Skip to content
Snippets Groups Projects
Unverified Commit a32e253d authored by Maxime FRIESS's avatar Maxime FRIESS :blue_heart:
Browse files

[dashboard] Fixed graph not resizing on smaller window

parent c80767cb
Branches
Tags
No related merge requests found
......@@ -70,7 +70,7 @@ const TransactionsGraphPanel = ({ data }) => {
return ('transactions' in data ? (
<Grid item xs={12}>
<CardHeader title={translate('dashboard.transactions.title')} />
<ResponsiveContainer width="100%" height={400}>
<ResponsiveContainer width={'99%'} height={400}>
<LineChart data={data.transactions.data} width={600} height={300}
margin={{ top: 10, right: 30, left: 0, bottom: 0 }}>
<XAxis domain={[Math.floor(start.getTime() / 1000), Math.floor(Date.now() / 1000)]} type="number" dataKey={data.transactions.date_field} tickFormatter={dateFormatter} />
......
......@@ -30,7 +30,7 @@ const BestProductsBarPanel = ({ data }) => {
<>
<Grid item xs={12}>
<CardHeader title={translate('dashboard.products.title')} />
<ResponsiveContainer width="100%" height={products.length * 20 + 40}>
<ResponsiveContainer width={'99%'} height={products.length * 20 + 40}>
<BarChart width={100} height={800} data={products} layout="vertical">
<XAxis type="number" />
<YAxis type="category" dataKey="name" tick={false} />
......
......@@ -30,7 +30,7 @@ const BestSellersBarPanel = ({ data }) => {
<>
<Grid item xs={12}>
<CardHeader title={translate('dashboard.sellers.title')} />
<ResponsiveContainer width="100%" height={sellers.length * 20 + 40}>
<ResponsiveContainer width={'99%'} height={sellers.length * 20 + 40}>
<BarChart width={100} height={800} data={sellers} layout="vertical">
<XAxis type="number" />
<YAxis type="category" dataKey="name" tick={false} />
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment