score:1
The equivalent of the colors array in a styled mode is .highcharts-color-{n}
css class combined with chart.colorCount property.
css:
.highcharts-color-0 {
fill: rgb(40,97,152);
stroke: rgb(40,97,152);
}
...
.highcharts-color-11 {
fill: rgb(141,198,253);
stroke: rgb(141,198,253);
}
js:
var chart = Highcharts.chart('container', {
chart: {
colorCount: 12
},
To have exactly the same effect as in a non-styled mode, you need to override some css rules from Highcharts css.
.highcharts-point {
stroke-width: 0
}
The best option is to create your own css file or override default Highcharts css.
example: http://jsfiddle.net/pugshon6/
If you look at the pattern plugin source code, there is information about last revision date - 2016-10-05, so the plugin should not be outdated.
score:1
I came across the same "feature" in new Highcharts and I also wanted to keep different style in JavaScript.
So after dig into the Highcharts code I found that it generates class name according to the provided color index (by default it uses 0-9 color indexes and classes for these indexes).
So I specified fake color index for data-serie "colorIndex": 55
, and highcharts generated class accordingly .highcharts-data-label-color-55
.
And this solved the problem! Now JS color with fill attribute wins over fake css class, unless you will define .highcharts-data-label-color-55
:-)
E.g. my data for heatmap:
"series": [
{
"data": [...],
"type": "heatmap",
"dataLabels": {
enabled: true,
color: '#000000'
},
"colorIndex": 55
}
],
E.g. my data for pie chart:
"series": [
{
data: [
{
name: 'N 1',
colorIndex: 55,
y: 10
},
{
name: 'N 2',
colorIndex: 55,
y: 20
},
{
name: 'N 3',
colorIndex: 55,
y: 30
},
{
name: 'N 4',
colorIndex: 55,
y: 40
},
]
}
],
Source: stackoverflow.com
Related Query
- Update Chart Colors When Using Styled HighCharts Version
- Using Highcharts and displaying a message over or on the chart when there is no data
- Issues using highcharts node export server from ClojureScript - "0x03 error when performing chart generation"
- Highcharts - update chart using ajax
- Why do I have the issue 'property assigment expected' when I want to display a chart on my web page using highcharts
- Highcharts display label for pie chart using html table as data source
- Update HighCharts chart when AJAX Updates my data on my page
- HighCharts title styles i.e textDecoration property not applying when we export the chart using canvg
- Update Of Chart Series Colors Fails When Drilled Into Chart
- Update chart title when drilling up and down in highcharts
- Show specific month when zoomed on a quarterly chart using highcharts
- Highcharts column chart returning incorrect series index on click when using shared tooltip
- Is there any way to highlight the node on search in network chart when using highcharts in angular application
- Highcharts cloud issue with data source when duplicating chart
- Using the source version instead of mimified when import lib with reactjs and npm
- Animate Highcharts series when chart appears in view when using Data Module
- How to update the HighCharts title using drill-up when there are multiple charts on same page?
- When I automatically update a HighCharts chart every minute, the CPU gradually overloads, and the browser locks up
- Highcharts error #17 when adding series to the chart using angular 4
- How to create a column range chart in Highcharts using range and navigator functions?
- How to display the value instead of percentage in a pie chart using jquery Highcharts
- Highcharts => Getting the id of a point when clicking on a line chart
- Highcharts saying undefined is not a function when trying to add a new chart
- Javascript Highcharts v3.0.5 - How to hide Y Axis Title when using multiple Y Axis
- JavaScript error when using Highcharts
- Using html2canvas to render a highcharts chart to pdf doesn't work on IE and Firefox
- Dynamically update Highcharts chart in react
- highcharts organization chart is throwing error when loading module
- Highcharts drilldown - when useing setData chart doesn't stay drilled down
- Not rendering VU-meter Gauge chart using HighCharts in Durandal
More Query from same tag
- Highcharts screen fitting issue
- How can I display legend in two columns in pie chart
- R Shiny Highcharter - How to use hc_rangeSelector()
- Not able to correctly plot x-axis in HighChart
- creating a chart using a count query on repository in symfony
- Donut Chart : Trigger legend or pie click event while selecting outside filter state change
- HighChart is not working with multiple axis
- How to implement motion video highchart on Reactjs
- Highcharts spline chart points not showing unless zoomed in
- Jquery: Dynamic binding events on a Highcharts object
- Higcharts: how to render background text over the chart, when there are plotBand with different colors?
- Javascript not executing after ajax partial rendering in rails
- HighCharts: set specific border width and border color dynamically for one column
- Pie chart 3d json series
- JSON format for Highcharts line and bar graph
- Highcharts show all categories even when no data
- Highcharts export chart using node.js
- Label Y-Axis stops in Highcharts solid gauges
- Highcharts - Highstock "inputEditDataFormat" breaking input
- Lines are not united Highcharts
- Sitecore 8 experience editor and jquery
- Is it possible to plot time series on top of a heat map in highcharts?
- Angular 5 is not rendering the component until click or hover anywhere
- if statement for Highcharts xAxis labels
- Multiple highstock charts on one page
- highcharts add plotline label with images
- How to Apply PlotOptions in Drill Down
- Highcharts - Hide child labels in a multiple levels and multiple layouts treemap
- Highcharts legend js error
- Highcharts stacked bar with datetime, not able to set start date