question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Charts are being duplicated

See original GitHub issue

Env:

"apexcharts": "^3.22.2",
"vue": "^3.0.2",
"vue3-apexcharts": "^1.1.1"

My options:

{
 chart: {
        height: 590,
        type: "area",
      },
      dataLabels: {
        enabled: false,
      },
      stroke: {
        curve: "smooth",
      },
      xaxis: {
        labels: {
          showDuplicates: false,
          hideOverlappingLabels: true,
          offsetY: 20,
          style: {
            colors: "#979797",
          },
        },
      },
}

Template:

<apexchart type="area" :height="590" :options="options" :series="series" />

Result:

image

Note: when I change a screen resolution, the duplicated one disappears

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:28 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
lukesnowdencommented, Aug 13, 2021
mounted() {
    this.$nextTick(() => {
        window.dispatchEvent(new Event('resize'));
    });
}

Will fix the issue for now

8reactions
mperriencommented, Jun 24, 2022

And if you’re using the Composition API (ie <script setup> syntax) use onBeforeMount instead of onMounted.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chart Duplicates because of useEffect re-render
In my child component I have a dependency array that re-renders every time color is changed from parent i.e ( props.backgroundColor ). Now...
Read more >
FAQ-1088 Why are there duplicated points on my box chart?
It is caused by that both data points and outliers habe been turned on. it will thus make those outlier points be plotted...
Read more >
Pie chart showing duplicates - Power Platform Community
Solved: Good Morning Community, I have been working on a pie chart in my app that is being used as a time keeper...
Read more >
Duplicate Chart - Workiva Support
You should be able to duplicate a Chart within a Document, though you don't get the same selectors you do in a Presentation....
Read more >
Duplicating Charts | Kintone Documentation Site
On the View screen of the app, select a graph to be copied in "Graphs". Image. Click the Create Graph button Column chart...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found