Created
August 30, 2012 04:08
-
-
Save randym/3522227 to your computer and use it in GitHub Desktop.
hide tick lables in chart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p = Axlsx::Package.new | |
p.workbook.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 | |
p.serialize 'no_cat_labels.xlsx' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment