score:0
the highcharts website has some useful articles about working with dynamic data. that is probably the best place to start.
http://www.highcharts.com/docs/working-with-data/preprocessing-live-data
http://www.highcharts.com/docs/working-with-data/preprocessing-data-from-a-database
try something out, and if you have trouble, come back here with a more specific question showing what you have tried. as it stands, your question is too broad, and will probably get closed.
an ajax request for updating data looks something like:
function requestdata() {
$.ajax({
url: 'live-server-data.php',
success: function(point) {
var series = chart.series[0],
shift = series.data.length > 20; // shift if the series is // longer than 20
// add the point
chart.series[0].addpoint(point, true, shift);
// call it again after one second
settimeout(requestdata, 1000);
},
cache: false
});
}
score:2
you can try with
var options = {
chart: {
renderto: 'chart',
},
credits: {
enabled: false
},
title: {
text: 'impression/click overview',
x: -20
},
xaxis: {
categories: [{}]
},
tooltip: {
formatter: function() {
var s = '<b>'+ this.x +'</b>';
$.each(this.points, function(i, point) {
s += '<br/>'+point.series.name+': '+point.y;
});
return s;
},
shared: true
},
series: [{},{}]
};
$.ajax({
url: "json.php",
data: 'show=impression',
type:'post',
datatype: "json",
success: function(data){
options.xaxis.categories = data.categories;
options.series[0].name = 'impression';
options.series[0].data = data.impression;
options.series[1].name = 'click';
options.series[1].data = data.clicks;
var chart = new highcharts.chart(options);
}
});
Source: stackoverflow.com
Related Query
- dynamic highcharts with json data
- dynamic highcharts with json data every 1 second
- Reload chart data via JSON with Highcharts
- Highcharts with JSON data and multiple series
- How to structure Angular with Highcharts and lots of dynamic data
- Add dynamic data to line chart from mysql database with highcharts
- Highcharts - Global configuration with common code and unique data & Headings
- Formatting JSON Data with ColdFusion for HighCharts
- AngularJS for Highcharts with dynamic ajax data
- Highcharts with ajax and json data what am i doing wrong?
- HighCharts : dynamic data with drill down
- Retrieving JSON data for Highcharts with multiple series?
- Add different symbols to highcharts chart with dynamic data
- passing formatting JavaScript code to HighCharts with JSON
- JSON Data Map Issue with HighCharts + Ajax
- Returning JSON file with cURL to use data in a HighCharts stock chart
- Customizing the series data in pie charts with a dynamic json series (HighCharts)
- Using yii with dynamic data and highcharts
- dynamic chart with Highcharts using json
- highcharts highmaps parsing json data to display world map with rich info
- Highcharts chart dynamic json data from sql
- Extract data series from a JSON array for a Highcharts chart with 2 y-axis
- Highcharts Sparkline chart with dynamic data for table -Angular js
- Issue with json data mapping with Highcharts
- Highcharts series visibility with csv data source
- Set HighCharts data from JSON string with setData() function
- Loading json data to highcharts with multiple series
- Invalid dates in Highcharts with data loaded by JSON
- Using JSON data with the jQuery highcharts plugin
- Export json data with highcharts
More Query from same tag
- Highchart - How do I create the attached image gauge within a semicircle pie chart
- Show Information From Database onclick of HighCharts
- How to align lines marker in middle/centre of the bars - High Charts
- How to add class name for each columns of highcharts?
- Highcharts load data from server ok, but not updating
- Call a function from within highchart click event in reactjs
- DrillDown in multiple line graphs
- getJSON function is not executing
- Highcharts does not resize charts inside tabs
- Real Time Update High charts from sql database
- Show only the first and last y-axis label on a graph highcharts
- Highcharts series bars - multiple series, same xAxis
- Invalid temp images directory in chart handler configuration
- Highcharts datalabels outside of plot area?
- how to make Highcharts React redraw without changing data
- Drawing a small vertical line on top of chart using High charts by specifying end coordinates
- Highcharts small columns inside area
- Highcharts - Ignore Series in Pie Percentage
- Highcharts sticky labels for big values goes out of chart
- Why doesn't HighCharts render when I pull it in with Ajax?
- Automatically zooming in on highcharts after loading
- dynamic spline highchart from database
- how to improve highcharts scatter 3d performance
- Calculating a min y axis value in highcharts
- Find and fill intersection of line chart with plot line in highcharts
- Highstock: How to combine lazy loading AND dynamic data?
- Highcharts multiple charts drilldown
- Set data grouping
- How to add categories related to legend in HighCharts?
- Unable to set colors in Highstock charts