apexcharts / vue3-apexcharts

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

Properties of undefined' error when using Vue3-ApexCharts with Nuxt #71

Open lipecss opened 1 year ago

lipecss commented 1 year ago

I'm encountering an issue when trying to use Vue3-ApexCharts with the Nuxt3 framework. When running the code, I receive an error message "properties of undefined (reading '0')" along with a related stack trace. It seems that the error occurs during the rendering or initialization of the chart animations.

image

im getting this when i change routes

 <ClientOnly>
      <apexchart
          type="bar"
          :options="chartOptions"
          :series="series"
       ></apexchart>
  </ClientOnly>
const chartOptions = ref({
  chart: {
    id: 'vuechart-example',
  },
  xaxis: {
    categories: [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998],
  },
});
const series = ref([
  {
    name: 'series-1',
    data: [30, 40, 35, 50, 49, 60, 70, 91],
  },
]);
karis commented 1 year ago

i recommend your to built reproduction error using stackblitz so we can figure out..

i was success build nuxt 3.5.1 and vue3-apexchart and it works

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.