score:5
Accepted answer
You can use chart renderer and svg attribiute.
this.renderer.button('Change background color', 74, 30, function(){
var gradient = {
linearGradient: [0, 0, 0, 400],
stops: [ [0, 'rgb(96, 96, 96)'],
[1, 'rgb(16, 16, 16)'] ]
};
chart.chartBackground.attr({
fill:gradient
});
}).add();
score:5
Highcharts doesn't have an API call to do this. However, you can get at the underlying elements and apply some css styling to them. e.g.
chart.chartBackground.css(
{
color: '#555555',
});
As you are manipulating the dom directly, there is no need to call redraw() on the chart.
As mentioned by another poster, you can do graduated backgrounds as follows:
var gradient = {
linearGradient: [0, 0, 0, 400],
stops: [ [0, 'rgb(96, 96, 96)'],
[1, 'rgb(16, 16, 16)'] ]
};
chart.chartBackground.attr({
fill:gradient
});
Source: stackoverflow.com
Related Query
- Highcharts - change background color along specific date range
- Is it possible to change background color of highcharts?
- Highcharts Change Bar Background Color Based on categories value
- background color change in jquery highcharts
- Change background color on HighCharts
- Change background color of highcharts on hover
- Is it possible to change the color of animating digits in Highcharts
- How to change the text color in Highcharts
- Highcharts Change Bar Color Based on Value
- Highcharts dynamically change bar color based on value
- Change Color of Volume Columns (High/Low) in HighCharts
- Change Highcharts Series color
- Change color of area chart programmatically in highcharts
- Highcharts column range change color for negative numbers
- Highcharts Change column color on hover
- Change Y Axis vertical line color in Highcharts
- Highcharts - how to disable color change on mouseover/hover
- Make Highcharts border color match background color on column chart
- Highcharts - change color of only clicked column
- How to change Highcharts xAxis label color individually?
- Background color to highcharts
- How do I set the background color of a Highcharts HTML label?
- How to change area graph color above certain value in Highcharts
- Highcharts hide series without change legend color
- Highcharts --- Change sliced color on drilldown pie chart
- Highcharts change the line color if its out of the area range
- change barchart background color dynamically in highcart
- Highcharts - Change line color between points
- HighCharts - Dynamically Change Axis Title Color
- In highcharts how do I change the color of the line above the categories?
More Query from same tag
- R highcharter legend based on point color
- Highcharts -- Dynamically apply "halo" effect to points without triggering hover event
- highcharts: how insert a fix label on a chart
- How to generate chart/graph on node.js as an html file
- Highcharts polar outcome is line instead of polar
- How to Format HighChartsJS ToolTip so it Only shows one X-axis?
- Area charts in Highcharts: min and minPadding for y-axis
- Highcharts missing array
- HighCharts ios Disable Initial Animation
- Highcharts creates same text 3 times
- Highstock error: a.ownerDocument is undefined
- Is there a way to load data into Highstock without the use of PHP?
- Different color for plot outside range
- enable disable hover in highchart.stock
- Adjust Highcharts data grouping based on range selector
- HighCharts how to place dates in the Y-Axis (vertical axis)
- Highstock: animate chart update when scrollbar is dragged or navigator handle is released
- Highcharts xAxis with datetime not showing any chart
- Invert Y axis in Highcharts
- highcharts - error in IE - Invalid Argument
- Highcharts custom legend SVG symbol does not fade when you click to turn off series
- Highcharts: Dynamic drilldown (stacked chart) in Combo Dual Axes
- In PHP , How to convert JSON into highchart supported format
- Unable to load Map Chart in Angular 7 using HighMaps 7
- Highcharts mouse tracking behaviour with multiple arearange & line series
- Highcharts update graph from array data
- if i have a data in highcharts greater then 1000 i want to display 1k
- Replace highcharts with images for report?
- change axis crosses in Highchart
- Highcharts: dynamically updating chart per click of a button