Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9220209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:17:39+00:00 2026-06-18T03:17:39+00:00

I have to display some sensors data using highcharts and I’m using YII as

  • 0

I have to display some sensors data using highcharts and
I’m using YII as php framework.
I store the time in mysql (v5.6) as timestamp(3) I need the millisecond fraction
and I want to use it because almost of my data are in one second or 2

my controller give me as output
["2012-12-01 15:00:00.070",45]
but this point is not shown in my chart , and the ajax request is made just one time
I get the error with firebug at the level of ” var series = chart.series[0], ”
I don’t know if the problem is in my highchart code or in the time format
I don’t know also how to use the Dateparse inside my code after receiving the point
please help !

function requestData() {
 $.ajax ({
            type:"get" ,
        url: "<?php echo CController::createUrl('beam/GetSensorsDataLive') ?>",
        data: {"beamId" : "<?php echo $modelBeam['poutre_id'] ?>" },
         dataType: "json",

          success: function(response,point) {
          var series = chart.series[0], //// error here 

    shift = series.data.length > 20;// shift if the series is longer than 20
          chart.series[0].addPoint( point,true, false); // add the point
          setTimeout(requestData, 1000);    // call it again after one second

                                   },
                                 cache: false
    });
           }  

 $(document).ready(function() {
     var chart;

        chart = new Highcharts.Chart({
        chart: {
            renderTo: 'graph',
            type: 'spline',
            events: {
                load: requestData   
            }
        },

        xAxis: {
          type: 'datetime',
          },
              tooltip: {

                  formatter: function() {

                    return '<b>'+ this.series.name +'</b><br/>'+

                    Highcharts.dateFormat('%H:%M:%S:%m', this.x) +'<br/>'+

                    Highcharts.numberFormat(this.y, 2);

            }

        },  


                    series: [{
            name: 'Live Data From sensor <?php echo $modelBeam['poutre_id'] ;?>  ',
             data:[] 
        }]

    });

});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:17:41+00:00Added an answer on June 18, 2026 at 3:17 am

    Your data x should be JS timestamp in miliseconds, also you can parse your data from php and use Date.UTC() function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using JGraphX to display some data (simple discrete graphs) and I
I have a BufferedImage using an IndexColorModel to display some graphics data which uses
I have a problem using JSF to display some data in Facelets. I have
I have been trying to display some basic EXIF data from a photo with
i have two foreach loop to display some data, but i want to use
I have a grid view in my main page and I display some data
I have a JTable that I want to use to display some data (a
I am using a popup window to display some information and have an edit
I have to display some tabular data where there is a maximum of 3
I have a HighCharts chart to display some information. I have stacked information for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.