gpt4 book ai didi

Highcharts/Highstock 阶梯线没有垂直 "transition"线?

转载 作者:行者123 更新时间:2023-12-03 16:48:16 25 4
gpt4 key购买 nike

是否可以从“方波”线中省略垂直线?我想你可以称之为水平线,这是一个例子:

level line

最佳答案

实现这种外观的最简单方法是使用带有自定义“线”符号的散点图:

// define a custom line symbol
Highcharts.SVGRenderer.prototype.symbols.line = function (x, y, w, h) {
return ['M', x, y, 'L', x - w * 2, y, 'M', x, y, 'L', x + w * 2, y, 'z'];
};
if (Highcharts.VMLRenderer) {
Highcharts.VMLRenderer.prototype.symbols.cross = Highcharts.SVGRenderer.prototype.symbols.cross;
}

$('#container').highcharts({
chart: {
type: 'scatter'
},
title: {
text: 'Look At Lines!!'
},
series: [{
name: 'Line Symbol',
data: [54.4, 29.9, {y: 129.2, radius: 8}, 144.0, 176.0, 135.6],
marker: {
symbol: 'line',
lineColor: null,
lineWidth: 2
}
}]
});

请注意,您可以通过增加 radius 来调整单个点的长度。 .

fiddle here .

产生:

enter image description here

关于Highcharts/Highstock 阶梯线没有垂直 "transition"线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23242857/

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