m150
m150

Reputation: 183

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.

Upvotes: 0

Views: 627

Answers (1)

m150
m150

Reputation: 183

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 :)

Upvotes: 0

Related Questions