Skip to content
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

Stacked Bar Chart remove initial space in X-axis #738

Open
AdityaAA2004 opened this issue Nov 13, 2024 · 0 comments
Open

Stacked Bar Chart remove initial space in X-axis #738

AdityaAA2004 opened this issue Nov 13, 2024 · 0 comments

Comments

@AdityaAA2004
Copy link

AdityaAA2004 commented Nov 13, 2024

I am trying to use the Stacked Bar chart, and I have almost got everything in place, however, there is a huge initial spacing between Y-axis and the initial label of X-axis. How to reduce that space?

image

This is the bar chart code:
<StackedBarChart hideLegend data={{ labels: daysOfWeek, legend: ["Completed", "Planned"], data: convertedStackedData, barColors: ["rgba(160, 32, 240, 1)", "rgba(128, 128, 128, 0.6)"], }} width={screenWidth - 70} height={220} withInnerLines={false} decimalPlaces={0} yAxisSuffix={yAxisSuffix} chartConfig={{ linejoinType: "bevel", backgroundGradientFrom: "#f3f3f3", backgroundGradientTo: "#f3f3f3", color: (opacity = 1) =>rgba(0, 0, 255, ${opacity}), labelColor: (opacity = 1) => rgba(0, 0, 0, ${opacity}), barPercentage: 0.75, // Adjust bar percentage to better align with labels propsForBackgroundLines: { strokeWidth: 0, }, }} style={{ marginVertical: 8, borderRadius: 16, }} />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant