You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check this if you would like to implement a PR, we are more than happy to help you go through the process.
Current and expected behavior
For specified media types the responsiveOptions (4th option of a chart function e.g. LineChart(..., ..., ..., responsiveOptions)) can be set. In case of some browsers (e.g. Safari 13.1.2 on macOS High Sierra 10.13.6) when you use the responsive Options chartist stops with error. The root cause of the error is the matchMedia function, because in case of some browsers the result object of the matchMedia has only an addListener function instead of the addEventListener function.
Reproduction
Use responsiveOption with e.g. a LineChart in Safari 13.1.2 with macOS High Sierra 10.13.6
Chartist version
v1.3.0
Possible solution
Change the mql.addEventListener("change", updateCurrentOptions); row in the } else if (responsiveOptions) {...} block of chartist to
if (mql.addEventListener) {
mql.addEventListener("change", updateCurrentOptions);
} else {
mql.addListener(updateCurrentOptions);
}
This can be found in the row # 1440 of the index.js of npm package of chartist.
The text was updated successfully, but these errors were encountered:
Would you like to work on a fix?
Current and expected behavior
For specified media types the responsiveOptions (4th option of a chart function e.g. LineChart(..., ..., ..., responsiveOptions)) can be set. In case of some browsers (e.g. Safari 13.1.2 on macOS High Sierra 10.13.6) when you use the responsive Options chartist stops with error. The root cause of the error is the matchMedia function, because in case of some browsers the result object of the matchMedia has only an addListener function instead of the addEventListener function.
Reproduction
Use responsiveOption with e.g. a LineChart in Safari 13.1.2 with macOS High Sierra 10.13.6
Chartist version
v1.3.0
Possible solution
Change the
mql.addEventListener("change", updateCurrentOptions);
row in the} else if (responsiveOptions) {...}
block of chartist toThis can be found in the row # 1440 of the index.js of npm package of chartist.
The text was updated successfully, but these errors were encountered: