score:2
Two way of adding series to your chart:
- Create the whole chart when ajax call ends successfully (thus creating series prior to invoke
new Highcharts.Chart
), see code below - Programmatically adding points to the (already) rendered chart
Example 1 (didn't try this, i'm just remembering the chart struncture):
// Create the options object without calling New Highcharts.Chart
var Options = { chart: { renderTo: 'container' } };
$.get('Newchart.aspx', function(data) {
var fulldata = document.getElementById("MyHiddenField").value;
var lines = fulldata.split('$');
var series = []; // Array of series to be filled
// Then loop each line and create one series for each line
$.each(lines, function(lineno, line) {
// Extract name and x/y values (e.g. [[x1, y1], [x2, y2]] from current line
var name, values;
var current = { name : name, data : values };
series.push(current); // Push current series
});
// Inizialize the chart
Options.series = series;
var chart = new Highcharts.Chart(Options);
});
Example 2: take a look here. Basically create a new instance of the chart and then call addSeries()
inside success function.
Source: stackoverflow.com
Related Query
- Highcharts - best way to handle and display zero (or negative) values in a line chart series with logarithmic Y axis
- Line chart with x and y values
- Highcharts: having trouble recreating stacked area chart from Excel with positive and negative values
- Highcharts - Area Chart - Stacking with series containing negative and positive values
- Highcharts - draw line chart with summed values but show breakup on hover
- Column chart with negative values and categories on xAxis in HighCharts
- (Horizontal) bar and line chart with Highcharts
- Can't disconnect line chart with [null,null] and irregular intervals in Highcharts
- Highcharts: how to draw line segments with click-and-drag and without chart to scroll?
- Find and fill intersection of line chart with plot line in highcharts
- Highchart how to create lollipop type chart with circle and line top/bottom at different positions
- Line and column combo chart with multiple columns for each category, how to position line marker for each category on a specific column?
- Highcharts to display area range and line chart with data from a CSV file
- how to make chart real time with 2 line and get data from php with highcharts
- Line chart with multiple series and irregular intervals not displaying correctly
- Highcharts - Performance issue using chart with x values date and TIME
- hightchart line and column chart , line not start with start of chart
- Drawing a dynamic Mixed Bar and Line chart with HIghchart.js with socket.io for live data
- JavaScript line and area chart with similar interface as shown
- Highcharts: Line graph with half solid line and half dotted line?
- JavaScript - Export Div with SVG chart + HTML as and Image
- Highcharts / jQuery - destroy and rebuild chart with original options
- How to create a new Highstock chart with new Highchart and not jquery?
- Highchart Area Range chart with gradient that follows the line
- Highcharts - Scatter chart with a line connecting the dots in the series
- Highcharts blank chart with x and y axis
- Add dynamic data to line chart from mysql database with highcharts
- Creating a line graph with highcharts and data in an external csv
- Stock chart timeline buttons and date field left align with chart
- High and low line on candlestick chart
More Query from same tag
- How to make drill down in stacked Column Line chart in Highchart
- Adding export-to-csv option onto Highcharts chart as a client user?
- Suggestions on getting Highstocks graph images sent to server
- Is possible to add a frame in 3d chart?
- Spline graph with xAxis dateTime the line starts extremeleft/origin overlapping colorband on yAxis
- Gauge chart in ng2-highcharts
- How to assign chart title as exporting filename?
- Disable-Click on Legend in HighCharts Column Graph
- How to disable tooltips for the highcharts-regression plugin?
- HighCharts Glow Effect on Charts Doesnt not affect to multiple graphs
- legend size in Highcharts under ruby on rails
- How to get Highcharts to keep rotated data labels within bounds of a chart?
- How to show two specific data points from tabular data in Highcharts?
- Rails 3.1 SQL sum only negative numbers
- Radar Chart Not working in React Highcharts
- Highchart long y-axis title may overlap with title when chart.styledMode set to true
- How to set the graph line chart dynamically?
- how to make custom directive or pass variable in directive in angular js
- Highcharts Gauge
- I'm trying to use highcharts to display a series of points not just x and y
- Renaming items in export menu in highcharts
- Highcharts - programmatically draw a line or graphic between two related points
- How we can show Highchart column-placement chart for negative values?
- How to click on SVG element in highcharts to download file using Selenium
- highcharts not showing decimal points coming from xml
- Highcharts label formatter to query mysql?
- Highcharts : How to remove the gap between series and vertical axis?
- Highcharts line not plotting
- How can I reload chart following data update?
- Ajax highcharts PieChart not displaying data