score:84
highcharts.setoptions({
colors: ['#50b432', '#ed561b', '#dddf00', '#24cbe5', '#64e572', '#ff9655', '#fff263', '#6af9c4']
});
look the following example http://jsfiddle.net/8qufv/
score:0
highcharts.color(highcharts.getoptions().colors[0]).setopacity(0.5).get('rgba')]
in high charts inbuilt colors we have. so you need to change the path of the color[0] or [1]........[6]
score:1
highcharts.setoptions({
colors: ['#333', '#cb2326', '#dddf00', '#24cbe5', '#64e572', '#ff9655', '#cb2326', '#6af9c4']
});
score:1
is there a webpage that says to what each of the "colors" corresponds? all the answers here show something like:
colors: ['#333', '#cb2326', '#dddf00', '#24cbe5', '#64e572', '#ff9655', '#cb2326', '#6af9c4']
but what do #333, #cb2326, etc. actually change? obviously i can just change them and see what changes, but it would nice to have this reference available somewhere.
score:1
i had the same problem. in highcharts.css there's a section called "default colors". after i deleted this section, i could use custom colors. anyway, i guess you do not need highcharts.css if you use version v5.0.4 or higher.
score:2
to answer @loko web design's question https://stackoverflow.com/a/38794379/7475250
is there a webpage that says to what each of the "colors" corresponds? all the answers here show something like:
colors: ['#333', '#cb2326', '#dddf00', '#24cbe5', '#64e572', '#ff9655', '#cb2326', '#6af9c4']
but what do #333, #cb2326, etc. actually change? obviously i can just change them and see what changes, but it would nice to have this reference available somewhere.
the color docs are available here. although helpful they do not describe what changing a specific color actually does. below is my best description.
the colors prop gives highcharts the colors you would like the chart to loop through. for example if you had the following color prop.
colors: ['blue', 'green']
your pie slices would alternate between blue and green. changing blue to red your colors would then alternate between red and green. test it with the following fiddle
expanding the color list increases the number of colors before repeating.
colors: ['blue', 'green', 'yellow']
would repeat the colors if more than 4 slices are in your dataset.
score:7
i think what you need to do is set the colors using theme instead of setoptions as follows:
highcharts.theme = {colors: ['#50b432', '#ed561b', '#dddf00', '#24cbe5',
'#64e572', '#ff9655', '#fff263', '#6af9c4']});
score:13
for those of you that prefer to initialize the color in the configs, you could simply put the colors in the plotoptions portion of the config object like so:
...,
plotoptions: {
pie: {
colors: [
'#50b432',
'#ed561b',
'#dddf00',
'#24cbe5',
'#64e572',
'#ff9655',
'#fff263',
'#6af9c4'
],
allowpointselect: true,
cursor: 'pointer',
datalabels: {
enabled: false
},
showinlegend: true
}
},
...
Source: stackoverflow.com
Related Query
- How can I change the colors of my highcharts piechart?
- How can you change the "label" (valueSuffix) on a highcharts gauge after the gauge has been created?
- How can I change highcharts events after the chart has been initialized
- How can i change the color of a tile which was clicked of a treemap in highcharts using react
- How to change the color of the each slice in piechart based on the backend response using highcharts
- how can I use rangeselector and navigation in highcharts in the given code
- HighCharts - How can I turn off the points?
- How do you change the colour of each category within a highcharts column chart?
- How to change the text color in Highcharts
- How can i hide all the Series in highcharts at a time
- How can I remove the white border from HighCharts pie chart?
- Highcharts - How to set custom colors for the series
- How can I change the unit at y axis dynamically at Highcharts?
- How can I change the width of the bars in a highchart?
- How can I delete all of the points from a highcharts series
- Highcharts, How can I change the datalable distance in a pie chart based on the value
- How can i change highcharts data values by selecting from a dropdown list
- How can i keep the color the same in highcharts
- How can I change the scale of the legend in highcharter in R?
- How to change the palette colors of a highcharter column plot which depends on a variable?
- In highcharts how do I change the color of the line above the categories?
- Highcharts : How can i move the tooltip to external DIV?
- How Can I Hide a Pie Chart's Slice in HighCharts Without Removing It From the Legend?
- how to display 2 same highcharts without duplicate the code
- How can I access the 'this' field in plotOptions of highcharts
- how can i add in highcharts a different dashStyle just for a part of the graph
- How can you have more than 10 colors represented in the graph and legend in highcharts?
- How can I display the outcome of the for loop in highcharts
- How to change the color of highcharts series graph to black & white during downloading it as an image?
- How to change the defualt behavior of drag event in Highcharts or Highstock?
More Query from same tag
- Highcharts Omits X Axis Label
- Highcharts/Highstock: How to move the tooltip position to the center of a dataGroup
- Highcharts stacked area - update tooltip only after exact area mouse over
- JSHint and grunt.js - Highcharts is not defined
- Generate a highchart based on the output of an array
- How to set the fixed xAxis value in Highcharts
- highcharts: convert useUTC=true milliseconds to javascript Date object
- Pie chart with laravel and js
- Highslide popup in Highcharts not showing properly
- Highstock Data Grouping to Use Last Data Time as Index
- How to properly update the nodes on a Highcharts Sankey?
- Highcharts: update chart when data actualized
- How can I change the color of legend points?
- How to use Highcharts.Tooltip type in typescript
- Clear chart by click in highcharts
- It's not possible load Highstock from the CDN as an AMD module
- Displaying a target area / value on a HighCharts graph
- Highcharts: adding line to graph removes labels from X axis
- HighCharts error #17 for pyramid chart angular2
- highcharts: resize exporting dropdown
- Dojo + Highcharts: showAxes property moves the x and y axis
- Step interval of "1" not working for me in Highcharts, why?
- Highcharts add button fix chart
- Highcharts : How to apply style to x-axis Labels?
- min, max threshold in highcharts
- want to remove this bullet in front of these labels of highcharts graph
- How can I focus or change label color on mouse-hover in Timeline Highchart?
- Fire click event on a highchart column drilldown chart on clicking x axis for drill down reports
- How does it implement this chart with highcharts?
- Saving dynamically added divs containing charts