score:27
There are two ways of specifying gradients in current version of highcharts. Previously you only had the option of using an array with four coordinates like linearGradient: [x1, y1, x2, y2]
. This would make the gradient coordinates apply to pixels and therefor be used for all bars (as in your example).
The new option is to use a configuration object instead:
linearGradient: {
x1: 0,
y1: 0,
x2: 1,
y2: 0
}
The coordinates here are numbers between 0 and 1 which corresponds to each individual bar. So, if you change the array you used to be a config option (and use normalized coordinates) you will get gradients in each bar.
Example on jsfiddle
Screenshot:
Edit: And as a bar chart have the x-axis going from top to bottom you should let x1 be 0 and x2 be 1, instead of changing y1 and y2.
score:3
Add Setoptions in chart
Highcharts.setOptions({
colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4']
});
Try this in fiddle
Source: stackoverflow.com
Related Query
- Styling bar colors in Highcharts with a gradient issue
- Highcharts cloud issue with data source when duplicating chart
- dealing with highcharts bar chart with really long category names
- Highcharts data series issue with ajax/json and PHP
- Highcharts - Issue with negative values when displaying multiple axes
- Highcharts stacked column bar with line
- Highcharts - Global configuration with common code and unique data & Headings
- creating a bar chart using Highcharts with React - getting an error that rendering div isn't found
- Highcharts bar with non-stacked percent series
- HighCharts query parameters issue with Flask webservice
- Highcharts column + line combination chart with multiple series. Issue aligning line over the column
- Resize issue while gridster.js with highcharts
- HighCharts: How to combine custom colors with gradient
- Adding round corners to Highcharts Bar Chart with stacked bars when value is 0
- Highcharts bar chart with fixed bar widths and gaps
- Splitted bar chart for paired data with highcharts
- Highcharts reloading issue with Backbone.js
- Highcharts zIndex issue with crosshair
- highcharts 5.0.14 issue with textOverflow
- Highcharts bar zoom issue when using transparent series
- Performance issue with Firefox on Highcharts and Highstocks
- Highcharts vertical stacked bar chart with negative values, is it possible?
- Highcharts grouped bar charts with multiple axes
- Highcharts solidgauge with green/yellow/red gradient
- HighCharts - bar chart with indicator
- passing formatting JavaScript code to HighCharts with JSON
- How to create a single series bar graph with Highcharts
- JSON Data Map Issue with HighCharts + Ajax
- Highcharts gantt chart : Task progress indicator need to show a single task for various status like completed,inprogress etc with different colors
- Highcharter bar colors issue
More Query from same tag
- Highcharts ColumnRange - Display time range on yAxsis instead of Date
- Highcharts bar grouping while maintaining transparent overlay?
- Disable Print Chart option only from HighCharts
- Highchart multi Yaxis in one line
- HighCharts :(Solid Gauge) How to generate gauge dial with an arrow end.
- Highcharts Legend error: "typeError: a.legendItem.bBox is undefined"
- Highcharts column chart rendering transparent columns in IE8
- Highcharts: Handling ng-click on tooltips
- Format data to parse to a highcharts pie chart
- Highcharts Resetting Drilldown (three layers) to Initial state
- Spanning categories in Highcharts across multiple points
- why to get mouse out event in legend in highchart?
- Highchart plot from two vectors: split the vectors?
- Is there a way to get the point information inside formatter function of y aixs label?
- highcharts zoom series dissapeares
- Highcharts Spiderweb with different max values
- highcharts how to set y-axis index for series data(categories),not series(legend)
- Store Highcharts in Javascript Function - How to?
- Highchart Annotation Scroll
- single array timestamp as xAxis for multiple series
- How to get current width of highcharts column
- How can I apply different background color to entire tooltip for different series in highcharts
- How to use jquery to access highcharts piechart plotOptions: pie : size parameter?
- Highcharts Annotation SVG doesn't move with other shapes
- Show HTML special characters as is
- How can you combine multiple graphs and control with one range selector with Highcharts?
- Chrome won't display the x-axis labels in Highcharts, Safari and Firefox do it
- Highcharts SVG Export from Python Server Side Code
- Highcharts Label Formatter Issue
- Highchart bubble chart shows empty chart