-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
feat(Timeseries): Respect time grain and add i18n support for ECharts #31765
base: master
Are you sure you want to change the base?
feat(Timeseries): Respect time grain and add i18n support for ECharts #31765
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
Category | Issue | Fix Detected |
---|---|---|
Missing Translation Wrapper ▹ view | ✅ | |
Incorrect Override of Smart Date Format ▹ view |
Need a new review? Comment
/korbit-review
on this PR and I'll review your latest changes.Korbit Guide: Usage and Customization
Interacting with Korbit
- You can manually ask Korbit to review your PR using the
/korbit-review
command in a comment at the root of your PR.- You can ask Korbit to generate a new PR description using the
/korbit-generate-pr-description
command in any comment on your PR.- Too many Korbit comments? I can resolve all my comment threads if you use the
/korbit-resolve
command in any comment on your PR.- Chat with Korbit on issues we post by tagging @korbit-ai in your reply.
- Help train Korbit to improve your reviews by giving a 👍 or 👎 on the comments Korbit posts.
Customizing Korbit
- Check out our docs on how you can make Korbit work best for you and your team.
- Customize Korbit for your organization through the Korbit Console.
Feedback and Support
if (format === SMART_DATE_ID) { | ||
return getSmartDateDetailedFormatter(); | ||
return getTimeFormatter(SMART_DATE_DETAILED_ID, timeGrain); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect Override of Smart Date Format
Tell me more
What is the issue?
When SMART_DATE_ID format is specified, the code overrides it with SMART_DATE_DETAILED_ID, which contradicts the user's explicit format choice.
Why this matters
Users selecting SMART_DATE_ID format will unexpectedly receive a different formatting style than requested, potentially causing confusion and inconsistency in the application's behavior.
Suggested change
Respect the user's format choice by modifying the code to:
if (format === SMART_DATE_ID) {
return getTimeFormatter(SMART_DATE_ID, timeGrain);
}
Chat with Korbit by mentioning @korbit-ai, and give a 👍 or 👎 to help Korbit improve your reviews.
dataView: { | ||
title: t('Data View'), | ||
lang: [t('Data View'), t('Close'), 'Refresh'], | ||
}, |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
You need to run the pre-commit hook to pass CI. Superset uses Git pre-commit hooks courtesy of pre-commit. To install run the following:
Alternatively it is possible to run pre-commit by running pre-commit manually:
|
@gerbermichi thanks for this PR! A few questions/requests:
|
SUMMARY
Respect time grain and add i18n support for ECharts
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
BEFORE
AFTER
TESTING INSTRUCTIONS
Create a Timeseries or MixedTimeseries chart and use the time grain Quarter.
ADDITIONAL INFORMATION