Skip to content

Commit

Permalink
switch to darker background color if theme is dark
Browse files Browse the repository at this point in the history
  • Loading branch information
junedchhipa committed Sep 20, 2023
1 parent df1e8ec commit 9936ffc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/Core.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ export default class Core {
transform: `translate(${cnf.chart.offsetX}, ${cnf.chart.offsetY})`,
})

gl.dom.Paper.node.style.background = cnf.chart.background
gl.dom.Paper.node.style.background =
cnf.theme.mode === 'dark' && cnf.chart.background === 'transparent'
? 'rgba(0, 0, 0, 0.8)'
: cnf.chart.background

this.setSVGDimensions()

Expand Down

2 comments on commit 9936ffc

@Erkam246
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? Now i can't set the background to transparent 😢

@scottchantry
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit doesn't fix the issue (#4028) it was supposed to. It can still be reproduced in 3.43.0 using the codepen in the issue so it has not been fixed.

Please sign in to comment.