Dagge1
Posts: 15
Joined: Tue Feb 18, 2020 5:47 pm

Ho to build dark version of chart

Tue Feb 25, 2020 10:37 pm

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

mateuszkornecki
Posts: 1222
Joined: Mon Oct 28, 2019 10:29 am

Re: Ho to build dark version of chart

Wed Feb 26, 2020 7:04 am

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.
Mateusz Kornecki
Highcharts Developer

Dagge1
Posts: 15
Joined: Tue Feb 18, 2020 5:47 pm

Re: Ho to build dark version of chart

Wed Feb 26, 2020 11:19 am

Thanks a lot, that was helpful.

mateuszkornecki
Posts: 1222
Joined: Mon Oct 28, 2019 10:29 am

Re: Ho to build dark version of chart

Wed Feb 26, 2020 12:06 pm

You're welcome ;)!
Mateusz Kornecki
Highcharts Developer

Return to “Highcharts Stock”