score:26
Top level config can contain colors
field. It's an array from which series colors will be picked.
Here's working piece from my project
var chart;
$(document).ready(function () {
chart = new Highcharts.Chart({
chart:{
renderTo:'perfchart',
type:'line',
marginRight:130,
marginBottom:25
},
colors: ['#0000FF', '#0066FF', '#00CCFF'],
title:{
text:'Historical system performance',
x:-20 //center
},
Appearance:
score:3
See the code (and the plot that it renders) below.
The snippet below is a complete script--i.e., either put it in your markup between two script tags or as a stand-along js file with an includes in your markup.
Colors
is a Chart object so the easiest way is to pass an array of colors (as hex strings):
$(function () {
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'line'
},
colors: ['#562F1E', '#AF7F24', '#263249', '#5F7F90', '#D9CDB6'],
title: {
text: false
},
yAxis: {
title: {
text: false
}
},
series: [{
name: 'series I',
data: [17.4, 16.1, 19.45, 24.15, 28.44, 33.15, 37.2, 41.25, 43.3]
},
{
name: 'series II',
data: [13.19, 17.23, 25.74, 28.5, 33.9, 35.62, 37.0, 36.6, 34.82]
}
]
});
});
})
score:3
The color can be configured as part of the series. Try something like this:
series: [
{
name: 'series I',
color: '#ffffff',
data: [17.4, 16.1, 19.45, 24.15, 28.44, 33.15, 37.2, 41.25, 43.3]
}
];
Source: stackoverflow.com
Related Query
- Customizing the colors of individual series in HighCharts
- HighCharts : Is it possible to customize the colors of individual series?
- Highcharts - How to set custom colors for the series
- rCharts: Change the individual point colors of a time series plot (Highcharts)
- How to make the selection of individual series dynamic in highcharts even after setting max and min?
- Use different colors depending on the number of series - Highcharts
- HighCharts Hide Series Name from the Legend
- How can I change the colors of my highcharts piechart?
- Hiding a Highcharts series without using the legend
- How can i hide all the Series in highcharts at a time
- Add a gap between the second and third series in a Highcharts column plot with four series displayed
- Show specific series values in the stack label using highcharts
- Customizing the Stockchart range selector buttons from HighCharts library in GWT (and Javascript in general)
- highcharts link series such that turn one off turns off the other
- How can I delete all of the points from a highcharts series
- Highcharts - Scatter chart with a line connecting the dots in the series
- Sort the series data for every X-Axis in Highcharts
- How do I style the series labels on a Highcharts pie chart?
- How to remove the halo/glow around a marker upon hovering a series in Highcharts
- Highcharts add tooltip that has a small arrow pointing toward the series
- How do I hide a Highcharts series from the chart, but always show it in the tooltip?
- Highcharts Bubble Chart - How to move an individual point's data label (dataLabel) to the front/top
- Gauge Series of Highcharts with React not the Solid Gauge but Gauge Series
- Highcharts show the same yAxis start and end value with multiple data series
- Highcharts - how to create multiple y axis and group the data series
- how to display 2 same highcharts without duplicate the code
- Highcharts heatmap - disabling the legend results in different colors
- Highcharts - Series tooltip doesn't work when plotting lines that zigzag on the x axis
- Is there a way to change the display value in series using highcharts
- change the categories and series in highcharts by select button?
More Query from same tag
- How to change the distance between lines of grid?
- Highcharts formatting: labels, datapoints and scale?
- highcharts javascript variables
- Printing html page elements
- Highcharts tickAmount off by 1
- Highcharts: stacked bar chart with different ranges of scales
- Add onclick event on chart made with the highcharts library
- Directive cannot replace variable in template: Syntax Error
- How can I take a backingbean GSON string to Highcharts
- Adjust X Scale in highchart to display proper ratio
- How to create a bubble chart
- Highcharts JS: Gap between X-Axis labels is too thin
- how to change highstock date to persian date
- change color of highcharts legend page navigation buttons
- Creating large heatmap using highcharts freezes browser
- Render Two charts separate charts using angular js directives
- How to change Highchart tooltip font family
- Highcharts pointPlacement ignored in version 2.3.5
- Aligning the xAxis of highcharts
- Can we manage multiple highchart charts in a single function by changing type in chart drawing functionm
- Setting Additional Data to highcharts tooltip with formatter doesn't work if points count exceed threshold
- How to add a label to axis
- customize images and different text in Highcharts
- Text overflow issue with highcharts
- How to edit the html of a highchart label?
- Get palette of some color
- Stack line on area / stack area on line in highcharts?
- How to display HighCharts with tables
- How do I display csv data in Highcharts?
- Highstock vs Google Charts in Performance