Area between two lines is not filled correctly when the steppedLine value is set to 'before' or 'after'.
Expected Behavior
Area between lines should be filled without overruns or leaving unfilled area.
Current Behavior
Area between two lines is not filled correctly when the steppedLine value is set to 'before' or 'after'.
Possible Solution
Area curve is built here, but the steppedLine value is interpreted incorrectly because the path is created in reverse order. I think we can use the flip argument to change the behavior in helpers.canvas.lineTo.
|
// building opposite area curve (reverse) |
|
for (i = len1 - 1; i > 0; --i) { |
|
helpers.canvas.lineTo(ctx, curve1[i], curve1[i - 1], true); |
|
} |
Steps to Reproduce
See https://jsfiddle.net/5aszap5L/
Environment
- Chart.js version: 2.6.0
- Browser name and version: Chrome 60.0.3112.101, FireFox 54.0.1, Safari 10.1.2
Area between two lines is not filled correctly when the
steppedLinevalue is set to'before'or'after'.Expected Behavior
Area between lines should be filled without overruns or leaving unfilled area.
Current Behavior
Area between two lines is not filled correctly when the
steppedLinevalue is set to'before'or'after'.Possible Solution
Area curve is built here, but the
steppedLinevalue is interpreted incorrectly because the path is created in reverse order. I think we can use theflipargument to change the behavior inhelpers.canvas.lineTo.Chart.js/src/plugins/plugin.filler.js
Lines 211 to 214 in 530c613
Steps to Reproduce
See https://jsfiddle.net/5aszap5L/
Environment