Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Force tooltips on the DonutChart to a constant width (#1618)
By default the `@patternfly/react-charts` chart tooltips use the same text width estimation as is used in the Victory charts [1]. This estimation works ok for ASCII characters, but underestimate sizes for other non-Latin character code pages. Instead of creating another text size estimation function that can handle non-Latin characters (e.g. see [2]), just pick a constant width that should accommodate the expected text widths of most languages we support. [1] - https://github.com/FormidableLabs/victory/blob/main/packages/victory-core/src/victory-util/textsize.ts [2] - https://stackoverflow.com/questions/118241/calculate-text-width-with-javascript
- Loading branch information