Skip to content

Commit

Permalink
make charts responsive (#132)
Browse files Browse the repository at this point in the history
Co-authored-by: Laurentiu Ghiur <[email protected]>
  • Loading branch information
jay-deshmukh and lghiur authored Jun 5, 2020
1 parent 1315f4e commit 901a0ff
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/tyk-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/tyk-ui.js.map

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/components/Chart/js/Chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ const Chart = (props) => {
return () => {
window.removeEventListener('resize', onResize);
};
}, []);
}, [tykChartInstance]);

useEffect(() => {
setTykChartInstance(echarts.init(chartWrapperRef.current));
Expand Down Expand Up @@ -362,7 +362,9 @@ const Chart = (props) => {
if (!tempStyle.height) {
tempStyle.height = '300px';
}

if (!tempStyle.width) {
tempStyle.width = '100%';
}
return tempStyle;
};

Expand Down

0 comments on commit 901a0ff

Please sign in to comment.