carbon-charts icon indicating copy to clipboard operation
carbon-charts copied to clipboard

[Bug]: TreemapChart doesn't render tiles propery

Open pre-ska opened this issue 3 years ago • 2 comments

Contact Details

What happened?

Scale of the tiles is not accurate Screenshot-20220203223443-618x301

that 38% tile should be much bigger...more than a half of the left tile

Version

"@carbon/charts": "^0.50.7"

Data & options used

data = [
    {
        "name": ".txt",
        "value": 60,
        "showLabel": true
    },
    {
        "name": ".docx",
        "value": 3,
        "showLabel": false
    },
    {
        "name": ".unknown",
        "value": 38,
        "showLabel": true
    }
]

options = {
    height: '284px',
    legend: {
      enabled: false,
    },
    getFillColor: () => segment[0].color,
  }

Relevant log output

No response

Codesandbox example

No response

pre-ska avatar Feb 03 '22 21:02 pre-ska

update: if I disable animations this doesn't happens

It's like animation doesn't finish expanding tile...something is stopping it I'm dynamically changing chart data by fetching it from the server (graphQL) , saving that data in component state (I need to remap it) and that state is hooked to chart data

pre-ska avatar Feb 04 '22 07:02 pre-ska

Hi, I'm unable to produce this issue, it works fine for me.

I did end up making some tweaks as I was looking at the treemap today (not related to this issue but related to treemap) in #1299

Could you pls use the Edit on Codesandbox button on this demo to reproduce this issue, and that way I can take a look? https://charts.carbondesignsystem.com/?path=/story/complex-charts-treemap--treemap

theiliad avatar Feb 04 '22 17:02 theiliad