superset icon indicating copy to clipboard operation
superset copied to clipboard

Uncaught TypeError when opening context menu on MixedTimeseries charts with saved metrics

Open sowo opened this issue 1 year ago • 0 comments

Bug description

On MixedTimeseries charts that use saved metrics from the dataset an Uncaught TypeError is thrown when opening the context menu

Uncaught (in promise) TypeError: (intermediate value)(intermediate value)(intermediate value)[eventParams.seriesName] is not iterable
    at ECharts.contextmenu (EchartsMixedTimeseries.tsx:143:1)
    at Eventful.trigger (Eventful.js:106:33)
    at ECharts.handler (echarts.js:908:17)
    at Eventful.trigger (Eventful.js:106:33)
    at Handler.dispatchToElement (Handler.js:159:18)
    at Handler.<computed> [as contextmenu] (Handler.js:259:14)
    at Eventful.trigger (Eventful.js:106:33)
    at localDOMHandlers.<computed> (HandlerProxy.js:170:14)
    at HTMLDivElement.eval (HandlerProxy.js:217:50)

This issue is not triggered when ad-hoc metrics are used.

How to reproduce the bug

  1. Create a MixedTimeseries chart using saved metrics that have both a metric key and a metric label and place it on a dashboard
  2. Right click on any element of the chart in the dashboard

Screenshots/recordings

Screencast from 04-24-2024 05:16:25 PM.webm

Superset version

master / latest-dev

Python version

3.10

Node version

18 or greater

Browser

Chrome

Additional context

No response

Checklist

  • [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

sowo avatar Apr 24 '24 15:04 sowo