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
- External variable in the title of the chart
- Changing charts tooltip
- Highchart world map rendering too slow in edge legacy browser
- Printing html page elements
- Organization chart doesn't show all labels
- Drilldown in Sankey Diagram
- Add a custom text tooltip that differs from point to point in Highcharts
- To create a list with multiple list inside it
- Mouse out event on highcharts
- Highcharts bar chart x-axis inconsistent behaviour
- HighCharts data from SQL Server, classic asp
- Highcharts bubble chart with date?
- high charts pie chart should be displayed in ascending order
- Highcharts - Detail chart with stacked columns
- Remove [Object] label in highchart
- Django-Chartit 'source' must either be a QuerySet, Model or Manager
- How to customize highchart treemap datalabels?
- How to align the xaxis tick mark center
- How to increase the height of the bands?
- Highcharts donut label overflow container
- How to merge two Highcharts container with the same legend-item
- Set Max value in yAxis jQuery Highcharts
- Php to JSON passed thru to high charts
- How to have a solid as well as dashed line in line chart highcharts
- Drag multiple points at one time in highcharts
- Highcharts- this.category returns undefined
- how to sort and select top 5 elements in a json array using angular JS
- Highcharts missing first date label on xAxis
- Highchart timezones
- How to integrate highchart range slider in angularjs