Access to Highcharts.getOptions().colors?
See original GitHub issueHi,
I’m working through a Highcharts example and using React with your excellent project here.
Unfortunately I’m really struggling to access Highcharts.getOptions().colors
. Can I do it from a standard import like:
var Highcharts = require('react-highcharts');
Or do I have to import the highcharts library separately? I’m afraid my understanding of node’s modules is not good enough to figure it out, though hopefully it is simple.
Any help would be much appreciated, Michael
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
colors | highcharts API Reference
An array containing the default colors for the chart's series. When all colors are used, new colors are pulled from the start again....
Read more >How to use the highcharts.getOptions function in ... - Snyk
To help you get started, we've selected a few highcharts. ... getOptions().colors.map(function (color) { return { radialGradient: { cx: 0.4, cy: 0.3, ...
Read more >Angular-highcharts colors. Is there any way to get color ...
Already solved, but just wondering, is there any way to get an access to the highcharts colors besides Highcharts.getOptions()?.
Read more >Highcharts Demo - JSFiddle - Code Playground
1. var colors = Highcharts.getOptions().colors; ; 2. ; 3. Highcharts.chart('container', { ; 4. title: { ; 5. text: 'Zones on X axis'....
Read more >Highcharts - Chart having Multiple Axes - Tutorialspoint
getOptions().colors[0] } } }, { // Tertiary yAxis gridLineWidth: 0, title: { text: 'Sea-Level Pressure', style: { color: Highcharts.getOptions().colors[1] } ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi michaeljones,
You should be able to access Highcharts object as
Highcharts.Highcharts
. e.g.Highcharts.Highcharts.getOptions().colors
.Please let me know if this works for you.
Hi @kirjs,
Thanks for the response and thank you @Kureev. I did try your approach @kirjs and it didn’t seem to work but I’ve just realised I was still on
0.0.7
. If I update to the latest on npm then it works.Sorry for the trouble, I should know better than to fail to check for newer versions.
It might be worth documenting the availability of
Highcharts.Highcharts
if it isn’t covered already. I can’t see reference to it.Cheers, Michael