Describe the bug
The config.width and config.height in the partition chart, at least in the pie chart layout, are overwritten by the parentDimensions.
The first part where the width and height are overwritten is visible in the getShapeViewModel before merging the partial config.
The second place is in the partitionMultiGeometries where we compute the chartWidth and chartHeight as derived from the marginedWidth/Height (always coming from the parentDimensions). On the same function we should also check the innerWidth/Height that also comes from the parentDimensions
To Reproduce
Steps to reproduce the behavior:
- Go to https://codesandbox.io/s/youthful-curran-egqkv?file=/src/App.tsx
- Try to use
width, height in the config, instead of the currently proposed workaround with margin/outerSizeRatio
- The size of the pie will be always the size of the parent, no matter what value are used as width/height in the Config
Expected behaviour
We should respect the config.width and config.height parameters exposed by the Partition component. If we don't want that feature, we should remove them from the API.
Version:
Errors in browser console
N/A
Describe the bug
The
config.widthandconfig.heightin the partition chart, at least in the pie chart layout, are overwritten by the parentDimensions.The first part where the
widthandheightare overwritten is visible in thegetShapeViewModelbefore merging the partial config.The second place is in the
partitionMultiGeometrieswhere we compute thechartWidthandchartHeightas derived from themarginedWidth/Height(always coming from theparentDimensions). On the same function we should also check theinnerWidth/Heightthat also comes from theparentDimensionsTo Reproduce
Steps to reproduce the behavior:
width,heightin the config, instead of the currently proposed workaround with margin/outerSizeRatioExpected behaviour
We should respect the
config.widthandconfig.heightparameters exposed by thePartitioncomponent. If we don't want that feature, we should remove them from the API.Version:
Errors in browser console
N/A