Vue-chartjs: How to re-render chart if dark mode changes

457 Views Asked by At

I am using a toggle to switch dark mode on and off. I want to change the colors of the axes-grid To do so, i have set the color tag to

color: this.$q.dark.isActive ? "#3F4041":"#E5E7E9"

This works fine if i reload the page after switching the dark mode, but i can not find a way to re-render the chart directly because i don't want to reload the page. In chartjs there is a function "update()" but it is not available in the vue-chartjs component. Any ideas?

0

There are 0 best solutions below