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 6468393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T05:53:08+00:00 2026-05-25T05:53:08+00:00

I have an issue regarding highcharts… Consider the example relation: Data —– Id(pk) Date

  • 0

I have an issue regarding highcharts…

Consider the example relation:

Data
-----
Id(pk)
Date date
Data varchar(50)

This relation contains data. It is important to note that the date is non-contiguous…i.e. data isn’t entered everyday. An example table may be

Data
-----
Id       Date        Data
1     2011-08-22   SomeData
2     2011-08-29   MoreData

I present users with an HTML/jQuery interface, where data can be pulled from the database and graphed using highcharts. This works well:

http://dev.speechlink.co.uk/David/fifthiteration/dbgrapher.php

I use the following jQuery to label the x-axis:

xAxis: {
         type: 'datetime',
         maxZoom: 14 * 24 * 3600000, // fourteen days
         lineWidth: 1,
         lineColor: '#999999',
         title: {
            text: 'Date' 
         }
       }

And this is for the series:

series: [{
         type: 'spline',
         name: data.questionTitle,
         pointInterval: 24 * 3600 * 1000,
     pointStart: Date.UTC(data.year, data.month, data.day),
     data: cdata,
     lineColor:  '#f6a828',
     color: '#418ed6'
      }]

Now this works fine bar ONE problem -> all points are plotted as if they are done on successive days…This is not the case…For example, if in my table I have data submitted on the 24th and then no data until the 29th….the data on the 29th is incorrectly placed as data submitted the 25th…

This is obviously to do with this series argument:

         **pointInterval: 24 * 3600 * 1000,**

My data comes in like this:

[23rd, 24th, 25th, 29th]

Whereas it should probably be something like:

[23rd, 24th, 25th, null, null, null, 29th]

I am not sure if the above is correct syntax..thats is why I am here…how do you tell highcharts to skip a point, but keep the same pointintervals….

EDIT:

I see on highcharts you can pass data like so:

var chart = new Highcharts.Chart({
    chart: {
        renderTo: 'container'
    },
    xAxis: {
        type: 'datetime'
    },

    series: [{
        data: [
            [Date.UTC(2010, 0, 1), 29.9], 
            [Date.UTC(2010, 2, 1), 71.5], 
            [Date.UTC(2010, 3, 1), 106.4]
        ]
    }]
});

Is there a way to pass a php array in the correct format to the series above (i.e. with a data and associated value)..

  • 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-05-25T05:53:09+00:00Added an answer on May 25, 2026 at 5:53 am

    If you dont have data points for an interval then you can specify as null in the series. You can try [23rd, 24th, 25th, null, null, null, 29th] it will perfectly work.

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

Sidebar

Related Questions

I have an issue regarding to auto populating a select dropdown from jQuery/JSON data
I have seen a few posts regarding this issue but not one specific to
i have a design issue regarding sending user data from a mobile phone app
I have already found a previous SF question regarding this issue and I believe
I have read many posts on here regarding this issue; The answers of 'Why
I have an issue regarding an recursive count which works well in SQL server,
I have recently run into a particularly sticky issue regarding committing the result of
Please help regarding the following issue. I have enabled the Block popup option in
I have an issue regarding sending form values to a script. I have a
I have a prickly design issue regarding the choice of database technologies to use

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.