MS Chart control with WPF C#

Posted by Birgir Hrafn Sigurðsson on Stack Overflow See other posts from Stack Overflow or by Birgir Hrafn Sigurðsson
Published on 2010-05-23T01:45:35Z Indexed on 2010/05/23 1:50 UTC
Read the original article Hit count: 844

Filed under:
|
|

Hello,

Ive got a MS Chart control and it works just fine except that I can't figure out how to "format" the Y-Axis. I am adding a lot of double numbers into a Serie but when the double numb are actually whole numbers (20.000000.....) the Y-Axis on my chart shows 20.

example: this serie :
12.32
11.00
10.13
would actually show up like this:
12.32
11
10.13

I have tried formatting the data as I insert it into the serie like this:

serie.Points.AddXY(date.ToString(),double[i].ToString("##.##"));

but that doesn't seem to work.

I've tried to search for a place to format it in Chart.Series[0].* and Chart.ChartAreas[0].* but I didn't find it there.

Thanks in advance,
Regards,
Birgir Hrafn

© Stack Overflow or respective owner

Related posts about c#

Related posts about wpf