Measure Silverlight chart loading time

I am trying to measure the time required for different Silverlight chart libraries (such as Silverlight Control Toolkit, Visifire, Telerik) to load on the screen.

My The problem is that I can only measure the time it takes to load the control and start drawing on the screen, but due to animation effects (such as point fading in), rendering takes more time.

Is there any chance I can set up some automatic detection When does the rendering end? My problem is that I only found the Loaded event handler hook on the Silverlight Framework element, which will only be notified when the rendering starts.

The sample code I currently use for the Silverlight Control Toolkit is as follows:

public void Init()
{
Chart chart = new Chart(); // Init chart object
DataPointSeries series;
(. ..)// Init series, add lots of points, set data binding
Chart.Series.Add(series); // Add series to chart
chart.Loaded += new RoutedEventHandler(Chart_Loaded);
LayoutRoot.Children.Add(chart);
StartTimer(); // Start timer and wait for control to load
}

public void Chart_Loaded(object sender , RoutedEventArgs e)
{
StopTimer(); // Problem: rendering just started at this point, hasn't finished yet!
}

I have found solutions for some chart libraries and some other chart libraries. Here are the events I can contact to get the real measurement time: < p>

Dundas chart:

Chart chart;
Chart.ImageReady += new ImageDownloaded(Chart_ImageReady); // Stop timer at this event

Silverlight Toolkit :

Chart chart;
DataPointSeries series;
Chart.Series.Add(series);
Chart.Series[0].Loaded += new RoutedEventHandler(Chart_Loaded); // Stop timer at this event

Steema TeeChart:

TChart chart;
chart.AfterDraw + = new PaintChartEventHandler(chart_AfterDraw); // Stop timer at this event

Telerik RAD chart:

RadChart chart;
chart.DefaultView. ChartArea.Loaded += new RoutedEventHandler(Chart_Loaded); // Stop timer at this event

Visifire

Chart chart;
chart. AnimationEnabled = false; // Turn off animation
chart.Loaded += new RoutedEventHandler(Chart_Loaded); // Stop timer at this event

The only one I can’t hook to the event that happened at the right time The library is Infagristics Netadvantage.

I am trying to measure the time required for different Silverlight chart libraries (e.g. Silverlight Control Toolkit, Visifire, Telerik) to load on the screen.

My problem is that I can only measure the time it takes to load the control and start drawing on the screen, but due to animation effects (such as point fading in), rendering takes more time.

Is there a chance that I can set up some methods to automatically detect when the rendering ends? My problem is that I only found the Loaded event handler hook on the Silverlight Framework element, which will only be notified when the rendering starts.

The sample code I currently use for the Silverlight Control Toolkit is as follows:

public void Init()
{
Chart chart = new Chart(); // Init chart object
DataPointSeries series;
(. ..)// Init series, add lots of points, set data binding
Chart.Series.Add(series); // Add series to chart
chart.Loaded += new RoutedEventHandler(Chart_Loaded);
LayoutRoot.Children.Add(chart);
StartTimer(); // Start timer and wait for control to load
}

public void Chart_Loaded(object sender , RoutedEventArgs e)
{
StopTimer(); // Problem: rendering just started at this point, hasn't finished yet!
}

I found solutions for some chart libraries and some other chart libraries. The following are the events I can contact to get the real measurement time:

Dundas chart:

Chart chart;
Chart.ImageReady += new ImageDownloaded(Chart_ImageReady); // Stop timer at this event

Silverlight toolkit:

Chart chart;
DataPointSeries serie s;
Chart.Series.Add(series);
Chart.Series[0].Loaded += new RoutedEventHandler(Chart_Loaded); // Stop timer at this event

Steema TeeChart:

TChart chart;
chart.AfterDraw += new PaintChartEventHandler(chart_AfterDraw); // Stop timer at this event

Telerik RAD Chart:

RadChart chart;
chart.DefaultView.ChartArea.Loaded += new RoutedEventHandler(Chart_Loaded); // Stop timer at this event

< p>Visifire

Chart chart;
chart.AnimationEnabled = false; // Turn off animation
chart.Loaded += new RoutedEventHandler(Chart_Loaded) ; // Stop timer at this event

The only library that I can’t connect to events that happen at the right time is Infagristics Netadvantage.

Leave a Comment

Your email address will not be published.