Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Commit

Permalink
fix: Fix GaugeChart height calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
diondiondion committed Aug 19, 2019
1 parent 3155652 commit 4381d62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/charts/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Takes a `data` prop that must contain of a simple array of number values which w
Takes a single `value` prop that must be a Number value between `0` and `1` which will then be plotted out as a pretty (half of a) pie chart.

<Playground>
<SimpleGauge value={0.3} height={200} />
<SimpleGauge value={0.3} height={125} />
<br />
<SimpleGauge value={0.8} height={150} color="positive" />
<SimpleGauge value={0.8} height={80} color="positive" />
</Playground>
4 changes: 2 additions & 2 deletions src/charts/SimpleGauge/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function SimpleGauge({value, height, color = 'links'}) {

const options = {
...defaultOptions,
height,
height: height * 2,
};

useChartist(hostRef, {
Expand All @@ -58,7 +58,7 @@ function SimpleGauge({value, height, color = 'links'}) {
options,
});

return <Wrapper ref={hostRef} height={height / 2} color={color} />;
return <Wrapper ref={hostRef} height={height} color={color} />;
}

export default SimpleGauge;

0 comments on commit 4381d62

Please sign in to comment.