我正在尝试使用此strokeWidth值来实现包含实线的对角线模式。这是我到目前为止所提出的,但我似乎无法获得正确的d路径:
Highcharts.chart('container', {
chart: {
type: 'area'
},
title: {
text: 'Pattern fill plugin demo'
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
plotOptions: {
area: {
fillColor: {
pattern: {
path: {
d: 'M 0 0 L 25 25 M 24 -1 L 26 1 M -1 24 L 1 26',
strokeWidth: 9
},
width: 25,
height: 25,
opacity: 0.2
}
}
}
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6],
color: '#88e',
fillColor: {
pattern: {
color: '#11d'
}
}
}, {
data: [null, null, null, null, null, 43.1, 95.6, 148.5, 216.4, 194.1, 95.6, 54.4],
color: '#e88',
fillColor: {
pattern: {
color: '#d11'
}
}
}]
});
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/pattern-fill.js"></script>
<div id="container" style="height: 400px; max-width: 800px; margin: 0 auto"></div>
如果你看一下这个例子,那么就会有一些中断。为了获得完整的对角线,我需要改变什么?提前致谢!
更新:我能够用qazxsw poi实现我想要的风格