Uma*_*han 1 javascript jquery morris.js
我已经Morris Line Chart用下面的代码实现了,并且运行良好。
但我需要对第二行名称进行一些修改以达到目标。每个月你都会看到斑点出现。我想从这条线上删除这些点,这样我就成为一条直线。
Morris.Line({
element: 'line-chart',
data: JSON.parse(GraphData),
xkey: 'title',
ykeys: ['goal', 'actual'],
labels: ['Goal', 'Actual'],
xLabelFormat: function(x) { // <--- x.getMonth() returns valid index
var month = months[x.getMonth()];
return month;
},
dateFormat: function(x) {
var month = months[new Date(x).getMonth()];
return month;
},
resize: true,
lineColors: ['#ecb201', '#1B17BB'],
gridTextFamily: "'Nunito', sans-serif",
gridTextWeight: '300',
gridTextSize: 11,
gridTextColor: '#090b0d',
pointSize: 4,
lineWidth: 2,
pointStrokeColors: ['#ffffff', '#ffffff'],
});
Run Code Online (Sandbox Code Playgroud)
尝试将pointSize更改为0。开始时设置pointSiZe: 0
Morris.Line({
element: 'line-chart',
pointSize: 0, ....
)}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1761 次 |
| 最近记录: |