2

Just as the title says. Have a look at the screen-shot below the see what I mean. Version is 0.9.7r635. Any ideas?

Screenshot

There is a years worth of data, that is, a plot for every single day. Here is a sample:

[[["01-01-2012", 0], ["01-02-2012", 0], ["01-03-2012", 0],...]]

And here is the javascript:

$.jqplot('jqplot', chartData, {
    seriesDefaults: {
        color: '#09c',
        showMarker: false,
        rendererOptions: {
            smooth: true
        }
    },
    axes: {
        xaxis: {
            pad: 0,
            renderer: $.jqplot.DateAxisRenderer,
            tickRenderer: $.jqplot.CanvasAxisTickRenderer ,
            tickOptions: {
              angle: -90
            },
            tickInterval: ( 'year' == duration ) ? '1 month' : '1 day'
        },
        yaxis: {
            min: 0,
            tickOptions: {
                formatString: '%d',
            }
        }
    }
});

In this instance, the tickInterval is set to '1 month'.

Jeff Farthing
  • 91
  • 1
  • 4
  • Can you please provide us the code of your plot. – Alon Adler Feb 23 '12 at 21:03
  • I have come accoross a set of similar problems with the DateAxisRenderer. I think this one might have the same reason as one of mine. Please see my answer to a similar issue http://stackoverflow.com/a/10233111/613495 Hope it helps you. – Boro Apr 19 '12 at 17:18

2 Answers2

0

For me updating jqplot (as this question is quite old) solves a lot of issues, in order to get tickinterval working the accepted answer here helped me:

jqPlot DateAxis tickInterval not working

Community
  • 1
  • 1
rmorse
  • 736
  • 6
  • 18
0

Try without this $.jqplot.CanvasAxisTickRenderer. When this is there the date values are treated as labels. So the dateaxis renderer cannot render the dates well. I had this same problem.

Juliyanage Silva
  • 2,529
  • 1
  • 21
  • 33