【问题标题】:jqPlot vertical axis label isn't render verticaljqPlot 垂直轴标签不垂直渲染
【发布时间】:2014-04-17 02:47:22
【问题描述】:

这是一个非常简单的问题,但我被困了 2 天,开始相信魔法。 好吧,我只需要简单地垂直旋转 Y 轴标签。 jqPlot 文档和示例说我必须使用:

labelRenderer: $.jqplot.CanvasAxisLabelRenderer

我做了,但它仍然不起作用。我什至尝试将 jqPlot 示例复制粘贴到我的项目中,但它也无法正常工作!是的,我连接了 canvasAxisLabelRenderer.js 和 canvasTextRenderer.js。在这里,请检查我的jsfiddle:http://jsfiddle.net/gu3Cr/5

更新: 刚刚注意到,它不仅适用于 Chrome(版本 34)。在 Mozilla firefox 28 上它可以工作。但这仍然是一个问题,因为 jqPlot 示例在 Chrome 上可以正常工作。

【问题讨论】:

    标签: jqplot


    【解决方案1】:

    您的示例代码很好,但是您的 JSFiddle 存在脚本引用问题。在 Chrome 控制台中,我看到了这个:

    Refused to execute script from 'https://bitbucket.org/cleonello/jqplot/raw/e8af8a37f0f14ea1e8c630ecfe6f1b1933794036/src/plugins/jqplot.canvasAxisLabelRenderer.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled. 
    

    我删除了该引用并添加了一个指向http://cdn.jsdelivr.net/jqplot/1.0.8/plugins/jqplot.canvasAxisLabelRenderer.min.js 的链接,它工作正常。在此处查看修改后的示例:

    http://jsfiddle.net/LuQh7/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多