You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 style prop to <Chart>, which will then be applied on the <div>
Allow passing in a size prop to <Chart>, which will then be applied on the <div>
Allow passing in multiple classNames as theme to <Chart>, which will then be applied on the <div>
Allow passing in a id prop to <Chart>, which will then be applied on the <div>
The text was updated successfully, but these errors were encountered:
The keen-react-charts is wrapper for old DataViz library and we are in process of dropping support for it as few months ago we introduced a new library.
For direct React integration I recommend to use our new charts library which is written in pure React
By using new DataViz You could easily control size of charts by by modifying the width / height of parent container - that You are using to render visualization.
My goal is to let different charts have different sizes. For example, I might have a
size
prop in my component, andbig
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 inkeen-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:
style
prop to<Chart>
, which will then be applied on the<div>
size
prop to<Chart>
, which will then be applied on the<div>
theme
to<Chart>
, which will then be applied on the<div>
id
prop to<Chart>
, which will then be applied on the<div>
The text was updated successfully, but these errors were encountered: