The bar chart I'm creating is auto scaling the Y axis tick increments starting at 0 as 0, .5, 1, 1.5
etc. I would like to have it increment in only whole numbers, ie 0, 1, 2, 3, 4
etc. I've tried chart.y_axis.tickLblSkip = 1
but had my doubts because I believe this is just the label itself, not the actual tick marks. Is there a way to control this? I see in the documentation you can control the overall scale of the axis with chart.y_axis.scaling.min
and max
but this isn't what I'm looking for.
Below is the code used to generate my chart. Below that is the chart itself where you can see the Y axis ticks, because 'unique jobs' will only be a whole number, it looks stupid to have decimals:
# Unique jobs chart
chart = BarChart()
chart.type = 'col'
chart.style = 13
chart.title = 'Unique Job Numbers Run'
chart.y_axis.title = 'Total Number of Parts'
chart.x_axis.title = 'Machine Number'
chart.legend = None
data = Reference(yearly_machine_totals_ws, min_col=4, min_row=1,
max_row=yearly_machine_totals_ws.max_row, max_col=4)
cats = Reference(yearly_machine_totals_ws, min_col=1, min_row=2,
max_row=yearly_machine_totals_ws.max_row)
chart.add_data(data, titles_from_data=True)
chart.set_categories(cats)
chart_ws.add_chart(chart, 'L2')