Incubator-superset: e.map is not a function explore view

Created on 14 Jan 2020  路  5Comments  路  Source: apache/incubator-superset

I encountered #2687 while casting from a table visualization with specified columns to a bar chart time series. Refreshing the page gets rid of the issue

Expected results

Moving between viz modes does not crash the slice explorer

Actual results

I reproduced #2687 by attempting to switch from a table viz to a time-series bar chart viz after creating the chart via the explore button in sql lab, and debugged on the exception to see:
image

How to reproduce the bug

while debugging on all exceptions

  1. create a table viz with specified columns and no metrics
  2. attempt to switch the viz type to line or time series bar chart
  3. Error should be thrown. You should see that e in the console is the above structure

Environment

(please complete the following information):

  • superset version: I'm on a slightly modified fork of 0.34.0. Others in the comments of #2687 corroborate. Would be surprised if it had been fixed
#bug

Most helpful comment

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.92. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

All 5 comments

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.92. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

The TimeTable expects the logged structure here:
https://github.com/apache/incubator-superset/blob/44d919c757fec0705f52cede8a1c6289fbf79817/superset/assets/src/visualizations/TimeTable/transformProps.js#L22

But superset-ui-legacy-preset-chart-nvd3/src/transformProps.js (and thus the line plugin, etc) expects an array:

  const rawData = queryData.data || [];
  const data = Array.isArray(rawData)
    ? rawData.map(row => ({
        ...row,
        key: formatLabel(row.key, datasource.verboseMap),
      }))
    : rawData;

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

Neither blocks of code I pointed to have changed, (though transformProps moved) so bumping this

@mistercrunch stalebot out here closing issues without inactive tags

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lenguyenthedat picture lenguyenthedat  路  3Comments

eliab picture eliab  路  3Comments

josephtyler picture josephtyler  路  3Comments

ylkjick532428 picture ylkjick532428  路  3Comments

XiaodiKong picture XiaodiKong  路  3Comments