caxlsx / caxlsx_rails

A Rails plugin to provide templates for the axlsx gem
MIT License
735 stars 84 forks source link

Bar Chart inverted Axis #137

Closed murgiuf closed 3 years ago

murgiuf commented 4 years ago

Hi,

I'm ussing an example code to draw a Bar3DChart:

wb.add_worksheet(:name => "Bar Chart") do |sheet|
   sheet.add_row ["A Simple Bar Chart"]
   sheet.add_row ["First", "Second", "Third"]
   sheet.add_row [1, 2, 3]
   sheet.add_chart(Axlsx::Bar3DChart, :start_at => "A4", :end_at => "F17") do |chart|
     chart.add_series :data => sheet["A3:C3"], :labels => sheet["A2:C2"], :title => sheet["A1"]
     chart.valAxis.label_rotation = -45
     chart.catAxis.label_rotation = 45
     chart.d_lbls.d_lbl_pos = :outEnd
     chart.d_lbls.show_val = true    
     chart.catAxis.tick_lbl_pos = :none
   end
  end

The problem is that the chart has the axis inverted:

inverted_axis

I'm sure this happened before in 2013:

https://stackoverflow.com/questions/17201836/inverted-axis-in-axlsx-bar-chart/17321499

And it was fixed then. Right now my gem 'caxlsx_rails' is up-to-date but I'm still facing this issue.

Much thanks! Freddy

straydogstudio commented 4 years ago

@murgiuf Have you found any solution on this? It might best be added to the Caxlsx gem, since this appears to be a caxlsx issue, and not caxlsx_rails. Also, which versions of calxsx/caxlsx_rails are in your lock file?

straydogstudio commented 4 years ago

Closing as not a caxlsx_rails issue.