score:1
Accepted answer
i couldn't find anything in the documentation, so i decided to roll my own function:
// get data
var data = givemedata(); // at this point the data is already formatted for hc
// convert data
var converteddata = [];
for (var i=0; i<data.length; i++) {
var item = data[i];
item['color'] = pickcolor(item.name);
converteddata.push(item);
}
// pass converted data to hc
...
wish there was some kind of color function that could take in a point or series item, but this handles my problem for now. if anyone has any better solutions, i'd still love to see them.
Source: stackoverflow.com
Related Query
- Color selection based on a function for Highchart graphs?
- Column based Highchart drilldown series assign color code to each column
- Highchart columnrange, color code lines based on data
- Background color for multiple Highchart panes, in Vue app
- how to change color of line chart in highchart based on a categorical column in r?
- Highchart heatmap: exclude the total row for color Axis
- Set series color based on X axis on a column Highchart
- TypeError: p is not a function while calling map function in angular 4 for fetching series for bellcurve highchart
- Setting Min and Max values for more than two Highchart Solid Gauges using function
- Cannot set Individual Point color in Series for Highstock API, it works for Highchart API
- how to add an color picker control to highchart for changing the color of series by user
- Highchart Treemap colorindex for fixed color values
- highchart - label color by based on point data
- change background color for highchart candlestick plot
- How to change the Highchart plotline color for theme
- How to change rCharts Highchart Color based on Factor Variable
- Set Color for Pie Chart using HighChart + JSON data
- Is is possible to change line color in highchart xy plot for specific y range only?
- Passing dynamic php values for Highchart graphs
- How to add background color on highchart based on flag?
- How to create dynamic color for highchart with dynamic dates?
- set the background color for column group graphs in highcharts
- How to set different colors for bars based on value in Highchart bar chart?
- How to set color for non plotting Area in HighChart
- after using for loop all my column graphs are plotted in single color i need each bar in different color in highcharts
- Differtent pattern color for every single column in highchart
- how to avail bg color for every bar in highchart
- Highchart Color Issue for series with single data with multiple colors
- Specify color for Pie Chart Highchart
- how to create area highchart for large amount of data based date?
More Query from same tag
- Spacing between plot border and start of data plotting in highcharts
- How do I create a columnrange highchart with a point object (consisting of one x and two y values)?
- Highcharts Polar Stacked Column chart - Legend is cut off
- min, max threshold in highcharts
- highchart axis label can't set at beginning of the label?
- highcharts 5.0.14 issue with textOverflow
- highcharts zoomable 6 month line graph
- How can I return list object to ajax call back function from asp.net web form?
- Group Smaller Slices in Pie Charts to Improve Readability
- Multiple Pie Charts Of Variable Data With Single Legend Item Click
- Highcharts does not work with wicked_pdf
- Setting options.rangeSelector.selected to 0 does not set zoom to correct level in highstock
- Can highcharts heatmap zone pattenObjects respect colors applied by color axis?
- I'm getting this error when fly over the chart: TypeError: Cannot read property 'lineWidth' of undefined
- change bar colors dynamically - highcharts
- Zoom function breaks the xAxis labels and creates chart gaps when exiting zoom
- Highmaps : dataLabels console error
- Fomatting labels on Y-axis in Highcharts with Data from HTML table
- jQuery: reading information from a text file and using content in text
- How to access any particular data in highchart tooltip?
- Remove DataPoint from x-axis redraw Issues
- Higmaps doesn't display states of certain country
- High Charts Rendering on Internet Explorer 10
- Highcharts and Excel Slicers
- customized tooltip and linking values to formfields -- highcharts / columnrange
- How to pass the correct data format from SQL to PHP
- How to access different contexts of 'this' in HighCharts callback (Angular / Typescript)
- Highchart property 'name' does not exist on type 'LegendOptions'
- Plotting multiple series from JSON php import to Highcharts
- Align second scatter series to the side similar to how column and bar charts do using HighCharts