Autoscaling on Y-Axis in Line Chart Doesn’t Work Well when the Range of Values Is Large

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!

@ikyrieieva,
Thank you for posting the question.

I will check the problem you encountered and will get back to you as soon as possible.

@ikyrieieva,
I reproduced the problem with the chart Y axis. This is normal behavior for PowerPoint (if you create the chart in PowerPoint, you will get the same).

Unfortunately, I was unable to change the behavior using Aspose.Slides.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESNET-43970

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.