reveha commented on code in PR #41111:
URL: https://github.com/apache/superset/pull/41111#discussion_r3459386526
##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx:
##########
@@ -218,6 +221,13 @@ export default function EchartsTimeseries({
// Determine if X-axis can be used for cross-filtering (categorical axis
without dimensions)
const canCrossFilterByXAxis =
!hasDimensions && xAxis.type === AxisType.Category;
+ const categoryAxisValueIndex =
+ formData.orientation === OrientationType.Horizontal ? 1 : 0;
+ const getCategoryAxisValue = useCallback(
+ (data: unknown) =>
+ Array.isArray(data) ? data[categoryAxisValueIndex] : undefined,
+ [categoryAxisValueIndex],
+ );
Review Comment:
Thanks for catching this. I updated the category extractor to read the
orientation-specific array value first, and fall back to the ECharts event name
when the payload is not an array or does not contain a string/number category
value. This keeps the horizontal bar fix while preserving category
cross-filtering for other ECharts payload shapes.
--
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]