Hi!
I found that autoscaling on the chart doesn’t work well when the range of values is large.
Example:
var pres = new Presentation();
var pptChart = pres.Slides[0].Slide.Shapes.AddChart(ChartType.Line, 0, 0, 700, 300);
pptChart.ChartData.Series.Clear();
pptChart.ChartData.Categories.Clear();
pptChart.ChartData.ChartDataWorkbook.Clear(0);
var pptSeries = pptChart.ChartData.Series.Add("Line 1", ChartType.Line);
pptSeries.DataPoints.DataSourceTypeForValues = DataSourceType.DoubleLiterals;
pptSeries.DataPoints.AddDataPointForLineSeries(4250);
pptSeries.DataPoints.AddDataPointForLineSeries(3300);
When we save we will have y-axis which starts from 0.
example1.PNG (16.7 KB)
But if we will set another value instead of [4250,3300], for example:
pptSeries.DataPoints.AddDataPointForLineSeries(4250);
pptSeries.DataPoints.AddDataPointForLineSeries(4000);
We will have y-axis which has autoscaling and starts from 3850.
example2.PNG (20.1 KB)
So, my question is, is it possible to make autoscaling always work or find out what it depends on? Because now it turns out that the graph has different behavior for different data.
Thanks!