MichaelVoelkel / ChartJs2QML

QML adaptor for Chart.js 2.x that supports startup animations and tooltips
MIT License
104 stars 20 forks source link

Chart.js bundle update and hover fix #9

Closed ghost closed 3 years ago

ghost commented 3 years ago

PR introduces two changes:

  1. Chart.js bundle was updated to v2.9.4
  2. Functions that changes state of points when we hover mouse pointer above them were uncommented. Currently fixed values were used to set the state of points in such a case.

AD 1) As for the Chart.js update my M.O. was to:

All changes that were available between original bundles were added, all other were kept as-is (customizations for the QML). Seems to be fine but it would be nice if verified by someone more proficient in JS. :)

AD 2) I suppose the fixed values were used for testing and never uncommented. I haven't seen any side effects of uncommenting those other than fixed behavior of changing point style during hover event.

Attached GIFs presenting behavior for such a point style:

elements: {
    point: {
        pointStyle: 'circle',
        radius: 3,
        borderWidth: 1,
        hoverRadius: 6,
        hoverBorderWidth: 2
    }
}

BEFORE THE CHANGES

before

AFTER THE CHANGES

after