Skip to content
Advertisement

How to set line color of openpyxl ScatterChart

I am trying to set the line of an openpyxl scatter chart to green:

JavaScript

While this code does not cause any problems, it does not change the line color from the default. What is the correct way to change the line color?

Interestingly I have no problem setting the style to dashed or dotted using:

JavaScript

Advertisement

Answer

As it turns out, the line width can remain default. I got the color change to work by setting solidFill to an instance of openpyxl.drawing.colors.ColorChoice:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement