Page 1 of 1

Ho to build dark version of chart

Posted: Tue Feb 25, 2020 10:37 pm
by Dagge1
Hello

I cannot manage to build dark version of the highstock chart with custom background and foreground colors. Something like those shown on the 'Dark Unica' demo versions of charts. https://www.highcharts.com/stock/demo/a ... dark-unica

There is a code example by Torstein Honsi, but it is unclear to me how to implement it because guy says that source is transpiled into TypeScript. Is there a way to add back and foreground colors directly in highchart object, in javascript language? Any code example would be highly appreciated.

thanks

Re: Ho to build dark version of chart

Posted: Wed Feb 26, 2020 7:04 am
by mateuszkornecki
Hi,

Thanks for contacting us with your question!

You don't need TypeScript to change/apply the theme. All you have to do is to copy/paste one of the existing themes from these files:
https://github.com/highcharts/highchart ... /js/themes, or basing a pretty advanced theme I have attached as a demo create your own version. You find more information about creating a theme on our official docs, that I also attached below.
Docs references: https://www.highcharts.com/docs/chart-d ... yle/themes
Live demo: https://jsfiddle.net/BlackLabel/t861c7o4/

Let me know if you have any further questions!

Kind regards.

Re: Ho to build dark version of chart

Posted: Wed Feb 26, 2020 11:19 am
by Dagge1
Thanks a lot, that was helpful.

Re: Ho to build dark version of chart

Posted: Wed Feb 26, 2020 12:06 pm
by mateuszkornecki
You're welcome ;)!