You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as my understanding goes, to develop a custom theme, you have to alter an existing one. Right now, the process can be a bit annoying because parent elements do not necessarily cascade their settings to all offspring. This is because there might some intermediate elements with different settings.
To give a more concrete example:
I wanted to make all lines in my chart black. Hence, I apply: line=element_line(color='black')
But then I realized that the grid lines where still grey.
After a while I realized that the default theme has: panel_grid=element_line(color='grey)
This creates a situation where, if you want to create a custom theme, you need to define every single element in full just to make sure that there are not intermediate elements messing with your settings. With this, inheritance becomes useless.
In my eyes, the implementation should be such that the default theme has all elements defined as None. That way, if an element is passed to the theme, all offspring will correctly inherit its properties. Only at rendering time, any leftover Nones should be substituted by suitable defaults.
If I am missing something and there is already a way to achieve what I am describing, please let me know.
The text was updated successfully, but these errors were encountered:
As far as my understanding goes, to develop a custom theme, you have to alter an existing one. Right now, the process can be a bit annoying because parent elements do not necessarily cascade their settings to all offspring. This is because there might some intermediate elements with different settings.
To give a more concrete example:
line=element_line(color='black')
panel_grid=element_line(color='grey)
This creates a situation where, if you want to create a custom theme, you need to define every single element in full just to make sure that there are not intermediate elements messing with your settings. With this, inheritance becomes useless.
In my eyes, the implementation should be such that the default theme has all elements defined as None. That way, if an element is passed to the theme, all offspring will correctly inherit its properties. Only at rendering time, any leftover Nones should be substituted by suitable defaults.
If I am missing something and there is already a way to achieve what I am describing, please let me know.
The text was updated successfully, but these errors were encountered: