fusioncharts / fusioncharts-dist

FusionCharts JavaScript Charting library. Over 95+ charts and 1,400+ maps to choose from, with integrations available for all popular JavaScript frameworks & back-end programming languages.
https://www.fusioncharts.com
Other
84 stars 46 forks source link

Random error with dataLabelStyle being undefined #36

Closed pablorosalesps closed 2 years ago

pablorosalesps commented 2 years ago

Hey, I'm looking for some pointers on what the cause of this could be.

I'm getting this error randomly on a bubble chart:

TypeError: Cannot read properties of undefined (reading 'dataLabelStyle')

To explain the context, we have a React component that renders a lot of times, multiple types of charts, and sometimes (it seems randomly) the bubble chart gets fails with this error, tho the data and config sent seem fine.

I haven't found anything wrong with the data sent to the chart, nor have I been able to replicate it on a simple code sample to provide. Plus the error message is not clear on where the issue is.

Here is an edited example of the data I see on the chart object at the moment of the exception.

[
    {
        "x": "3.6",
        "y": "0.91",
        "z": "3.6",
        "name": "A",
        "label": "A"
    },
    {
        "x": "4.16",
        "y": "1.02",
        "z": "4.16",
        "name": "M",
        "label": "M"
    },
    {
        "x": "4.58",
        "y": "1.66",
        "z": "4.58",
        "name": "M2",
        "label": "M2"
    },
    {
        "x": "1.11",
        "y": "0.21",
        "z": "1.11",
        "name": "M3",
        "label": "M3"
    },
    {
        "x": "1.71",
        "y": "0.24",
        "z": "1.71",
        "name": "H",
        "label": "H"
    }
]

Any pointers on why this could happen?

PS: We are PRO licensed, and I'm using the npm version 3.18.0

pablorosalesps commented 2 years ago

We found a way to avoid the issue, which is not ideal but it solves it for us. Will close this issue.