Small Numbers in Chart

Hi,
I am attempting to chart very small numbers (ie, 0.001 or smaller) and the numbers seem to plot correctly but the Y-Axis labels are strange. I am getting Y-Axis labels like 0.00, 0.00, 0.001, 0.001, etc. I have tried to use Auto as well as Set RangeType and tried to use various Format statements. This is 4.402.0.51. I can multiple the numbers by 1000 and that seems to get the numbers to display the Y-Axis labels correctly but would like to use the actual values if possible.

Thanks.
David

3 Replies

DA David A. Gonzales June 29, 2007 01:59 PM UTC

Here is a small sample that illustrates the problems I am having with the Chart control:

protected void FillPlot()
{
this.ChartWebControl1.Model.Series.Clear();

ChartSeries series1 = this.ChartWebControl1.Model.NewSeries("Plot1", ChartSeriesType.Line);
series1.Text = series1.Name;

series1.Points.Add(1, 0.007);
series1.Points.Add(2, 0.001);
series1.Points.Add(3, 0.009);

this.ChartWebControl1.Series.Add(series1);
this.ChartWebControl1.Redraw(true);
}

This shows the numbers being displayed but the Y-Axis Labels are strange.

Thanks
David.


RF Rashidha F Syncfusion Team July 3, 2007 02:09 PM UTC

Hi David,

My apologies for the delay in responding to you.

Thanks for using Syncfusion Products.

If your intention is to display very small value in Y axes means, please use RoundingPlace property in chartControl.

The following code snippet which illestrates how to set the Range and Roundingplace property in chartControl.

this.chartControl1.PrimaryYAxis.RangeType = ChartAxisRangeType.Set;
this.chartControl1.PrimaryYAxis.Range = new MinMaxInfo(0.000, 0.005, 0.001);
this.chartControl1.PrimaryYAxis.RoundingPlaces = 4;

Please let me know if this helps.

Thanks and Regards,
Rashidha.



DA David A. Gonzales July 5, 2007 05:49 PM UTC

Thanks. That worked. I had to write a couple routines to determine min, max and interval as well as determine the Rounding but works like a charm.

Thanks again.
David.

Loader.
Up arrow icon