score:3
Accepted answer
got it....
var options = {
chart: {
renderto: 'container',
defaultseriestype: 'spline'
},
series: [{name: 'a', data: [1,2,3,2,1]}]
};
var chart = new highcharts.chart(options);
$("#list").on('change', function(){
//alert('f')
var selval = $("#list").val();
if(selval == "a" || selval == '')
{
options.series = [{name: 'a', data: [1,2,3,2,1]}]
}
else if(selval == "b")
{
options.series = [{name: 'b', data: [3,2,1,2,3]}]
}
else if(selval == "c")
{
options.series = [{name: 'c', data: [5,4,8,7,6]}]
}
else
{
options.series = [{name: 'd', data: [4,7,9,6,2]}]
}
var chart = new highcharts.chart(options);
});
score:1
in highcharts documentation you can fine a example for the same using a button,
example for series.setdata();
http://api.highcharts.com/highcharts#series.setdata()
you can use the same example here also.
apply the same logic with on change event.
Source: stackoverflow.com
Related Query
- How can i change highcharts data values by selecting from a dropdown list
- How can I pass values from Highcharts event callbacks (click, mouseOver, mouseOut) back to React component member function?
- How to make the Y Axis values not start from 0 in highcharts? How to display forcefully display the last category data on X axis in HighCharts ?
- In highcharts how can I provide data with values x, y, title so that I can put the title in the tooltip?
- How to change the data series for highchart using a dropdown list
- How can I change data series dynamically in HighCharts without overwriting initial series?
- Can not access Highcharts chart from container, so I can't change data in a chart dynamically
- How can I scrape Json data from Highcharts (stats.twitchapps.com)
- How can I change the colors of my highcharts piechart?
- How can I hide series from a HighCharts legend?
- How can I hide a series from initially being displayed in Highcharts
- How do I dynamically change a data point in Highcharts using JavaScript
- How can I remove the white border from HighCharts pie chart?
- Highcharts - How can I remove starting and ending padding from area chart
- How can I delete all of the points from a highcharts series
- How to populate a Highcharts axis with string formatted data from a PHP array
- How can I force ticks/grid lines on a Highcharts datetime X axis to arbitrarily line up with data points?
- How Can I Hide a Pie Chart's Slice in HighCharts Without Removing It From the Legend?
- How to make Highcharts fetch data from external JSON file?
- How can I make a graph with highcharts from csv file?
- How can I update two highcharts with one dropdown menu?
- How can i loop data in highcharts
- How To Get Data From Database To Highcharts Plugin in cakephp
- passing json values to highcharts from .net code behind
- How to hardcode chart data in my Model then have my Controller pull it from there to display it. Using Highcharts
- How can i change convert "120 Lakhs" to "1 crore 20 Lakhs" in Highcharts
- How can I put custom color in High Charts PIE data | Slice and want to change slice text
- Highcharts large treemap how can I dynamically change allowDrillToNode flag?
- How can I show all Timeline Highcharts data without any overlapping?
- How to change Highcharts xAxis formatting from yearly to monthly?
More Query from same tag
- Highcharts tooltip auto-resize on content change
- Creating Pie Chart from external JSON not working
- container .fadeIn/Out with HighCharts and Leaflet
- Highchart changes chart width when user hides the graph lines
- Assign colour to specific data in Highcharts depending on data type dynamically
- min-height to chart container if no data with highcharts.js
- Line not rendered with data in variable but rendering with array data
- Highcharts: How do I set dynamic data to the drilldown pie chart?
- Highcharts: How to shrink bubble radius on legend item hover?
- Vue 3 how to correctly update data in Highcharts?
- Call asynchronous functions inside loop
- How to update config in HighChart with React hooks?
- Highcharts bar data labels position
- Highcharts: Generate chart from tables having HTML tags in TD's
- Dotnet highcharts not working (Missing assembly)
- highcharts first and last category width
- Adding a comment box to a web page
- Issue with increasing the size of the highlighted area
- Lazy Loading for multiple series unlike multiple points in highcharts
- highstock(highchart) livedata can have move animation point?
- Different xAxis label, max and colors for drilldown in Highcharts
- Get number and percentage on Highchart´s chart
- Adding round corners to Highcharts Bar Chart with stacked bars when value is 0
- HighCharts API pie chart CSS how to select drilldown labels
- How to use a 'plotWidth' calculation to position a highcharts pie
- xAxis - point specific label positions
- Rsquare best fit line in actual and precited scatter plot with d3.js/chart.js/highcharts
- Highcharts - How to split up multiple charts in Rails 3
- Custom color & tooltip for a single bar in Highcharts histogram
- highcharts_column_id_on_click