Note that there are some explanatory texts on larger screens.

plurals
  1. POjqplot cannot display legend and y axis label correctly
    text
    copied!<p>I have a linechart using jqplot with two lines. One line represents max values and other one represents min values. With my code legend does not display correctly and y axis label overlaps with y axis ticks What am I doing wrong? Thanks for your help!</p> <p>[EDIT] Jqplot version is jquery.jqplot.1.0.0b2_r1012</p> <p><strong>My code displays this chart:</strong></p> <p><img src="https://i.stack.imgur.com/1JZY0.png" alt="My code display this chart"></p> <p><strong>I want a legend like the one in this</strong> <a href="http://www.jqplot.com/docs/files/images/basicoptions.png" rel="nofollow noreferrer">image</a></p> <p><strong>Here's my code:</strong></p> <pre><code>&lt;link rel="stylesheet" type="text/css" hrf="../plugins/jqplot/jquery.jqplot.min.css" /&gt; &lt;script type="text/javascript" src="../plugins/jqplot/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="../plugins/jqplot/jquery.jqplot.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="../plugins/jqplot/plugins/jqplot.canvasTextRenderer.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="../plugins/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="../plugins/jqplot/plugins/jqplot.enhancedLegendRenderer.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="../plugins/jqplot/plugins/jqplot.canvasOverlay.min.js"&gt;&lt;/script&gt; &lt;script&gt; $(document).ready(function(){ var maxPoints86 = [3.000000,4.000000,4.500000,5.000000,7.000000,7.000000,5.500000,8.500000,6.700000,5.200000,4.000000,5.500000,0.200000,7.500000,5.000000,5.200000,5.000000]; var minPoints86 = [2.000000,1.000000,3.000000,4.000000,5.000000,4.800000,5.000000,6.000000,4.000000,2.500000,2.500000,5.000000,0.100000,6.000000,3.500000,5.000000,5.000000]; var plot86 = $.jqplot('chart', [maxPoints86, minPoints86], { title:'Errores en facturación', axesDefaults: { labelRenderer: $.jqplot.CanvasAxisLabelRenderer }, axes: { xaxis: { label: "Monthly", }, yaxis: { label: "Percentage" } }, legend: { show: true, location: 'se', labels:['Max','Min'], showSwatch: true, predraw: false, placement:"insideGrid", }, series:[ { lineWidth:5, markerOptions: { style:"circle", size:10 } }, { lineWidth:5, markerOptions: { style:"filledSquare", size:10 } } ] } ); }); &lt;/script&gt; &lt;div id="chart" style="width:500px;height:300px;"&gt;&lt;/div&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload