diff --git a/ontrack-web-core/components/charts/CountChart.js b/ontrack-web-core/components/charts/CountChart.js index 79f194488e..bf2737a60f 100644 --- a/ontrack-web-core/components/charts/CountChart.js +++ b/ontrack-web-core/components/charts/CountChart.js @@ -3,7 +3,13 @@ import {useEffect, useState} from "react"; import {Bar, CartesianGrid, ComposedChart, Legend, Tooltip, XAxis, YAxis} from "recharts"; import ChartContainer from "@components/charts/ChartContainer"; -export default function CountChart({query, variables, yTickFormatter}) { +export default function CountChart({ + query, + variables, + yTickFormatter, + legendFormatter = () => "Count ", + domain, + }) { const client = useGraphQLClient() @@ -40,10 +46,6 @@ export default function CountChart({query, variables, yTickFormatter}) { } }, [client, query, variables]); - const legendFormatter = (value, entry, index) => { - return "Count" - } - const [inactiveSeries, setInactiveSeries] = useState([]) const legendClick = ({dataKey}) => { @@ -62,7 +64,7 @@ export default function CountChart({query, variables, yTickFormatter}) { > - + diff --git a/ontrack-web-core/components/charts/PercentageChart.js b/ontrack-web-core/components/charts/PercentageChart.js index 24c829a2be..32374dcca3 100644 --- a/ontrack-web-core/components/charts/PercentageChart.js +++ b/ontrack-web-core/components/charts/PercentageChart.js @@ -8,7 +8,9 @@ export default function PercentageChart({query, variables}) { "%"} + domain={[0, 100]} /> )