3

using two DateAxisSeries (x-axis) with normal integer values on the y-axis my jqPlot renders the y-ticks twice.

Like this:

2|
2|
1|
1|
0|______________________________________

This causes the values being rendered not properly, except the face that this obviously shouldn't happen.

Serie 1: [["07.03.2012", 2], ["17.03.2012", 2], ["28.03.2012", 1]]

Serie 2: [["01.03.2012", 1], ["08.03.2012", 1], ["14.03.2012", 1], ["24.03.2012", 1]]

Julius F
  • 3,434
  • 4
  • 29
  • 44

2 Answers2

2

What you using for your y-axis formatString? I ran into this same problem because I was inadvertently using formatString='%d', causing the y-value 1.5 to render as 1.

You should be able to fix this by removing/modifying your yaxis formatString or specifying a specific tickInterval, e.g.

yaxis: {
    min:          0,
    max: {{ max_count }} + 1,
    tickInterval: 1,
    tickOptions:  {
        formatString:'%d'
    }
}
Cerin
  • 60,957
  • 96
  • 316
  • 522
0

I have never had a chart with two Date axes, but I suspect the problem you are facing is the same as for one.

Did you remembered to set the min and max parameters for each axis? I have mentioned this solution already in one of my answers. Please find it here.

This appears to be the only way of getting the data axis to work properly since otherwise it is being auto sized chance the duplication of values.

Community
  • 1
  • 1
Boro
  • 7,913
  • 4
  • 43
  • 85
  • @daemonfire300 can you make a jsfiddle (http://jsfiddle.net/) with a sample so I can work with it from there? – Boro Apr 26 '12 at 17:33