apexcharts.js icon indicating copy to clipboard operation
apexcharts.js copied to clipboard

Error when updating series while slice is selected - donut chart

Open cvakodobro opened this issue 3 years ago • 15 comments

Bug report

Codepen

https://codepen.io/cvakodobro/pen/poNpQNX

To replicate the error just select slice and click randomize button. You will see an error in the console log.

Explanation

  • What is the behavior you expect?

No error when updating series while slice is selected.

  • What is happening instead?

An error is thrown every time you update the series while a slice is selected. I'm experiencing this issue using vue-apexchart but I've noticed that the same issue happens with JS apexchart.

  • What error message are you getting?

Error: <path> attribute d: Expected moveto path command ('M' or 'm'), "null".

cvakodobro avatar Feb 25 '21 13:02 cvakodobro

I am also seeing this error under similar circumstances (when calling updateOptions() on a chart that has a slice selected). The donut chart appears to be working fine otherwise, but spams the following error:

Error: attribute d: Expected moveto path command ('M' or 'm'), "null".

I'm going to assume I can safely ignore this, because it does appear to be working fine despite the error. But maybe it indicates a bug somewhere in the code?

karagog avatar May 21 '21 01:05 karagog

I am using apexchart with Typescript and Angular 12 and I am having the same issue.

Androvski93 avatar May 21 '21 11:05 Androvski93

I am using ApexChart with React Js, and I am facing this error just with the region change to the UK, and the graph is not showing correctly and throws this error Error: attribute d: Expected moveto path command ('M' or 'm'), "null". Else on other Regions, it is working fine with no errors. Can anyone help me out on this?

htimran avatar Jun 08 '21 07:06 htimran

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.

github-actions[bot] avatar Sep 15 '21 14:09 github-actions[bot]

I am using apexchart with Vue 2 and I am having the same issue.

Captura de Pantalla 2021-09-15 a la(s) 9 46 09 p  m

When I resize the browser or collapse the dashboard sidebar the chart lose data and plotted empty

PjMQWf9SGy

data: () => ({
  chart: {
      series: [0, 0, 0],
      chartOptions: {
        chart: {
          type: 'donut',
        },
        legend: {
          position: 'bottom',
        },
        colors: ['#1ab7ea', '#0084ff', '#39539E'],
        labels: [
          'Label 1',
          'Label 2',
          'Label 3',
        ],
        responsive: [
          {
            breakpoint: 480,
            options: {
              legend: {
                fontSize: '10px',
              },
            },
          },
        ],
      },
    },
}),
mounted() {
    this.api
      .get()
      .then((response) => {
        this.$refs.chart.updateSeries(
            response.data.chart // => [33, 34, 33]
          )
      })
},

daniiprado avatar Sep 16 '21 03:09 daniiprado

This issue has been confirmed! Thanks for reporting it.

brianlagunas avatar Sep 16 '21 14:09 brianlagunas

Any new progress on this issue?

Mangor1no avatar Nov 23 '21 04:11 Mangor1no

Still have this issue.

apexchart==3.28.3 react-apexcharts==1.3.9

yeongbin-jo avatar Jan 17 '22 07:01 yeongbin-jo

In the original Codepen https://codepen.io/cvakodobro/pen/poNpQNX provided by @cvakodobro, the issue doesn't happen with the latest version 3.33.0

junedchhipa avatar Jan 17 '22 07:01 junedchhipa

The same problem is occurring in the latest version, but I will first review whether it is my own problem, and if it is not my problem, I will post an example code that can reproduce the error.

yeongbin-jo avatar Jan 17 '22 23:01 yeongbin-jo

Same here. Version 3.33.0.

1001v avatar Feb 05 '22 22:02 1001v

In the original Codepen https://codepen.io/cvakodobro/pen/poNpQNX provided by @cvakodobro, the issue doesn't happen with the latest version 3.33.0

Please select a data-point and you will see the issue.

1001v avatar Feb 05 '22 22:02 1001v

In the original Codepen https://codepen.io/cvakodobro/pen/poNpQNX provided by @cvakodobro, the issue doesn't happen with the latest version 3.33.0

Same here

gyoogle avatar May 27 '22 02:05 gyoogle

Still having this issue on "apexcharts": "^3.35.3"

Asmodeios avatar Jul 06 '22 12:07 Asmodeios

I'm having this issue using "apexcharts": "^3.33.0" and "vue": "^2.6.12".

gbermudezjc avatar Sep 07 '22 22:09 gbermudezjc

still having issues [ "apexcharts": "^3.36.0", "react-apexcharts": "^1.4.0"]

Sabih-KL avatar Nov 18 '22 14:11 Sabih-KL

If anyone using next js, adding swcMinify: false in next.config.js makes it work.

Ref: https://github.com/chartjs/Chart.js/issues/10673

karthickprasathmb avatar Nov 24 '22 13:11 karthickprasathmb

If anyone using next js, adding swcMinify: false in next.config.js makes it work.

Ref: chartjs/Chart.js#10673

thanks!

Sabih-KL avatar Nov 24 '22 15:11 Sabih-KL

I am using apexchart with Vue 3 / Typescript and I am having the same issue.

image

SeanParkTiz avatar Dec 06 '22 06:12 SeanParkTiz

my version "3.33.0" and nuxtjs "2.15.7" This problem still occurs. anyone, please tell me how to fix it?

AdinoWayne avatar Mar 03 '23 03:03 AdinoWayne

my version "3.33.0" and nuxtjs "2.15.7" This problem still occurs. anyone, please tell me how to fix it?

swcMinify: false in next.config.js

Sabih-KL avatar Mar 03 '23 07:03 Sabih-KL