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

[Bug]: Chart places the Peak value of the meter chart incorrectly for values lower than the value of first data element. #1902

Open
1 of 6 tasks
invos opened this issue Oct 9, 2024 · 0 comments

Comments

@invos
Copy link

invos commented Oct 9, 2024

Relevant package(s)

  • @carbon/charts
  • @carbon/charts-svelte
  • @carbon/charts-react
  • @carbon/charts-angular
  • @carbon/charts-vue
  • Documentation website

Carbon Charts Version

1.15.7

Which bundler are you using?

Webpack

What happened and what did you expect to happen?

If you have more than one elements in the data set, for example there are 2 elements in your data set, 'Dataset 1' with a value of 40 and 'Dataset 2' with a value of 60, and you provide a value that is less than the first element (in this case, less than 40), the peak bar will be positioned incorrectly.

Chart data and options (automatically formatted so no need for backticks)

// data.js
export default [
{
group: 'Dataset 1',
value: 40
},
{
group: 'Dataset 1',
value: 60
}
]

// options.js

export default {
title: 'Meter Chart - statuses and custom color',
meter: {
height: '7px',
peak: 10,
},
height: '120px',
};

JavaScript console or build output (if relevant)

Image

No response

StackBlitz repro

No response

IBM Application/Team (if relevant)

No response

What priority level would this be in your opinion?

P0 (Critical)

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