This project is read-only.

How to make a histogram?

Dec 30, 2013 at 5:42 AM
I'm looking for a WPF charting package and find this amazing one.

I want to make a histogram using column chart. My data has negative and positive values and I expect the bar is drawing on both sides of zero axis. However, it always draws the bar from the bottom. What did I do wrong?
Jan 16, 2014 at 11:32 PM
Is this nice tool still maintained?

Okay, since nobody responded to my request, I got the source and made the fix. It is pretty trivia:

In file ColumnSeries.cs (line 42), change

Point endPoint = NormalizePoint(new Point(point.XValue + startAndEndPoint.Y, YMin));


Point endPoint = NormalizePoint(new Point(point.XValue + startAndEndPoint.Y, Math.Max(0, YMin)));

will fix my problem.

Now, the only complaint I have is this control is so slow. I have three sparrow charts in the same window with 7 lines and about 250 data points each, and it takes 10 seconds to render the lines on my powerful laptop. Anybody got idea why?
Jan 27, 2014 at 6:10 PM

You could increase the performance of LineSeries by uisng the following properties
<chart:LineSeries UseSinglePart="True"></chart:LineSeries>
<chart:SparrowChart  RenderingMode="GDIRendering" SmoothingMode="HighSpeed" CompositingMode="SourceCopy" CompositingQuality="HighSpeed" >
Vinoth Kumar J
Jan 29, 2014 at 2:45 PM
Hi Kumar:

Your tip really works. It is much faster now. Thank you very much!
Jan 30, 2014 at 3:04 PM
Okay, with the suggested tip, one problem I notice is that the lines become blurry. As I found out, if I remove RenderingMode="GDIRendering", lines become clear, but the performance becomes bad again. Other parameters have minor impact on both performance and chart quality.