Im trying to set Ant Desing Area chart to not have margin/padding on the sides so my chart will perfectly fit inside the wrapping container - but for some reason i couldn't find the attribute for that on Ant's documentation. Also i would like the Chart to start from 0 on the Y axis i tried the "beginAtZero" attribute but also didnt worked
these are my configurations:
const config = {
height: 60,
data: volumeData,
autoFit: true,
xField: "date",
yField: "count",
padding: [5],
xAxis: false,
yAxis: false,
color: "#916afc",
legend: false,
point: {
shape: 'circle'
},
};
wrpper container css
width: 100%;
background-color: #ffffff;
box-shadow: 0px 5px 10px rgb(0 0 0 / 5%);
border-radius: 10px;
padding: 20px;
and the chart:
<Area {...config} />
You should set the scale.min of y field to 0
.
{
/* ... */
meta: {
count: { min: 0 }
}
}
Then the y axis will start wiht zero.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With