score:-2
Not sure you find an answer yet or not but I found one link which is 101% useful to you even for future reference. So can you have a look please. I was searching for something else and I found this link and also got your question.
[http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/members/series-update/][1]
Let me know or accept my answer if this will help to you in any manner. Cheers:)
score:0
Here what works for me:
function changeType() {
var series = chart.series[0];
var newType = your_condition_here ? 'column' : 'bar';
var dataArray = [],
points = series.data;
series.chart.addSeries({
type: newType,
name: series.name,
color: series.color,
data: series.options.data
}, false);
series.remove();
}
It creates new series using the new type and removes the old one.
Free to add more options as you need.
Hope it helps someone :)
score:0
You are able to update the chart type at the level of the chart. Since you have set the type inside the chart attribute, you need to update the same attribute.
// Initializing Chart
let probChart = new Highcharts.Chart('container', {
chart: {
type: "line"
},
});
// Updating Chart Type
probChart.update({
chart: { type: "column" }
});
score:3
This works for me:
$.each(chart.series, function (key, series) {
series.update(
{type: 'bar'},
false
);
}
score:12
You can use inverted parameter in chart and update yAxis. http://jsfiddle.net/n9xkR/8/
$('#bar').click(function () {
chart.inverted = true;
chart.xAxis[0].update({}, false);
chart.yAxis[0].update({}, false);
chart.series[0].update({
type: 'column'
});
});
Source: stackoverflow.com
Related Query
- highcharts jquery dynamic change chart type column to bar
- How to change color of bar in column chart with different level of percentage in highcharts
- Highcharts change chart type on drop down Jquery
- Highcharts - Column Chart Drilldown, how to change the drilldown bar color based on some value
- Highcharts : Change opacity of a column chart
- HighCharts Dynamically Change Chart Type
- Simple bar chart in jQuery HighCharts and MVC 2 application?
- Change chart type and redraw with multiple series in Highcharts
- jQuery Highcharts: change chart type using dropdown list
- How to add a horizontal line in Column bar chart in Highcharts plugin?
- Change legend symbol in Column Chart in highcharts
- Get the end points of each bar in a highcharts column chart
- highcharts change chart type using dropdown for multiple series
- Highcharts Stacked Column chart change legendItemClick function
- Highcharts Column Chart Not Displaying Dynamic Values
- Highcharts - Dynamically change chart type with on radio buttons click
- Ajax dynamic data with column bar chart
- How to make split grouped column bar chart in highcharts with percentage?
- highcharts column chart with line, need line start at bar start
- highcharts - Not able to switch between bar to column or vice versa graph type in drilldown
- Stacked Bar type of jquery Highcharts with data from HTML Table
- Dynamic values above column + jQuery Highcharts
- Highcharts - column chart has space between bar and xAxis
- Dynamic column based highcharts feeding data with jquery and php
- Highcharts Chart Bar - How can I display in the chart, only one column from my HTML table?
- Highcharts Bar Chart Without Column
- highcharts drilldown column chart change Aaxis lables
- How to Create a Stacked Column Chart with Dynamic Series in Highcharts
- How to plot stacked bar chart in highcharts with dynamic data?
- Highcharts (9.0.1): drilldown problem after change chart type dynamically
More Query from same tag
- Is Highmaps included in the .NET wrapper?
- Trying to figure out how to assign specific colors to specific data points in Highchart Pie chart
- How to adjust vertical labels on this Line Chart?
- Highchart series from JSON array
- highcharter markdown presentation
- Highcharts - multiple charts
- Visualizing Data via Highcharts and Django-Chartit2 on App Engine
- Add new axis dynamically when adding series from indicators/stocktools
- Show tooltip and keep it visible
- Draw 2 lines in Highcharts. JSON malformed?
- disable hover on special slice of pie chart
- testing React Highcharts config object with formatter callback
- Highcharts hover delay and not rendering with multiple series
- PHP JSON Highcharts load database result
- Split json data
- Annotation and its toolbar for Measure-x in High stocks is not appearing in the graph rather it is appearing in the navigator below
- Display tooltip on mouseover in the Highchart Stack Column Total
- How do I auto scale an axis with a max height in highcharts?
- Call addPoint hang in HighCharts
- Highcharts export web war does not work on Weblogic server
- How to use highcharts to display data of only five point when the page is initialized?
- High Charts add variance instead of values
- Highchart timezones
- Modifying text in resetZoomButton doesn't work - highcharts
- Date type xAxis in Angular Highcharts is still allowing duplicate 'Date' values
- Is it possible to turn boost mode in highcharts only when client's browser starts to jank?
- chartOptions.redraw is not a function in highcharts using angular
- Updating basic column high chart
- Hichcharts (Highstock) — Why isn't the plotLine being drawn on the chart?
- High charts Change the color of horizontal bar