excel - How to create chart with xlsxwriter with no "Horizontal (Value) Axis" -


how remove "horizontal (value) axis" excel 2013 chart xlsxwriter.

xlsxwriter documentation silent it.

i have tried:

chart.set_x_axis({none: true}) chart.set_y_axis({none: true}) not work.

on excel able remove axis selecting itand hitting delete key.

the thing want remove selected in redbox. enter image description here

you can set axis label_position (docs) none hide axis:

chart.set_x_axis({'label_position': 'none'}) 

for example:

import xlsxwriter  workbook = xlsxwriter.workbook('chart.xlsx') worksheet = workbook.add_worksheet()  worksheet.write_column('a1', [10, 40, 50])  chart = workbook.add_chart({'type': 'bar', 'subtype': 'percent_stacked'})  chart.add_series({'values': '=sheet1!$a$1', 'data_labels': {'value': 1}}) chart.add_series({'values': '=sheet1!$a$2', 'data_labels': {'value': 1}}) chart.add_series({'values': '=sheet1!$a$3', 'data_labels': {'value': 1}})  chart.set_legend({'none': true}) chart.set_x_axis({'label_position': 'none'})  worksheet.insert_chart('d2', chart)  workbook.close() 

output:

enter image description here


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -