Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions superset/assets/src/visualizations/presets/MainPreset.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import SunburstChartPlugin from '@superset-ui/legacy-plugin-chart-sunburst';
import TableChartPlugin from '@superset-ui/legacy-plugin-chart-table';
import TreemapChartPlugin from '@superset-ui/legacy-plugin-chart-treemap';
import WordCloudChartPlugin from '@superset-ui/legacy-plugin-chart-word-cloud';
import HelloWorldPlugin from '@superset-ui/plugin-chart-hello-world/src';
import WorldMapChartPlugin from '@superset-ui/legacy-plugin-chart-world-map';
// There is a known issue with bubble chart that the bubbles will not show up.
// (<path d="NaN" />)
Expand Down Expand Up @@ -100,6 +101,7 @@ export default class MainPreset extends Preset {
new TimeTableChartPlugin().configure({ key: 'time_table' }),
new TreemapChartPlugin().configure({ key: 'treemap' }),
new WordCloudChartPlugin().configure({ key: 'word_cloud' }),
new HelloWorldPlugin().configure({ key: 'hello_world' }),
new WorldMapChartPlugin().configure({ key: 'world_map' }),
],
});
Expand Down
5 changes: 5 additions & 0 deletions superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,11 @@ def query_obj(self):
return d


class HelloWorld(BaseViz):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason this appears to be necessary despite being in useLegacyApi: false, also the content of buildQuery doesn't seem used at this time

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just lost a lot of time coming to this realisation :(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me too. This is a really sad limitation, if only this wasn't required, adding visualisations could be much simpler and more isolated.

viz_type = "hello_world"
pass


class TreemapViz(BaseViz):

"""Tree map visualisation for hierarchical data."""
Expand Down