Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

fix(echarts): correct time shift handling in Timeseries transformProps#38126

Open
YousufFFFF wants to merge 1 commit intoapache:masterfrom
YousufFFFF:fix/echarts-annotation-timeshift
Open

fix(echarts): correct time shift handling in Timeseries transformProps#38126
YousufFFFF wants to merge 1 commit intoapache:masterfrom
YousufFFFF:fix/echarts-annotation-timeshift

Conversation

@YousufFFFF
Copy link
Contributor

SUMMARY

This PR fixes incorrect time shift behavior in the ECharts Timeseries path used by the Bar chart.
Fixes#36966.

Previously, when a time shift (e.g., 1 month, 5 months) was applied, the shifted series was not properly aligned during series construction insidetransformProps.ts. This caused incorrect rendering and misalignment of shifted data along the x-axis.

This update corrects the time shift handling logic to ensure proper timestamp alignment and consistent rendering across different shift values and dimension combinations.


BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before (Time Shift Not Functioning Correctly)

  • Time shift not reflected properly on x-axis

After (Time Shift Working as Expected)

Base.Test.-.Google.Chrome.2026-02-20.23-36-29.mp4
  • Shifted series aligns correctly with timestamps
  • Multiple shift values render properly
  • Behavior consistent with expected time shift semantics

TESTING INSTRUCTIONS

  1. Create aBar Chart
  2. SelectTimeseries mode
  3. Add a metric
  4. Apply aTime Shift (e.g.,1 month,5 months)
  5. Optionally add one or moreDimensions
  6. Verify:
    • Shifted series renders correctly
    • X-axis alignment is accurate
    • No duplicated or broken series
    • Chart behaves consistently across different shift values

Tested locally using Docker environment.


ADDITIONAL INFORMATION

  • Has associated issue:FixesCertain Annotation Options Have No Effect in Time Series Annotations #36966
  • 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

@bito-code-review
Copy link
Contributor

bito-code-reviewbot commentedFeb 20, 2026
edited
Loading

Code Review Agent Run #1b0812

Actionable Suggestions - 0
Additional Suggestions - 1
  • superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts -1
    • Type Safety Violation ·Line 685-685
      The 'as any' type assertion is unnecessary here, as 'layer.overrides?.time_shift' is properly typed according to the TimeseriesAnnotationLayer interface. This violates the repository's TypeScript standards that prohibit 'any' types.
      Code suggestion
       @@ -684,3 +684,3 @@-  const shiftMs = parseTimeShiftToMs(-  (layer as any)?.overrides?.time_shift,-  );+  const shiftMs = parseTimeShiftToMs(+  layer?.overrides?.time_shift,+  );
Review Details
  • Files reviewed -1 · Commit Range:5894a6d..5894a6d
    • superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts
  • Files skipped -0
    • Tools
      • Whispers (Secret Scanner) - ✔︎ Successful
      • Detect-secrets (Secret Scanner) - ✔︎ Successful
      • Eslint (Linter) - ✔︎ Successful

    Bito Usage Guide

    Commands

    Type the following command in the pull request comment and save the comment.

    • /review - Manually triggers a full AI review.

    • /pause - Pauses automatic reviews on this pull request.

    • /resume - Resumes automatic reviews.

    • /resolve - Marks all Bito-posted review comments as resolved.

    • /abort - Cancels all in-progress reviews.

    Refer to thedocumentation for additional commands.

    Configuration

    This repository usesSuperset You can customize the agent settingshere or contact your Bito workspace admin atevan@preset.io.

    Documentation & Help

    AI Code Review powered byBito Logo

    @dosubotdosubotbot added the viz:charts:timeseriesRelated to Timeseries labelFeb 20, 2026
    @netlify
    Copy link

    netlifybot commentedFeb 20, 2026

    Deploy Preview forsuperset-docs-preview ready!

    NameLink
    🔨 Latest commit5894a6d
    🔍 Latest deploy loghttps://app.netlify.com/projects/superset-docs-preview/deploys/6998a5e91cd6b300085836d9
    😎 Deploy Previewhttps://deploy-preview-38126--superset-docs-preview.netlify.app
    📱 Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.

    To edit notification comments on pull requests, go to yourNetlify project configuration.

    Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

    Reviewers

    No reviews

    Assignees

    No one assigned

    Labels

    Projects

    None yet

    Milestone

    No milestone

    Development

    Successfully merging this pull request may close these issues.

    Certain Annotation Options Have No Effect in Time Series Annotations

    1 participant

    @YousufFFFF

    [8]ページ先頭

    ©2009-2026 Movatter.jp