Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Sun Feb 06, 2022 4:55 am

Dears ,

i am trying to make 4 trnedline charts in same file using c# and need to user same Axe values

starting from 0 till 25k with 2.5k increase

neverisnothing
 
Posts: 5
Joined: Wed Dec 15, 2021 7:42 am

Mon Feb 07, 2022 3:41 am

Hello,

Thanks for your inquiry!

Please refer to the following code to set the axis from 0 till 25k with 2.5k increase. If you have any other questions, just feel free to contact us.

Code: Select all
            //add trendline
            ITrendlines it = chart.Series[0].AddTrendLine(TrendlinesType.Polynomial);
            //Set the trendline properties to determine what should be displayed.
            it.displayEquation = false;
            it.displayRSquaredValue = false;
            //did not show the bar
            chart.Series[0].Fill.FillType = FillFormatType.None;
            //did not have legend
            chart.HasLegend = false;

            //axis increase
            chart.PrimaryValueAxis.IsAutoMin = false;
            chart.PrimaryValueAxis.MinValue = 0;
            chart.PrimaryValueAxis.IsAutoMax = false;
            chart.PrimaryValueAxis.MaxValue = 25000;
            chart.PrimaryValueAxis.IsAutoMinor = false;
            chart.PrimaryValueAxis.MinorUnit = 500;
            chart.PrimaryValueAxis.IsAutoMajor = false;
            chart.PrimaryValueAxis.MajorUnit = 2500;


Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Mon Feb 07, 2022 5:31 am

Thank You !

neverisnothing
 
Posts: 5
Joined: Wed Dec 15, 2021 7:42 am

Mon Feb 07, 2022 6:23 am

Hello,

You are welcome!

If you encounter any issues related to our product in the future, just feel free to contact us.

Have a nice day!

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Return to Spire.Presentation

cron