-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Steps to repeat:
- Using bar chart example at https://nagix.github.io/chartjs-plugin-rough/samples/bar.html as base. (It references Chart.js 2.8.0.)
- Working configuration with Chart.js 2.8.0: https://jsfiddle.net/f1ropz3e/
- Not working configuration with Chart.js 2.9.0: https://jsfiddle.net/v3wrjh8g/
- Scenario:
-- hover over bar: Properly rendered tooltip shown
-- leave bar: tooltip disappears
When using Chart.js 2.9.0 (or the latest 2.9.4) a JavaScript error is thrown when hovering over a bar and the chart remains in a white-ish color.
I did some digging:
- In chartjs-plugin-rough.js, RoughTooltip>drawBody>ctx.fillRect and ctx.StrokeRect 'options.fillOptions' and 'options.strokeOptions' are accessed. This is where the error occurs.
- Variable 'options' is updated in the customized 'helpers.each'. The logic expects Chart.js to use helper.each to iterate. Chart.js is not using that method in that place anymore.
drawBody in Chart.js 2.8.0:
// Draw body lines now
helpers$1.each(body, function(bodyItem, i) {
drawBody in Chart.js 2.9.0:
// Draw body lines now
for (i = 0, ilen = body.length; i < ilen; ++i) {
bodyItem = body[i];
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels