0

I created a waterfall using RGraph as seen in the image below. Everything looks great except there are these thin lines connecting each bar. I have circled them in red in the image. How can I get rid of these thin connecting lines? I can't find it in the documentation.

See my jsfiddle here for a working version.

Waterfall image with lines circled in red

Code:

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();

Thank you for your help!

4

1 回答 1

1

它们只是连接线 - 没有关闭它们的选项,但您可以通过执行以下操作更改源以隐藏它们:

在(或大约) 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)'; // transparent
于 2019-06-28T16:00:01.050 回答