Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The same Bar chart is displayed 3 times. #62

Open
hekep opened this issue Dec 19, 2022 · 2 comments
Open

The same Bar chart is displayed 3 times. #62

hekep opened this issue Dec 19, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@hekep
Copy link

hekep commented Dec 19, 2022

Description

The same Bar chart is displayed 3 times.
After some time milliseconds the second and 3rd copy are removed.

Sometimes 2nd and 3rd copy remain, until user zooms page in or out.

This hapneds both in Chrome and Firefox.

Quasar project.

Steps to Reproduce

<template>
  <q-page class="q-pa-md" style="">
    <div>
      <h1>Bar Graph attempt</h1>
    </div>

    <div>
      <apexchart
        width="500"
        type="bar"
        :options="myAppGraphDataOptions"
        :series="myAppGraphData"
      ></apexchart>
    </div>
  </q-page>
</template>

<script>
/**
 *
 */
import { ref, onMounted } from "vue";

import VueApexCharts from "vue3-apexcharts";

/**
 *
 */
import { Notify, Dialog } from "quasar";
/**
 *
 */
export default {
  name: "BarChart",
  components: {
    apexchart: VueApexCharts,
  },

  setup(props) {
    const myAppGraphData = ref([]);
    const myAppGraphDataOptions = ref({});

    /**
     * Registers a callback to be called after the component has been mounted.
     *  After the component has mounted into DOM:
     * @returns {undefined}
     */
    onMounted(() => {
      myAppGraphDataOptions.value = {
        chart: {
          id: "vuechart-example",
        },
        xaxis: {
          categories: [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998],
        },
      };

      myAppGraphData.value = [
        {
          name: "series-1",
          data: [130, 40, 135, 50, 49, 60, 70, 191],
        },
      ];

      // EOF yAppGraphData.value
    });

    return {
      myAppGraphData,
      myAppGraphDataOptions,
    }; //           EOF             return {
  }, //           EOF             setup(props) {
}; //           EOF              export default {
</script>

Expected Behavior

Display Bar chart only 1 time

Actual Behavior

Displayes bar chart 3 times

Screenshots

kuva

kuva

Reproduction Link

https://codesandbox.io/s/priceless-aryabhata-hit2h8?file=/src/pages/Index.vue

@hekep hekep added the bug Something isn't working label Dec 19, 2022
@drewbitt
Copy link

drewbitt commented Jan 8, 2023

This would be an issue to open in https://github.com/apexcharts/vue-apexcharts

@junedchhipa junedchhipa transferred this issue from apexcharts/apexcharts.js Jan 21, 2023
@Aegon95
Copy link

Aegon95 commented Feb 14, 2023

updated my app from Vue2 to Vue 3, now iam facing this issue

any workarounds for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants