Pre loader

Forums

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0 votes
12k views

I checked all the demos and examples and was unable to figure out if I can do a bar chart, similar to one on the picture. How difficult would it be to make SciChart look very close to attached?

Another question is possible to incorporate a slider on a bar chart? The slider is suppose to set a threshold to change bar color when signal is above it.

Thank you,
Sergey

0 votes
12k views

I need numAxis.MajorStartIndex = 1;

XValue is sequentially

 public class CustomAxis : NumericAxis
    {
        public override string FormatText(IComparable value)
        {
         ...
        }
    }
0 votes
0 answers
9k views

SciChart v1.3.5.1252 has been released, which includes two bug-fixes that have been reported in the forums. Please download this update if you are experiencing either of these issues.

Fixes

  • Fixed a bug when the surface is empty when first dataseries has no points
  • Fixed an issue which appears when removing the last series/axis in an MVVM application, where CPU goes to 100%
0 votes
11k views

Hi,

I need to accomplish the next scenario:
i have a real time financial graph that looks like the one in the attached screenshot.
The captured position of the graph is perfect, it has 4 ticks and the series is positioned in the middle.

i have done this by defining the following YAxis:

YAxis = new NumericAxis
{
AutoTicks = true,
MaxAutoTicks = 4,
Id = "YAxisID",
TextFormatting = "#.######",
TickTextBrush = Brushes.White,
BorderBrush = Brushes.Black,
AxisTitle = "Rates",
AxisAlignment = AxisAlignment.Left,
DrawMajorGridLines = true,
DrawMinorGridLines = false,
BorderThickness = new Thickness(2, 2, 2, 2),
//MinorDelta = 0.00001,
//MajorDelta = 0.0001,
AutoRange = true,
AutoAlignVisibleRange = true,
GrowBy = new DoubleRange(2, 2)

  };

now, the problem is that i have MaxAutoTicks set to 4, but because the chart is dynamic and changes dynamically from a delta of 0.0001 to 0.001 (for example), the number of ticks always changes from 1 to 4 and the chart is zooming in and out…
what i need is to set the number of ticks to a fixed number of 4 and that the series will always be in the middle as in the screenshot and not zoomed in and out all the time – the only thing that can be changed are the values of the ticks of the Y axis…is that possible to accomplish?

Thanks,

Alex

0 votes
11k views

I am considering applying server-side licensing for my javerScript application.

In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)

However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)

I wonder if there is a sample code implemented in C++ for server-side licensing.

Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?

  • dwaldo asked 12 years ago
  • last active 2 years ago
0 votes
9k views

Whenever possible I like to do simple UI related things such as changing the MouseWheelZoomModifier direction from Xaml.

My first attempt at this was to use DataTriggers on the MouseWheelZoomModifier bound to check boxes as such.

That did not work so I switched it to this. Radio buttons for mutually exclusive selection…

<StackPanel Orientation="Horizontal">
<RadioButton x:Name="xDirection"
Margin="5,3"
IsChecked="{Binding ElementName=mouseWheelZoomModifierX, Path=IsEnabled}"
Content="Zoom X Only" />

            &lt;RadioButton x:Name=&quot;yDirection&quot;
                      Margin=&quot;5,3&quot;
                      IsChecked=&quot;{Binding ElementName=mouseWheelZoomModifierY, Path=IsEnabled}&quot;
                      Content=&quot;Zoom Y Only&quot; /&gt;

            &lt;RadioButton x:Name=&quot;xyDirection&quot;
                      Margin=&quot;5,3&quot;
                      IsChecked=&quot;{Binding ElementName=mouseWheelZoomModifierXY, Path=IsEnabled}&quot;
                      Content=&quot;Zoom X&amp;amp;Y&quot; /&gt;

And three separate zoom modifiers…

<SciChart:MouseWheelZoomModifier x:Name="mouseWheelZoomModifierX"
IsEnabled="False"
XyDirection="XDirection" />
<SciChart:MouseWheelZoomModifier x:Name="mouseWheelZoomModifierY"
IsEnabled="False"
XyDirection="YDirection" />
<SciChart:MouseWheelZoomModifier x:Name="mouseWheelZoomModifierXY"
IsEnabled="True"
XyDirection="XYDirection" />

Am I missing something with the Triggers? If not this is working fine, it just seems like an odd way to do it…

0 votes
14k views

Hi, currently in my application, when mouse over the data point, the line will be selected. If mouse over the line, the line will not be selected. Is there any way to know that the line is mouse over and make the line selected?

  • sim asked 12 years ago
0 votes
14k views

Hi,

I’m wondering if it’s possible to create a candlestick chart with “real-time” values.

For Example:
I want to create a chart with 8 x values and constantly changing y values (about once a minute). Is there a way to change the y value of these bars (Currently, I’m “deleting” all of them and draw the new ones afterwards – guess that’s not the best option?)

Thanks in advance!

Regards,
Intercept

0 votes
0 answers
9k views

Check out the following blog post showcasing the upcoming features in SciChart v1.5!

SciChart v1.5 Beta Preview

The release date is “Q4” – we anticipate being ready for full release by end Oct / early November. Contact us if you’re interested in any of the new features and want a beta version!

0 votes
10k views

I am considering applying server-side licensing for my javerScript application.

In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support-dev.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)

However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)

I wonder if there is a sample code implemented in C++ for server-side licensing.

Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?

1 vote
15k views

As the topic asks: is this able to run in linux? or has anybody gotten this to run under Linux or android?

  • rippie asked 12 years ago
  • last active 9 months ago
0 votes
7k views

Hello!

In your example of RolloverMoodifier on Candlestics there are only four fields in tooltip (Highest, Open, Close, Lowest).

These are all available fields? Because it’s quite useful to place on tooltip CloseTime and Volume. Of course I can see volume on VolumeChartPanel and calculate CloseTime by myself, but when there are many candlesticks on ChartPanel it’s uncomfortable to do.

0 votes
12k views

I have a chart that is graphing multiple DataSeries. I’m trying to create a sort of “legend” on my chart which essentially works like this
example except no rolling over is necessary and it always just displays the most recent value. Any suggestions? Is there a good way to get the most recent value out of a DataSeries to bind to?

Thanks,
Alex

0 votes
14k views

Hi

Looking through the help file I’m assuming SciChart doesn’t provide any “out of the box” printing functionality? I haven’t attempted printing in WPF yet, so before I crack open my “Pro WPF” book I wondered if you had any code samples or pointers for printing a chart? I’m using MVVM if that makes a difference.

Thanks in advance
Andrew

0 votes
10k views

Hi, I’m just getting started with my trial of SciChart, and so far I think it’s very nice. I’ve added a FastCandlestickRenderableSeries to the SciChartSurface, and it seems to be working as expected, but I’m wondering if there’s a way to change the width of each individual candle? I know the FastCandlestickRenderableSeries has a Width property, but changing its value seems to have no effect on anything. Just to clarify, I’m only trying to change the width of the individual candles, I’m not trying to fit more candles on the chart. Thanks!

Edit: I’ve also noticed in the code-behind that FastCandlestickRenderableSeries has a property called ‘ActualWidth’, and its value always seems to return as zero. I’m not sure if that means anything to anyone, but I thought I’d add that.

1 vote
17k views

I want some specific behavior out of my X and Y axes. Right now I have custom code which modifies the ranges for the axes to get the behavior I want. It would be nice to just do this by setting options on the axes.

For my Y axis I want to use the AutoRange feature but the default seems a little crowded. Instead of it ranging to the min and max of the data series I want it to show a little room on the top and bottom.

For the X axis I want to show exactly the most recent hour of data.

Thanks for any help.

  • dlee asked 12 years ago
0 votes
14k views

I am trying to display data values on mouse move as displayed by green rectangle in attached image. Values displayed are not correct. I use following logic to calculate point values on mouse move.

internal void UpdateCoordinates(System.Windows.Point point)
{
double xD = xAxis.MajorDelta;
int xDecimals = 1;
if (xD < 1)
{
xDecimals = (int)Math.Round(Math.Abs(Math.Log10(xD))) + 1;
}

        double x = Math.Round(xAxis.GetCurrentCoordinateCalculator().GetDataValue(point.X), xDecimals);

        double yD = yAxis.MajorDelta;
        int yDecimals = 1;
        if (yD &lt; 1)
        {
            yDecimals = (int)Math.Round(Math.Abs(Math.Log10(yD))) + 1;
        }

        double y = Math.Round(yAxis.GetCurrentCoordinateCalculator().GetDataValue(point.Y), yDecimals);

        coordinates.Visibility = System.Windows.Visibility.Visible;
        coordinates.Content = string.Format(&quot;({0},{1})&quot;, x, y);
    }
2 votes
14k views

Hi

Has anyone implemented or has any thoughts on how to implement keyboard shortcuts to zoom and pan? Something like key up/down/right/left to pan and shift+up/down/right/left to zoom?

0 votes
11k views

Hi,

Is there any functionality to only increase the YAxis VisibleRange when the displayed data exceeds the initial VisibleRange?

Example: I’ve set the initial VisibleRange of the YAxis to min=0.0 and max=10.0. I don’t want the chart to AutoRange, because this range should be always visible even if the displayed values are smaller. But I want the VisibleRange to be increased by the set GrowBy value if the displayed data is smaller or higher than the initial range.

Is there any built-in functionality or do I have to care about that myself inside of the ViewModel?

Thanks!

0 votes
10k views

Hi,

I’m binding SciChart to a ViewModel in the following way:

<sciChart:SciChartSurface DataSet="{Binding Path=ChannelDataSet}"
RenderableSeries="{Binding Path=ChannelSeries}"
XAxis="{Binding Path=TimeAxis}"
YAxes="{Binding Path=YAxisCollection}" />

The YAxisCollection contains three IAxis objects with three different VisibleRanges. The problem is that the set VisibleRanges are ignored by the chart while setting AutoRange to false. I get three Y-Axis on the chart, but the VisibleRange seems to be automatic. What am I doing wrong in my Bindings?

I attached a sample project that points out the issue!

Thanks

0 votes
10k views

Hi
Is there a way to change the color or shape of a datapoint according to a metadata tag? or “extra details”?

for example – a regular value is a red ellipse, but when an offline value is received (or any other info that arrived with the datapoint besides x value and y value) i want the datapoint of that (x,y) value to be a cross or a rectangle…

Thanks,
Alex

0 votes
13k views

Hi guys,

I purchased sci chart recently and have been using it in our trading applications. We have a requirement to produce some reports around our activity that are not numeric or date time on the x-axis.

I assumed sci chart would be able to handle text on an axis but it seems that it cant. Is there any work around to this?!

We really do not want to have to buy another charting package just to produce some simple charts and we love sci chart for everything else…

0 votes
9k views

I’m trying to plot a FIFO series but nothing is rendering. I’m using a timer to append a new point to the series every 0.5 seconds – the X-value is simply an incrementing integer, while the Y-value often stays the same, or might change once every few seconds or so. I would therefore have expected to see a flat-line being plotted, or a “staircase” pattern (in the latter scenario), but I get nothing at all. It uses a timer and continuously appends the same Y value (line 38 in MainWindow.xaml.cs) – I don’t see anything being plotted on the chart. If I comment out that line and uncomment the one above it (to generate random Y values), then the chart does plot.

If I randomly generate the Y-value then it does plot – it’s as though the FIFO chart/series only works if each newly appended Y-value is different from the previous one? Is this expected behaviour or a problem?

Thanks in advance
Andrew

0 votes
12k views

Hi,

I would like to select different themes using MVVM.
Do you have an example how to do this?

Thanks,
Egbert

0 votes
11k views

I’ve been asked to design a UI that will act rather like some image viewers that you see on the web these days – we want to display a list of small chart “thumbnails” (with horizontal scrolling), and when one is clicked have it display at a larger size. Worst case scenario I see there being a dozen charts, each with varying complexity (a single series with a few points, up to several series/hundreds of points and maybe a couple of custom modifiers too).

These charts will be generated each time the user clicks on a cell in a datagrid (elsewhere in the window), so performance may or may not be an issue (although it could of course be done on a background thread).

Should I just be able to render and add all these charts to the ItemsControl (or whatever I use for the scrolling) or will performance suffer having many charts on screen at once? Would there be any benefit to rendering the charts to bitmaps, and using these as the thumbnails (I guess there would be more overhead in doing this)? I suspect the answer may be “try it and see”, but wanted to run it by you first.

Thanks in advance
Andy

0 votes
19k views

The topic title speaks for itself. Will SciChart ever support non-Sci types like the pie chart?

Thanks…

  • RMittelman asked 11 years ago
  • last active 6 years ago
1 vote
16k views

I like the BlackSteel theme for the data chart, but like to modify a little bit of it. Is there a way for me to use the blackSteel theme that come out of the box as a start, and customize it a little to meet our customer’s needs?

Thanks,

  • JaneZ asked 11 years ago
  • last active 9 years ago
2 votes
12k views

Hello support team,

Im looking for a way to use keys to navigate through values in the graph. The rollover provides this easily with the mouse.
I include the rollovermodifier and the template I have. Do you have an idea how to do this? I just need to navigate left and right with the cursors. Any input or idea is extremely welcome.
Thank you very much for your great support

Marcel

0 votes
12k views

Hi. Apparently I need the SciChartSurface object in order to print. I’m living in the MVVM world and I’m currently binding the surface’s DataSet to my viewmodel. How can I get the same data to my paginator for printing? I can get a scichartsurface object to my paginator but currently I’m having to create a second object with all my viewmodel data in it, which seems somewhat inefficient – not to mention awkward.

Thanks for any guidance.

  • BowIT_Andy asked 11 years ago
  • last active 8 years ago
0 votes
0 answers
9k views

A BETA edition of the upcoming SciChart v1.5 can be downloaded on the Downloads page.

Please read the release note which contains upgrade instructions from v1.3.x. Existing customers can be upgraded for free to SciChart v1.5 Premium Edition by contacting us with your license key. Trial users will be able to use the Beta for 30-days.
<br/>

SciChart v1.5.0.1604 Beta What’s New

  • UIElement Annotations
  • CategoryDateTimeAxis re-write
  • OverviewControl re-write.
  • MVVM Series API.
  • New SciStockChart Control
  • Added SciChartGroup Control
  • Added FastBandRenderableSeries
  • CursorModifier Improvements
  • Added PaletteProvider property to BaseRenderableSeries. Enables overriding of data-point colors when rendering. E.g. color individual points, candles or columns.
  • YAxisDragModifier may now be used when YAxis.AutoRange = true, by setting the ResizeMode=Relative/Absolute. In AbsoluteMode the YAxisDragModifier sets the VisibleRange of the axis, which is overwritten by AutoRange. In RelativeMode, the modifier sets the GrowBy, causing a margin above/below the maximum of the chart and can be used in conjunction with AutoRange.
  • DataSeries API Refactor
  • Alpha Blending of MountainSeries, Column Charts. These series now alpha blend so if you have a MountainSeries or ColumnSeries over a LineSeries the underlying series show through.
  • Source code customers: SciChart is now a single csproj, no need to include Abt.Licensing and WriteableBitmapEx. In addition we have made a number of improvements for source code customers, such as ability to strip out licensing and deploy entirely safe code (No Unsafe) for use in partial trust environments such as Bloomberg Terminal via conditional compilation pre-processor statements and provided a VS2012 solution as well as VS2010.
  • Implemented 30-day Trial. SciChartís Terms & conditions are changing. The trial duration will be 30-days and licensed per-machine. Of course, if you need more time weíd be happy to extend your trial! License keys have also changed. Contact us to upgrade your key from v1.3 to v1.5.
  • Fixed binding errors in CursorModifier and RolloverModifier, improving performance of both cursors.
  • Fixed Logarithmic Y-Axis crash when switching from Linear to Logarithmic mode and back.
  • Fixed memory leaks when themes are changed.
  • Fixed memory leaks when a SciChartSurface is loaded/unloaded.
  • Fixed axis/label flickering when SciChart is used under .NET4.5
  • Fixed Candles/OHLC bars too closely spaced in CategoryDateTimeAxis.
  • In WPF – Fixed MVVM binding silently failing to AxisCollection, RenderableSeries, VisibleRange when SciChartSurface is used inside an DataTemplate/ItemTemplate. In Silverlight, these issues can be resolved via workaround. Contact us if you experience them.
  • Fixed crash bug when zooming using RubberBandXyZoomModifier and YAxis.FlipCoordinates=true is set.
  • Fixed axis ticks getting shifted if BorderThickness is used
  • Fixed DataSeriesSet.Insert not firing SeriesUpdated event
  • Fixed DateTimeAxis.MaxAutoTicks doesnít work
  • Fixed YAxis.AutoRange calculation when OHLC or Candlestick charts are used. Now uses the high/low of candles not the close to compute VisibleRange.
  • Added exception message if AxisBase.AutoTicks=false but major, minor deltas are not set
  • Fixed AxisBase.IsPrimaryAxis, now set correctly when multiple axes are used. The primary axis draws gridlines others don’t.
  • Fixed Column series rendering issues when series contains negative values.
  • Fixed a bug where SciChartSurface is empty when first dataseries is empty.
  • Fixed DataSeries.Clear crash (rare race condition) when updating the chart in a separate thread.
  • Created eleven new examples
  • All examples now have descriptions
  • Example homepage updated to show features via icons
1 vote
10k views

Hi again!

I have an AnnotationCollection returned from my ViewModel which the SciChartSurface.Annotations binds to

<scichart:SciChartSurface Annotations="{Binding OccurrenceAnnotations}" />

The annotations are generated from a list of objects returned by the model. These objects contain a property which dictates what the annotation should look like (basically a different coloured box)

var annotations = new AnnotationCollection();

foreach (var occ in source)
{
    // what to do with the occ.EventType enum???
    annotations.Add(new TextAnnotation { X1 = occ.Time, Y1 = 0, ToolTip = MySpecialOccurrenceViewModel.Create(occ)  });
}

Can you point me at how I go about defining the template and applying it to the annotations?

ThankYouThankYouThankYou.

AC

1 vote
16k views

Hi,

The new annotations looks great.
How can I add 2 vertical line annotations by code (mvvm)?
When on screen, how can I get the values of the two lines back in the viewmodel so I can display/calculate x and Y values of the chart?

Thanks…

0 votes
14k views

Hi,
We are trying to initialize SciChart on application startup by calling SciChartSurface constructor. But it takes to much time, several seconds. It is seems to be that the problem is in a license check that takes to much time. Could you please check on this issue. Please find attached performance profiler session screenshot.

  • yanr1984 asked 11 years ago
  • last active 4 years ago
2 votes
14k views

attachment is one type chart used in our product. could the sciChart implement this functions?

great thanks.

  • darkgone asked 11 years ago
  • last active 8 years ago
0 votes
10k views

Hi,

We are using SciChart with 4 dataseries inside.
We also display 4 axis at the side.
We like to move one of the series up or down, so we can set it on top of another serie for easier compare.
At the moment, if we move it by dragging the Yaxis, only the max or the min value will change, so the view will change (Ymax – Ymin will be different everytime).

Is there are way to move the serie up or down and keep the size the same (so Ymax – Ymin) will be the same?

Thanks…

0 votes
13k views

Hi,

I have 4 or 8 series on screen and I want to select 1 of them to display some info about it.

How can I use the SeriesSelectionModifier with MVVM and also change the color of the selected serie.
Is it also possible to get an event when the selection has been changed?

I started with:

SeriesSelectionModifier seriesSelectionModifier = new SeriesSelectionModifier();
this.ChartModifier.ChildModifiers.Add(seriesSelectionModifier);

But don’t know how to continue.

Thanks in advance,
Egbert

  • EJansen asked 11 years ago
  • last active 6 years ago
0 votes
9k views

Hello Andrew,

when zooming a graph only 1 series is rendered (in this case). I have added a simple project that you can easily test. The values are loaded from xml files to simplify. I know it depends on the values but cant really understand what happens.
I had this issue before and waited for the new version to see if it solved. The behavior is exactly the same.

Thank you very much for your support

Marcel

0 votes
10k views

Hello,

I am evaluating SciChart and have been very impressed so far with the power and ease of use.

I have a need to plot a single series Mountain style chart with 64K data points and then update around 10 times a second. The X values are fixed, the Y values may vary from update to update.

Is there a way to prevent redraws while I am updating the data in the series (planning on using a loop calling dataSeries.Update(TX, TY) for each point unless you can suggest a better way)

Thanks and Kind Regards

Mark

2 votes
11k views

Good afternoon,

In the project Im working I need to save the annotations created so I can load generate them when the graph is generated.
I have tried to serialize them but maybe because its obfuscated I get an exception I try serialization:
There was an error reflecting type ‘Abt.Controls.SciChart.LineArrowAnnotation’
inner exception: There was an error reflecting property ‘InputBindings’.
Do you have an easy solution for this?

I would like to ask if its possible to have such a feature included, a method that would return the xml of the current state of the object.
or the list of minimum properties needed for annotation base:
X1, X2, Y1, Y2, YAxisId

then each different annotation type has different properties, thats why serialization would be extremely useful in this case.

Thank you for your attention

0 votes
14k views

Hello,

I do not seem to be able to have a scrolling Date/Time axis show seconds (or anything except hh:mm) regardless of what values I use for TextFormatting and SubDayTextFormatting.

Everything else works/displays as expected

My X axis XAML looks like:

<SciChart:SciChartSurface.XAxis>
<SciChart:CategoryDateTimeAxis TextFormatting=”MM/dd/yy” GrowBy=”0.1,0.1″ SubDayTextFormatting=”hh:mm:ss” AutoRange=”True” />
</SciChart:SciChartSurface.XAxis>

Many Thanks for your help

Mark

.NET 4.5, Win 7 SP1, VS2012

0 votes
9k views

I have four basic line charts that are next to a storyboard animation. Basically when I press run, I draw a vertical line through each chart that moves based on the elapsed time of the animation. The point is to show where in the time-axis the current animation frame is occurring.

I was using Windows.Controls.DataVisualization.Tookit but when drawing the four lines my animation would become choppy. I tried implementing with SciChart and find the performance is just as bad. Any tips? It was my understanding this would be a great improvement.

My approach is just to have two FastLineRenderableSeries per chart, and every time the animation traps in the Storyboard_CurrentTimeInvalidated, I clear the 2nd series(that only has 2 datapoints) and do a series.append at the coordinates of the line. If I disable the lines, it runs fine, and if I switch tabs on my application so the charts are hidden(but lines are still being drawn), it runs fine.

Thanks.

1 vote
10k views

Hi,

I’m evaluating charts and would like to know if SciChart supports selection of data points. More details:
1. Multiple selection with CTRL and Shift
2. Visual styleable feedback showing which points are selected

Regards,
Fredrik

0 votes
9k views

I am considering applying server-side licensing for my javerScript application.

In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)

However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)

I wonder if there is a sample code implemented in C++ for server-side licensing.

Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?

0 votes
9k views

Is this possible to have multiple charts stacked and bind the rollovermodifier have them working in unison?

1 vote
13k views

I am trying to use a line series to display digital values (0,1) Is it possible to have the line series remain at 1 if there is no data after the reading until it reaches the next value read. Currently the line goes to 1 and then starts to fall until it reaches zero as there is no data to tell it otherwise

0 votes
10k views

Hi!

I am using a custom modifier written guided by the example in http://http://www.scichart.com/extending-scichart-with-text-annotations-and-screenshots/

However, I am running mvvm and have an Annotations dependency property in my modifier.

However, when the Annotations property in my viewmodel is changed, the modifier does not redraw itself. I have to do something else, like switch over to another tab and then back again for the new annotations to appear.

Any ideas to how I can get the modifier to draw the new annotations?

0 votes
0 answers
9k views

It’s finally here! After what seems like ages of development and testing, we are pleased to announce SciChart v1.5.

As of today, you will be able to download v1.5.0.1694 on our Downloads page.

You can find a quick run-down of the features here:

Features at a glance:

  • Complete re-write of CategoryDateTimeAxis, enabling smooth interactive real-time stock charts
  • Annotations API for dynamic and static UIElement annotations
  • New series types, BandSeries, ImpulseSeries
  • New MVVM API to assist with adding/removing series dynamically
  • New SciStockChart control to bundle all our stock charting knowledge into one user control
  • Complete re-write of Overview control to zoom and pan a chart
  • Override bar colors using IPaletteProvider interface and BaseRenderableSeries.PaletteProvider property
  • Override Axis label formatting using ILabelFormatter interface and AxisBase.LabelFormatter property
  • Many many bug fixes and minor enhancements (too many to list!)

Full release notes with bug-fixes and features added since the beta can be found at Downloads page.

0 votes
14k views

Hello chaps. I’ve modified the examples found in the “Offscreen rendering” post to scale a chart for printing, works great for my line serieses. I’ve made it nice and generic because I was hoping to just hand over a second chart with the other type of series being used – a FastMountainRenderableSeries, but whilst that looks great on the screen, none of the points render when it’s printed. The surface itself does, but not the data in the series. I’ve created a UserControl:

<UserControl x:Class="SciChart.MultiAxes.View.Charting.MyChartView"
             xmlns=" http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
             xmlns:x=" http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:mc=" http://schemas.openxmlformats.org/markup-compatibility/2006"  
             xmlns:scichart=" http://schemas.abtsoftware.co.uk/scichart" 
             xmlns:utilconv="clr-namespace:MyUtility.Converters;assembly=MyUtility"
             xmlns:d=" http://schemas.microsoft.com/expression/blend/2008"  >
    <Grid>
        <scichart:SciChartSurface x:Name="sciChartSurface" Background="White" scichart:ThemeManager.Theme="Chrome" DataSet="{Binding HistogramData,Mode=TwoWay}">
            <scichart:SciChartSurface.RenderableSeries>
                <scichart:FastMountainRenderableSeries SeriesColor="Black" AreaColor="Black" />
            </scichart:SciChartSurface.RenderableSeries>

            <scichart:SciChartSurface.XAxis>
                <scichart:NumericAxis AxisTitle="Standard Deviation" DrawMinorGridLines="False" DrawMinorTicks="False" >
                    <scichart:NumericAxis.VisibleRange>
                        <scichart:DoubleRange Min="-6.000" Max="6.000" />
                    </scichart:NumericAxis.VisibleRange>
                </scichart:NumericAxis>
            </scichart:SciChartSurface.XAxis>

            <scichart:SciChartSurface.YAxis>
                <scichart:NumericAxis AxisAlignment="Left" AutoRange="True" DrawMinorGridLines="False" DrawMajorGridLines="False" />
            </scichart:SciChartSurface.YAxis>

            <scichart:SciChartSurface.ChartModifier>
                <scichart:ModifierGroup>
                    <scichart:RubberBandXyZoomModifier IsXAxisOnly="True" />
                    <scichart:ZoomExtentsModifier ExecuteOn="MouseDoubleClick" />
                </scichart:ModifierGroup>
            </scichart:SciChartSurface.ChartModifier>

            <scichart:SciChartSurface.Annotations>
                <scichart:VerticalLineAnnotation VerticalAlignment="Stretch" ShowLabel="False" Stroke="#bb27AAE1" StrokeThickness="2" X1="4" Y1="0" />
                <scichart:VerticalLineAnnotation VerticalAlignment="Stretch" ShowLabel="False" Stroke="#bb27AAE1" StrokeThickness="2" X1="-4" Y1="0" />
                <scichart:TextAnnotation Text="{Binding StandardDeviation,StringFormat=Standard Deviation: {0}}" X1="0.000" Y1="0.000" CoordinateMode="Relative" HorizontalAnchorPoint="Left" VerticalAnchorPoint="Top" AnnotationCanvas="AboveChart" FontSize="12" FontWeight="Normal" Foreground="#ff000000"/>
                <scichart:TextAnnotation Text="{Binding ExceedanceCount,StringFormat=Number of Exceedances: {0}}" X1="0.000" Y1="0.050" CoordinateMode="Relative" HorizontalAnchorPoint="Left" VerticalAnchorPoint="Top" AnnotationCanvas="AboveChart" FontSize="12" FontWeight="Normal" Foreground="#ff000000"/>
                <scichart:TextAnnotation Text="{Binding Kurtosis,StringFormat=Kurtosis: {0}}" X1="0.000" Y1="0.100" CoordinateMode="Relative" HorizontalAnchorPoint="Left" VerticalAnchorPoint="Top" AnnotationCanvas="AboveChart" FontSize="12" FontWeight="Normal" Foreground="#ff000000"/>
            </scichart:SciChartSurface.Annotations>
        </scichart:SciChartSurface>

    </Grid>
</UserControl>

And the interesting parts of the code:

    <pre class="brush: csharp; gutter: true; first-line: 1; highlight: []; html-script: false">

public partial class MyChartView : UserControl, IPrintChart
{

// …

    public void Prepare(Rect renderBox)
    {
        this.BeginInit();
        this.Width = renderBox.Width;
        this.Height = renderBox.Height;
        this.sciChartSurface.OnLoad();
        this.EndInit();
        this.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
        this.Arrange(renderBox);
        this.UpdateLayout();
    }

Then in my VM:

        private readonly IPrintChart _chart;

        public Visual GetPage(int pageNumber)
        {
            var transformedVisual = new DrawingVisual();

            if (pageNumber == 0)
            {
                this._chart.Prepare(new Rect(0d, 0d, this.PageSize.Height, this.PageSize.Width));
                var sourceBitmap = BitmapUtility.ExportElementToBitmap(this._chart.AsFrameworkElement());
                var targetBitmap = new RenderTargetBitmap((int)this.PageSize.Width, (int)this.PageSize.Height, sourceBitmap.DpiX, sourceBitmap.DpiY, PixelFormats.Default);
                var finalTransform = new TransformGroup();

                // prepare the transform
                finalTransform.Children.Add(new RotateTransform(-90d));
                finalTransform.Children.Add(new TranslateTransform(0, this.PageSize.Height));

                // use an image control to manipulate and layout using canvas
                Image rotatedImage = new Image { Stretch = Stretch.None, Source = sourceBitmap, RenderTransform = finalTransform };
                Canvas container = new Canvas();

                container.Children.Add(rotatedImage);
                container.Arrange(new Rect(0d, 0d, sourceBitmap.PixelWidth, sourceBitmap.PixelHeight));
                // render into final bitmap
                targetBitmap.Render(container);

                // finally, draw the image into the outgoing visual object
                using (DrawingContext drawingContext = transformedVisual.RenderOpen())
                {
                    drawingContext.DrawImage(targetBitmap, new Rect(0d, 0d, this.PageSize.Width, this.PageSize.Height));
                }
            }

            return transformedVisual;
        }

(You might recognise large chunks of it ;->)

I’ve got a whole standalone demo project (in fact an updated version of the project you’ve already seen for the multi-axis scaling example) but it’s a bit too domain-specific to put into the public’s hands as it is so I’ll email it if useful???

The data I pass into the control for print is a copy of the one used for displaying, so it isn’t a problem with the points/series being tied to a different surface, in case you wondered … ???

This is v1.5 beta in VS 2012 on Windows 8 x64.

Thanks for your help,
AC

0 votes
10k views

Hello,
I’m using the latest release version of SciChart (v 1.5.1694). And now I have a problem which didn’t appear in v 1.3. I want to add FastLineRenderableSeries dynamically to the ChartPanel.
Something like this:

var series = dataSet.AddSeries();
var fastLineSeries = new FastLineRenderableSeries { DataSeries = series, StrokeThickness = 1 };
ChartSurface.RenderableSeries.Add(fastLineSeries);

Then I append values to this series. The X values are shifted from left border of ChartPanel (X axis is CategoryDateTimeAxis and candlesticks starts for example from 10:55 and my series from 11:40), but it appears on ChartPanel that this serie starts right from left border.
I can’t remember that I change something in this part of my code when upgrading from 1.3 to 1.5 and I can’t understand why this happens.
Do you have any suggestions?

Thank you.

  • Vasile asked 11 years ago
  • last active 6 months ago
0 votes
10k views

Hello all and good morning,

I have a normal graph with values on the x axis. in the data structure each of this x values has also a time.
Can you help me finding the best approach for this?
the request is to include this value in the rollover tool tip, but maybe I can also accomplish this with an event for a mouse button (hit test) finding the closest x value and return the time right? how would you show this value in the graph like a tooltip or something temporary?

Thank you very much for your comment and ideas.
Marcel

  • Marcel asked 11 years ago
  • last active 2 years ago
Showing 51 - 100 of 4k results