ailon's DevBlog: Development related stuff in my life

amCharts Quick Charts in “Colin Eberhardt’s Performance Test”

12/17/2010 7:04:19 PM

About a week ago Colin Eberhardt has published a post in Scott Logic blog comparing performance of several Silverlight charting libraries. Not surprisingly their Visiblox charts came on top in a shoot out between 6 contenders (2 of them unnamed for licensing reasons).

amCharts Quick Charts were absent from the comparison. One can only guess why. Maybe they aren’t known enough, even though amCharts comes up higher on Google when looking for “silverlight charts” than many of the reviewed contenders. Or maybe the reason is in the paragraphs below ;)

amCharts Quick Charts Test

I’ve plugged Quick Charts into the test project provided in the above mentioned blog and here’s the result:

Here’s the XAML for Quick Charts

   1: <Grid x:Name="LayoutRoot" Background="White">
   2:       <chart:SerialChart x:Name="chart" 
   3:                          CategoryValueMemberPath="Location" 
   4:                          LegendVisibility="Collapsed" 
   5:                          MinimumValueGridStep="5"
   6:                          MinimumCategoryGridStep="1000"
   7:                          >
   8:           <chart:SerialChart.Graphs>
   9:               <chart:LineGraph Brush="#A00" ValueMemberPath="RIntensity" />
  10:               <chart:LineGraph Brush="#0A0" ValueMemberPath="GIntensity"  />
  11:               <chart:LineGraph Brush="#00A" ValueMemberPath="BIntensity"  />
  12:           </chart:SerialChart.Graphs>
  13:       </chart:SerialChart>
  14:   </Grid>

and C# for hooking app the data from the test suite:

   1: protected override void RenderDataToChart(List<List<Histogram.DataPoint>> rgbData)
   2: {
   3:     _chart.Chart.DataSource = GetRGBData(rgbData);
   4: }
   6: private List<RGBData> GetRGBData(List<List<Histogram.DataPoint>> rgbData)
   7: {
   8:     var data =
   9:         from r in rgbData[0]
  10:         join g in rgbData[1] on r.Location equals g.Location
  11:         join b in rgbData[2] on r.Location equals b.Location
  12:         select new RGBData() { Location = r.Location, RIntensity = r.Intensity, GIntensity = g.Intensity, BIntensity = b.Intensity };
  14:     return data.ToList();
  15: }

Notice that I had to combine data from 3 separate lists in the test suite into one list for Quick Charts which affects performance somewhat.

Even though I admit this is due to an intentional limitation in Quick Charts, I still can’t see why the data for each point is in 3 separate lists in the first place? 1 object per point would make more sense. Maybe there’s an objective reason for that, or maybe this way is preferable for Visiblox API. I don’t know and lets just leave it at that.

Test results

I’ve ran the automated tests for Visiblox and amCharts Quick Charts on my machine (10 times each) and here are the average results:

  • Visiblox – 63.9 fps
  • amCharts Quick Charts – 70.6 fps.


You probably expect my conclusion to be that amCharts Quick Charts is faster than Visiblox and consequently all the other charting libraries in the original test. Sure, that too ;)

But my main conclusion is that you shouldn’t compare apples to oranges. All the charting libraries on that list have their strong features and they all probably have some killer features that affect performance. Now if you need that feature the performance advantage of some other library (that doesn’t have the feature) is pointless.

amCharts Quick Charts was created with simplicity in mind. So, even though it’s not very performance oriented, it beats other charts because it doesn’t do some special things other libraries (including amCharts Bundle and amCharts Stock Chart) might do.

Anyway the point is: if you need simple and performing WPF, Silverlight or Windows Phone 7 charts, probably nothing beats amCharts Quick Charts, but, when you are after some advanced features or deeper customization, performance becomes a secondary factor, not primary.

Tags: ,

blog comments powered by Disqus
Copyright © 2003 - 2018 Alan Mendelevich
Powered by BlogEngine.NET