I have an unfinished project using the trial version on Visblox. I did not buy the licence since the performance was not good enough. Now Visiblox stopped support and so I am migrating to SciCharts. I have some questions though hope you can help.
-
The chart is DateTime,Double type, and there are multiply datapoints on some dates. When editing I need to delete particular points but the Remove method seems to remove all Y values for specific X value. So is it possible to remove a particular X,Y datapoint only from the chart?
-
I need to give each datapoint a name and I was using TextAnnotations on Visiblox (which had a datapoint property). However on SCIcharts the TextAnnotations does not have Datapoint property. How can I do this please?
-
I have 2 charts showing audio waveforms. One showing the full time and one showing a zoomed section. When I hit Play I need the zoomed chart to follow the music waveform. With Visiblox I was using a dispatcher timer and on every tick(20ms) I update the Xaxis range, however the performance was not very good.
What best method to use for SCI charts please?
- Julian Muscat asked 9 years ago
- You must login to post comments
Hi Julian,
Thank you for your enquiry! We don’t have any guides on specifically how to migrate Visiblox to SciChart, as ScIChart is a different product, and we are not Visiblox experts. That being said we welcome you to SciChart and are really pleased you like the performance of our WPF Charting software!
Regarding your questions:
-
As well as DataSeries.Remove, there is a DataSeries.RemoveAt overload, accepting an index. I would suggest using this
-
DataPoints are not supported in SciChart. We have omitted them deliberately as they tend to slow down the entire chart. As you have noted Visiblox cannot deliver high performance, and the data-model is one reason why. What you can do is set TextAnnotation.X1 and TextAnnotation.Y1 equal to the X,Y data value you wish to bind it to. That way the annotation will always track the data-point on the chart. We would also recommend limiting the amount of UIElement annotations on a chart, since these are WPF primitives and WPF is not very fast. One way of doing this is to show or hide ALL annotations depending on zoom level by removing or attaching the SciChartSurface.AnnotationCollection depending on SciChartSurface.VisibleRange.AsDoubleRange().Diff value.
-
We actually have a control which can do this for you. It’s called the SciChartOverview control. Also see our scrollbars API. Please see the following articles:
Scrolling a Chart with the SciChartOverview
Creating a Custom SciChartOverview with many series using Scrollbar API
Also see How to have a Fixed Scrolling Time-Range on the XAxis that works with Modifiers which shows how to update the XAxis to scroll to the latest portion of a waveform.
Best regards,
Andrew
- Andrew Burnett-Thompson answered 9 years ago
- You must login to post comments
Hi Julian,
Regarding your further questions:
-
600-2000 annotations should not be a problem. Please see our FAQ performance with many annotations where one user achieved 50,000 annotations on a SciChartSurface (albeit, slowly).
-
Regarding overview control zoom limit, this is intentional to prevent the grips overlapping. It can be adjusted via the property SciChartScrollbar.ZoomLimitProperty (default=20pixels).
To set this on an overview you will need to apply the style SciChartOverview.ScrollBarStyleProperty. I would recommend not setting this closer than ~5px. Here is the default SciChartOverview.ScrollBarStyle:
<Style TargetType="visuals:SciChartScrollbar">
<Setter Property="Orientation" Value="Horizontal" />
<Setter Property="GripsLength" Value="25" />
<!-- Adjust ZoomLimit to allow finer zooming -->
<Setter Property="ZoomLimit" Value="20"/>
<Setter Property="ViewportStyle">
<Setter.Value>
<Style TargetType="Control">
<Setter Property="Opacity" Value="0" />
</Style>
</Setter.Value>
</Setter>
<Setter Property="NonSelectedAreaStyle">
<Setter.Value>
<Style TargetType="Path">
<Setter Property="Fill" Value="{s:ThemeBinding Path=OverviewFillBrush}" />
</Style>
</Setter.Value>
</Setter>
</Style>
For more info on styling the scrollbar, please see the article SciChartScrollbar – per axis ScrollBars API
Hope this helps!
Best regards,
Andrew
- Andrew Burnett-Thompson answered 9 years ago
-
Thanks for this but I am trying to work it the other way round. Using the VisibleRangeChanged event, can I check the current zoom level, and if fully zoomed in then adjust the axis range to my default zoom?
- You must login to post comments
I am testing the sci-chart performance but noticed that I am having same issues like with Visiblox.
I have loaded the dataseries to the chart and zoomed in to a small portion by setting the Visible Range. Now I started a dispatcher timer and on every tick (10ms) I move the Xaxis range hoping for a smooth movement. However the movement is a little jerky especially if I move the mouse around. I have followed the timer ticks and noticed that some ticks are missing sometimes as much as 10 ticks. If I leave the mouse steady, the movement is quite smooth.
This is the code I am running on every Timer tick.
double sectemp = stopWatch.ElapsedMilliseconds;
VandC.posSeconds = prevposSeconds + (sectemp / 1000);
DateTime dtmp = dtmin;
TimeSpan drng = new TimeSpan(0, 0, VisCon.zoomRangeIn);
TimeSpan ttmp = TimeSpan.FromSeconds(VandC.posSeconds);
TimeSpan dtlo = ttmp.Subtract(drng);
TimeSpan dthi = ttmp.Add(drng);
dtmp = dtmp.AddSeconds(VandC.posSeconds);
posLabel.Content = dtmp.ToString("mm:ss.ff");
sciChartZoom.XAxis.VisibleRange.Min = dtlo;
sciChartZoom.XAxis.VisibleRange.Max = dthi;
sciChartZoom.XAxis.VisibleRangeChanged += TimeSpanAxis_VisibleRangeChanged;
- Julian Muscat answered 9 years ago
-
Hi Julian. DispatcherTimer has a priority, by default, this is quite low, which means if you move your mouse, or the CPU is busy, it will not tick! Please have a look at http://stackoverflow.com/a/14355200/303612
-
PS: I would strongly suggest a new post for each issue. If you have a look at the forum page, it is now quite a mess :) this is because we are following Q&A format, like StackOverflow. One question, multiple answers + comments.
-
Yes I think its better to separate questions. Anyway you suggestion works fine by setting DispatcherTimer priority to Render. Thanks!
- You must login to post comments
Thanks for support. So…
- Will try that later
-
I have an average of 600 Points with a maximum possible of 2000. Do you think these will effect performance?
Will post back about performance when coding is ready. -
Overview control work very good thanks. Only problem I have is that there is a limit to the zoom level (when moving sliders together) and I need it a little more zoomed in. Anyway around this please?
I was using DateTime axis and changed to TimeSpan axis but I still have a problem showing the minor ticks. I need minor ticks to show every 0.05 seconds – is this code ok?
<s:TimeSpanAxis MinorDelta="0:0:0.05" MajorDelta="0:0:0.50" TextFormatting="-mm\:ss\.ff" VisibleRangeChanged="TimeSpanAxis_VisibleRangeChanged"
DrawMajorGridLines="True" DrawMinorGridLines="True" DrawMajorTicks="True" DrawMinorTicks="True">
</s:TimeSpanAxis>
- Julian Muscat answered 9 years ago
-
Im answering again below. Note this is a Q&A format, votes up/down will move posts around!
-
So shall I post a new question instead of continuing on this thread? I think this thread might come in handy for other Visiblox users too.
-
Up to you, just note that Questions and Answers will get jumbled up if anyone up or down votes. The forum works exactly the same way as StackOverflow.com
-
Ok noted. So about showing minor ticks at 50ms, can you give some suggestions please?
- You must login to post comments
Please login first to submit.