openpyxl - Ability to remove border from charts?

自闭症网瘾萝莉.ら 提交于 2019-12-02 06:54:51
seamus.shi

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!