Slow performance with too many data points - Latest Visifire v4.5.x is 2x faster now
#1
Posted 30 November 2011 - 10:27 PM
I works on the Visifire Chart under Silverlight. In my work, I need to chart 3 data series and each series contains about 1 year X 24 hours data (8760 data points). I generated a data.xml to contains those data in file. However, it is very slow to load the chart.
1. How can I improve the loading speed?
2. I don't want to display the entire data in chart plot area (8760 data points in chart window) instead that I only want to display 168 data points in current chart area. How can I do it in my chart settings?
Regards,
Mike Lu
#2
Posted 01 December 2011 - 03:59 AM
Which version of Visifire are you using? Can you please try using Visifire 4.5.0-2 and see.
Regards,
Vivek
Team Visifire
#3
Posted 01 December 2011 - 04:47 PM
I just bought the license and it is version v4.1.4.0. I test the beta version 4.5.0-2 and it is much better. By the way, how can I set the initial chart to display only 144 points with horizon scroll bar instead of displaying all 8760 points in plot area.Mike,
Which version of Visifire are you using? Can you please try using Visifire 4.5.0-2 and see.
#4
Posted 01 December 2011 - 08:21 PM
#5
Posted 02 December 2011 - 04:09 AM
Zoom() method is working fine here. Can you please provide the test case for the issue you are facing?
Regards,
Vivek
Team Visifire
#6
Posted 02 December 2011 - 07:52 PM
Attached Files
#7
Posted 05 December 2011 - 04:33 AM
If you want to zoom at initial render, you have to do it inside Rendered event of chart.
Example:
vChart.loaded = function(args)
{
chart = args[0];
// Attach an event handler with the chart for Rendered event.
chart.Rendered = function(sender, eventArgs)
{
setTimeout("Zoom()", 150);
};
};
Regards,
Vivek
Team Visifire
#8
Posted 05 December 2011 - 10:52 PM
#9
Posted 06 December 2011 - 03:52 AM
Regards,
Vivek
Team Visifire
#10
Posted 06 December 2011 - 12:17 PM
#11
Posted 06 December 2011 - 01:35 PM
Regards,
Vivek
Team Visifire
#12
Posted 06 December 2011 - 03:33 PM
Attached Files
#13
Posted 07 December 2011 - 05:38 AM
We are not able to reproduce the issue with the above code that you have provided. Can you please provide us the exact test case to reproduce the issue?
Regards,
Shoaib
#14
Posted 07 December 2011 - 05:43 PM
http://69.199.86.170...ightApp001.html
The version of Visifire Chart I tested is visifire_v4.5.0-2_trial. I tested in version visifire_v4.1.4-0_ent and got the same problem.
#15
Posted 08 December 2011 - 04:17 AM
I have found the problem you are facing. Actually this is happening due to the max PlotArea size set inside the chart. Whenever you zoom the chart, PlotArea size increases and render the DataPoints with the new size. In Silverlight, a Panel or any other UIElement doesn't behave properly when it's width or height increases to a particular limit. You can reproduce this by using a Canvas and putting a Line inside it. Then try to set the canvas Width above 32000, you will see the weird behavior. Due to this reason only, we have fixed a max PlotArea size in chart. So the PlotArea size will not increase beyond this limit while zooming.
Regards,
Vivek
Team Visifire
#16
Posted 08 December 2011 - 10:58 PM
Is there any way to fix such issue?
#17
Posted 09 December 2011 - 07:02 AM
In this case, I would suggest you a workaround. You can attach MouseLeftButtonDown and MouseLeftButtonUp events on PlotArea. Inside the event handler, you will get XValue and YValue as events arguments. So while zooming you can find out the min XValue (on mouse down) and max XValue (on mouse up) of the mouse position using which you can further find out the DataPoints lying under that XValue range. Once MouseLeftButtonUp event on PlotArea fires, you can render the chart with those new set of DataPoints.
In order to know how to attach mouse events on PlotArea and get the XValue as event argument, please check documentation sample here.
Regards,
Vivek
Team Visifire
#18
Posted 27 January 2012 - 05:53 PM
#19
Posted 30 January 2012 - 04:59 AM
You can check the Axis's ScrollableLength property inside OnZoom event.
void Axis_OnZoom(object sender, AxisZoomEventArgs e)
{
if ((sender as Axis).ScrollableLength != oldScrollableLength)
{
// Axis Labeling code goes here
oldScrollableLength = (sender as Axis).ScrollableLength;
}
}
Double oldScrollableLength = 0;
If ScrollableLength is not equal to oldScrollableLength, then only execute Axis labeling code.
Regards,
Vivek
Team Visifire
#20
Posted 30 January 2012 - 04:46 PM
JTyler,
You can check the Axis's ScrollableLength property inside OnZoom event.
void Axis_OnZoom(object sender, AxisZoomEventArgs e) { if ((sender as Axis).ScrollableLength != oldScrollableLength) { // Axis Labeling code goes here oldScrollableLength = (sender as Axis).ScrollableLength; } } Double oldScrollableLength = 0;
If ScrollableLength is not equal to oldScrollableLength, then only execute Axis labeling code.
Thank you for that, I'll try it out.
As for issue at hand, I have a scenario where I may be showing years of data, but at a resolution of minutes. So, the user should be able to zoom as close as looking at 5 minutes of data even though they may be plotting 5 years of data. Is this not possible with Visifire's WPF chart?
Thanks.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users














