lin-xin / vue-schart

:bar_chart: Vue.js wrapper for sChart.js
https://lin-xin.gitee.io/example/schart/
MIT License
325 stars 77 forks source link

[Bug] Charts with transparent backgrounds renders on top of the previous chart #3

Closed Coreusa closed 4 years ago

Coreusa commented 7 years ago

There's a bug with all diagram types:

Use this as options:

      schartOptions: {
        title: 'Chart example',
        bgColor: 'transparent'
      }

If you update the chart data reactive, the new chart gets rendered on top of the next one. Even initially it looks phoobar. Like this:

bilde

If you keep updating the data (empty the array then create new values), it gets worse:

bilde

Here's the same, but with the pie diagram. It looks better initially... bilde

However, keep updating the data (empty the array then create new values), the next update renders the chart on top of the previous one: bilde

This makes me think you're not doing proper house cleaning when updating the chart, something that isn't apparent when using a background color (which effectively hides what's behind the top-most chart).

You should look into this.