我使用RGraph创建了一个瀑布,如下图所示。所有的东西看起来都很棒,除了这些细小的线条连接着每一根柱子。我在图片中用红色圈出了它们。我怎样才能摆脱这些细小的连接线?我在文档里找不到。
有关工作版本,请参阅my jsfiddle here。

代码:
html:
<html>
<body>
<canvas id="cvs" width="800px" height="300px"></canvas>
</body>
</html>javascript:
var waterfallChart = new RGraph.Waterfall({
id: 'cvs',
data: [570.00, -7.39, -26.61, -18.69, -4.24],
options: {
linewidth: 0,
colors: ["#b3b3b3", "#afe5ed", "#afe5ed", "#afe5ed", "#afe5ed", "#6f2e92"],
colorsStroke: "#ffffff",
colorsSequential: true,
title: "The Title Of My Chart",
titleColor: "#727272",
titleSize: 15,
labelsAbove: true,
labelsAboveDecimals: 2,
labelsAboveUnitsPre: "$",
axes: false,
backgroundGrid: false,
backgroundBarsCount: 0,
yaxisLabels: false,
yaxisTickmarksCount: 0,
xaxisTickmarksCount: 0,
yaxisScaleMin: 450,
xaxisLabelsSize: 10,
xaxisLabels: ['Plan 3',
'This is\na label',
'This is \nanother label',
'This is\na thing',
'This is\nyet another thing',
'blah'],
xaxisLabelsOffsety: 50,
xaxisLabelsColor: "#9f9f9f"
}
});
// waterfallChart.Set('chart.gutter.bottom',35);
waterfallChart.draw();谢谢你的帮助!
发布于 2019-06-29 00:00:01
它们只是连接线-没有关闭它们的选项,但您可以通过执行以下操作来更改源代码以隐藏它们:
在RGraph.waterfall.js的1318行(或大约行)上,您将找到以下行:
co.lineWidth = 1;
co.strokeStyle = '#666';将它们改为:
co.lineWidth = 0.00001; // Don't zet to zero
co.strokeStyle = 'rgba(0,0,0,0)'; // transparenthttps://stackoverflow.com/questions/56798580
复制相似问题