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

  • SEARCH
  • Home
  • 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 8291347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:05:54+00:00 2026-06-08T13:05:54+00:00

I’m trying to draw a chart with a single datapoint each month. I’m sending

  • 0

I’m trying to draw a chart with a single datapoint each month. I’m sending this through to jqPlot as a single point on the first of each month:

$.jqplot('actualChart', [[['2011-10-01',0.296],['2011-11-01',0.682]]], {
    title: programSelection.options[programSelection.selectedIndex].text,
    axes: {
        xaxis: {
            renderer: $.jqplot.DateAxisRenderer,
            rendererOptions: { tickRenderer: $.jqplot.CanvasAxisTickRenderer },
            tickOptions: { formatString: '%b' }
        }
    }
}

I’m loading the chart data using Ajax. Some datasets have more points of data than others – in the example above with only 2 points, the x-axis ticks (which ‘%b’ means just appear as Oct and Nov) are rendered automatically along the axis, but too often, e.g. Sep…Oct…Oct…Oct…Oct…Nov – at regular points along the line that is shown. I just want a single tick at the start of Oct and another at the start of Nov.

I have spent a lot of time searching and it seems tickInterval is made for this, but adding

tickInterval: '1 month'

just makes the x-axis, datapoints and line disappear – this is the broken functionality I’m referring to! Specifying any other interval e.g.

tickInterval: '2 days'

also breaks it.

A workaround is to provide the ticks manually, e.g.

ticks: ['2011-10-01','2011-11-01']

This does put the ticks in the right place, but

a) is a hassle that should not be required, and

b) loses the nice padding at either end of the graph’s datapoints, so the points at either end appear on the edges of the graph. Unless manual ticks either side are added, of course, but in the Oct-Nov example above I don’t want to provide a whole month on either side because then the interesting data takes up only the middle third of the graph.

Can anyone help me with this? Thanks in advance.

EDIT – found a solution: Providing a min attribute for the axis does appear to fix this (for whatever reason… bug?), so unless anyone has any better ideas I’ll do this!

  • 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-08T13:05:56+00:00Added an answer on June 8, 2026 at 1:05 pm

    I found a solution!
    You need to specify the tickinterval as a javascript timestamp.
    So lets say you want 1 hour. That would be 1000*60*60 = 3600000 (javascript timestamps are in milliseconds).

    So you would write: tickInterval:’3600000′,

    Works here.

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

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,

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.