-
Notifications
You must be signed in to change notification settings - Fork 14k
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(plugin-chart-echarts): add support for generic axis to mixed chart #20097
Conversation
4fa6505
to
b6e13af
Compare
/testenv up FEATURE_GENERIC_CHART_AXES=true |
@stephenLYZ Container image not yet published for this PR. Please try again when build is complete. |
@stephenLYZ Ephemeral environment creation failed. Please check the Actions logs for details. |
/testenv up FEATURE_GENERIC_CHART_AXES=true |
@villebro Ephemeral environment spinning up at http://34.215.190.191:8080. Credentials are |
Codecov Report
@@ Coverage Diff @@
## master #20097 +/- ##
==========================================
- Coverage 66.46% 66.45% -0.01%
==========================================
Files 1721 1721
Lines 64467 64475 +8
Branches 6795 6804 +9
==========================================
+ Hits 42847 42848 +1
- Misses 19892 19895 +3
- Partials 1728 1732 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
7894a2f
to
5dd1151
Compare
An example chart on the eph env: http://34.215.190.191:8080/superset/explore/p/gG3OYRVY0wj/ |
superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/buildQuery.ts
Outdated
Show resolved
Hide resolved
superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/buildQuery.ts
Outdated
Show resolved
Hide resolved
@@ -447,4 +447,12 @@ const config: ControlPanelConfig = { | |||
], | |||
}; | |||
|
|||
if (isFeatureEnabled(FeatureFlag.GENERIC_CHART_AXES)) { |
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.
Can we just use ternary operator when declaring config? Like
isFeatureEnabled(FeatureFlag.GENERIC_CHART_AXES)) ?
{ label: t('Shared query fields'),
expanded: true,
controlSetRows: [[xAxisControl]],
} : sections.legacyTimeseriesTime
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.
We still need the time section (I hope we can get rid of it soon, but it'll require some more work that's beyond the scope of this PR)
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.
Sorry, I meant to write
isFeatureEnabled(FeatureFlag.GENERIC_CHART_AXES)) ?
{ label: t('Shared query fields'),
expanded: true,
controlSetRows: [[xAxisControl]],
} : null
🤦
I think that's a pattern that we use in several control panels
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.
oh right, I forgot about that pattern 👍
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.
5dd1151
to
00755eb
Compare
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.
Tested, LGTM
Ephemeral environment shutdown and build artifacts deleted. |
…rt (apache#20097) * feat(plugin-chart-echarts): add support for generic axis to mixed chart * fix tests + add new tests * address review comments * simplify control panel * fix types and tests
SUMMARY
Add support for generic x-axis to Mixed Time-Series chart. In addition do the following changes:
null
values on the control panel section config and make the check explicit with a type guardAFTER
When the feature flag is enabled, the x-axis control appears, making it possible to use a non-temporal x-axis:
Now the chart is called "Mixed chart" instead of "Mixed Time-series Chart":
TESTING INSTRUCTIONS
GENERIC_CHART_AXES
feature flagMixed time-series chart
has been replaced withMixed chart
with a description that doesn't mention the words "timeseries" or "temporal"ADDITIONAL INFORMATION