apexcharts / vue3-apexcharts

📊 Vue-3 component for ApexCharts
MIT License
314 stars 35 forks source link

Regression in v1.6.0: v-if condition on chart labels causes "Maximum call stack size exceeded" error #119

Closed njk18 closed 1 month ago

njk18 commented 1 month ago

After upgrading from version 1.5.3 to 1.6.0, my application encounters a "Maximum call stack size exceeded" error when using a v-if condition on a reactive object to check the existence of chart labels in the options for an apexchart. This issue did not occur in version 1.5.3 with the same code.

Uncaught (in promise) RangeError: Maximum call stack size exceeded
    at MutableReactiveHandler.get (chunk-PM4FC3ST.js)
    at Function.value (chunk-UU6VT44U.js)
const dataSetOverview = reactive(overview);
const { dataSet } = toRefs(dataSetOverview);

...

<apexchart
  v-if="dataSet.chartConfig.labels.length > 0"
  type="donut"
  height="375"
  :options="dataSet?.chartConfig"
  :series="dataSet?.series"
/>

vue3-apexcharts: 1.6.0 Vue: 3.5.8

junedchhipa commented 1 month ago

released vue3-apexcharts@1.7.0 with a fix for this. Please upgrade to v.1.7.0

njk18 commented 1 month ago

@junedchhipa upgraded from v1.5.3 to v1.7.0 with no other changes, and got the same error. I downgraded back to v.1.5.3 and everything is working fine again. The problem occurs with one specific chart, the others work fine on both versions.

The problematic chart:

<apexchart
    v-if="chartOptions.labels.length > 0"
    type="donut"
    height="375"
    :options="chartOptions"
    :series="series"
    @mounted="..."
/>
marioBaltiSolar commented 3 weeks ago

I upgraded to nuxt-bridge 2.17.3 and now getting RangeError: Maximum call stack size exceeded I am using "vue-apexcharts": "^1.6.2", Is there a fix?