Spire.XLS for .NET is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Tue Nov 14, 2017 8:56 pm

Hi -
I want to know if its possible to put labels on the top and the bottom of the primary axis, 'for example 'Disagree a lot' and 'Agree a lot' https://i.gyazo.com/9ebb1662b2182e23008 ... fec35b.png

I also want to know if I can set the max value to 5 no matter the actual max amount in the data https://i.gyazo.com/d1d294aca64af7b9835 ... 39f4ec.png


Thanks

laziale
 
Posts: 1
Joined: Tue Nov 14, 2017 5:55 pm

Wed Nov 15, 2017 6:58 am

Hello,

Thanks for your inquiry.
Please use the below code to set the max value for the PrimaryValueAxis.
Code: Select all
 
            Workbook workbook = new Workbook();
            workbook.LoadFromFile(xlsPath);
            Worksheet sheet = workbook.Worksheets[0];
            Chart chart = sheet.Charts[0];
            chart.PrimaryValueAxis.IsAutoMax = false;
            chart.PrimaryValueAxis.MaxValue = 5;
            workbook.SaveToFile("maxValue.xlsx");

For requirement 1, we need further investigation. Could you please share your sample xlsx file and the desired result file?

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Fri Nov 17, 2017 10:09 am

Hello,

Greeting from E-iceblue.
How is the issue going?
Your feedback will be greatly appreciated.

Sincerely,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Return to Spire.XLS