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: adjust line type as well as weight for time series #30949

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

eschutho
Copy link
Member

@eschutho eschutho commented Nov 16, 2024

SUMMARY

The line thicknesses were with time adjustments were making the visualization difficult to read. Instead, I kept the existing thickness to match the legacy line chart and adjusted the dashed pattern instead.

I also removed the line boldness on hover because on dashed lines the animation is a bit distracting.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
image
image

After:
Screenshot 2025-01-17 at 4 35 39 PM

Screenshot 2025-01-17 at 4 35 07 PM

Hover animation:
Before:

Screen.Recording.2024-11-15.at.5.39.03.PM.mov

After:

Screen.Recording.2025-01-17.at.5.50.33.PM.mov

TESTING INSTRUCTIONS

Create a line chart with a time comparison and add more than 5 time comparisons.

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

@dosubot dosubot bot added the viz:charts:timeseries Related to Timeseries label Nov 16, 2024
Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

// https://apache.github.io/echarts-handbook/en/basics/release-note/5-3-0/#removing-the-default-bolding-emphasis-effect-in-the-line-chart
// TODO: should consider only adding emphasis to currently hovered series
lineStyle: {
width: 'bolder',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@villebro is it ok to remove this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also removed the line boldness on hover because on dashed lines the animation is a bit distracting.

@eschutho I believe this was added to keep the hover behavior consistent with other chart types.

Copy link
Member Author

@eschutho eschutho Jan 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you feel about us removing the bolder weight? It looks like the echarts community didn't like the look of it on the line chart, so they removed it. It just seems more distracting than anything on the line chart imo.

@eschutho
Copy link
Member Author

cc @michael-s-molina

@sadpandajoe sadpandajoe requested a review from villebro November 19, 2024 16:54
@@ -288,11 +288,20 @@ export default function transformProps(
entry,
ensureIsArray(chartProps.rawFormData?.time_compare),
)!;
if (!offsetLineWidths[offset]) {
offsetLineWidths[offset] = Object.keys(offsetLineWidths).length + 1;
if (!offsetLineWidths.includes(offset)) {
Copy link
Member

@michael-s-molina michael-s-molina Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous map approach is more efficient than looping through the elements with include.

@eschutho eschutho added the hold! On hold label Nov 23, 2024
@eschutho eschutho force-pushed the elizabeth/adjust-line-weight branch from 879919b to 5a7feff Compare January 18, 2025 00:48
@eschutho eschutho removed the hold! On hold label Jan 18, 2025
@eschutho eschutho force-pushed the elizabeth/adjust-line-weight branch from 5a7feff to fcc9656 Compare January 18, 2025 01:42
@eschutho eschutho force-pushed the elizabeth/adjust-line-weight branch from fcc9656 to 82603e6 Compare January 21, 2025 17:47
@sadpandajoe sadpandajoe merged commit 5501238 into master Jan 21, 2025
48 checks passed
@sadpandajoe sadpandajoe deleted the elizabeth/adjust-line-weight branch January 21, 2025 18:02
hainenber pushed a commit to hainenber/superset that referenced this pull request Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants