Groups
Groups
Sign in
Groups
Groups
openpyxl-users
Conversations
About
Send feedback
Help
Turn off gridlines in bar chart
210 views
Skip to first unread message
Kristóf Kereszturi
unread,
Sep 12, 2022, 8:10:18 AM
9/12/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openpyx...@googlegroups.com
Is there any way to turn off the gridlines in a chart?
My code looks like this:
from
openpyxl
.
chart
import
BarChart, Reference
values
= Reference(
wq
,
min_col
=
6
,
max_col
=
6
,
min_row
=
18
,
max_row
=
21
)
chart
= BarChart()
chart
.type =
'bar'
chart
.add_data(
values
)
chart
.legend =
None
chart
.x_axis.delete =
True
chart
.y_axis.delete =
True
wq
.
add_chart
(
chart
,
"M17"
)
And this is the output:
I want to remove those lines.
Thank you in advance!!!
Christian Harries
unread,
Sep 16, 2024, 10:58:53 AM
9/16/24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openpyxl-users
Hey,
I worked on something similar. Try adding this:
chart.y_axis.majorGridlines
=
None
Reply all
Reply to author
Forward
0 new messages