score:8
You have to use the setData methode of the series object as descriped in documentation. In your case it is options.series[0].setData(Data)
And I think you have to turn your Ajax result from string to a real object/array by using JSON.parse(data)
.
EDIT:
@Ricardo Lohmann: in the ajax-call he did not specify the dataType he expects in the response, so jQuery will guess the dataType. But it will not recognize a string starting with [
as JSON and I doubt his response will be served with correct mime type application/json
. So specifying the correct mime type should also solve the problem. But I do not have an example of the complete ajax respons of the questioner. So I'm just guessing, too.
I'd recommend the following ajax call:
$.ajax({
type: "POST",
url: "update_visits_chart",
data: {month: month},
dataType: 'json',
success: function(data){
options.series[0].setData(data);
}
});
@Jugal Thakkar
$.getJSON
is just a shortcut for the ajax-call above, but it is less flexible because you have less options.
score:4
You have to set directly data
to series because data
is already a multidimensional array.
The following code will fix it.
Change options.series.push(data);
to options.series = data;
Source: stackoverflow.com
Related Query
- Load data into Highcharts with Ajax
- Highcharts load data with ajax to populate the tooltip
- Load highcharts data with laravel and ajax
- HighCharts load data via ajax
- Highcharts - Global configuration with common code and unique data & Headings
- AngularJS for Highcharts with dynamic ajax data
- Highcharts with ajax and json data what am i doing wrong?
- How to input plot data into highcharts with rails
- HighCharts & MVC: How to load whole graph definition and data with JSON?
- Load CSV data via Ajax for display in Highcharts
- highcharts Gauge live data with ajax
- JSON Data Map Issue with HighCharts + Ajax
- Have an issue with JavaScript, AJAX code displaying data
- Highcharts IE issues with jQuery ajax load
- highcharts how to load data via ajax
- Not able to load local csv data into Highcharts
- Highcharts with data populated by php generated html table - only one will load
- Highcharts series visibility with csv data source
- Handling two ajax calls on single page to pull data into Highcharts on another page
- Highcharts : using same div to load a chart multiple times with different series data
- How to have multiple highcharts with different series data in vuejs without repeating code
- Refresh Highcharts with data from AJAX using Handlebars
- Highcharts Windbarb with ajax data loading
- Highcharts cloud issue with data source when duplicating chart
- Load JSON Data into Highcharts Drilldown map Dynamicly
- addpoint is not adding point in highcharts ,where data is updated dynamically with ajax
- How to load custom JSON data into Highcharts mapbubble?
- Backfilling Highcharts chart with data from Ajax call
- How to load data dynamically into highcharts charts
- extending highcharts with an ajax load event
More Query from same tag
- Trying to use highcharts inside native script web-view. Does not work
- HighChart Pie Chart click on legend item to trigger drilldown
- Highcharts rendered with no strokes using wkhtmltopdf
- Call an angular component method when we click on highchart series
- How to handle Highcharts events from an AngularJS directive?
- R Highcharter: Different display and value for clicked category
- Highcharts Omits X Axis Label
- How to send other variables in x-axis of ReactHighCharts?
- Highcharts Drilldown with breadcrumb navigation
- how to enable only 1 out of 2 column column graph by default when page loads in highcharts and the 2nd one gets visible when toggled in the legend
- Highchart with straight lines and empty circle bullet
- Set axis extremes dynamically on drilldown
- Cannot modify highcharts initilized as a global variable
- How to show always the pop-up at the point in a cloud graph?
- Highcharts get additional info in tool tip form JSON object
- Highcharts - Is there a way to disble styled mode for certain elements?
- Multi-series Highchart chart from Django
- Highstock tooltip 'a tag' doesn't get rendered
- How to add space between series in stacked columns in HighChart?
- Highcharts with datatable
- How can I switch between JSON data sets in HighMaps using setData?
- How can I use chart tooltip formatter in react-highcharts?
- Can't add nice shading to highcharts
- Can I colour individual points with stacked columns in Highcharts?
- Highcharts: Dates Off By 1 Month
- Highcharts: column overlaps when hiding by legend
- Highcharts Navigator Zoom
- Setting Highcharts x axis label's width
- Options is not defined : Highchart error, Javascript
- How to handle HighCharts zooming with large data sets