gpt4 book ai didi

javascript - jQuery flotcharts - 向 yaxis 标签添加单个值

转载 作者:行者123 更新时间:2023-11-28 01:31:28 25 4
gpt4 key购买 nike

如何给yaxis标签添加单值?就像这个 80 值: enter image description here

最佳答案

1) 对于线路使用 markings ,例如将此添加到您的图表选项:

grid: {
markings: [ { xaxis: { from: 0, to: 2000 }, yaxis: { from: 80, to: 80 }, color: "black" }, ... ]
...
}

根据您的需要和min/max 值更改fromto 值。

2) 对于轴上的值,您必须像这样手动添加它(参见 example ):

var o = plot.pointOffset({ x: plot.getAxes().xaxis.min, y: 80.0});
$(plot.getPlaceholder()).append("<div style='position:absolute;right:" + (o.left - 4) + "px;top:" + o.top + "px;color:red;font-size:smaller;text-align:right'>80</div>");

关于javascript - jQuery flotcharts - 向 yaxis 标签添加单个值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30121997/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com