Using openpyxl, the charts inserted into my worksheet have a border on them. Is there any way to set the style of the chart (pie/bar) to either via the styles.Style/styles.bord
You can set chat graphical_properties, the code is
chart.graphical_properties = GraphicalProperties(ln=LineProperties(noFill=True))
This will apply the line style to chartSpace.
Before you do this, you should modifiy the source code of openpyxl lib
, the file is
Python27\Lib\site-packages\openpyxl\chart\_chart.py
#cs = ChartSpace(chart=container)
cs = ChartSpace(chart=container, spPr=self.graphical_properties)
It works well.
This isn't easy but should be possible. You will need to work through the XML source of a suitably formatted sample chart and see which particular variables need setting or changing. openpyxl implements the complete chart API but this unfortunately very complicated.