我遇到了麻烦chartist.js
。y-axis
我想将网格线之间的间距调整为40px
.(现在 36px)我已经尝试找到一些示例,但我找不到。
.ct-grids line {
stroke: #fff;
opacity: .05;
stroke-dasharray: none;
}
这是我当前的网格样式。
var data = {
labels: ['JAN 1', 'JAN 18', 'FEB 14', 'MAR 9', 'APR 22', 'May 2'],
series: [
[40.8, 46.5, 48.8, 56.9, 68.7, 72.7],
[12.8, 13.7, 13.9, 14.8, 15.3, 15.6],
[5.2, 3.8, 4.2, 5, 3.9, 4.3],
[1.2, 1.8, 1.7, 2.1, 1.8, 1.9]
]
};
var options = {
showPoint: false,
lineSmooth: false,
axisX: {
showGrid: false,
showLabel: false
},
axisY: {
offset: 0,
showGrid: true,
showLabel: false
}
};
var chart = new Chartist.Line('.ct-chart', data, options);
如果您知道,请告诉我。谢谢。