您好我使用axlsx用于生成EXCEL在导轨传说颜色不正确的axlsx堆积条形图
在堆叠组barchat传说文件的颜色是不妥当的。
它没有把我的颜色。
sheet.add_chart(Axlsx::Bar3DChart, :start_at => "G2", :end_at => "O15", :title => "#{business_unit}",:barDir => :col,:grouping=> :stacked) do |chart|
chart.add_series :data => sheet["B3:B6"], :labels => sheet["A3:A6"], :title => sheet["B2"], :colors => ['222','222','222','222']
chart.add_series :data => sheet["C3:C6"], :labels => sheet["A3:A6"], :title => sheet["C2"], :colors => ['ffff00','ffff00','ffff00','ffff00']
chart.add_series :data => sheet["D3:D6"], :labels => sheet["A3:A6"], :title => sheet["D2"], :colors => ['ff0000','ff0000','ff0000','ff0000']
chart.add_series :data => sheet["E3:E6"], :labels => sheet["A3:A6"], :title => sheet["E2"], :colors => ['0f52d6','0f52d6','0f52d6','0f52d6']
end
请看图片的细节。其采取默认的颜色不是我 enter image description here
感谢您的答复。其实它并没有把标签当作传说。它采用标题作为传说。因此它采用默认颜色。 – Vikiesakki