FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Donut threshold chart warning for donutWidth=0 · Issue #2587 · patternfly/patternfly-react · GitHub

Donut threshold chart warning for donutWidth=0 #2587

Description

The donut threshold chart appears to generate the warning below when donutWidth is zero.

"I think figured out where the @patternfly/react-charts prop type warning in OpenShift is coming from . In ChartDonutThreshold.tsx on L521 and L522, we make some calculations on the donutHeight and donutWidth props using static values from a theme object. If the initial value for donutHeight/donutWidth is low enough (below 28 to be exact), then the calculation will always result in a negative number. I think this doesn't cause a detectable bug because no one has set the width or height to a number that low and expected to see anything. In the case of OpenShift, the value is 0 on initial render, which is causing this calculation to return a negative number and throw the prop type warning." -- @TheRealJon

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


Back | FazBrowse Home | New Git URL