Skip to content

Commit

Permalink
Fix flexible chart during initial load (#1468)
Browse files Browse the repository at this point in the history
* add flex chart to show case

* fix flexible width chart

* add space
  • Loading branch information
kenns29 authored Jan 7, 2023
1 parent 1d4b74a commit 6c17826
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/react-vis/src/make-vis-flexible.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ function makeFlexible(Component, isWidthFlexible, isHeightFlexible) {
}));
}

_onResize();

const cancelSubscription = subscribeToDebouncedResize(_onResize);

return () => {
Expand Down
8 changes: 7 additions & 1 deletion packages/showcase/showcase-sections/misc-showcase.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const {
SelectionPlotExample,
DragableChartExample,
BidirectionDragChart,
ClipExample
ClipExample,
FlexibleCharts
} = showCase;

const MISC = [
Expand Down Expand Up @@ -96,6 +97,11 @@ const MISC = [
name: '2d Dragable Chart',
component: BidirectionDragChart,
componentName: 'BidirectionDragChart'
},
{
name: 'Flexible Chart',
component: FlexibleCharts,
componentName: 'FlexibleCharts'
}
];

Expand Down

0 comments on commit 6c17826

Please sign in to comment.