-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
My goal is to let different charts have different sizes. For example, I might have a size prop in my component, and big would mean the chart is rendered bigger.
According to docs of keen-dataviz, It's better to control the size using the CSS of the container HTML element.
(While it's also possible to directly pass in {size: {width:..., height:xxx }}) to c3, it seems to only work for height, and not width.
Except we don't have access to the <div> directly in keen-react-charts.
I have tried adding two classNames through theme, e.g. theme="keen-dataviz my-own-class", but that seems to break the whole chart.
The solution could come in a variety of ways, but here are some I could see:
- Allow passing in a
styleprop to<Chart>, which will then be applied on the<div> - Allow passing in a
sizeprop to<Chart>, which will then be applied on the<div> - Allow passing in multiple classNames as
themeto<Chart>, which will then be applied on the<div> - Allow passing in a
idprop to<Chart>, which will then be applied on the<div>
Metadata
Metadata
Assignees
Labels
No labels