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!

james
  • 712
  • 4
  • 11
  • 29

1 Answers1

1

They're just the connecting lines - and there's no option to turn them off but you can alter the source to hide them by doing this:

On (or about) line 1318 of RGraph.waterfall.js you'll find these lines:

co.lineWidth   = 1;
co.strokeStyle = '#666';

Change them to this instead:

co.lineWidth   = 0.00001; // Don't zet to zero
co.strokeStyle = 'rgba(0,0,0,0)'; // transparent
Richard
  • 4,809
  • 3
  • 27
  • 46