score:2
Accepted answer
this is working fine for me:
var chart;
$(document).ready(function() {
options ={
chart: {
renderto: 'container',
defaultseriestype: 'line',
zoomtype: 'xy'
},
title : { text : 'foo' },
xaxis: { title: { text: 'x label' } },
yaxis: { title: { text: 'y label' } },
series: {}
};
chart = new highcharts.chart(options);
series3 = [{"name": 10402, "color": "rgba(255,139,0,0.5)", data: [[ 146,55.8 ],[150,60.9]]},{"name": 10403, "color": "rgba(255,255,0,0.5)", "data": [[ 130,25.8 ],[150,54.9]]}];
series2 = [{
name: '1042',
color: "rgba(255,139,0,0.5)",
data: [[ 146,55.8 ],[150,60.9]]
}, {
name: '10403',
color: "rgba(255,255,0,0.5)",
data: [[ 130,25.8 ],[150,54.9]]
}];
$( "#chartform" ).submit(function() {
options.series = series3;
var chart = new highcharts.chart(options);
return false;
});
});
edit: i believe the problem is that you are submitting the form. do a return false and use submit handler instead of click. you can check it live in: http://jsfiddle.net/bcfhl/157/
Source: stackoverflow.com
Related Query
- Updating a Highchart from a form with a click() event in jquery
- Use a symfony route with parameters in a click event for highchart series
- Highcharts + set event click from options in jquery
- Call a function from within highchart click event in reactjs
- How to fire a jquery function onchange from an html element in highchart event on click?
- How to trigger legend click event on outside when using Highchart and no using JQuery
- Highchart plotOption click event only fired once with mouse stay in the block
- Click event on Donut Highchart with GWT
- How to get the X axis value from HighChart on android on click event
- how to display the highchart data with data serialize from a form using button onclick?
- Highcharts : Chart with drilldown how to obtain click event of drill up button
- programatically fire a click event for a point on highchart scatter plot
- body click issue with highchart library
- Get X Axis value on bar Highchart click event
- Click event on highchart axis
- Fire click event on a highchart column drilldown chart on clicking x axis for drill down reports
- adding click event dynamically created highchart
- How to catch the click event from the axis ticks jqplot, highcharts,flot
- c# WPF Webbrowser with Highchart, Javascript from external source not working "An error has occurred in the script on this page"
- HighChart : plot line click event for multiple chart
- Highcharts : How do I keep the marker formatting and make the click event fire with a 5K+ point scatter plot?
- Dynamically set click event on bar from highcharts graph
- Append a jQuery variable to a click event handler function
- Highchart xAxis label click jquery error
- HIghchart Treemap - Add double click event on legend click
- change VueJS component data value from inside Highchart event
- Highcharts access drilldown data from event click
- Unable to trigger a click event on series data | Highchart
- How to create chart with highchart in which bar doesn't start from 0 in y axis?
- Pass data to click event callback in Highstock chart with more then 1000 entries
More Query from same tag
- Highcharts Gauge chart is rounding down max number
- Sort the series data for every X-Axis in Highcharts
- Customizing the colors of individual series in HighCharts
- How to spread Y Axis values in "area" chart using HighCharts
- Highcharts :Cannot read property 'parentGroup' of undefined with AngularJS
- Highmaps : Custom data label on world map
- Can Highcharts sort a legend list in a tooltip box?
- Highlight slice of a pie chart in highcarts
- Adding flags to Highstock chart (highcharts) with JavaScript
- Python: Read data from Highcharts after setExtreme
- Highcharts: How to Place Y-axis title next to first marker?
- How to show all the annotations in Hichcharts?
- Highstock mouseover data window
- How to remove year from Highchart
- How can I get proper object through loop using javascript for Bubble Charts of Highcharts
- LINQ that groups data and returns series for chart
- Highcharts Java Api wrapper for JSF?
- Restrict Highchart draggable points
- Background color to highcharts
- How to access any particular data in highchart tooltip?
- Write JSON parser to format data for pie chart (HighCharts)
- why x-axis showing alternate months rather every month?
- Unable to get highcharts image from highcharts export server using rails httparty
- Line not show properly while exporting HTML to PDF using wkhtmltopdf
- Class 'ConsoleTVs\Charts\Facades\Charts' not found in laravel Charts
- How to match columns height with spline in Highcharts
- setData is not a function + Angular2-Highcharts
- How to convert current xhtml page with javascript charts to pdf
- HighStock hiding specific series and axes based on checkboxes
- HighCharts tooltip while dragging