jquery - jqPlot - 水平图例

标签 jquery css jqplot

jqPlot 能够为图表创建图例。这些示例仅显示垂直图例。我想做一个横向图例。例如,我想要:

X-Label1 X-Label2 X-Label3

并且不想:

X-Label1
X-Label2
X-Label3

谢谢

最佳答案

使用 EnhancedLegendRenderer plugin 很容易实现这一点.只需包含插件并使用与此类似的选项。

legend:{
    renderer: $.jqplot.EnhancedLegendRenderer,
    show: true,
    rendererOptions: {
        numberRows: 1
    }
}

您只需将 numberRows 设置为 1,这样图例将只显示 1 行。

关于jquery - jqPlot - 水平图例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12351698/

相关文章:

html - 居中 Masonry 网格中的图像不会随浏览器调整大小而缩放

javascript - 使用 Javascript 从整个网页中删除所有具有特定类的 span 标签

jQuery FlexSlider : Advance Carousel One Item at a Time

java - 在 SWT 浏览器中运行 JQuery 脚本

html - CSS Flexbox - 扩展容器下载以显示溢出内容

javascript - Google 文档查看器显示空格

jqPlot:如何实时更新图表

jquery - jQPlot 荧光笔 - 每个系列都有不同的荧光笔选项

javascript - 将数组元素重新排列成两个新数组

jquery - 如何根据特定条件动态创建 jQuery ui 选项卡?