Issue #512 resolved

Single value issue

Anonymous created an issue

when I pass just one value the browser crashes {{{

!js

<script> $(document).ready(function(){ var line1=[['2008-06-15', 40]]; var plot2 = $.jqplot('chart1', [line1], { title:'Customized Date Axis', axes:{ xaxis:{ renderer:$.jqplot.DateAxisRenderer, tickOptions: { formatString: '%b %#d, %#I %p' } } }, series:[{lineWidth:4, markerOptions: {style:'square'}}], highlighter: { show: true, sizeAdjust: 7.5 }, }); }); </script>

}}}

this one works though {{{

!js

var line1=[['2008-06-15', 40], ['2008-06-16', 20]]; }}}

Comments (11)

  1. Anonymous

    ran into this too. I used two lines one with 5 and one with 2, all on the same day. if I moved one point a bit, it worked but it rendered a lot of horizontal lines.

    Nice plug in btw. I like this.

  2. Anonymous

    horizontal lines, it should be vertical lines, and ticks on the x axis. I moved one point 300000 ms and used this format: xaxis:{ renderer:$.jqplot.DateAxisRenderer, tickOptions:{formatString:'%b&nbsp;%#d'} }

  3. Anonymous

    I could not make this fix work with multiple lines

    var line1 = [[1262304000000,2000]];
    var line2 = [[1262304000001,30]];
      
    var plot1 = $.jqplot('chart2', [line1, line2], {
      //var plot1 = $.jqplot('chart2', [line1], {
       title:'Data Point Highlighting',
    
          axes:{
            xaxis:{
              renderer:$.jqplot.DateAxisRenderer,
              min: "2012-01-03 07:50",
              tickOptions:{formatString:'%b&nbsp;%#d'}
    

    and the ticks grows, when just moving one point a bit.

    var line1 = [[1262304000000,2000]]; 
    var line2 = [[1262304000001,30], [1262304300000,300]];
      
      var plot1 = $.jqplot('chart2', [line1, line2], {
      //var plot1 = $.jqplot('chart2', [line1], {
          title:'Data Point Highlighting',
    
          axes:{
            xaxis:{
              renderer:$.jqplot.DateAxisRenderer,
              tickOptions:{formatString:'%b&nbsp;%#d'}
            },
            yaxis:{
              tickOptions:{
                formatString:'%.2f'
                }
            }
          },
      
    
  4. Log in to comment