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

fix: Added chart examples for left out chart types #26387

Closed
wants to merge 9 commits into from
Closed
2 changes: 1 addition & 1 deletion RELEASING/release-notes-2-0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Superset 2.0 is a big step forward. This release cleans up many legacy code path

- New GitHub workflow to test Storybook Netlify instance nightly ([#19852](https://github.com/apache/superset/pull/19852))

- Minimum requirement for Superset is now Python 3.8 ([#19017](https://github.com/apache/superset/pull/19017)
- Minimum requirement for Superset is now Python 3.8 ([#19017](https://github.com/apache/superset/pull/19017))

## Features

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/frequently-asked-questions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Table schemas evolve, and Superset needs to reflect that. It’s pretty common i
dashboard to want to add a new dimension or metric. To get Superset to discover your new columns,
all you have to do is to go to **Data -> Datasets**, click the edit icon next to the dataset
whose schema has changed, and hit **Sync columns from source** from the **Columns** tab.
Behind the scene, the new columns will get merged it. Following this, you may want to re-edit the
Behind the scene, the new columns will get merged. Following this, you may want to re-edit the
table afterwards to configure the Columns tab, check the appropriate boxes and save again.

### What database engine can I use as a backend for Superset?
Expand Down Expand Up @@ -220,7 +220,7 @@ and write your own connector. The only example of this at the moment is the Drui
is getting superseded by Druid’s growing SQL support and the recent availability of a DBAPI and
SQLAlchemy driver. If the database you are considering integrating has any kind of of SQL support,
it’s probably preferable to go the SQLAlchemy route. Note that for a native connector to be possible
the database needs to have support for running OLAP-type queries and should be able to things that
the database needs to have support for running OLAP-type queries and should be able to do things that
are typical in basic SQL:

- aggregate data
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/installation/event-logging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ from superset.stats_logger import StatsdStatsLogger
STATS_LOGGER = StatsdStatsLogger(host='localhost', port=8125, prefix='superset')
```

Note that it’s also possible to implement you own logger by deriving
Note that it’s also possible to implement your own logger by deriving
`superset.stats_logger.BaseStatsLogger`.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@
*/
import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
import thumbnail from './images/thumbnail.png';
import example from './images/example.png';
import transformProps from '../transformProps';
import controlPanel from './controlPanel';

const metadata = new ChartMetadata({
category: t('Map'),
credits: ['https://uber.github.io/deck.gl'],
description: t('Compose multiple layers together to form complex visuals.'),
exampleGallery: [{ url: example }],
name: t('deck.gl Multiple Layers'),
thumbnail,
useLegacyApi: true,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
import thumbnail from './images/thumbnail.png';
import example from './images/example.png';
import transformProps from '../../transformProps';
import controlPanel from './controlPanel';

Expand All @@ -29,6 +30,7 @@ const metadata = new ChartMetadata({
),
name: t('deck.gl Arc'),
thumbnail,
exampleGallery: [{ url: example }],
useLegacyApi: true,
tags: [t('deckGL'), t('Geo'), t('3D'), t('Relational'), t('Web')],
});
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
import transformProps from '../../transformProps';
import controlPanel from './controlPanel';
import thumbnail from './images/thumbnail.png';
import example from './images/example.png';

const metadata = new ChartMetadata({
category: t('Map'),
credits: ['https://uber.github.io/deck.gl'],
description: t(
'Uses Gaussian Kernel Density Estimation to visualize spatial distribution of data',
),
name: t('deck.gl Countour'),
exampleGallery: [{ url: example }],
name: t('deck.gl Contour'),
thumbnail,
useLegacyApi: true,
tags: [t('deckGL'), t('Spatial'), t('Comparison'), t('Experimental')],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
import thumbnail from './images/thumbnail.png';
import example from './images/example.png';
import transformProps from '../../transformProps';
import controlPanel from './controlPanel';

Expand All @@ -27,6 +28,7 @@ const metadata = new ChartMetadata({
description: t(
'The GeoJsonLayer takes in GeoJSON formatted data and renders it as interactive polygons, lines and points (circles, icons and/or texts).',
),
exampleGallery: [{ url: example }],
name: t('deck.gl Geojson'),
thumbnail,
useLegacyApi: true,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
*/
import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
import thumbnail from './images/thumbnail.png';
import example from './images/example.png';
import transformProps from '../../transformProps';
import example1 from './images/example1.png';
import controlPanel from './controlPanel';

const metadata = new ChartMetadata({
Expand All @@ -27,8 +29,10 @@ const metadata = new ChartMetadata({
description: t(
'Visualize geospatial data like 3D buildings, landscapes, or objects in grid view.',
),
exampleGallery: [{ url: example1 }],
name: t('deck.gl Grid'),
thumbnail,
exampleGallery: [{ url: example }],
useLegacyApi: true,
tags: [t('deckGL'), t('3D'), t('Comparison'), t('Experimental')],
});
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
import transformProps from '../../transformProps';
import controlPanel from './controlPanel';
import thumbnail from './images/thumbnail.png';
import example from './images/example.png';

const metadata = new ChartMetadata({
category: t('Map'),
credits: ['https://uber.github.io/deck.gl'],
description: t(
'Uses Gaussian Kernel Density Estimation to visualize spatial distribution of data',
),
exampleGallery: [{ url: example }],
name: t('deck.gl Heatmap'),
thumbnail,
useLegacyApi: true,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
import thumbnail from './images/thumbnail.png';
import example from './images/example.png';
import transformProps from '../../transformProps';
import controlPanel from './controlPanel';

Expand All @@ -27,6 +28,7 @@ const metadata = new ChartMetadata({
description: t(
'Overlays a hexagonal grid on a map, and aggregates data within the boundary of each cell.',
),
exampleGallery: [{ url: example }],
name: t('deck.gl 3D Hexagon'),
thumbnail,
useLegacyApi: true,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,19 @@
*/
import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
import thumbnail from './images/thumbnail.png';
import example from './images/example.png';
import transformProps from '../../transformProps';
import example1 from './images/example1.png';
import controlPanel from './controlPanel';

const metadata = new ChartMetadata({
category: t('Map'),
credits: ['https://uber.github.io/deck.gl'],
description: t('Visualizes connected points, which form a path, on a map.'),
exampleGallery: [{ url: example1 }],
name: t('deck.gl Path'),
thumbnail,
exampleGallery: [{ url: example }],
useLegacyApi: true,
tags: [t('deckGL'), t('Web')],
});
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
*/
import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
import thumbnail from './images/thumbnail.png';
import example from './images/example.png';
import transformProps from '../../transformProps';
import example1 from './images/example1.png';
import controlPanel from './controlPanel';

const metadata = new ChartMetadata({
Expand All @@ -27,8 +29,10 @@ const metadata = new ChartMetadata({
description: t(
'Visualizes geographic areas from your data as polygons on a Mapbox rendered map. Polygons can be colored using a metric.',
),
exampleGallery: [{ url: example1 }],
name: t('deck.gl Polygon'),
thumbnail,
exampleGallery: [{ url: example }],
useLegacyApi: true,
tags: [
t('deckGL'),
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
*/
import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
import thumbnail from './images/thumbnail.png';
import example from './images/example.png';
import transformProps from '../../transformProps';
import example1 from './images/example1.png';
import example2 from './images/example2.png';
import controlPanel from './controlPanel';

const metadata = new ChartMetadata({
Expand All @@ -27,8 +30,10 @@ const metadata = new ChartMetadata({
description: t(
'A map that takes rendering circles with a variable radius at latitude/longitude coordinates',
),
exampleGallery: [{ url: example1 }, { url: example2 }],
name: t('deck.gl Scatterplot'),
thumbnail,
exampleGallery: [{ url: example }],
useLegacyApi: true,
tags: [
t('deckGL'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
*/
import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
import thumbnail from './images/thumbnail.png';
import example from './images/example.png';
import transformProps from '../../transformProps';
import example1 from './images/example1.png';
import example2 from './images/example2.png';
import controlPanel from './controlPanel';

const metadata = new ChartMetadata({
Expand All @@ -27,8 +30,10 @@ const metadata = new ChartMetadata({
description: t(
'Aggregates data within the boundary of grid cells and maps the aggregated values to a dynamic color scale',
),
exampleGallery: [{ url: example1 }, { url: example2 }],
name: t('deck.gl Screen Grid'),
thumbnail,
exampleGallery: [{ url: example }],
useLegacyApi: true,
tags: [
t('deckGL'),
Expand Down
3 changes: 3 additions & 0 deletions superset-frontend/src/embedded/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { makeApi, t, logging } from '@superset-ui/core';
import Switchboard from '@superset-ui/switchboard';
import getBootstrapData from 'src/utils/getBootstrapData';
import setupClient from 'src/setup/setupClient';
import setupPlugins from 'src/setup/setupPlugins';
import { RootContextProviders } from 'src/views/RootContextProviders';
import { store, USER_LOADED } from 'src/views/store';
import ErrorBoundary from 'src/components/ErrorBoundary';
Expand All @@ -32,6 +33,8 @@ import ToastContainer from 'src/components/MessageToasts/ToastContainer';
import { UserWithPermissionsAndRoles } from 'src/types/bootstrapTypes';
import { embeddedApi } from './api';

setupPlugins();

const debugMode = process.env.WEBPACK_MODE === 'development';
const bootstrapData = getBootstrapData();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export default class SelectControl extends React.PureComponent {

const getValue = () => {
const currentValue =
value ||
value ??
(this.props.default !== undefined ? this.props.default : undefined);

// safety check - the value is intended to be undefined but null was used
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -849,17 +849,26 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) {
grid-area: examples-header;
`}
>
{!!selectedVizMetadata?.exampleGallery?.length && t('Examples')}
Examples
</SectionTitle>
<Examples>
{(selectedVizMetadata?.exampleGallery || []).map(example => (
{selectedVizMetadata?.exampleGallery.length ? (
(selectedVizMetadata?.exampleGallery || []).map(example => (
<img
key={example.url}
src={example.url}
alt={example.caption}
title={example.caption}
/>
))
) : (
<img
key={example.url}
src={example.url}
alt={example.caption}
title={example.caption}
key={selectedVizMetadata?.thumbnail}
src={selectedVizMetadata?.thumbnail}
alt={selectedVizMetadata?.name}
title={selectedVizMetadata?.name}
/>
))}
)}
</Examples>
</>
</div>
Expand Down
28 changes: 14 additions & 14 deletions superset-websocket/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions superset-websocket/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"lodash": "^4.17.21",
"uuid": "^9.0.1",
"winston": "^3.11.0",
"ws": "^8.15.0"
"ws": "^8.16.0"
},
"devDependencies": {
"@types/cookie": "^0.6.0",
"@types/ioredis": "^4.27.8",
"@types/jest": "^27.0.2",
"@types/jsonwebtoken": "^9.0.5",
"@types/node": "^20.10.5",
"@types/node": "^20.10.6",
"@types/uuid": "^9.0.7",
"@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "^5.61.0",
Expand Down
Loading
Loading