score:2
Accepted answer
I have been able to solve it. Actually I didn't use my variable chart1
correctly for the function below. It has t be changed as such:
var chart1;
/**
* Request data from the server, add it to the graph and set a timeout
* to request again
*/
function requestLightData() {
$.ajax({
url: '/live-data',
success: function(point) {
var series = chart1.series[0],
shift = series.data.length > 20; // shift if the series is
// longer than 20
// add the point
chart1.series[0].addPoint(point, true, shift);
// call it again after one second
setTimeout(requestLightData, 1000);
},
cache: false
});
}
I also merged the two js
scripts into, ie I added all that was in highchartsTemp.js
into highcharts.js
and removed the script highchartsTemp.js
from my HTML file.
Source: stackoverflow.com
Related Query
- AJAX displaying values from two different functions in a single Highcharts chart instead of two different ones
- Highcharts - two different values are being overlapped
- passing json values to highcharts from .net code behind
- Connect two different values with vertical line in highcharts
- Highcharts column chart color by single color but with different brightness level as per respective column value
- Is it possible to have two Y Axis in a highstock chart from highcharts one on the left and another on the right?
- Highcharts gantt chart : Task progress indicator need to show a single task for various status like completed,inprogress etc with different colors
- HighCharts - Single legend for two columns in a Stack Column chart
- Highcharts Column Chart Not Displaying Dynamic Values
- Highcharts Pie Chart from Ajax
- Highcharts not displaying data but drawing chart when reading from CSV file
- Highcharts pie chart plotting different values
- Handling two ajax calls on single page to pull data into Highcharts on another page
- How to Plot chart from two different webform Submission data And Wand to Display annotated point
- Highcharts Stacked Column chart from JSON not charting correct values
- Highcharts column chart with two different scales
- Displaying array values in Bar chart of HighCharts
- Trellis chart x categories values are not displaying correctly in Highcharts
- dynamically generating json from json for highcharts heap map chart using ajax
- Highcharts Ajax Json not displaying Chart
- Highcharts not displaying chart from csv file
- Highchart, Combined Two Chart in One with different data from Meteor Collection
- dataLabels for bar chart in Highcharts not displaying for null values in 3.0.8
- HighCharts Pie Chart - Displaying multiple series values in Tooltip
- HighCharts pie chart X-axies values are not displayed while trying to get data from MySQL database using PHP
- Highcharts - How to show two tooltips for single point at different positions of chart?
- Backfilling Highcharts chart with data from Ajax call
- Get SVG Data from Highcharts without displaying the chart
- Displaying multiple Highcharts from single json
- Highcharts chart not displaying data from csv file
More Query from same tag
- Sort the series data for every X-Axis in Highcharts
- Highchart chart synchronisation showing console error while using highstock.js
- Highcharts - Multiple Axis Graph not displaying labels
- How do I get elements in zoom area
- Applying custom style on ticks of Highchart
- Highcharts Gauge - how to read input from file?
- Highcharts yAxis max not working
- Why is this drilldown graph made by python-highcharts not working?
- HighChart Avoiding points on the plotbackground
- How can i align the highchart legend pagination to right or left side of the legends?
- Highcharts create space for negative value
- Highchart is blank
- Unable to trigger a click event on series data | Highchart
- How do you correctly encode JSON from MYSQL, ready for Highcharts
- How do I configure the options in Highcharts to allow multiple drilldowns asynchronously?
- Highcharts series not loading
- In semi-overlapped bubble hide behind bubble content upto hidden part in Highcharts
- Highcharts change or add color for name in a array of point.names and y
- Tooltip for line segments instead of points in highcharts
- Highcharts overlay multiple datetime series
- Highcharts Pie Chart data corrupted
- In polar chart, connect each series on base with an individual line
- Highcharts large data set clustering
- Highcharts Detect mouseOver event only in the colored area
- Hide Heatmap DataLabels based on Condition
- Shared events highcharts
- How do i combine a horizontal bar graph with a line chart?
- how to update highstock indicators on dynamically updated chart
- Highcharts - Redraw empty chart
- Highcharts legend symbol sizes for scatter charts