您好我使用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