javascript - 从面积样条图中删除线点
问题描述
我需要从线条中删除点。我已经看到这个答案停止 HighCharts 在悬停时增加线的宽度但对我不起作用。
这是小提琴
这是我的代码
Highcharts.chart('graph_box', {
chart: {
type: 'areaspline',
width: 300,
height: 275
},
xAxis: {
gridLineWidth: 0,
labels: {
enabled: false
},
categories: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']
},
yAxis: {
title: {
text: ''
},
gridLineWidth: 0,
labels: {
enabled: false
}
},
tooltip: {
shared: true,
valueSuffix: ' units'
},
credits: {
enabled: false
},
plotOptions: {
line: {
marker: {
enabled: false
}
},
areaspline: {
fillOpacity: 0.5
},
series: {
lineWidth: 2,
states: {
hover: {
enabled: false
}
}
}
},
series: [
{
lineColor: '#8b8bff',
color: '#c5c6ff',
lineWidth: '4px',
data: [3, 8, 9, 5, 4, 10, 12, 6, 7, 1, 4, 6]
}
]
})
有人可以帮忙吗!!
解决方案
可以通过这种方式禁用系列标记:
plotOptions: {
line: {
marker: {
enabled: false
},
states: {
hover: {
enabled: false
}
}
}
},
现场演示:http: //jsfiddle.net/BlackLabel/4o023vxg/
API:https ://api.highcharts.com/highcharts/plotOptions.line.states.hover.enabled
推荐阅读
- email - Rundeck 电子邮件审批流程
- reactjs - 检查 cookie 是否存在于 React
- javascript - BrowserSync 不会在使用 Gulp 进行更改时重新加载
- typescript - TypeScript 接口函数字段逆变类型错误
- momentjs - 为什么这个日期使用不同的小时值格式化?
- java - java.security.KeyStoreException:无法存储非 PrivateKeys
- azure - 通过 terraform 在 Azure 中跨订阅的 NSG 规则
- sql - 什么是包变量?
- java-8 - 主要可完成未来完成后如何同时调用多个可完成未来
- python - 为什么 ZeroMQ SUB 缺少消息?