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

Change spacing between y-axis and chart #1547

Open
susiekims opened this issue Jun 27, 2023 · 1 comment
Open

Change spacing between y-axis and chart #1547

susiekims opened this issue Jun 27, 2023 · 1 comment

Comments

@susiekims
Copy link
Contributor

Feature request summary

In the dashboard metric cards, we want to change the spacing between the y-axis labels the chart:
image

Not sure if it's worth adding a theme config (maybe yAxis.marginRight), or just hardcoding the value to be a bit smaller.

Rationale


🌟 Feature requests that are not yet planned will be closed. We then use the issue’s 👍 upvotes to track and set priorities. See the contribution guidelines for more information.

@sergiu920
Copy link

I have also tried to apply some options like stepSize and stepRatio but they are ignored. No reaction.

const yAxisOptions = {
title: 'Percentage',
min: Math.min(...data.map(d => d.value)),
max: Math.max(...data.map(d => d.value)),
stepSize: 10,
stepRatio: 0.1,
format: (value) => `${value}%`,
};

<LineChart data={data} showLegend theme="Light" yAxisOptions={yAxisOptions} />

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

2 participants