gpt4 book ai didi

javascript - jqPlot 两次显示 y 刻度

转载 作者:行者123 更新时间:2023-11-29 15:00:54 26 4
gpt4 key购买 nike

在 y 轴上使用两个具有正常整数值的 DateAxisSeries(x 轴)我的 jqPlot 将 y 刻度呈现两次。

像这样:

2|
2|
1|
1|
0|______________________________________

这会导致值无法正确呈现,除了表面这显然不应该发生。

意甲 1:[["07.03.2012", 2], ["17.03.2012", 2], ["28.03.2012", 1]]

意甲联赛 2:[["01.03.2012", 1], ["08.03.2012", 1], ["14.03.2012", 1], ["24.03.2012", 1]]

最佳答案

y 轴格式字符串使用什么?我遇到了同样的问题,因为我无意中使用了 formatString='%d',导致 y 值 1.5 呈现为 1。

您应该能够通过删除/修改您的 yaxis formatString 或指定特定的 tickInterval 来解决此问题,例如

yaxis: {
min: 0,
max: {{ max_count }} + 1,
tickInterval: 1,
tickOptions: {
formatString:'%d'
}
}

关于javascript - jqPlot 两次显示 y 刻度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10329559/

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