我正在尝试将虚线应用于我的 Highcharts 折线图中的最后一列,但我无法找到解决方案。
这是我的 Highcharts 代码:
}
xAxis: {
type: 'datetime',
dateTimeLabelFormats: { year: '%Y' },
tickInterval: Date.UTC(2012, 0, 1) - Date.UTC(2011, 0, 1),
title: {
text: 'Years', style: {color: '#333', fontFamily: 'sans-serif',}
}
}
yAxis: {
tickInterval: 5,
title: {
text: 'Points', style: {color: '#333', fontFamily: 'sans-serif'}
}
},
series: [{
showInLegend: false
color: '#000'
pointInterval: 31557600000
pointStart: Date.UTC(2005, 0, 1)
data: [data['points_2005'], data['points_2006'], data['points_2007'],
data['points_2008'], data['points_2009'], data['points_2010'], data['points_2011'],
data['points_2012'], data['points_2013']]
}]
我尝试使用以下代码编辑 2013 数据点:
{data['points_2013'], dashStyle: 'shortdot'}
我在这里附上了一张图片来解释。
谢谢你的帮助!
编辑:与以下评论相关的代码:
series: [
{
showInLegend: false
color: '#79C417'
pointInterval: 31557600000
pointStart: Date.UTC(2005, 0, 1)
pointEnd: Date.UTC(2012, 0, 1)
data: [searchData['points_2005'], searchData['points_2006'], searchData['points_2007'], searchData['points_2008'], searchData['points_2009'], searchData['points_2010'], searchData['points_2011'], searchData['points_2012']]
}
{
showInLegend: false
color: '#79C417'
pointInterval: 31557600000
pointStart: Date.UTC(2012, 0, 1)
pointEnd: Date.UTC(2013, 0, 1)
dashStyle: 'shortdot'
data: searchData['points_2013']
}