chore: Deprecates some NVD3 charts in 3.0 (#24322)

This commit is contained in:
Michael S. Molina 2023-06-08 16:34:25 -03:00 committed by GitHub
parent e5b7f7c9b5
commit 7e626c04cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 34 additions and 14 deletions

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
import { t, ChartMetadata, ChartPlugin, ChartLabel } from '@superset-ui/core';
import transformProps from '../transformProps';
import example1 from './images/example1.jpg';
import example2 from './images/example2.jpg';
@ -38,6 +38,7 @@ const metadata = new ChartMetadata({
{ url: example3, caption: t('Video game consoles') },
{ url: example4, caption: t('Vehicle Types') },
],
label: ChartLabel.DEPRECATED,
name: t('Area Chart (legacy)'),
supportedAnnotationTypes: [ANNOTATION_TYPES.INTERVAL, ANNOTATION_TYPES.EVENT],
tags: [
@ -58,6 +59,9 @@ const metadata = new ChartMetadata({
useLegacyApi: true,
});
/**
* @deprecated in version 3.0.
*/
export default class AreaChartPlugin extends ChartPlugin {
constructor() {
super({

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
import { t, ChartMetadata, ChartPlugin, ChartLabel } from '@superset-ui/core';
import transformProps from '../transformProps';
import thumbnail from './images/thumbnail.png';
import example1 from './images/Time_Series_Bar_Chart.jpg';
@ -32,6 +32,7 @@ const metadata = new ChartMetadata({
'Visualize how a metric changes over time using bars. Add a group by column to visualize group level metrics and how they change over time.',
),
exampleGallery: [{ url: example1 }, { url: example2 }, { url: example3 }],
label: ChartLabel.DEPRECATED,
name: t('Time-series Bar Chart (legacy)'),
supportedAnnotationTypes: [ANNOTATION_TYPES.INTERVAL, ANNOTATION_TYPES.EVENT],
tags: [
@ -44,11 +45,16 @@ const metadata = new ChartMetadata({
t('Proportional'),
t('Advanced-Analytics'),
t('nvd3'),
t('Legacy'),
t('Deprecated'),
],
thumbnail,
useLegacyApi: true,
});
/**
* @deprecated in version 3.0.
*/
export default class BarChartPlugin extends ChartPlugin {
constructor() {
super({

View File

@ -16,12 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import {
t,
ChartMetadata,
ChartPlugin,
hasGenericChartAxes,
} from '@superset-ui/core';
import { t, ChartMetadata, ChartPlugin, ChartLabel } from '@superset-ui/core';
import transformProps from '../transformProps';
import thumbnail from './images/thumbnail.png';
import example1 from './images/Bar_Chart.jpg';
@ -40,7 +35,8 @@ const metadata = new ChartMetadata({
{ url: example2, caption: 'Grouped style' },
{ url: example3 },
],
name: hasGenericChartAxes ? t('Bar Chart (legacy)') : t('Bar Chart'),
label: ChartLabel.DEPRECATED,
name: t('Bar Chart (legacy)'),
tags: [
t('Additive'),
t('Bar'),
@ -53,11 +49,15 @@ const metadata = new ChartMetadata({
t('Stacked'),
t('Vertical'),
t('nvd3'),
t('Deprecated'),
],
thumbnail,
useLegacyApi: true,
});
/**
* @deprecated in version 3.0.
*/
export default class DistBarChartPlugin extends ChartPlugin {
constructor() {
super({

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
import { t, ChartMetadata, ChartPlugin, ChartLabel } from '@superset-ui/core';
import transformProps from '../transformProps';
import example1 from './images/LineChart.jpg';
import example2 from './images/LineChart2.jpg';
@ -35,6 +35,7 @@ const metadata = new ChartMetadata({
{ url: example2 },
{ url: battery, caption: t('Battery level over time') },
],
label: ChartLabel.DEPRECATED,
name: t('Line Chart (legacy)'),
supportedAnnotationTypes: [
ANNOTATION_TYPES.TIME_SERIES,
@ -47,6 +48,9 @@ const metadata = new ChartMetadata({
useLegacyApi: true,
});
/**
* @deprecated in version 3.0.
*/
export default class LineChartPlugin extends ChartPlugin {
constructor() {
super({

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
import { t, ChartMetadata, ChartPlugin, ChartLabel } from '@superset-ui/core';
import transformProps from '../transformProps';
import thumbnail from './images/thumbnail.png';
import controlPanel from './controlPanel';
@ -24,11 +24,16 @@ import controlPanel from './controlPanel';
const metadata = new ChartMetadata({
credits: ['http://nvd3.org'],
description: '',
name: t('Pie Chart'),
label: ChartLabel.DEPRECATED,
name: t('Pie Chart (legacy)'),
thumbnail,
useLegacyApi: true,
tags: [t('Legacy'), t('nvd3'), t('Deprecated')],
});
/**
* @deprecated in version 3.0.
*/
export default class PieChartPlugin extends ChartPlugin {
constructor() {
super({

View File

@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
import { t, ChartMetadata, ChartPlugin, ChartLabel } from '@superset-ui/core';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';
import example1 from './images/example1.jpg';
@ -25,7 +25,8 @@ import controlPanel from './controlPanel';
const metadata = new ChartMetadata({
category: t('Tools'),
name: t('Filter box (deprecated)'),
label: ChartLabel.DEPRECATED,
name: t('Filter box (legacy)'),
description:
t(`Chart component that lets you add a custom filter UI in your dashboard. When added to dashboard, a filter box lets users specify specific values or ranges to filter charts by. The charts that each filter box is applied to can be fine tuned as well in the dashboard view.