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

undefined error of DataChart horizontal bar when the input length is 1 #6991

Open
ZhengtianChu opened this issue Oct 24, 2023 · 0 comments · May be fixed by #7020
Open

undefined error of DataChart horizontal bar when the input length is 1 #6991

ZhengtianChu opened this issue Oct 24, 2023 · 0 comments · May be fixed by #7020
Assignees
Labels
bug issue that does not match design or documentation and requires code changes to address

Comments

@ZhengtianChu
Copy link

Expected Behavior

When the input length of data is 1, the data chart should render a single horizontal bar.

Actual Behavior

undefined error: Cannot read properties of undefined

URL, screen shot, or Codepen exhibiting the issue

https://codesandbox.io/s/grommet-v2-template-forked-tjjym6?file=/index.js
image

Steps to Reproduce

  • Choose direction='horizontal' in DataChart
  • Declare the y column in series and axis.
  • if the length of data is 1, it will be an undefined error, if the length is larger than 1, the rendered date is wrong.

Your Environment

  • Grommet version: 2.33.1
  • Browser Name and version: chrome
  • Operating System and version (desktop or mobile): Win 10
@jcfilben jcfilben added the bug issue that does not match design or documentation and requires code changes to address label Oct 24, 2023
@Sulaymon333 Sulaymon333 linked a pull request Nov 17, 2023 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue that does not match design or documentation and requires code changes to address
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants