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

Single data point charts are empty #652

Open
1 of 3 tasks
adamhwang opened this issue Oct 3, 2022 · 1 comment
Open
1 of 3 tasks

Single data point charts are empty #652

adamhwang opened this issue Oct 3, 2022 · 1 comment

Comments

@adamhwang
Copy link
Contributor

I'm submitting a...

  • bug
  • feature
  • chore

What is the current behavior

A chart with a single data point appears to be empty and does not show the single data point.

What is the expected behavior

A chart with a single data point should show the single data point.

Please tell us about your environment

  • Version: 1.1.0
  • Browser: Chrome 105.0.5195.127

Other information

Repro in demo: https://react-financial.github.io/react-financial-charts/?path=/story/features-edgecases--single-data-point

@adamhwang
Copy link
Contributor Author

I was able to workaround this with plotFull=true but seems like this also causes some other unintended side effects. For now, length == 1 seems to be a decent compromise:

<ChartCanvas
  ...
  plotFull={data.length === 1}
>

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

No branches or pull requests

1 participant