1

I'm using Jqplot and it shows me a double date.. i dont know why, maybe you can help me ;)

That's my Code:

$(document).ready(function(){
var line1=[['17-Oct-13', 0.00], ['18-Oct-13', 0.00], ['19-Oct-13', 0.00], ['20-Oct-13', 0.00], ['21-Oct-13', 0.00], ['22-Oct-13', 0.00], ['23-Oct-13', 0.00], ['24-Oct-13', 0.00], ['25-Oct-13', 1], ['26-Oct-13', 0.00], ['27-Oct-13', 0.00], ['28-Oct-13', 0.00]];
  var plot1 = $.jqplot('chartdiv', [line1], {
      title:'',
      axes:{
        xaxis:{
          renderer:$.jqplot.DateAxisRenderer,
          tickOptions:{
            formatString:'%b %#d'
          }
        },
        yaxis:{
          tickOptions:{
            formatString:'€%.2f'
            }
        }
      },
      highlighter: {
        show: true,
        sizeAdjust: 7.5
      },
      cursor: {
        show: false
      }
  });
});

Output looks like:

You can see that there is a double date (Okt-26). How do I fix this?

Community
  • 1
  • 1
mattja
  • 79
  • 1
  • 5
  • Sorry I don't have an answer. I'm really going nuts with the same issue. http://jsfiddle.net/GFtAr/3/ but in my case the 27th is repeated. – Pod Oct 29 '13 at 10:59

1 Answers1

0

Same problem. I can suggest just a workaround, try to use, for he first date, an hour, like 2013-10-1 1:00 AM. It worked for me. I've tried in the Pod's code too, and it worked (p = [["2013-10-1 1:00 AM", 0.8], ["2013-10-2", 0.5],...)

Hope it helps

  • Thanks Biagio. It was working yesterday but now with the real code (several series in same graph) it is not working. I added a min value and let the ticks arrange themselves (based on this http://stackoverflow.com/questions/8467233/jqplot-dateaxis-tickinterval-not-working). That's the best I could get. I could also feed the ticks manually but then zooming does not behave properly. That's the price of free software, jqplot support has been dead for months already...thanks for the suggestions! – Pod Oct 30 '13 at 13:48