Skip to content
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

Word cloud error when metric is not text #444

Closed
wil5for opened this issue May 6, 2016 · 1 comment
Closed

Word cloud error when metric is not text #444

wil5for opened this issue May 6, 2016 · 1 comment
Labels
!deprecated-label:bug Deprecated label - Use #bug instead

Comments

@wil5for
Copy link

wil5for commented May 6, 2016

The world cloud visualization UI for editing/creating slices breaks when a non-text metric is chosen.

Setup
Osx 10.10.4
sqlite caravel backend
postgres db connection

To reproduce:

Add a non text metric to a table, the default Count(*) metric works.
Click on the table to create a new slice.
Change the visualization type to a Word Cloud.
Select the count metric

Result: UI is unhappy, query never runs
js console logs an error

I believe the issue is in caravel.js (colorBnb function), s is not a string

  var colorBnb = function () {
    // Color factory
    var seen = {};
    return function (s) {
      if (!s) { return; }
      // next line is for caravel series that should have the same color
      s = s.replace('---', '');
      if (seen[s] === undefined) {
        seen[s] = Object.keys(seen).length;
      }
      return this.bnbColors[seen[s] % this.bnbColors.length];
    };
  };
@mistercrunch
Copy link
Member

This should do it:
#447

@mistercrunch mistercrunch added !deprecated-label:bug Deprecated label - Use #bug instead validation:required A committer should validate the issue please_test and removed validation:required A committer should validate the issue labels May 8, 2016
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 17, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 24, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 25, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
!deprecated-label:bug Deprecated label - Use #bug instead
Projects
None yet
Development

No branches or pull requests

2 participants