diff --git a/src/charts/SimpleChart/ChartTooltips.js b/src/charts/SimpleChart/ChartTooltips.js index 3378aa89..b99cae43 100644 --- a/src/charts/SimpleChart/ChartTooltips.js +++ b/src/charts/SimpleChart/ChartTooltips.js @@ -49,7 +49,7 @@ const ReadoutListItem = styled.li` const Cursor = styled.span` display: block; - height: 100%; + height: ${p => (p.yValue ? p.yValue * 100 : 100)}%; width: 1px; background-color: ${p => alpha(p.theme.shade, p.theme.lineStrength)}; `; @@ -91,6 +91,8 @@ function ChartTooltips({ if (!data || !data.length) return null; + const maxValue = Math.max.apply(null, data); + return ( {data.map((value, index) => { @@ -105,6 +107,7 @@ function ChartTooltips({ @@ -114,6 +117,7 @@ function ChartTooltips({