Performance of Visifire Chart
#1
Posted 23 February 2012 - 08:47 AM
I have 10 to 20 dataseries in my chart. I'm fetching all the data from a live database and updating my chart every 3 minutes. At the end of the day or with a full day request chart has lets say: 20 dataseries each have 480 datapoint 480 x 20 = 9600 and sometimes more datapoints. When I load this much of data to the chart my whole program's performance goes down and including excluding dimensions, adding new refractions take like 15-20 seconds and freezes the program. I tried it with 4.5.1-0 stable trial yesterday too and I didn't see a major change.
Any suggestions for improving performance?
Edit: I wrote 4.5.2-0 stable instead 4.5.1-0
#2
Posted 23 February 2012 - 01:56 PM
Hi,Any suggestions for improving performance?
I have few queries regarding this matter.
1) Which chart type you are working with?
2) Whether you are working with WPF or Silverlight?
Eva
#3
Posted 23 February 2012 - 02:01 PM
Thanks for your response. I'm working with Silverlight and using line chart generally.
#4
Posted 23 February 2012 - 02:25 PM
Have you tried QuickLine chart?
Eva
#5
Posted 23 February 2012 - 03:00 PM
Edit: Link name
#6
Posted 23 February 2012 - 03:46 PM
#7
Posted 24 February 2012 - 06:27 AM
Well then the Line Chart would fit well for your requirement. I'm creating a sample demo app for you. I will tell you the tips to improve your application performance.I need the datapoint details and ToolTips.
#8
Posted 24 February 2012 - 06:44 AM
According to your requirement is it fixed that you need to work with 20 line graphs only for now?
Edited by mac, 24 February 2012 - 07:00 AM.
#9
Posted 24 February 2012 - 06:58 AM
The information you have requested can be found here : MultiChart Binding Post
I am not using DateTime axis my AxisXLabel values are also strings. I have a render as converter in a combobox which user can select graph type like column, stacked column etc. But line chart is the important one, the other charts performance are not crucial.
Edit: I saw you changed your post after my post.
#10
Posted 24 February 2012 - 03:12 PM
Well you might have noticed that we made few major changes in v4.5.x for better performance. Well previously DataPoints collection of a DataSeries was not a DependencyProperty. Now DataPoints collection in DataSeries is a DependencyProperty of type DataPointCollection.
Few important tips
#1: Performance will improve if you update a DataSeries as below.
/* Create new set of DataPoints */
DataPointCollection collection = new DataPointCollection();
for (int index = 0; index < MAX_NUMBER_OF_SERIES; index++)
collection.Add(new DataPoint() { YValue = value, AxisXLabel = "AxisXLabel”});
/* Directly set the new collection as DataPoints */
Chart.Series[0].DataPoints = collection;#2: When working with huge number of DataPoints, performance will decrease if you perform the following operation directly in DataPoints list of a DataSeries. So always follow Tip #1.
Chart.Series[0].DataPoints.Add( new DataPoint() { YValue =value, AxisXLabel = "AxisXLabel”});
// Or
Chart.Series[0].DataPoints.Remove(dataPoint);
// Or
Chart.Series[0].DataPoints.Clear();#3: Also note that setting LightWeight="true" in DataSeries will improve the performance drastically.
#4: Disable shadow by setting ShadowEnabled in PlotArea, Chart, Legend and DataSeries/DataPoints etc.
You are updating the chart data in every 3 minutes. I think Chart is taking time to render as you are trying to update all the DataSeries at once. I suggest you to update each DataSeries one by one with interval of 1 to 2 seconds under a DispatcherTimer.
Please checkout the attached example application along with this post. Here I’m working with 20 DataSeries having 480 DataPoints in each. On click of a button I’m refreshing the data present in ViewModel to update the chart.
Also please download the latest version of Visifire from the link below and try this application.
http://www.visifire.com/download_silverlight_wpf_controls.php
Regards,
Mac
Attached Files
#11
Posted 24 February 2012 - 03:19 PM
#12
Posted 27 February 2012 - 11:37 AM
I have a quick question. In your example app you are defining 20 dataseries in xaml code. My series differentiates between chart data. Therefore, I need to create and bind dataseries dynamically too. While I was trying to achieve this I have considered the information you gave me:
Well you might have noticed that we made few major changes in v4.5.x for better performance. Well previously DataPoints collection of a DataSeries was not a DependencyProperty. Now DataPoints collection in DataSeries is a DependencyProperty of type DataPointCollection.
But when I was binding dataseries' datapoints from code behind I couldn't find DataPointsProperty while I was trying
ds.SetBinding(Visifire.Charts.DataSeries.DataPointsProperty, <img src='http://www.visifire.com/forums/public/style_emoticons/<#EMO_DIR#>/cool.gif' class='bbc_emoticon' alt='B)' />;
Anything about how to bind dataseries datapoints programatically?
#14
Posted 28 February 2012 - 02:53 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users












