jqPlot 在图表上显示所有系列的标签。我只想在标签上显示一些系列。问题是有些线只是为了显示值的适当限制(视觉上) - 有些点在上面,有些点在下面。现在我只是简单地为标签放置空字符串,但标签区域中的标签点仍然存在 - 它看起来不太好。
这是代码:
series:[
{lineWidth:1, color: '#d8d8d8', showMarker: false},
{lineWidth:0.5, color: 'red', showMarker: false},
{lineWidth:1, color: '#d8d8d8', showMarker: false},
{lineWidth:1, color: '#d8d8d8', showMarker: false},
{lineWidth:1, color: '#76a4e8', showMarker: false},
{lineWidth:1, color: '#d8d8d8', showMarker: false},
{lineWidth:0.5, color: 'red', showMarker: false},
{lineWidth:1, color: '#d8d8d8', showMarker: false},
{lineWidth:1, color: '#d8d8d8', showMarker: false},
{
lineWidth:0.5,
color: 'green',
rendererOptions: {animation: {speed: 1500}},
markerOptions:{color: 'green',
style:'filledSquare'},
},
//here are the series with real values - they come from php in red or orange
],
legend:{
renderer: jQuery.jqplot.EnhancedLegendRenderer,
show: true,
hideZeros: true,
location: 'e',
//labele with names
//labels: [ 'SD+4', 'SD+3', 'SD+2', 'SD+1','Perfect value', 'SD-1', 'SD-2', 'SD-3', 'SD-4', 'Real Values', 'Vales to high'],
//labele with empty points
labels: [ ' ', ' ', ' ', ' ','Perfect value', ' ', ' ', ' ', ' ', 'Real Values', 'Vales to high'],
placement: 'outsideGrid'
}
如您所见,它看起来不太好。仅应显示完美值、真实值和过高/过低的值。