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

标签 label jqplot legend

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

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

我的代码显示此图表:

My code display this chart

我想要一个这样的传奇
image

这是我的代码:

<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,
                placement:"insideGrid",
              },
              series:[ 
                  {
                    lineWidth:5,
                    markerOptions: { style:"circle", size:10 }
                  },
                  {
                    lineWidth:5, 
                    markerOptions: { style:"filledSquare", size:10 }
                  }
              ]
            }
          );

    });
</script>
<div id="chart" style="width:500px;height:300px;"></div>

最佳答案

由马克在他的评论中解决。我的样式表链接错误,href 应该是href。非常感谢马克!

关于label - jqplot 无法正确显示图例和 y 轴标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10620785/

相关文章:

python - matplotlib 自定义图例中类别的副标题

python - 格式化德语的刻度标签,即以点作为千位分隔符,以逗号作为十进制分隔符

wpf - WPF 标签中的换行符?

jquery - JQplot : blank chart when print IE

jqplot 条形图忽略我的 float 数字。如何修复它们?

matplotlib - 如何在图例中的同一标签下添加条形和线条?

R 指定点边框颜色与填充和线条不同

ios - 如何识别标签点击自定义 UITableViewCell - Swift 3

JavaFX - 如何将事件句柄分配给标签数组?

jqplot - 将 jqplot 放入 jquery 选项卡中