Skip to content

Commit

Permalink
Fixing top resources at risk chart (elastic#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanSh authored and orouz committed Dec 21, 2021
1 parent 2d13a25 commit 36adc68
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export const ResourcesAtRiskChart = () => {
);
};

const top5 = resources.length > 5 ? resources.slice(0, 5) : resources;

return (
<Chart size={{ height: 200 }}>
<Settings
Expand All @@ -53,12 +55,10 @@ export const ResourcesAtRiskChart = () => {
<BarSeries
displayValueSettings={{
showValueLabel: true,
// valueFormatter: (d: any) => `${Number(d * 100).toFixed(0)} %`,
}}
id="bars"
name="0"
data={resources}
xAccessor={'name'}
id="resources-at-risk-bars"
data={top5}
xAccessor={'resource'}
yAccessors={['value']}
splitSeriesAccessors={['evaluation']}
stackAccessors={['evaluation']}
Expand Down

0 comments on commit 36adc68

Please sign in to comment.