reveha commented on code in PR #42792:
URL: https://github.com/apache/superset/pull/42792#discussion_r3719161202
##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx:
##########
@@ -257,15 +357,28 @@ export default function EchartsTimeseries({
// Cross-filter by dimension (original behavior)
const { seriesName: name } = props;
handleChange(name);
- } else if (canCrossFilterByXAxis && props.componentType === 'series') {
+ } else if (
+ canCrossFilterByXAxis &&
+ xAxis.type === AxisType.Category &&
+ props.componentType === 'series'
+ ) {
// Cross-filter by X-axis value when no dimensions (issue #25334)
- const categoryAxisValue = getCategoryAxisValue(
+ const categoryAxisValue = getXAxisValue(
props.data,
props.name,
);
if (categoryAxisValue !== undefined) {
handleXAxisChange(categoryAxisValue);
}
+ } else if (
+ canCrossFilterByXAxis &&
+ xAxis.type === AxisType.Time &&
+ props.componentType === 'series'
+ ) {
+ const timeAxisValue = getXAxisValue(props.data, props.name);
+ if (typeof timeAxisValue === 'number') {
+ handleTimeAxisChange(timeAxisValue);
+ }
}
Review Comment:
done
##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx:
##########
@@ -349,9 +463,10 @@ export default function EchartsTimeseries({
crossFilter = getCrossFilterDataMask(seriesName);
} else if (
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]