Javascript 不要删除样条曲线图表中的上一点
在splin highchart中,当绘制新的活动点时,将从左侧移除第一个点 如何在highchart中禁用此工作 我的图表必须在fix datetime范围内,live splin图表必须以min datetime开始,以max datetime结束。并且不要删除任何点 当接收到最大日期时间时,该点必须清晰Javascript 不要删除样条曲线图表中的上一点,javascript,jquery,highcharts,Javascript,Jquery,Highcharts,在splin highchart中,当绘制新的活动点时,将从左侧移除第一个点 如何在highchart中禁用此工作 我的图表必须在fix datetime范围内,live splin图表必须以min datetime开始,以max datetime结束。并且不要删除任何点 当接收到最大日期时间时,该点必须清晰 $(function () { $(document).ready(function () { Highcharts.setOptions({
$(function () {
$(document).ready(function () {
Highcharts.setOptions({
global: {
useUTC: false
}
});
$('#LineChart').highcharts({
chart: {
type: 'spline',
zoomType: 'x',
resetZoomButton: {
position: {
x: 0,
y: -30
}
},
animation: Highcharts.svg, // don't animate in old IE
marginRight: 10,
events: {
load: function () {
var seri = new Array();
seri = this.series;
setInterval(function () {
var result = ReadAlarmTypes();
var j = 0;
$.each(result, function (index, AlarmTypes) {
var AlarmName = AlarmTypes.AlarmName;
var AlarmTypeId = AlarmTypes.AlarmTypeId;
//Read Last Device's Log Value
var signals = ReadLatestLogs(AlarmTypeId);
if (signals != null) {
$.each(signals, function (index, signal) {
var series1 = seri[j];
var x = (new Date(signal.DateTime)).getTime(), // current time
y = signal.Value;
series1.addPoint([x, y], true, true);
});
}
j++;
});
}, 5000);
}
}
},
title: {
text: 'Live random data'
},
xAxis: {
type: 'datetime',
tickPixelInterval: 150
//min: (new Date(GetShiftTime())).getTime()
},
yAxis: {
title: {
text: 'Value'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
formatter: function () {
return '<b>' + this.series.name + '</b><br/>' +
Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x) + '<br/>' +
Highcharts.numberFormat(this.y, 2);
}
},
legend: {
enabled: true
},
exporting: {
enabled: true
},
series: getSeri('Online')
});
});
});
检查您是否需要从左侧移除,如果您需要移除呼叫:
series1.addPoint([x, y], true, true);
其他电话:
series1.addPoint([x, y], true, false);
请澄清您的具体问题或添加其他详细信息,以突出显示您所需的内容。正如目前所写的,很难准确地说出你在问什么。请参阅页面以获取澄清此问题的帮助。