小编Rog*_*ger的帖子

jqplot无法正确显示图例和y轴标签

我有一个使用jqplot和两行的线图.一行代表最大值,另一行代表最小值.我的代码图例无法正确显示,y轴标签与y轴重叠,我做错了什么?谢谢你的帮助!

[编辑] Jqplot版本是jquery.jqplot.1.0.0b2_r1012

我的代码显示此图表:

我的代码显示此图表

我想要一个像这个 图像中的传奇

这是我的代码:

<link rel="stylesheet" type="text/css" hrf="../plugins/jqplot/jquery.jqplot.min.css" />
<script type="text/javascript" src="../plugins/jqplot/jquery.min.js"></script>
<script type="text/javascript" src="../plugins/jqplot/jquery.jqplot.min.js"></script>
<script type="text/javascript" src="../plugins/jqplot/plugins/jqplot.canvasTextRenderer.min.js"></script>
<script type="text/javascript" src="../plugins/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js"></script>
<script type="text/javascript" src="../plugins/jqplot/plugins/jqplot.enhancedLegendRenderer.min.js"></script>
<script type="text/javascript" src="../plugins/jqplot/plugins/jqplot.canvasOverlay.min.js"></script>
<script>
  $(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, …
Run Code Online (Sandbox Code Playgroud)

label legend jqplot

5
推荐指数
1
解决办法
5471
查看次数

标签 统计

jqplot ×1

label ×1

legend ×1