javascript 使用 highcharts 调整数据点的大小
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11253318/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Resize data points with highcharts
提问by Lightbeard
We are using highchartsand are trying to customize a chart to look similar to this:
我们正在使用highcharts并尝试自定义图表以使其看起来与此类似:
We were able to set colors as documented and also increase the thickness of the lines by using the lineWidth
attribute, but can't find a way to customize the data points so they are always circles and larger than the thicker lines. This is what it looks like at this point:
我们能够按照文档设置颜色并通过使用lineWidth
属性增加线条的粗细,但找不到自定义数据点的方法,因此它们始终是圆形并且比粗线大。这是此时的样子:
Also, we can't find a way to remove the default gray horizontal lines.
此外,我们找不到删除默认灰色水平线的方法。
Help!
帮助!
回答by Ricardo Alvaro Lohmann
This gray line is called grid line, you can customize them following the reference.
这条灰线称为网格线,您可以按照参考进行自定义。
To remove grid lines
删除网格线
yAxis: {
gridLineWidth: 0
}
Like this example.
像这个例子。
Change marker width
更改标记宽度
plotOptions: {
series: {
marker: {
enabled: true,
symbol: 'circle',
radius: 7
}
}
}
You can take a look hereif you want to customize series markers.
如果您想自定义系列标记,可以查看此处。