gpt4 book ai didi

javascript - jQuery Flotcharts - 以数据点结尾的直线系列

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

我在格式化以下流程图时遇到问题:

我希望我的第二个系列(灰色)是直的,就像正方形一样。应该是从682开始,到683结束,怎么解决呢?

我的船队的选项:

var options = {
grid: {
clickable: true,
hoverable: true
},
series: {
lines: {
show: true,
fill: true,
lineWidth: 0,
fillColor: { colors: [{opacity: 1 }, { opacity: 1}] },

},

},
colors: ["rgba(41, 150, 206, 0.9)", "rgba(67, 90, 110, 0.4)",],
crosshair: {
mode: "xy",
color: "#323232",
lineWidth: 1,
},
xaxis: {
mode: mode,
show: true,
position: "bottom",
color: "#323232",
font: {
size: 10,
lineHeight: 15,
},
labelHeight: 15,
},
yaxis: {
show: true,
position: "left",
color: "#323232",
labelWidth: 20,
font: {
size: 10,
},
max: 150,
min: 0,
},
pan: {
interactive: true,
cursor: "move",
frameRate: 60,
},
tooltip: true,
tooltipOpts: {
id: 'flotTip',
content: '%x : %y km/h',
shifts: {
x: 10,
y: 20,
},
defaultTheme: true,
lines: {
track: false,
threshold: 0.05,
},

}
};

最佳答案

如果零值超出了数据非零值的范围,则图表将使用对 Angular 线连接这些(有效)数据点。如果您想在特定点结束图表,请将该点之后的值更改为 null

这在 documentation 中有描述。 :

If a null is specified as a point or if one of the coordinates is null or couldn't be converted to a number, the point is ignored when drawing. As a special case, a null value for lines is interpreted as a line segment end, i.e. the points before and after the null value are not connected.

关于javascript - jQuery Flotcharts - 以数据点结尾的直线系列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29744355/

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