Single value issue

Anonymous avatarAnonymous created an issue

when I pass just one value the browser crashes

<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

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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.