You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2023/01/18 17:16:53 UTC

[superset] branch master updated: chore: adding missing examples in the gallery for some chart types (#22766)

This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new aca2f1b201 chore: adding missing examples in the gallery for some chart types (#22766)
aca2f1b201 is described below

commit aca2f1b2013b7eab2a36592f4fb4674592923914
Author: Yash Mehta <ya...@samsung.com>
AuthorDate: Wed Jan 18 22:46:40 2023 +0530

    chore: adding missing examples in the gallery for some chart types (#22766)
---
 .../src/images/example1.jpg                            | Bin 0 -> 62434 bytes
 .../src/images/example2.jpg                            | Bin 0 -> 106374 bytes
 .../src/index.js                                       |   3 +++
 .../src/images/example.jpg                             | Bin 0 -> 44054 bytes
 .../plugins/legacy-plugin-chart-partition/src/index.js |   2 ++
 .../src/images/example.jpg                             | Bin 0 -> 59676 bytes
 .../legacy-plugin-chart-pivot-table/src/index.js       |   2 ++
 .../src/Compare/images/example.jpg                     | Bin 0 -> 66360 bytes
 .../legacy-preset-chart-nvd3/src/Compare/index.js      |   2 ++
 .../src/MixedTimeseries/images/example.jpg             | Bin 0 -> 65380 bytes
 .../plugin-chart-echarts/src/MixedTimeseries/index.ts  |   2 ++
 .../plugin-chart-pivot-table/src/images/example.jpg    | Bin 0 -> 66959 bytes
 .../plugin-chart-pivot-table/src/plugin/index.ts       |   2 ++
 .../plugin-chart-pivot-table/types/external.d.ts       |   2 ++
 .../src/visualizations/TimeTable/images/example.jpg    | Bin 0 -> 72275 bytes
 .../src/visualizations/TimeTable/index.ts              |   2 ++
 16 files changed, 17 insertions(+)

diff --git a/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/images/example1.jpg b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/images/example1.jpg
new file mode 100644
index 0000000000..6d73037214
Binary files /dev/null and b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/images/example1.jpg differ
diff --git a/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/images/example2.jpg b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/images/example2.jpg
new file mode 100644
index 0000000000..d5858bdc84
Binary files /dev/null and b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/images/example2.jpg differ
diff --git a/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/index.js b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/index.js
index cc7975f97b..0a6ff7bb5a 100644
--- a/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/index.js
+++ b/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/index.js
@@ -19,6 +19,8 @@
 import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
 import transformProps from './transformProps';
 import thumbnail from './images/thumbnail.png';
+import example1 from './images/example1.jpg';
+import example2 from './images/example2.jpg';
 import controlPanel from './controlPanel';
 
 const metadata = new ChartMetadata({
@@ -27,6 +29,7 @@ const metadata = new ChartMetadata({
   description: t(
     'Plots the individual metrics for each row in the data vertically and links them together as a line. This chart is useful for comparing multiple metrics across all of the samples or rows in the data.',
   ),
+  exampleGallery: [{ url: example1 }, { url: example2 }],
   name: t('Parallel Coordinates'),
   tags: [t('Coordinates'), t('Directional'), t('Legacy'), t('Relational')],
   thumbnail,
diff --git a/superset-frontend/plugins/legacy-plugin-chart-partition/src/images/example.jpg b/superset-frontend/plugins/legacy-plugin-chart-partition/src/images/example.jpg
new file mode 100644
index 0000000000..7799791a27
Binary files /dev/null and b/superset-frontend/plugins/legacy-plugin-chart-partition/src/images/example.jpg differ
diff --git a/superset-frontend/plugins/legacy-plugin-chart-partition/src/index.js b/superset-frontend/plugins/legacy-plugin-chart-partition/src/index.js
index 1094b21e9f..866a18d0f0 100644
--- a/superset-frontend/plugins/legacy-plugin-chart-partition/src/index.js
+++ b/superset-frontend/plugins/legacy-plugin-chart-partition/src/index.js
@@ -19,11 +19,13 @@
 import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
 import transformProps from './transformProps';
 import thumbnail from './images/thumbnail.png';
+import example from './images/example.jpg';
 import controlPanel from './controlPanel';
 
 const metadata = new ChartMetadata({
   category: t('Part of a Whole'),
   description: t('Compare the same summarized metric across multiple groups.'),
+  exampleGallery: [{ url: example }],
   name: t('Partition Chart'),
   tags: [t('Categorical'), t('Comparison'), t('Legacy'), t('Proportional')],
   thumbnail,
diff --git a/superset-frontend/plugins/legacy-plugin-chart-pivot-table/src/images/example.jpg b/superset-frontend/plugins/legacy-plugin-chart-pivot-table/src/images/example.jpg
new file mode 100644
index 0000000000..b6258eeba7
Binary files /dev/null and b/superset-frontend/plugins/legacy-plugin-chart-pivot-table/src/images/example.jpg differ
diff --git a/superset-frontend/plugins/legacy-plugin-chart-pivot-table/src/index.js b/superset-frontend/plugins/legacy-plugin-chart-pivot-table/src/index.js
index b91d969eb8..9d45be2219 100644
--- a/superset-frontend/plugins/legacy-plugin-chart-pivot-table/src/index.js
+++ b/superset-frontend/plugins/legacy-plugin-chart-pivot-table/src/index.js
@@ -19,6 +19,7 @@
 import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
 import transformProps from './transformProps';
 import thumbnail from './images/thumbnail.png';
+import example from './images/example.jpg';
 import controlPanel from './controlPanel';
 
 const metadata = new ChartMetadata({
@@ -27,6 +28,7 @@ const metadata = new ChartMetadata({
     t(`Used to summarize a set of data by grouping together multiple statistics along two axes. Examples: Sales numbers by region and month, tasks by status and assignee, active users by age and location.
 
   This chart is being deprecated and we recommend checking out Pivot Table V2 instead!`),
+  exampleGallery: [{ url: example }],
   name: t('Pivot Table (legacy)'),
   tags: [t('Legacy')],
   thumbnail,
diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Compare/images/example.jpg b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Compare/images/example.jpg
new file mode 100644
index 0000000000..375ef57a6a
Binary files /dev/null and b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Compare/images/example.jpg differ
diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Compare/index.js b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Compare/index.js
index e417e45e44..91d6bbb4f7 100644
--- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Compare/index.js
+++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/Compare/index.js
@@ -19,6 +19,7 @@
 import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
 import transformProps from '../transformProps';
 import thumbnail from './images/thumbnail.png';
+import example from './images/example.jpg';
 import controlPanel from './controlPanel';
 
 const metadata = new ChartMetadata({
@@ -27,6 +28,7 @@ const metadata = new ChartMetadata({
   description: t(
     'Visualizes many different time-series objects in a single chart. This chart is being deprecated and we recommend using the Time-series Chart instead.',
   ),
+  exampleGallery: [{ url: example }],
   name: t('Time-series Percent Change'),
   tags: [
     t('Legacy'),
diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/images/example.jpg b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/images/example.jpg
new file mode 100644
index 0000000000..8a7edb3200
Binary files /dev/null and b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/images/example.jpg differ
diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/index.ts
index 05bc71604d..eb1bef3c9b 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/index.ts
+++ b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/index.ts
@@ -28,6 +28,7 @@ import buildQuery from './buildQuery';
 import controlPanel from './controlPanel';
 import transformProps from './transformProps';
 import thumbnail from './images/thumbnail.png';
+import example from './images/example.jpg';
 import {
   EchartsMixedTimeseriesFormData,
   EchartsMixedTimeseriesProps,
@@ -69,6 +70,7 @@ export default class EchartsTimeseriesChartPlugin extends ChartPlugin<
           AnnotationType.Interval,
           AnnotationType.Timeseries,
         ],
+        exampleGallery: [{ url: example }],
         name: hasGenericChartAxes ? t('Mixed Chart') : t('Mixed Time-Series'),
         thumbnail,
         tags: [
diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/src/images/example.jpg b/superset-frontend/plugins/plugin-chart-pivot-table/src/images/example.jpg
new file mode 100644
index 0000000000..e4f534ed0a
Binary files /dev/null and b/superset-frontend/plugins/plugin-chart-pivot-table/src/images/example.jpg differ
diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts b/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts
index 7b5f7b4b9e..b2d355f0ff 100644
--- a/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts
+++ b/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts
@@ -28,6 +28,7 @@ import buildQuery from './buildQuery';
 import controlPanel from './controlPanel';
 import transformProps from './transformProps';
 import thumbnail from '../images/thumbnail.png';
+import example from '../images/example.jpg';
 import { PivotTableQueryFormData } from '../types';
 
 export default class PivotTableChartPlugin extends ChartPlugin<
@@ -51,6 +52,7 @@ export default class PivotTableChartPlugin extends ChartPlugin<
       description: t(
         'Used to summarize a set of data by grouping together multiple statistics along two axes. Examples: Sales numbers by region and month, tasks by status and assignee, active users by age and location. Not the most visually stunning visualization, but highly informative and versatile.',
       ),
+      exampleGallery: [{ url: example }],
       name: t('Pivot Table'),
       tags: [t('Additive'), t('Report'), t('Tabular'), t('Popular')],
       thumbnail,
diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/types/external.d.ts b/superset-frontend/plugins/plugin-chart-pivot-table/types/external.d.ts
index a273f3a2ba..ecdf68a745 100644
--- a/superset-frontend/plugins/plugin-chart-pivot-table/types/external.d.ts
+++ b/superset-frontend/plugins/plugin-chart-pivot-table/types/external.d.ts
@@ -21,3 +21,5 @@ declare module '*.png' {
   const value: any;
   export default value;
 }
+
+declare module '*.jpg';
diff --git a/superset-frontend/src/visualizations/TimeTable/images/example.jpg b/superset-frontend/src/visualizations/TimeTable/images/example.jpg
new file mode 100644
index 0000000000..e20c265066
Binary files /dev/null and b/superset-frontend/src/visualizations/TimeTable/images/example.jpg differ
diff --git a/superset-frontend/src/visualizations/TimeTable/index.ts b/superset-frontend/src/visualizations/TimeTable/index.ts
index ae7f406646..7855a3617a 100644
--- a/superset-frontend/src/visualizations/TimeTable/index.ts
+++ b/superset-frontend/src/visualizations/TimeTable/index.ts
@@ -19,6 +19,7 @@
 import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
 import transformProps from './transformProps';
 import thumbnail from './images/thumbnail.png';
+import example from './images/example.jpg';
 import controlPanel from './controlPanel';
 
 const metadata = new ChartMetadata({
@@ -27,6 +28,7 @@ const metadata = new ChartMetadata({
   description: t(
     'Compare multiple time series charts (as sparklines) and related metrics quickly.',
   ),
+  exampleGallery: [{ url: example }],
   tags: [
     t('Multi-Variables'),
     t('Comparison'),