문제

I'm using this very straightforward code (practically the same as the bar chart examples here, however I am noticing that the Axes are inverted. The data that should be on the Val axis is shown on the Cat axis.

This is also true for the example linked above, and I can't seem to find a way to put them in the correct order.

Below is an image of the problem. The code used to generate it is:

sheet.add_chart(Axlsx::Bar3DChart,:title => "Chart", :show_legend => false, :start_at => "A1", :end_at => "P30", :bar_dir => :col) do |chart|
   chart.add_series :data => sheet["B1:B25"], :labels => sheet["A1:A25"]
   chart.valAxis.gridlines = false
   chart.catAxis.gridlines = false
end

도움이 되었습니까?

해결책

I fixed it. You can find my fork of axlsx here: https://github.com/HansCz/axlsx.

A pull request will be sent to https://github.com/randym/axlsx

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top