randym / axlsx

xlsx generation with charts, images, automated column width, customizable styles and full schema validation. Axlsx excels at helping you generate beautiful Office Open XML Spreadsheet documents without having to understand the entire ECMA specification. Check out the README for some examples of how easy it is. Best of all, you can validate your xlsx file before serialization so you know for sure that anything generated is going to load on your client's machine.
MIT License
2.62k stars 695 forks source link

Title not set in LineChart. #643

Open abime opened 5 years ago

abime commented 5 years ago

I am unable to set the Title field in LineChart. 'row number' is picked by default.

package.workbook.add_worksheet(name: sheet_name) do | sheet |
  sheet.add_chart(Axlsx::LineChart) do |chart|
      chart.start_at "M34"
      chart.end_at "X46"
      chart.title = " Engagement(%) per week "
      chart.d_lbls.show_val = true
      chart.add_series :data => package.workbook.worksheets.first["A10:G10"],
        :labels => package.workbook.worksheets.first["A10:G10"],
>       :title =>package.workbook.worksheets.first["B10"],
        :color => "e69138"
    end