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
- How to Plot chart from two different webform Submission data And Wand to Display annotated point
- Asyncronously add history to existing HighStock chart
- Is it possible to plot more than 35000 points in Highcharts
- Angular highcharts modules conflict after import heatmap
- Highmaps Group Countries and Hover, Follow link on Click
- Highcharts skip non-provided steps in a series
- How to add Highcharts view data table option to the exports dropdown?
- change distance of x-axis labels from axis in highchart
- Add category in HighCharts
- Highstock with datepicker and a non-default date
- Highcharts addSeries not showing line
- Highstock add points to dynamically added series
- How to set the x axis of HighCharts to intake DateRange
- HighCharts series Z index
- Overlapping labels in HighCharts on xAxis
- How to change bar chart colors when is weekend?
- LINQ that groups data and returns series for chart
- Add additional data in tooltip of Highcharts with dynamic x-axis category
- Highchart label rotation makes my column dissappear
- How to use date range for highcharter columnrange plot?
- Error scraping Highcharts in Python with selenium
- How to plot a highstock single line series graph from ajax data
- Highcharts repeating same label value on Y Axis
- Loading Json File Into Highmaps
- Async DrillDown functionality in Highcharts with Angular 4
- Can we display a tooltip by default not by mouseover
- Highcharts When printing the chart does not fit the page
- Turning array of JSON objects into an array for HighCharts/GoogleCharts
- Click event in drilldown chart - Highcharts
- Resize height with Highcharts