简体   繁体   中英

C# SpreadSheetsLight axis

i have a spreadsheet with table generated with SpreadsheetLight library, and chart from this table also generated with SpreadsheetLight. When i open generated result in excel and select chart, i can change rows for cols with button in excel (i don't have excel in english language so i'm just guessing it is called "change rows and cols"). Is there posibility to do this by code with SpreadsheetLight while generating spreadsheet? Or is it possible to tell SpreadsheetLight which data should be on category and which on data axis?

Thank you for any help.

So the answer for my own question is, that there is an overload of method SLDocument.CreateChart(), where is parameter RowsAsDataSeries. Or there is also an overload with SLCreateChartOptions parameter, and inside of SLCreateChartOptions is property RowsAsDataSeries. Second option seems to be better because the first one is marked as obsolette.

Many thank's to Mr. Vincent Tan for help and for great OpenXml library :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM