-
-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Line chart full width #709
Comments
You can modify the LineChart.tsx. Check the point calculation logic here:
You need to modify the x calculation logic, the straight way to do is changing the xmax calculations:
From: getXMaxValues = (data: Dataset[]) => {
return data.reduce((acc, cur) => {
return cur.data.length > acc ? cur.data.length : acc;
}, 0);
}; To: getXMaxValues = (data: Dataset[]) => {
const xmax = data.reduce((acc, cur) => {
return cur.data.length > acc ? cur.data.length : acc;
}, 0);
return Math.max(1, xmax - 1);
}; |
@laishere Thank you! Should we open a pull request? |
@cs-manughian You're welcome! Feel free to go ahead with the pull request. |
Hi im using line chart but i can't make it full width. I checked the element inspector there is no padding so it should be a width problem
The text was updated successfully, but these errors were encountered: