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

fix(big-number): big number gets cut off on a Dashboard #20488

Merged
merged 1 commit into from
Jun 30, 2022

Conversation

stephenLYZ
Copy link
Member

@stephenLYZ stephenLYZ commented Jun 24, 2022

SUMMARY

In the big number chart, we currently use computeMaxFontSize to measure the font size, where the incoming width is the actual width of the chart. After testing, it is found that the calculated font size has a certain error, resulting in truncation in the dashboard. So here we decrease 8px of the width to display fonts of different text lengths well.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before after
6 length image image
7 length image image
... ... ...
12 length image image

Since the minimum font size is 10px, if the text length exceeds 12 in extreme cases, it will be truncated. So user need to resize chart at that moment.

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Jun 24, 2022

Codecov Report

Merging #20488 (97d9fb9) into master (44f0b51) will not change coverage.
The diff coverage is n/a.

❗ Current head 97d9fb9 differs from pull request most recent head 2430321. Consider uploading reports for the commit 2430321 to get more accurate results

@@           Coverage Diff           @@
##           master   #20488   +/-   ##
=======================================
  Coverage   66.75%   66.75%           
=======================================
  Files        1740     1740           
  Lines       65172    65172           
  Branches     6900     6900           
=======================================
  Hits        43505    43505           
  Misses      19918    19918           
  Partials     1749     1749           
Flag Coverage Δ
javascript 51.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...lugin-chart-echarts/src/BigNumber/BigNumberViz.tsx 0.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44f0b51...2430321. Read the comment docs.

@zhaoyongjie zhaoyongjie merged commit 24a53c3 into apache:master Jun 30, 2022
michael-s-molina pushed a commit that referenced this pull request Jul 6, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels Preset-Patch size/XS v2.0 🍒 2.0.0 🍒 2.0.1 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants