score:0
It is possible to get width from arcs that are created in chart's background. Then use that calculated width to update series. Here all panes are of equal width, so it is possible to get one width and set it to all series.
Example: http://jsfiddle.net/xs0gj2zu/
var token = true;
Highcharts.chart('container', {
chart: {
type: 'solidgauge',
marginTop: 50,
events:{
load: function(){
token = false;
var each = Highcharts.each,
series = this.series,
band = this.yAxis[0].plotLinesAndBands[0],
d = band.svgElem.d.split(" "),
width = parseFloat(d[13]) - parseFloat(d[2]);
each(series, function(s){
s.update({borderWidth: width}, false);
});
this.redraw();
token = true;
},
redraw: function(){
if(token) {
token = false;
var each = Highcharts.each,
series = this.series,
band = this.yAxis[0].plotLinesAndBands[0],
d = band.svgElem.d.split(" "),
width = parseFloat(d[13]) - parseFloat(d[2]);
each(series, function(s){
s.update({borderWidth: width}, false);
});
this.redraw();
token = true;
}
}
}
},
...
(The token
is a variable used to avoid infinite loops, because redraw is called in redraw.)
Source: stackoverflow.com
Related Query
- What should be the right borderWidth in a solidgauge Highcharts chart?
- Highcharts graph should start entirely to the left and end entirely to the right
- put labels on the right of the chart area in HighCharts
- Highcharts Sunburst chart - What is the range of colorVariation.to values?
- Want to make the Highcharts Bar Chart data labels appear on the far right in the chart
- Highcharts Onclick a PieChart slice should refresh the chart
- what should be the initial dataset from millions of data points for stock line highcharts
- How to display the value instead of percentage in a pie chart using jquery Highcharts
- HighCharts - Make the pie chart 100% of the div
- What format does the highcharts js library accept for dates?
- Highcharts => Getting the id of a point when clicking on a line chart
- HighCharts : Adding Hyperlinks to the X-Axis of the chart
- How do you increase the performance of highcharts chart creation and rendering
- Highcharts - Legend Positioning outside the chart
- Highcharts chart click event fired on click of the reset zoom button (bug?)
- Using Highcharts and displaying a message over or on the chart when there is no data
- Highcharts Bar Chart - How to set the minimum bar width/length
- Highcharts - Scatter chart with a line connecting the dots in the series
- Add onclick event on chart made with the highcharts library
- Highcharts stacking bar chart border not displaying on right side
- Highcharts - Bar - Setting the X axis width and the chart area width to be constant
- HighCharts tooltip appearing behind the dialog holding the chart
- Highcharts - areaspline with negative values, area should be always at the bottom
- Highcharts Bubble Chart - How to move an individual point's data label (dataLabel) to the front/top
- Highcharts column + line combination chart with multiple series. Issue aligning line over the column
- Chart highlighting in the highcharts javascript API
- Highcharts - Rotate pie chart aligning the clicked section to a fixed point (180°)
- Highcharts stock chart - Technical Indicators - Stock price is missing in the tooltip when selecting the 'All' range
- Highcharts rendering the same chart twice
- HighCharts: How to Determine on Click Event what Data Grouping the Chart is Currently In?
More Query from same tag
- Highstock: On Series Flags that are inverted
- How to make a function call every few seconds in c#?
- Adding comma format to Highcharter tooltips
- On Mouse over on the high chart data the tool tip value should be displayed next to legend label
- Searching for JS based (Highcharts, AnyChart, etc) thermometer or vertical linear gauge with multiple pointers
- HighCharts Drag points saving with angularJs
- Highmaps label centering in irregular path
- Highcharts X-Axis Alignment
- Highstock - why is min/maxPadding on xAxis ignored
- Highchart Legend Alignment
- Scrollbar is not working with Dumbell Chart in Highchart
- Highcharts - columns too thin in differents zoom time
- Drilldown for lines in Highcharts
- highchart select an area to show some info by clicking and drag mouse but not release
- Responsive Highchart legend position
- How to center text vertically in a custom highcharts button
- Render Two charts separate charts using angular js directives
- Bar with negative and neutral stack
- Highcharts Ganttchart (or XRange) group y-Axis elements
- Highcharts multiple charts on a single page using c# asp.net mvc3
- Export of high chart to CSV using custom button
- Highcharts NG show only one point at a time. Animations
- Auto Refreshing Highcharts with PHP/JS
- Highcharts donut legend toggle
- Window scrollY = 0 on Highcharts redraw()
- Highcharts Bar Graphic: Make small number the higher bar and large number the smaller bar
- read the json file to output to an highcharts
- Percentage in hctreemap2 of Highcharter using tooltip?
- Vaadin-Charts won´t apply all CSS styles on export/download
- Angular: HighChart TreeMap is not updating with the new data