我正在为服务器响应时间创建一个图表。当服务器没有响应时,我管理它导出0值。 我只有一个问题。当服务器关闭时,我无法设置BOLD RED线。 有一条红线,与蓝线的其余部分一样厚。问题是,当有更多数据(大约1000个测量点)时,红线不可见。
问:如何使两个零值之间的线变粗?
由于
$(function () {
$('.container').highcharts({
exporting: {
filename: 'PCEP0012 - PCE response time (ms)-chart',
sourceWidth: 900,
},
chart: {
zoomType: 'x',
spacingRight: 20,
type: "spline" },
title: {
text: 'PCE response time (ms) for PCEP0012 (was_pce)' },
subtitle: {
text: document.ontouchstart === undefined ?
'Click and drag in the plot area to zoom in' :
'Pinch the chart to zoom in'
},
xAxis: {
type: 'datetime',
maxZoom: '225 * * 60',
title: {
text: null
}
},
yAxis: {
title: {
text: 'response time (ms)'
}
},
tooltip: {
shared: false,
headerFormat: '<b>{series.name}</b><br>',
pointFormat: '{point.x:%b %e, %H:%M:%S}: {point.y:.2f}ms' },
legend: {
enabled: false },
plotOptions: {
area: {
fillColor: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1},
stops: [
[0, Highcharts.getOptions().colors[0]],
[1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]
]
},
lineWidth: 1,
marker: {
enabled: false
},
shadow: false,
states: {
hover: {
lineWidth: 1
}
},
threshold: null
} },
series:
[{
type: "area",
color: "#207CCA",
threshold: 1,
negativeColor: "#FF0000",
name: "response time (ms)",
data: [[Date.UTC(2014, 06, 12, 04, 08, 01), 15095.383],[Date.UTC(2014, 06, 12, 04, 10, 01), 14330.695],[Date.UTC(2014, 06, 12, 04, 12, 01), 16656.669],[Date.UTC(2014, 06, 12, 04, 14, 01), 9759.296],[Date.UTC(2014, 06, 12, 04, 16, 02), 7976.574],[Date.UTC(2014, 06, 12, 04, 18, 01), 8798.903],[Date.UTC(2014, 06, 12, 04, 20, 01), 13886.284],[Date.UTC(2014, 06, 12, 04, 22, 01), 38.782],[Date.UTC(2014, 06, 12, 04, 24, 01), 7939.111],[Date.UTC(2014, 06, 12, 04, 26, 01), 9691.947],[Date.UTC(2014, 06, 12, 04, 28, 01), 15545.322],[Date.UTC(2014, 06, 12, 04, 30, 01), 13236.333],[Date.UTC(2014, 06, 12, 04, 32, 01), 5867.989],[Date.UTC(2014, 06, 12, 04, 34, 01), 4387.544],[Date.UTC(2014, 06, 12, 04, 36, 01), 17743.056],[Date.UTC(2014, 06, 12, 04, 38, 01), 4925.899],[Date.UTC(2014, 06, 12, 04, 40, 01), 38.005],[Date.UTC(2014, 06, 12, 04, 42, 01), 7892.13],[Date.UTC(2014, 06, 12, 04, 44, 01), 15566.796],[Date.UTC(2014, 06, 12, 04, 46, 01), 9993.286],[Date.UTC(2014, 06, 12, 04, 48, 01), 44.89],[Date.UTC(2014, 06, 12, 04, 50, 01), 40.635],[Date.UTC(2014, 06, 12, 04, 52, 01), 13154.058],[Date.UTC(2014, 06, 12, 04, 54, 01), 2872.489],[Date.UTC(2014, 06, 12, 04, 56, 01), 2043.6],[Date.UTC(2014, 06, 12, 04, 58, 01), 4909.991],[Date.UTC(2014, 06, 12, 05, 00, 01), 6791.92],[Date.UTC(2014, 06, 12, 05, 02, 01), 15333.337],[Date.UTC(2014, 06, 12, 05, 04, 01), 9353.361],[Date.UTC(2014, 06, 12, 05, 06, 01), 0],[Date.UTC(2014, 06, 12, 05, 08, 01), 28011.216],[Date.UTC(2014, 06, 12, 05, 10, 01), 28497.689],[Date.UTC(2014, 06, 12, 05, 12, 01), 26644.719],[Date.UTC(2014, 06, 12, 05, 14, 01), 38.495],[Date.UTC(2014, 06, 12, 05, 16, 01), 0],[Date.UTC(2014, 06, 12, 05, 18, 01), 108.889],[Date.UTC(2014, 06, 12, 05, 20, 01), 20858.454],[Date.UTC(2014, 06, 12, 05, 22, 01), 9674.677],[Date.UTC(2014, 06, 12, 05, 24, 01), 17188.879],[Date.UTC(2014, 06, 12, 05, 26, 01), 0],[Date.UTC(2014, 06, 12, 05, 28, 01), 24331.205],[Date.UTC(2014, 06, 12, 05, 30, 01), 13916.841],[Date.UTC(2014, 06, 12, 05, 32, 01), 0],[Date.UTC(2014, 06, 12, 05, 34, 01), 27795.304],[Date.UTC(2014, 06, 12, 05, 36, 01), 0],[Date.UTC(2014, 06, 12, 05, 38, 01), 11957.804],[Date.UTC(2014, 06, 12, 05, 40, 01), 0],[Date.UTC(2014, 06, 12, 05, 42, 01), 28683.35],[Date.UTC(2014, 06, 12, 05, 44, 01), 0],[Date.UTC(2014, 06, 12, 05, 46, 01), 0],[Date.UTC(2014, 06, 12, 05, 48, 01), 0],[Date.UTC(2014, 06, 12, 05, 50, 01), 0],[Date.UTC(2014, 06, 12, 05, 52, 01), 0],[Date.UTC(2014, 06, 12, 05, 54, 01), 0],[Date.UTC(2014, 06, 12, 05, 56, 01), 0],[Date.UTC(2014, 06, 12, 05, 58, 01), 282.594],[Date.UTC(2014, 06, 12, 06, 00, 01), 0],[Date.UTC(2014, 06, 12, 06, 02, 01), 29868.05],[Date.UTC(2014, 06, 12, 06, 04, 01), 0],[Date.UTC(2014, 06, 12, 06, 06, 01), 8458.511],[Date.UTC(2014, 06, 12, 06, 08, 01), 0],[Date.UTC(2014, 06, 12, 06, 10, 01), 0],[Date.UTC(2014, 06, 12, 06, 12, 01), 0],[Date.UTC(2014, 06, 12, 06, 14, 01), 0],[Date.UTC(2014, 06, 12, 06, 16, 01), 0],[Date.UTC(2014, 06, 12, 06, 18, 01), 0],[Date.UTC(2014, 06, 12, 06, 20, 01), 0],[Date.UTC(2014, 06, 12, 06, 22, 01), 0],[Date.UTC(2014, 06, 12, 06, 24, 01), 0],[Date.UTC(2014, 06, 12, 06, 26, 01), 0],[Date.UTC(2014, 06, 12, 06, 28, 01), 0],[Date.UTC(2014, 06, 12, 06, 30, 01), 0],[Date.UTC(2014, 06, 12, 06, 32, 03), 1089.502],[Date.UTC(2014, 06, 12, 06, 34, 01), 12444.977],[Date.UTC(2014, 06, 12, 06, 36, 01), 0],[Date.UTC(2014, 06, 12, 06, 38, 01), 0],[Date.UTC(2014, 06, 12, 06, 40, 01), 0],[Date.UTC(2014, 06, 12, 06, 42, 01), 0],[Date.UTC(2014, 06, 12, 06, 44, 01), 0],[Date.UTC(2014, 06, 12, 06, 46, 01), 0],[Date.UTC(2014, 06, 12, 06, 48, 01), 29266.843],[Date.UTC(2014, 06, 12, 06, 50, 01), 0],[Date.UTC(2014, 06, 12, 06, 52, 01), 19099.068],[Date.UTC(2014, 06, 12, 06, 54, 01), 0],[Date.UTC(2014, 06, 12, 06, 56, 01), 0],[Date.UTC(2014, 06, 12, 06, 58, 01), 0],[Date.UTC(2014, 06, 12, 07, 00, 01), 0],[Date.UTC(2014, 06, 12, 07, 02, 01), 179.059],[Date.UTC(2014, 06, 12, 07, 04, 01), 0],[Date.UTC(2014, 06, 12, 07, 06, 01), 0],[Date.UTC(2014, 06, 12, 07, 08, 01), 0],[Date.UTC(2014, 06, 12, 07, 10, 01), 0],[Date.UTC(2014, 06, 12, 07, 12, 01), 388.289],[Date.UTC(2014, 06, 12, 07, 14, 01), 108.435],[Date.UTC(2014, 06, 12, 07, 16, 01), 1377.491],[Date.UTC(2014, 06, 12, 07, 18, 01), 67.981],[Date.UTC(2014, 06, 12, 07, 20, 01), 48.772],[Date.UTC(2014, 06, 12, 07, 22, 01), 1576.512],[Date.UTC(2014, 06, 12, 07, 24, 01), 1863.452],[Date.UTC(2014, 06, 12, 07, 26, 01), 3103.779],[Date.UTC(2014, 06, 12, 07, 28, 01), 2096.81],[Date.UTC(2014, 06, 12, 07, 30, 01), 1998.134],[Date.UTC(2014, 06, 12, 07, 32, 01), 2043.788],[Date.UTC(2014, 06, 12, 07, 34, 01), 0],[Date.UTC(2014, 06, 12, 07, 36, 01), 0],[Date.UTC(2014, 06, 12, 07, 38, 01), 27108.756],[Date.UTC(2014, 06, 12, 07, 40, 01), 0],[Date.UTC(2014, 06, 12, 07, 42, 01), 0],[Date.UTC(2014, 06, 12, 07, 44, 01), 61.515],[Date.UTC(2014, 06, 12, 07, 46, 01), 60.925],[Date.UTC(2014, 06, 12, 07, 48, 01), 56.488],[Date.UTC(2014, 06, 12, 07, 50, 01), 55.307],[Date.UTC(2014, 06, 12, 07, 52, 01), 56.321],[Date.UTC(2014, 06, 12, 07, 54, 01), 53.686],[Date.UTC(2014, 06, 12, 07, 56, 01), 54.522],[Date.UTC(2014, 06, 12, 07, 58, 01), 52.195],]
}]
});
});