- Issue created by @davidwhthomas
- Merge request !157Add support for highcharts styledMode configuration option β (Merged) created by davidwhthomas
- πΊπΈUnited States andileco
This is very cool and thanks for this write-up and patch! When I use your MR, I am getting a black, infinite-scrolling box where the chart should be (see uploaded screenshare video). Did you experience this? Do you have any other configurations in your site?
- πΊπΈUnited States andileco
If I disable styled mode, then I actually get a nice, dark-mode chart.
- π³πΏNew Zealand davidwhthomas
Hey, thanks for checking it.
styledMode
needs the CSS file added, otherwise it will show that black box.For example. this CSS: https://code.highcharts.com/css/highcharts.css and possibly adding https://code.highcharts.com/dashboards/css/dashboards.css
I have that CSS file added by my theme, but maybe we could add a library to include by the default
highcharts.css
ifstyledMode
is enabled. It could then be overridden if needed in the theme etc..In your other example, with styledMode off, the dark mode doesn't look so good because the fonts etc.. are black on black and other issues which the highcharts dark mode support solves when enabled.
Let me check if I can add that default CSS as a library when
styledMode
is enabled. - πΊπΈUnited States andileco
Thanks for clarifying. I think we need the option to bring in the library or some sort of validation that prevents users from doing something they're not going to like. What about like one of these, except it says, "Enabled styledMode" (with a link to more info)?
- π³πΏNew Zealand davidwhthomas
You're welcome. How about this approach of just adding the default highcharts css library, if
styledMode
is enabled?The user can then override the default CSS in their theme etc..
This is similar to what is mentioned in the highcharts docs here https://api.highcharts.com/highcharts/chart.styledMode
The default style sheet is available from https://code.highcharts.com/css/highcharts.css.
If we just add the CSS with the
styledMode
option, it will prevent any issues with the default css missing whenstyledMode
is enabled. - πΊπΈUnited States andileco
That's fine, was just trying to have a single place where all the optional libraries are toggled on and off. I'll take a look at the updated MR tomorrow my time.
- π³πΏNew Zealand davidwhthomas
Thanks again, I've added some updates to the MR to:
1. Add the default highcharts.css library if styledMode is enabled
2. Add an option to disable adding the default CSS library (if styledMode is enabled)This means the default CSS will be now added by default while also providing the option to disable adding the default CSS, if needed.
-
andileco β
committed 9090718a on 5.1.x authored by
davidwhthomas β
Issue #3532198 by davidwhthomas, andileco, nikathone: Highcharts dark...
-
andileco β
committed 9090718a on 5.1.x authored by
davidwhthomas β
- π³πΏNew Zealand davidwhthomas
Sorry, this one needs one more minor update, one moment.
- Merge request !158Ensure default value is set for disable_default_css_library β (Merged) created by davidwhthomas
-
andileco β
committed 17165a23 on 5.1.x authored by
davidwhthomas β
Issue #3532198 by davidwhthomas, andileco, nikathone: Highcharts dark...
-
andileco β
committed 17165a23 on 5.1.x authored by
davidwhthomas β