microsoft / fluentui

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.
https://react.fluentui.dev
Other
18.4k stars 2.72k forks source link

[Bug]: [@fluentui/react-chart][Vertical-Bar-chart] show wrong data when the value for Y is less than 1 #30213

Open Gutentag0004 opened 9 months ago

Gutentag0004 commented 9 months ago

Library

React / v8 (@fluentui/react)

System Info

$ npx envinfo --system --npmPackages @fluentui/react-charting --browsers
npm WARN exec The following package was not found and will be installed: envinfo@7.11.0

  System:
    OS: Windows 11 10.0.22621
    CPU: (8) x64 Intel(R) Xeon(R) W-2223 CPU @ 3.60GHz
    Memory: 4.56 GB / 31.69 GB
  Browsers:
    Edge: Chromium (120.0.2210.91)
    Internet Explorer: 11.0.22621.1

Are you reporting Accessibility issue?

None

Reproduction

/

Bug Description

Actual Behavior

fill this out image

Expected Behavior

fill this out this value for Y should be something like 0.18 but it is shown as 180m

Logs

No response

Requested priority

High

Products/sites affected

No response

Are you willing to submit a PR to fix?

yes

Validations

AtishayMsft commented 9 months ago

The y labels are following the SI notation to represent very small values. https://en.wikipedia.org/wiki/Scientific_notation To solve this, you can explicitly format the number using d3 formatting options as demoed in the codepen link below and passing an additional yAxisCalloutData property to the data. https://codepen.io/AtishayMsft/pen/WNPJyWN

Or feel free to submit a fix if the proposed solution does not work for you.

microsoft-github-policy-service[bot] commented 3 months ago

This issue has not had activity for over 180 days! We're adding Soft close label and will close it soon for house-keeping purposes. Still require assistance? Please add comment - "keep open".