You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/05/06 09:32:01 UTC

[GitHub] [superset] uwine-fr opened a new issue, #19975: Word cloud is blank when using custom sql series

uwine-fr opened a new issue, #19975:
URL: https://github.com/apache/superset/issues/19975

   When using custom sql (instead of a 'Simple' column) for a word cloud, the chart is empty. Looking at the page source, all `<text>` elements are created empty.
   
   #### How to reproduce the bug
   
   1. Create a word cloud chart (eg. Examples > Girl name)
   2. Use a custom SQL in the `Series` field, eg. `UPPER(name)`
   3. Use any metric, eg. `sum__num`
   
   ### Expected results
   
   A word cloud!
   
   ### Actual results
   
   A blank chart
   
   #### Screenshots
   
   ![image](https://user-images.githubusercontent.com/52753406/167105192-d6f543ac-f533-49bd-ad74-4c1eec72635c.png)
   
   
   ### Environment
   
   - browser type and version: any browser
   - superset version: `1.5.0`
   - python version: `3.9`
   - node.js version: `v.16.15`
   - any feature flags active: `ENABLE_EXPLORE_DRAG_AND_DROP, ENABLE_DND_WITH_CLICK_UX`
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   I had a look at the code in `superset-frontend/plugins/plugin-chart-word-cloud/src/legacyPlugin/transformProps.ts`, and I managed to get a working word cloud with the following changes - though I have no idea if it is actually the correct fix, hence did not submit a PR:
   
   ```
   @@ -47,10 +47,11 @@ export default function transformProps(chartProps: ChartProps): WordCloudProps {
      } = formData as LegacyWordCloudFormData;
   
      const metricLabel = getMetricLabel(metric);
   +  const textField = getMetricLabel(series);
   
      const encoding: Partial<WordCloudEncoding> = {
        color: {
   -      field: series,
   +      field: textField || '',
          scale: {
            scheme: colorScheme,
          },
   @@ -68,7 +69,7 @@ export default function transformProps(chartProps: ChartProps): WordCloudProps {
                type: 'quantitative',
              },
        text: {
   -      field: series,
   +      field: textField || '',
        },
      };
   ```
   
   


-- 
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: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] uwine-fr closed issue #19975: Word cloud is blank when using custom sql series

Posted by "uwine-fr (via GitHub)" <gi...@apache.org>.
uwine-fr closed issue #19975: Word cloud is blank when using custom sql series
URL: https://github.com/apache/superset/issues/19975


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] Shazad-khan commented on issue #19975: Word cloud is blank when using custom sql series

Posted by "Shazad-khan (via GitHub)" <gi...@apache.org>.
Shazad-khan commented on issue #19975:
URL: https://github.com/apache/superset/issues/19975#issuecomment-1539978108

   This issue has been fixed so please close this issue 
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org