mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-11 17:27:31 +02:00
Merge pull request #461 from R0m1k3/1.1
Improve store performance analytics with visible chart data
This commit is contained in:
2 files changed
+12
-6
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
@@ -482,14 +482,20 @@ export default function Analytics() {
|
|||||||
<CardContent>
|
<CardContent>
|
||||||
{Array.isArray(byStore) && byStore.length > 0 ? (
|
{Array.isArray(byStore) && byStore.length > 0 ? (
|
||||||
<ResponsiveContainer width="100%" height={300}>
|
<ResponsiveContainer width="100%" height={300}>
|
||||||
<BarChart data={byStore.slice(0, 5)} layout="horizontal">
|
<BarChart
|
||||||
|
data={byStore.slice(0, 5)}
|
||||||
|
margin={{ top: 20, right: 30, left: 20, bottom: 5 }}
|
||||||
|
>
|
||||||
<CartesianGrid strokeDasharray="3 3" />
|
<CartesianGrid strokeDasharray="3 3" />
|
||||||
<XAxis type="number" />
|
<XAxis dataKey="storeName" />
|
||||||
<YAxis dataKey="storeName" type="category" />
|
<YAxis />
|
||||||
<Tooltip />
|
<Tooltip
|
||||||
|
formatter={(value, name) => [value, name]}
|
||||||
|
labelFormatter={(label) => `Magasin : ${label}`}
|
||||||
|
/>
|
||||||
<Legend />
|
<Legend />
|
||||||
<Bar dataKey="orders" fill="#8884d8" name="Commandes" />
|
<Bar dataKey="orders" fill="#8884d8" name="Commandes" radius={[4, 4, 0, 0]} />
|
||||||
<Bar dataKey="deliveries" fill="#82ca9d" name="Livraisons" />
|
<Bar dataKey="deliveries" fill="#82ca9d" name="Livraisons" radius={[4, 4, 0, 0]} />
|
||||||
</BarChart>
|
</BarChart>
|
||||||
</ResponsiveContainer>
|
</ResponsiveContainer>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Reference in new issue
Block a user