diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/Stories.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/Stories.tsx new file mode 100644 index 0000000000..b6aca11a91 --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/Stories.tsx @@ -0,0 +1,12 @@ +import { AreaChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3'; + +new AreaChartPlugin().configure({ key: 'area' }).register(); + +export default { + title: 'Legacy Chart Plugins|legacy-preset-chart-nvd3/Area', +}; + +export { stacked } from './stories/stacked'; +export { stackedWithYAxisBounds, stackedWithYAxisBoundsMinOnly } from './stories/stackedWithBounds'; +export { expanded } from './stories/expanded'; +export { controlsShown } from './stories/controlsShown'; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Area/data.js b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/data.ts similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Area/data.js rename to packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/data.ts diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/controlsShown.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/controlsShown.tsx new file mode 100644 index 0000000000..049dd8c5a9 --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/controlsShown.tsx @@ -0,0 +1,35 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +export const controlsShown = () => ( + +); diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/expanded.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/expanded.tsx new file mode 100644 index 0000000000..a2aff8b621 --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/expanded.tsx @@ -0,0 +1,35 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +export const expanded = () => ( + +); diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/stacked.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/stacked.tsx new file mode 100644 index 0000000000..b27d5d1f1d --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/stacked.tsx @@ -0,0 +1,36 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +export const stacked = () => ( + +); diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/stackedWithBounds.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/stackedWithBounds.tsx new file mode 100644 index 0000000000..cecd95e3fc --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Area/stories/stackedWithBounds.tsx @@ -0,0 +1,74 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +export const stackedWithYAxisBounds = () => ( + +); + +stackedWithYAxisBounds.story = { + name: 'Stacked with yAxisBounds', +}; + +export const stackedWithYAxisBoundsMinOnly = () => ( + +); + +stackedWithYAxisBoundsMinOnly.story = { + name: 'Stacked with yAxisBounds min only', +}; diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bar/Stories.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bar/Stories.tsx new file mode 100644 index 0000000000..f34b47217c --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bar/Stories.tsx @@ -0,0 +1,12 @@ +import { BarChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3'; + +new BarChartPlugin().configure({ key: 'bar' }).register(); + +export default { + title: 'Legacy Chart Plugins|legacy-preset-chart-nvd3/Bar', +}; + +export { basic } from './stories/basic'; +export { barWithValues } from './stories/barWithValues'; +export { barWithPositiveAndNegativeValues } from './stories/barWithPositiveAndNegativeValues'; +export { stackedBarWithValues } from './stories/stackedBarWithValues'; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bar/data.js b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bar/data.ts similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bar/data.js rename to packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bar/data.ts diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bar/stories/barWithPositiveAndNegativeValues.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bar/stories/barWithPositiveAndNegativeValues.tsx new file mode 100644 index 0000000000..0440a1da12 --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bar/stories/barWithPositiveAndNegativeValues.tsx @@ -0,0 +1,41 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +export const barWithPositiveAndNegativeValues = () => ( + ({ + ...group, + values: group.values.map(pair => ({ ...pair, y: (i % 2 === 0 ? 1 : -1) * pair.y })), + })), + }} + formData={{ + bottomMargin: 'auto', + colorScheme: 'd3Category10', + contribution: false, + groupby: ['region'], + lineInterpolation: 'linear', + metrics: ['sum__SP_POP_TOTL'], + richTooltip: true, + showBarValue: true, + showBrush: 'auto', + showControls: false, + showLegend: true, + stackedStyle: 'stack', + vizType: 'bar', + xAxisFormat: '%Y', + xAxisLabel: '', + xAxisShowminmax: false, + xTicksLayout: 'auto', + yAxisBounds: [null, null], + yAxisFormat: '.3s', + yLogScale: false, + }} + /> +); diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bar/stories/barWithValues.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bar/stories/barWithValues.tsx new file mode 100644 index 0000000000..3e666139aa --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bar/stories/barWithValues.tsx @@ -0,0 +1,36 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +export const barWithValues = () => ( + +); diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bar/stories/basic.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bar/stories/basic.tsx new file mode 100644 index 0000000000..1e66e11f2c --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bar/stories/basic.tsx @@ -0,0 +1,36 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +export const basic = () => ( + +); diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bar/stories/stackedBarWithValues.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bar/stories/stackedBarWithValues.tsx new file mode 100644 index 0000000000..519a94dc17 --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bar/stories/stackedBarWithValues.tsx @@ -0,0 +1,37 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +export const stackedBarWithValues = () => ( + +); diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/BoxPlot/Stories.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/BoxPlot/Stories.tsx new file mode 100644 index 0000000000..168a0f341a --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/BoxPlot/Stories.tsx @@ -0,0 +1,9 @@ +import { BoxPlotChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3'; + +new BoxPlotChartPlugin().configure({ key: 'box-plot' }).register(); + +export default { + title: 'Legacy Chart Plugins|legacy-preset-chart-nvd3/BoxPlot', +}; + +export { basic } from './stories/basic'; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/BoxPlot/data.js b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/BoxPlot/data.ts similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/BoxPlot/data.js rename to packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/BoxPlot/data.ts diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/BoxPlot/stories/basic.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/BoxPlot/stories/basic.tsx new file mode 100644 index 0000000000..081e3dcbd6 --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/BoxPlot/stories/basic.tsx @@ -0,0 +1,19 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +export const basic = () => ( + +); diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bubble/Stories.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bubble/Stories.tsx new file mode 100644 index 0000000000..74db0f14cb --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bubble/Stories.tsx @@ -0,0 +1,9 @@ +import { BubbleChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3'; + +new BubbleChartPlugin().configure({ key: 'bubble' }).register(); + +export default { + title: 'Legacy Chart Plugins|legacy-preset-chart-nvd3/Bubble', +}; + +export { basic } from './stories/basic'; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bubble/data.js b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bubble/data.ts similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bubble/data.js rename to packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bubble/data.ts diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bubble/stories/basic.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bubble/stories/basic.tsx new file mode 100644 index 0000000000..5219faab1a --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bubble/stories/basic.tsx @@ -0,0 +1,37 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +export const basic = () => ( + +); diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bullet/Stories.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bullet/Stories.tsx new file mode 100644 index 0000000000..3bdd1d975a --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bullet/Stories.tsx @@ -0,0 +1,9 @@ +import { BulletChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3'; + +new BulletChartPlugin().configure({ key: 'bullet' }).register(); + +export default { + title: 'Legacy Chart Plugins|legacy-preset-chart-nvd3/Bullet', +}; + +export { basic } from './stories/basic'; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bullet/data.js b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bullet/data.ts similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bullet/data.js rename to packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bullet/data.ts diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bullet/stories/basic.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bullet/stories/basic.tsx new file mode 100644 index 0000000000..13af18a803 --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Bullet/stories/basic.tsx @@ -0,0 +1,23 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +export const basic = () => ( + +); diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Compare/Stories.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Compare/Stories.tsx new file mode 100644 index 0000000000..ccb8215a1c --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Compare/Stories.tsx @@ -0,0 +1,9 @@ +import { CompareChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3'; + +new CompareChartPlugin().configure({ key: 'compare' }).register(); + +export default { + title: 'Legacy Chart Plugins|legacy-preset-chart-nvd3/Compare', +}; + +export { basic } from './stories/basic'; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Compare/data.js b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Compare/data.ts similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Compare/data.js rename to packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Compare/data.ts diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Compare/stories/basic.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Compare/stories/basic.tsx new file mode 100644 index 0000000000..2bf84d19dc --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Compare/stories/basic.tsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +export const basic = () => ( + +); diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DistBar/Stories.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DistBar/Stories.tsx new file mode 100644 index 0000000000..9f51af78f8 --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DistBar/Stories.tsx @@ -0,0 +1,10 @@ +import { DistBarChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3'; + +new DistBarChartPlugin().configure({ key: 'dist-bar' }).register(); + +export default { + title: 'Legacy Chart Plugins|legacy-preset-chart-nvd3/DistBar', +}; + +export { basic } from './stories/basic'; +export { manyBars } from './stories/manyBars'; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/DistBar/data.js b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DistBar/data.ts similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/DistBar/data.js rename to packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DistBar/data.ts diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DistBar/stories/basic.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DistBar/stories/basic.tsx new file mode 100644 index 0000000000..6b3474b8de --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DistBar/stories/basic.tsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +export const basic = () => ( + +); diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DistBar/stories/manyBars.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DistBar/stories/manyBars.tsx new file mode 100644 index 0000000000..6cfda85d8b --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DistBar/stories/manyBars.tsx @@ -0,0 +1,37 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; + +const data: { + key: string; + values: { + x: string; + y: number; + }[]; +}[] = [{ key: 'sth', values: [] }]; +const LONG_LABEL = + 'some extremely ridiculously extremely extremely extremely ridiculously extremely extremely ridiculously extremely extremely ridiculously extremely long category'; + +for (let i = 0; i < 50; i += 1) { + data[0].values.push({ + x: `${LONG_LABEL.substring(0, Math.round(Math.random() * LONG_LABEL.length))} ${i + 1}`, + y: Math.round(Math.random() * 10000), + }); +} + +export const manyBars = () => ( + +); diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DualLine/Stories.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DualLine/Stories.tsx new file mode 100644 index 0000000000..15c2730f69 --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DualLine/Stories.tsx @@ -0,0 +1,10 @@ +import { DualLineChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3'; + +new DualLineChartPlugin().configure({ key: 'dual-line' }).register(); + +export default { + title: 'Legacy Chart Plugins|legacy-preset-chart-nvd3/DualLine', +}; + +export { basic } from './stories/basic'; +export { verifyConsistentColors } from './stories/verifyConsistentColors'; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/DualLine/data.js b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DualLine/data.ts similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/DualLine/data.js rename to packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DualLine/data.ts diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DualLine/stories/basic.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DualLine/stories/basic.tsx new file mode 100644 index 0000000000..89a28553b4 --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DualLine/stories/basic.tsx @@ -0,0 +1,21 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +export const basic = () => ( + +); diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DualLine/stories/verifyConsistentColors.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DualLine/stories/verifyConsistentColors.tsx new file mode 100644 index 0000000000..7d43bc418e --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/DualLine/stories/verifyConsistentColors.tsx @@ -0,0 +1,46 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +const reverseData = data.map(series => ({ + ...series, + yAxis: series.yAxis === 1 ? 2 : 1, +})); + +export const verifyConsistentColors = () => ( +
+ + +
+); + +verifyConsistentColors.story = { + name: 'Swap y-axis with consistent color', +}; diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Line/Stories.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Line/Stories.tsx new file mode 100644 index 0000000000..7b1cc21d2a --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Line/Stories.tsx @@ -0,0 +1,12 @@ +import { LineChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3'; + +new LineChartPlugin().configure({ key: 'line' }).register(); + +export default { + title: 'Legacy Chart Plugins|legacy-preset-chart-nvd3/Line', +}; + +export { basic } from './stories/basic'; +export { markers } from './stories/markers'; +export { logScale } from './stories/logScale'; +export { yAxisBounds } from './stories/yAxisBounds'; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Line/data.js b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Line/data.ts similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Line/data.js rename to packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Line/data.ts diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Line/stories/basic.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Line/stories/basic.tsx new file mode 100644 index 0000000000..c1d85800e2 --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Line/stories/basic.tsx @@ -0,0 +1,34 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +export const basic = () => ( + +); diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Line/stories/logScale.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Line/stories/logScale.tsx new file mode 100644 index 0000000000..0937a86da0 --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Line/stories/logScale.tsx @@ -0,0 +1,21 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +export const logScale = () => ( + +); diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Line/stories/markers.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Line/stories/markers.tsx new file mode 100644 index 0000000000..0c9d7f531d --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Line/stories/markers.tsx @@ -0,0 +1,34 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +export const markers = () => ( + +); diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Line/stories/yAxisBounds.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Line/stories/yAxisBounds.tsx new file mode 100644 index 0000000000..579194679d --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Line/stories/yAxisBounds.tsx @@ -0,0 +1,79 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +export const yAxisBounds = () => ( +
+

yAxisBounds

+
yAxisBounds=undefined
+ +
yAxisBounds=[0, 60000]
+ +
yAxisBounds=[null, 60000]
+ +
yAxisBounds=[40000, null]
+ +
yAxisBounds=[40000, null] with Legend
+ +
+); diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Pie/Stories.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Pie/Stories.tsx new file mode 100644 index 0000000000..fc9d0c5888 --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Pie/Stories.tsx @@ -0,0 +1,10 @@ +import { PieChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3'; + +new PieChartPlugin().configure({ key: 'pie' }).register(); + +export default { + title: 'Legacy Chart Plugins|legacy-preset-chart-nvd3/Pie', +}; + +export { basic } from './stories/basic'; +export { noData } from './stories/noData'; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Pie/data.js b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Pie/data.ts similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Pie/data.js rename to packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Pie/data.ts diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Pie/stories/basic.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Pie/stories/basic.tsx new file mode 100644 index 0000000000..6e3cdee7e5 --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Pie/stories/basic.tsx @@ -0,0 +1,24 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; +import data from '../data'; + +export const basic = () => ( + +); diff --git a/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Pie/stories/noData.tsx b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Pie/stories/noData.tsx new file mode 100644 index 0000000000..b702b0f768 --- /dev/null +++ b/packages/superset-ui-demo/storybook/stories/plugins/legacy-preset-chart-nvd3/Pie/stories/noData.tsx @@ -0,0 +1,23 @@ +import React from 'react'; +import { SuperChart } from '@superset-ui/chart'; +import dummyDatasource from '../../../../../shared/dummyDatasource'; + +export const noData = () => ( + +); diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/README.md b/plugins/legacy-preset-chart-nvd3/README.md similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/README.md rename to plugins/legacy-preset-chart-nvd3/README.md diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/package.json b/plugins/legacy-preset-chart-nvd3/package.json similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/package.json rename to plugins/legacy-preset-chart-nvd3/package.json diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Area/images/thumbnail.png b/plugins/legacy-preset-chart-nvd3/src/Area/images/thumbnail.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Area/images/thumbnail.png rename to plugins/legacy-preset-chart-nvd3/src/Area/images/thumbnail.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Area/images/thumbnailLarge.png b/plugins/legacy-preset-chart-nvd3/src/Area/images/thumbnailLarge.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Area/images/thumbnailLarge.png rename to plugins/legacy-preset-chart-nvd3/src/Area/images/thumbnailLarge.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Area/index.js b/plugins/legacy-preset-chart-nvd3/src/Area/index.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Area/index.js rename to plugins/legacy-preset-chart-nvd3/src/Area/index.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Bar/images/thumbnail.png b/plugins/legacy-preset-chart-nvd3/src/Bar/images/thumbnail.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Bar/images/thumbnail.png rename to plugins/legacy-preset-chart-nvd3/src/Bar/images/thumbnail.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Bar/images/thumbnailLarge.png b/plugins/legacy-preset-chart-nvd3/src/Bar/images/thumbnailLarge.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Bar/images/thumbnailLarge.png rename to plugins/legacy-preset-chart-nvd3/src/Bar/images/thumbnailLarge.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Bar/index.js b/plugins/legacy-preset-chart-nvd3/src/Bar/index.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Bar/index.js rename to plugins/legacy-preset-chart-nvd3/src/Bar/index.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/BoxPlot/images/thumbnail.png b/plugins/legacy-preset-chart-nvd3/src/BoxPlot/images/thumbnail.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/BoxPlot/images/thumbnail.png rename to plugins/legacy-preset-chart-nvd3/src/BoxPlot/images/thumbnail.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/BoxPlot/images/thumbnailLarge.png b/plugins/legacy-preset-chart-nvd3/src/BoxPlot/images/thumbnailLarge.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/BoxPlot/images/thumbnailLarge.png rename to plugins/legacy-preset-chart-nvd3/src/BoxPlot/images/thumbnailLarge.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/BoxPlot/index.js b/plugins/legacy-preset-chart-nvd3/src/BoxPlot/index.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/BoxPlot/index.js rename to plugins/legacy-preset-chart-nvd3/src/BoxPlot/index.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Bubble/images/thumbnail.png b/plugins/legacy-preset-chart-nvd3/src/Bubble/images/thumbnail.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Bubble/images/thumbnail.png rename to plugins/legacy-preset-chart-nvd3/src/Bubble/images/thumbnail.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Bubble/images/thumbnailLarge.png b/plugins/legacy-preset-chart-nvd3/src/Bubble/images/thumbnailLarge.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Bubble/images/thumbnailLarge.png rename to plugins/legacy-preset-chart-nvd3/src/Bubble/images/thumbnailLarge.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Bubble/index.js b/plugins/legacy-preset-chart-nvd3/src/Bubble/index.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Bubble/index.js rename to plugins/legacy-preset-chart-nvd3/src/Bubble/index.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Bullet/images/thumbnail.png b/plugins/legacy-preset-chart-nvd3/src/Bullet/images/thumbnail.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Bullet/images/thumbnail.png rename to plugins/legacy-preset-chart-nvd3/src/Bullet/images/thumbnail.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Bullet/images/thumbnailLarge.png b/plugins/legacy-preset-chart-nvd3/src/Bullet/images/thumbnailLarge.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Bullet/images/thumbnailLarge.png rename to plugins/legacy-preset-chart-nvd3/src/Bullet/images/thumbnailLarge.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Bullet/index.js b/plugins/legacy-preset-chart-nvd3/src/Bullet/index.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Bullet/index.js rename to plugins/legacy-preset-chart-nvd3/src/Bullet/index.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Compare/images/thumbnail.png b/plugins/legacy-preset-chart-nvd3/src/Compare/images/thumbnail.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Compare/images/thumbnail.png rename to plugins/legacy-preset-chart-nvd3/src/Compare/images/thumbnail.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Compare/images/thumbnailLarge.png b/plugins/legacy-preset-chart-nvd3/src/Compare/images/thumbnailLarge.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Compare/images/thumbnailLarge.png rename to plugins/legacy-preset-chart-nvd3/src/Compare/images/thumbnailLarge.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Compare/index.js b/plugins/legacy-preset-chart-nvd3/src/Compare/index.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Compare/index.js rename to plugins/legacy-preset-chart-nvd3/src/Compare/index.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/DistBar/images/thumbnail.png b/plugins/legacy-preset-chart-nvd3/src/DistBar/images/thumbnail.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/DistBar/images/thumbnail.png rename to plugins/legacy-preset-chart-nvd3/src/DistBar/images/thumbnail.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/DistBar/images/thumbnailLarge.png b/plugins/legacy-preset-chart-nvd3/src/DistBar/images/thumbnailLarge.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/DistBar/images/thumbnailLarge.png rename to plugins/legacy-preset-chart-nvd3/src/DistBar/images/thumbnailLarge.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/DistBar/index.js b/plugins/legacy-preset-chart-nvd3/src/DistBar/index.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/DistBar/index.js rename to plugins/legacy-preset-chart-nvd3/src/DistBar/index.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/DualLine/images/thumbnail.png b/plugins/legacy-preset-chart-nvd3/src/DualLine/images/thumbnail.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/DualLine/images/thumbnail.png rename to plugins/legacy-preset-chart-nvd3/src/DualLine/images/thumbnail.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/DualLine/images/thumbnailLarge.png b/plugins/legacy-preset-chart-nvd3/src/DualLine/images/thumbnailLarge.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/DualLine/images/thumbnailLarge.png rename to plugins/legacy-preset-chart-nvd3/src/DualLine/images/thumbnailLarge.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/DualLine/index.js b/plugins/legacy-preset-chart-nvd3/src/DualLine/index.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/DualLine/index.js rename to plugins/legacy-preset-chart-nvd3/src/DualLine/index.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Line/images/thumbnail.png b/plugins/legacy-preset-chart-nvd3/src/Line/images/thumbnail.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Line/images/thumbnail.png rename to plugins/legacy-preset-chart-nvd3/src/Line/images/thumbnail.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Line/images/thumbnailLarge.png b/plugins/legacy-preset-chart-nvd3/src/Line/images/thumbnailLarge.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Line/images/thumbnailLarge.png rename to plugins/legacy-preset-chart-nvd3/src/Line/images/thumbnailLarge.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Line/index.js b/plugins/legacy-preset-chart-nvd3/src/Line/index.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Line/index.js rename to plugins/legacy-preset-chart-nvd3/src/Line/index.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/LineMulti/LineMulti.jsx b/plugins/legacy-preset-chart-nvd3/src/LineMulti/LineMulti.jsx similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/LineMulti/LineMulti.jsx rename to plugins/legacy-preset-chart-nvd3/src/LineMulti/LineMulti.jsx diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/LineMulti/images/thumbnail.png b/plugins/legacy-preset-chart-nvd3/src/LineMulti/images/thumbnail.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/LineMulti/images/thumbnail.png rename to plugins/legacy-preset-chart-nvd3/src/LineMulti/images/thumbnail.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/LineMulti/images/thumbnailLarge.png b/plugins/legacy-preset-chart-nvd3/src/LineMulti/images/thumbnailLarge.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/LineMulti/images/thumbnailLarge.png rename to plugins/legacy-preset-chart-nvd3/src/LineMulti/images/thumbnailLarge.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/LineMulti/index.js b/plugins/legacy-preset-chart-nvd3/src/LineMulti/index.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/LineMulti/index.js rename to plugins/legacy-preset-chart-nvd3/src/LineMulti/index.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/NVD3Vis.css b/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.css similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/NVD3Vis.css rename to plugins/legacy-preset-chart-nvd3/src/NVD3Vis.css diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/NVD3Vis.js b/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js similarity index 97% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/NVD3Vis.js rename to plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js index 823496ba9c..18ab5f60f9 100644 --- a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/NVD3Vis.js +++ b/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js @@ -74,7 +74,7 @@ const NO_DATA_RENDER_DATA = [ // Override the noData render function to make a prettier UX // Code adapted from https://github.com/novus/nvd3/blob/master/src/utils.js#L653 -nv.utils.noData = function(chart, container) { +nv.utils.noData = function (chart, container) { const opt = chart.options(); const margin = opt.margin(); const height = nv.utils.availableHeight(null, container, margin); @@ -364,10 +364,7 @@ function nvd3Vis(element, props) { break; case 'bar': - chart = nv.models - .multiBarChart() - .showControls(showControls) - .groupSpacing(0.1); + chart = nv.models.multiBarChart().showControls(showControls).groupSpacing(0.1); if (!reduceXTicks) { width = computeBarChartWidth(data, isBarStacked, maxWidth); @@ -702,16 +699,8 @@ function nvd3Vis(element, props) { // align yAxis1 and yAxis2 ticks if (isVizTypes(['dual_line', 'line_multi'])) { const count = chart.yAxis1.ticks(); - const ticks1 = chart.yAxis1 - .scale() - .domain(chart.yAxis1.domain()) - .nice(count) - .ticks(count); - const ticks2 = chart.yAxis2 - .scale() - .domain(chart.yAxis2.domain()) - .nice(count) - .ticks(count); + const ticks1 = chart.yAxis1.scale().domain(chart.yAxis1.domain()).nice(count).ticks(count); + const ticks2 = chart.yAxis2.scale().domain(chart.yAxis2.domain()).nice(count).ticks(count); // match number of ticks in both axes const difference = ticks1.length - ticks2.length; @@ -733,19 +722,13 @@ function nvd3Vis(element, props) { } if (showMarkers) { - svg - .selectAll('.nv-point') - .style('stroke-opacity', 1) - .style('fill-opacity', 1); + svg.selectAll('.nv-point').style('stroke-opacity', 1).style('fill-opacity', 1); // redo on legend toggle; nvd3 calls the callback *before* the line is // drawn, so we need to add a small delay here chart.dispatch.on('stateChange.showMarkers', () => { setTimeout(() => { - svg - .selectAll('.nv-point') - .style('stroke-opacity', 1) - .style('fill-opacity', 1); + svg.selectAll('.nv-point').style('stroke-opacity', 1).style('fill-opacity', 1); }, 10); }); } @@ -886,19 +869,10 @@ function nvd3Vis(element, props) { if (vizType === 'bar') { xMin = d3.min(data[0].values, d => d.x); xMax = d3.max(data[0].values, d => d.x); - xScale = d3.scale - .quantile() - .domain([xMin, xMax]) - .range(chart.xAxis.range()); + xScale = d3.scale.quantile().domain([xMin, xMax]).range(chart.xAxis.range()); } else { - xMin = chart.xAxis - .scale() - .domain()[0] - .valueOf(); - xMax = chart.xAxis - .scale() - .domain()[1] - .valueOf(); + xMin = chart.xAxis.scale().domain()[0].valueOf(); + xMax = chart.xAxis.scale().domain()[1].valueOf(); if (chart.xScale) { xScale = chart.xScale(); } else if (chart.xAxis.scale) { @@ -1119,11 +1093,7 @@ function nvd3Vis(element, props) { } // rerender chart appended with annotation layer - svg - .datum(data) - .attr('height', height) - .attr('width', width) - .call(chart); + svg.datum(data).attr('height', height).attr('width', width).call(chart); // Display styles for Time Series Annotations chart.dispatch.on('renderEnd.timeseries-annotation', () => { diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Pie/images/thumbnail.png b/plugins/legacy-preset-chart-nvd3/src/Pie/images/thumbnail.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Pie/images/thumbnail.png rename to plugins/legacy-preset-chart-nvd3/src/Pie/images/thumbnail.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Pie/images/thumbnailLarge.png b/plugins/legacy-preset-chart-nvd3/src/Pie/images/thumbnailLarge.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Pie/images/thumbnailLarge.png rename to plugins/legacy-preset-chart-nvd3/src/Pie/images/thumbnailLarge.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Pie/index.js b/plugins/legacy-preset-chart-nvd3/src/Pie/index.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/Pie/index.js rename to plugins/legacy-preset-chart-nvd3/src/Pie/index.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/PropTypes.js b/plugins/legacy-preset-chart-nvd3/src/PropTypes.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/PropTypes.js rename to plugins/legacy-preset-chart-nvd3/src/PropTypes.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/ReactNVD3.js b/plugins/legacy-preset-chart-nvd3/src/ReactNVD3.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/ReactNVD3.js rename to plugins/legacy-preset-chart-nvd3/src/ReactNVD3.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/TimePivot/images/thumbnail.png b/plugins/legacy-preset-chart-nvd3/src/TimePivot/images/thumbnail.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/TimePivot/images/thumbnail.png rename to plugins/legacy-preset-chart-nvd3/src/TimePivot/images/thumbnail.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/TimePivot/images/thumbnailLarge.png b/plugins/legacy-preset-chart-nvd3/src/TimePivot/images/thumbnailLarge.png similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/TimePivot/images/thumbnailLarge.png rename to plugins/legacy-preset-chart-nvd3/src/TimePivot/images/thumbnailLarge.png diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/TimePivot/index.js b/plugins/legacy-preset-chart-nvd3/src/TimePivot/index.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/TimePivot/index.js rename to plugins/legacy-preset-chart-nvd3/src/TimePivot/index.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/index.js b/plugins/legacy-preset-chart-nvd3/src/index.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/index.js rename to plugins/legacy-preset-chart-nvd3/src/index.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/preset.js b/plugins/legacy-preset-chart-nvd3/src/preset.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/preset.js rename to plugins/legacy-preset-chart-nvd3/src/preset.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/transformProps.js b/plugins/legacy-preset-chart-nvd3/src/transformProps.js similarity index 85% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/transformProps.js rename to plugins/legacy-preset-chart-nvd3/src/transformProps.js index 0bfc336c82..102f0dee4e 100644 --- a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/transformProps.js +++ b/plugins/legacy-preset-chart-nvd3/src/transformProps.js @@ -21,9 +21,10 @@ import { formatLabel } from './utils'; const NOOP = () => {}; -const grabD3Format = (chartProps, targetMetric) => { +const grabD3Format = (datasource, targetMetric) => { let foundFormatter; - chartProps.datasource.metrics.forEach(metric => { + const { metrics = [] } = datasource || {}; + metrics.forEach(metric => { if (metric.d3format && metric.metric_name === targetMetric) { foundFormatter = metric.d3format; } @@ -51,6 +52,9 @@ export default function transformProps(chartProps) { leftMargin, lineInterpolation, maxBubbleSize, + metric, + metric2, + metrics = [], orderBars, pieLabelType, reduceXTicks, @@ -88,13 +92,14 @@ export default function transformProps(chartProps) { })) : rawData; - if (chartProps.formData.vizType === 'pie') { - numberFormat = numberFormat || grabD3Format(chartProps, chartProps.formData.metric); - } else if (chartProps.formData.vizType === 'dual_line') { - yAxisFormat = yAxisFormat || grabD3Format(chartProps, chartProps.formData.metric); - yAxis2Format = yAxis2Format || grabD3Format(chartProps, chartProps.formData.metric2); + if (vizType === 'pie') { + numberFormat = numberFormat || grabD3Format(datasource, metric); + } else if (vizType === 'dual_line') { + yAxisFormat = yAxisFormat || grabD3Format(datasource, metric); + yAxis2Format = yAxis2Format || grabD3Format(datasource, metric2); } else if (['line', 'dist_bar', 'bar', 'area'].includes(chartProps.formData.vizType)) { - yAxisFormat = yAxisFormat || grabD3Format(chartProps, chartProps.formData.metrics[0]); + yAxisFormat = + yAxisFormat || grabD3Format(datasource, metrics.length > 0 ? metrics[0] : undefined); } return { diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/utils.js b/plugins/legacy-preset-chart-nvd3/src/utils.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/utils.js rename to plugins/legacy-preset-chart-nvd3/src/utils.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/utils/isTruthy.js b/plugins/legacy-preset-chart-nvd3/src/utils/isTruthy.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/utils/isTruthy.js rename to plugins/legacy-preset-chart-nvd3/src/utils/isTruthy.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/vendor/superset/AnnotationTypes.js b/plugins/legacy-preset-chart-nvd3/src/vendor/superset/AnnotationTypes.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/vendor/superset/AnnotationTypes.js rename to plugins/legacy-preset-chart-nvd3/src/vendor/superset/AnnotationTypes.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/vendor/superset/exploreUtils.js b/plugins/legacy-preset-chart-nvd3/src/vendor/superset/exploreUtils.js similarity index 96% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/vendor/superset/exploreUtils.js rename to plugins/legacy-preset-chart-nvd3/src/vendor/superset/exploreUtils.js index d690875282..baae3297fa 100644 --- a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/src/vendor/superset/exploreUtils.js +++ b/plugins/legacy-preset-chart-nvd3/src/vendor/superset/exploreUtils.js @@ -47,10 +47,7 @@ export function getExploreLongUrl(formData, endpointType, allowOverflow = true, if (endpointType === 'standalone') { search.standalone = 'true'; } - const url = uri - .directory(directory) - .search(search) - .toString(); + const url = uri.directory(directory).search(search).toString(); if (!allowOverflow && url.length > MAX_URL_LENGTH) { const minimalFormData = { datasource: formData.datasource, diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/test/utils.test.js b/plugins/legacy-preset-chart-nvd3/test/utils.test.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/test/utils.test.js rename to plugins/legacy-preset-chart-nvd3/test/utils.test.js diff --git a/temporary-plugins/superset-ui-legacy-preset-chart-nvd3/test/utils/isTruthy.test.js b/plugins/legacy-preset-chart-nvd3/test/utils/isTruthy.test.js similarity index 100% rename from temporary-plugins/superset-ui-legacy-preset-chart-nvd3/test/utils/isTruthy.test.js rename to plugins/legacy-preset-chart-nvd3/test/utils/isTruthy.test.js diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bubble/Stories.tsx b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Bubble/Stories.tsx similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bubble/Stories.tsx rename to temporary-plugins/superset-ui-plugins-demo/storybook/stories/Bubble/Stories.tsx diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Bubble/data.js b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Bubble/data.js new file mode 100644 index 0000000000..37a26d3ecf --- /dev/null +++ b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Bubble/data.js @@ -0,0 +1,338 @@ +/* eslint-disable sort-keys, no-magic-numbers */ +export default [ + { + key: 'East Asia & Pacific', + values: [ + { + country_name: 'China', + region: 'East Asia & Pacific', + sum__SP_POP_TOTL: 1344130000.0, + sum__SP_RUR_TOTL_ZS: 49.427, + sum__SP_DYN_LE00_IN: 75.042, + x: 49.427, + y: 75.042, + size: 1344130000.0, + shape: 'circle', + group: 'East Asia & Pacific', + }, + { + country_name: 'Indonesia', + region: 'East Asia & Pacific', + sum__SP_POP_TOTL: 244808254.0, + sum__SP_RUR_TOTL_ZS: 49.288, + sum__SP_DYN_LE00_IN: 70.3915609756, + x: 49.288, + y: 70.3915609756, + size: 244808254.0, + shape: 'circle', + group: 'East Asia & Pacific', + }, + { + country_name: 'Japan', + region: 'East Asia & Pacific', + sum__SP_POP_TOTL: 127817277.0, + sum__SP_RUR_TOTL_ZS: 8.752, + sum__SP_DYN_LE00_IN: 82.5912195122, + x: 8.752, + y: 82.5912195122, + size: 127817277.0, + shape: 'circle', + group: 'East Asia & Pacific', + }, + { + country_name: 'Philippines', + region: 'East Asia & Pacific', + sum__SP_POP_TOTL: 94501233.0, + sum__SP_RUR_TOTL_ZS: 54.983, + sum__SP_DYN_LE00_IN: 68.3914878049, + x: 54.983, + y: 68.3914878049, + size: 94501233.0, + shape: 'circle', + group: 'East Asia & Pacific', + }, + { + country_name: 'Vietnam', + region: 'East Asia & Pacific', + sum__SP_POP_TOTL: 87840000.0, + sum__SP_RUR_TOTL_ZS: 68.971, + sum__SP_DYN_LE00_IN: 75.457902439, + x: 68.971, + y: 75.457902439, + size: 87840000.0, + shape: 'circle', + group: 'East Asia & Pacific', + }, + { + country_name: 'Thailand', + region: 'East Asia & Pacific', + sum__SP_POP_TOTL: 66902958.0, + sum__SP_RUR_TOTL_ZS: 54.606, + sum__SP_DYN_LE00_IN: 74.008902439, + x: 54.606, + y: 74.008902439, + size: 66902958.0, + shape: 'circle', + group: 'East Asia & Pacific', + }, + { + country_name: 'Myanmar', + region: 'East Asia & Pacific', + sum__SP_POP_TOTL: 52125411.0, + sum__SP_RUR_TOTL_ZS: 68.065, + sum__SP_DYN_LE00_IN: 64.7612439024, + x: 68.065, + y: 64.7612439024, + size: 52125411.0, + shape: 'circle', + group: 'East Asia & Pacific', + }, + ], + }, + { + key: 'South Asia', + values: [ + { + country_name: 'India', + region: 'South Asia', + sum__SP_POP_TOTL: 1247446011.0, + sum__SP_RUR_TOTL_ZS: 68.724, + sum__SP_DYN_LE00_IN: 65.9584878049, + x: 68.724, + y: 65.9584878049, + size: 1247446011.0, + shape: 'circle', + group: 'South Asia', + }, + { + country_name: 'Pakistan', + region: 'South Asia', + sum__SP_POP_TOTL: 173669648.0, + sum__SP_RUR_TOTL_ZS: 62.993, + sum__SP_DYN_LE00_IN: 66.2838780488, + x: 62.993, + y: 66.2838780488, + size: 173669648.0, + shape: 'circle', + group: 'South Asia', + }, + { + country_name: 'Bangladesh', + region: 'South Asia', + sum__SP_POP_TOTL: 153405612.0, + sum__SP_RUR_TOTL_ZS: 68.775, + sum__SP_DYN_LE00_IN: 69.891804878, + x: 68.775, + y: 69.891804878, + size: 153405612.0, + shape: 'circle', + group: 'South Asia', + }, + ], + }, + { + key: 'North America', + values: [ + { + country_name: 'United States', + region: 'North America', + sum__SP_POP_TOTL: 311721632.0, + sum__SP_RUR_TOTL_ZS: 19.06, + sum__SP_DYN_LE00_IN: 78.6414634146, + x: 19.06, + y: 78.6414634146, + size: 311721632.0, + shape: 'circle', + group: 'North America', + }, + ], + }, + { + key: 'Latin America & Caribbean', + values: [ + { + country_name: 'Brazil', + region: 'Latin America & Caribbean', + sum__SP_POP_TOTL: 200517584.0, + sum__SP_RUR_TOTL_ZS: 15.377, + sum__SP_DYN_LE00_IN: 73.3473658537, + x: 15.377, + y: 73.3473658537, + size: 200517584.0, + shape: 'circle', + group: 'Latin America & Caribbean', + }, + { + country_name: 'Mexico', + region: 'Latin America & Caribbean', + sum__SP_POP_TOTL: 120365271.0, + sum__SP_RUR_TOTL_ZS: 21.882, + sum__SP_DYN_LE00_IN: 76.9141707317, + x: 21.882, + y: 76.9141707317, + size: 120365271.0, + shape: 'circle', + group: 'Latin America & Caribbean', + }, + ], + }, + { + key: 'Sub-Saharan Africa', + values: [ + { + country_name: 'Nigeria', + region: 'Sub-Saharan Africa', + sum__SP_POP_TOTL: 163770669.0, + sum__SP_RUR_TOTL_ZS: 55.638, + sum__SP_DYN_LE00_IN: 51.7102439024, + x: 55.638, + y: 51.7102439024, + size: 163770669.0, + shape: 'circle', + group: 'Sub-Saharan Africa', + }, + { + country_name: 'Ethiopia', + region: 'Sub-Saharan Africa', + sum__SP_POP_TOTL: 89858696.0, + sum__SP_RUR_TOTL_ZS: 82.265, + sum__SP_DYN_LE00_IN: 62.2528536585, + x: 82.265, + y: 62.2528536585, + size: 89858696.0, + shape: 'circle', + group: 'Sub-Saharan Africa', + }, + { + country_name: 'Congo, Dem. Rep.', + region: 'Sub-Saharan Africa', + sum__SP_POP_TOTL: 68087376.0, + sum__SP_RUR_TOTL_ZS: 59.558, + sum__SP_DYN_LE00_IN: 49.3007073171, + x: 59.558, + y: 49.3007073171, + size: 68087376.0, + shape: 'circle', + group: 'Sub-Saharan Africa', + }, + { + country_name: 'South Africa', + region: 'Sub-Saharan Africa', + sum__SP_POP_TOTL: 51553479.0, + sum__SP_RUR_TOTL_ZS: 37.254, + sum__SP_DYN_LE00_IN: 55.2956585366, + x: 37.254, + y: 55.2956585366, + size: 51553479.0, + shape: 'circle', + group: 'Sub-Saharan Africa', + }, + ], + }, + { + key: 'Europe & Central Asia', + values: [ + { + country_name: 'Russian Federation', + region: 'Europe & Central Asia', + sum__SP_POP_TOTL: 142960868.0, + sum__SP_RUR_TOTL_ZS: 26.268, + sum__SP_DYN_LE00_IN: 69.6585365854, + x: 26.268, + y: 69.6585365854, + size: 142960868.0, + shape: 'circle', + group: 'Europe & Central Asia', + }, + { + country_name: 'Germany', + region: 'Europe & Central Asia', + sum__SP_POP_TOTL: 81797673.0, + sum__SP_RUR_TOTL_ZS: 25.512, + sum__SP_DYN_LE00_IN: 80.7414634146, + x: 25.512, + y: 80.7414634146, + size: 81797673.0, + shape: 'circle', + group: 'Europe & Central Asia', + }, + { + country_name: 'Turkey', + region: 'Europe & Central Asia', + sum__SP_POP_TOTL: 73199372.0, + sum__SP_RUR_TOTL_ZS: 28.718, + sum__SP_DYN_LE00_IN: 74.5404878049, + x: 28.718, + y: 74.5404878049, + size: 73199372.0, + shape: 'circle', + group: 'Europe & Central Asia', + }, + { + country_name: 'France', + region: 'Europe & Central Asia', + sum__SP_POP_TOTL: 65342776.0, + sum__SP_RUR_TOTL_ZS: 21.416, + sum__SP_DYN_LE00_IN: 82.1146341463, + x: 21.416, + y: 82.1146341463, + size: 65342776.0, + shape: 'circle', + group: 'Europe & Central Asia', + }, + { + country_name: 'United Kingdom', + region: 'Europe & Central Asia', + sum__SP_POP_TOTL: 63258918.0, + sum__SP_RUR_TOTL_ZS: 18.43, + sum__SP_DYN_LE00_IN: 80.9512195122, + x: 18.43, + y: 80.9512195122, + size: 63258918.0, + shape: 'circle', + group: 'Europe & Central Asia', + }, + { + country_name: 'Italy', + region: 'Europe & Central Asia', + sum__SP_POP_TOTL: 59379449.0, + sum__SP_RUR_TOTL_ZS: 31.556, + sum__SP_DYN_LE00_IN: 82.187804878, + x: 31.556, + y: 82.187804878, + size: 59379449.0, + shape: 'circle', + group: 'Europe & Central Asia', + }, + ], + }, + { + key: 'Middle East & North Africa', + values: [ + { + country_name: 'Egypt, Arab Rep.', + region: 'Middle East & North Africa', + sum__SP_POP_TOTL: 83787634.0, + sum__SP_RUR_TOTL_ZS: 57.0, + sum__SP_DYN_LE00_IN: 70.6785609756, + x: 57.0, + y: 70.6785609756, + size: 83787634.0, + shape: 'circle', + group: 'Middle East & North Africa', + }, + { + country_name: 'Iran, Islamic Rep.', + region: 'Middle East & North Africa', + sum__SP_POP_TOTL: 75184322.0, + sum__SP_RUR_TOTL_ZS: 28.8, + sum__SP_DYN_LE00_IN: 73.4493170732, + x: 28.8, + y: 73.4493170732, + size: 75184322.0, + shape: 'circle', + group: 'Middle East & North Africa', + }, + ], + }, +]; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bubble/index.js b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Bubble/index.js similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bubble/index.js rename to temporary-plugins/superset-ui-plugins-demo/storybook/stories/Bubble/index.js diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bullet/Stories.tsx b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Bullet/Stories.tsx similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bullet/Stories.tsx rename to temporary-plugins/superset-ui-plugins-demo/storybook/stories/Bullet/Stories.tsx diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Bullet/data.js b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Bullet/data.js new file mode 100644 index 0000000000..df677e9504 --- /dev/null +++ b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Bullet/data.js @@ -0,0 +1,10 @@ +/* eslint-disable sort-keys, no-magic-numbers */ +export default { + measures: [75691], + ranges: [0, 83260.1], + rangeLabels: null, + markers: null, + markerLabels: null, + markerLines: null, + markerLineLabels: null, +}; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bullet/index.js b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Bullet/index.js similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bullet/index.js rename to temporary-plugins/superset-ui-plugins-demo/storybook/stories/Bullet/index.js diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Compare/Stories.tsx b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Compare/Stories.tsx similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Compare/Stories.tsx rename to temporary-plugins/superset-ui-plugins-demo/storybook/stories/Compare/Stories.tsx diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Compare/data.js b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Compare/data.js new file mode 100644 index 0000000000..17c1032935 --- /dev/null +++ b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Compare/data.js @@ -0,0 +1,908 @@ +/* eslint-disable sort-keys, no-magic-numbers */ +export default [ + { + key: ['Christopher'], + values: [ + { + x: -157766400000.0, + y: 24703, + }, + { + x: -126230400000.0, + y: 27861, + }, + { + x: -94694400000.0, + y: 29436, + }, + { + x: -63158400000.0, + y: 31463, + }, + { + x: -31536000000.0, + y: 35718, + }, + { + x: 0.0, + y: 41758, + }, + { + x: 31536000000.0, + y: 48172, + }, + { + x: 63072000000.0, + y: 52092, + }, + { + x: 94694400000.0, + y: 48217, + }, + { + x: 126230400000.0, + y: 48476, + }, + { + x: 157766400000.0, + y: 46438, + }, + { + x: 189302400000.0, + y: 45086, + }, + { + x: 220924800000.0, + y: 46610, + }, + { + x: 252460800000.0, + y: 47107, + }, + { + x: 283996800000.0, + y: 50514, + }, + { + x: 315532800000.0, + y: 48969, + }, + { + x: 347155200000.0, + y: 50108, + }, + { + x: 378691200000.0, + y: 59055, + }, + { + x: 410227200000.0, + y: 59188, + }, + { + x: 441763200000.0, + y: 59859, + }, + { + x: 473385600000.0, + y: 59516, + }, + { + x: 504921600000.0, + y: 56633, + }, + { + x: 536457600000.0, + y: 54466, + }, + { + x: 567993600000.0, + y: 52996, + }, + { + x: 599616000000.0, + y: 53205, + }, + { + x: 631152000000.0, + y: 52322, + }, + { + x: 662688000000.0, + y: 47109, + }, + { + x: 694224000000.0, + y: 42470, + }, + { + x: 725846400000.0, + y: 38257, + }, + { + x: 757382400000.0, + y: 34823, + }, + { + x: 788918400000.0, + y: 32728, + }, + { + x: 820454400000.0, + y: 30988, + }, + { + x: 852076800000.0, + y: 29179, + }, + { + x: 883612800000.0, + y: 27083, + }, + { + x: 915148800000.0, + y: 25700, + }, + { + x: 946684800000.0, + y: 24959, + }, + { + x: 978307200000.0, + y: 23180, + }, + { + x: 1009843200000.0, + y: 21731, + }, + { + x: 1041379200000.0, + y: 20793, + }, + { + x: 1072915200000.0, + y: 19739, + }, + { + x: 1104537600000.0, + y: 19190, + }, + { + x: 1136073600000.0, + y: 19674, + }, + { + x: 1167609600000.0, + y: 19986, + }, + { + x: 1199145600000.0, + y: 17771, + }, + ], + }, + { + key: ['David'], + values: [ + { + x: -157766400000.0, + y: 67646, + }, + { + x: -126230400000.0, + y: 66207, + }, + { + x: -94694400000.0, + y: 66581, + }, + { + x: -63158400000.0, + y: 63531, + }, + { + x: -31536000000.0, + y: 63502, + }, + { + x: 0.0, + y: 61570, + }, + { + x: 31536000000.0, + y: 52948, + }, + { + x: 63072000000.0, + y: 46218, + }, + { + x: 94694400000.0, + y: 40968, + }, + { + x: 126230400000.0, + y: 41654, + }, + { + x: 157766400000.0, + y: 39019, + }, + { + x: 189302400000.0, + y: 39165, + }, + { + x: 220924800000.0, + y: 40407, + }, + { + x: 252460800000.0, + y: 40533, + }, + { + x: 283996800000.0, + y: 41898, + }, + { + x: 315532800000.0, + y: 41743, + }, + { + x: 347155200000.0, + y: 40486, + }, + { + x: 378691200000.0, + y: 40283, + }, + { + x: 410227200000.0, + y: 39048, + }, + { + x: 441763200000.0, + y: 38346, + }, + { + x: 473385600000.0, + y: 38395, + }, + { + x: 504921600000.0, + y: 37021, + }, + { + x: 536457600000.0, + y: 36672, + }, + { + x: 567993600000.0, + y: 35214, + }, + { + x: 599616000000.0, + y: 35139, + }, + { + x: 631152000000.0, + y: 33661, + }, + { + x: 662688000000.0, + y: 30347, + }, + { + x: 694224000000.0, + y: 28344, + }, + { + x: 725846400000.0, + y: 26947, + }, + { + x: 757382400000.0, + y: 24784, + }, + { + x: 788918400000.0, + y: 22967, + }, + { + x: 820454400000.0, + y: 22941, + }, + { + x: 852076800000.0, + y: 21824, + }, + { + x: 883612800000.0, + y: 20816, + }, + { + x: 915148800000.0, + y: 20267, + }, + { + x: 946684800000.0, + y: 19695, + }, + { + x: 978307200000.0, + y: 19281, + }, + { + x: 1009843200000.0, + y: 18600, + }, + { + x: 1041379200000.0, + y: 18557, + }, + { + x: 1072915200000.0, + y: 18315, + }, + { + x: 1104537600000.0, + y: 18017, + }, + { + x: 1136073600000.0, + y: 17510, + }, + { + x: 1167609600000.0, + y: 17400, + }, + { + x: 1199145600000.0, + y: 16049, + }, + ], + }, + { + key: ['James'], + values: [ + { + x: -157766400000.0, + y: 67506, + }, + { + x: -126230400000.0, + y: 65036, + }, + { + x: -94694400000.0, + y: 61554, + }, + { + x: -63158400000.0, + y: 60584, + }, + { + x: -31536000000.0, + y: 59824, + }, + { + x: 0.0, + y: 61597, + }, + { + x: 31536000000.0, + y: 54463, + }, + { + x: 63072000000.0, + y: 46960, + }, + { + x: 94694400000.0, + y: 42782, + }, + { + x: 126230400000.0, + y: 41258, + }, + { + x: 157766400000.0, + y: 39471, + }, + { + x: 189302400000.0, + y: 38203, + }, + { + x: 220924800000.0, + y: 39916, + }, + { + x: 252460800000.0, + y: 39783, + }, + { + x: 283996800000.0, + y: 39237, + }, + { + x: 315532800000.0, + y: 39185, + }, + { + x: 347155200000.0, + y: 38176, + }, + { + x: 378691200000.0, + y: 38750, + }, + { + x: 410227200000.0, + y: 36228, + }, + { + x: 441763200000.0, + y: 35728, + }, + { + x: 473385600000.0, + y: 35750, + }, + { + x: 504921600000.0, + y: 33955, + }, + { + x: 536457600000.0, + y: 32552, + }, + { + x: 567993600000.0, + y: 32418, + }, + { + x: 599616000000.0, + y: 32658, + }, + { + x: 631152000000.0, + y: 32288, + }, + { + x: 662688000000.0, + y: 30460, + }, + { + x: 694224000000.0, + y: 28450, + }, + { + x: 725846400000.0, + y: 26193, + }, + { + x: 757382400000.0, + y: 24706, + }, + { + x: 788918400000.0, + y: 22691, + }, + { + x: 820454400000.0, + y: 21122, + }, + { + x: 852076800000.0, + y: 20368, + }, + { + x: 883612800000.0, + y: 19651, + }, + { + x: 915148800000.0, + y: 18508, + }, + { + x: 946684800000.0, + y: 17939, + }, + { + x: 978307200000.0, + y: 17023, + }, + { + x: 1009843200000.0, + y: 16905, + }, + { + x: 1041379200000.0, + y: 16832, + }, + { + x: 1072915200000.0, + y: 16459, + }, + { + x: 1104537600000.0, + y: 16046, + }, + { + x: 1136073600000.0, + y: 16139, + }, + { + x: 1167609600000.0, + y: 15821, + }, + { + x: 1199145600000.0, + y: 14920, + }, + ], + }, + { + key: ['John'], + values: [ + { + x: -157766400000.0, + y: 71390, + }, + { + x: -126230400000.0, + y: 64858, + }, + { + x: -94694400000.0, + y: 61480, + }, + { + x: -63158400000.0, + y: 60754, + }, + { + x: -31536000000.0, + y: 58644, + }, + { + x: 0.0, + y: 58348, + }, + { + x: 31536000000.0, + y: 51382, + }, + { + x: 63072000000.0, + y: 43028, + }, + { + x: 94694400000.0, + y: 39061, + }, + { + x: 126230400000.0, + y: 37553, + }, + { + x: 157766400000.0, + y: 34970, + }, + { + x: 189302400000.0, + y: 33876, + }, + { + x: 220924800000.0, + y: 34103, + }, + { + x: 252460800000.0, + y: 33895, + }, + { + x: 283996800000.0, + y: 35305, + }, + { + x: 315532800000.0, + y: 35131, + }, + { + x: 347155200000.0, + y: 34761, + }, + { + x: 378691200000.0, + y: 34560, + }, + { + x: 410227200000.0, + y: 33047, + }, + { + x: 441763200000.0, + y: 32484, + }, + { + x: 473385600000.0, + y: 31397, + }, + { + x: 504921600000.0, + y: 30103, + }, + { + x: 536457600000.0, + y: 29462, + }, + { + x: 567993600000.0, + y: 29301, + }, + { + x: 599616000000.0, + y: 29751, + }, + { + x: 631152000000.0, + y: 29011, + }, + { + x: 662688000000.0, + y: 27727, + }, + { + x: 694224000000.0, + y: 26156, + }, + { + x: 725846400000.0, + y: 24918, + }, + { + x: 757382400000.0, + y: 24119, + }, + { + x: 788918400000.0, + y: 23174, + }, + { + x: 820454400000.0, + y: 22104, + }, + { + x: 852076800000.0, + y: 21330, + }, + { + x: 883612800000.0, + y: 20556, + }, + { + x: 915148800000.0, + y: 20280, + }, + { + x: 946684800000.0, + y: 20032, + }, + { + x: 978307200000.0, + y: 18839, + }, + { + x: 1009843200000.0, + y: 17400, + }, + { + x: 1041379200000.0, + y: 17170, + }, + { + x: 1072915200000.0, + y: 16381, + }, + { + x: 1104537600000.0, + y: 15692, + }, + { + x: 1136073600000.0, + y: 15083, + }, + { + x: 1167609600000.0, + y: 14348, + }, + { + x: 1199145600000.0, + y: 13110, + }, + ], + }, + { + key: ['Michael'], + values: [ + { + x: -157766400000.0, + y: 80812, + }, + { + x: -126230400000.0, + y: 79709, + }, + { + x: -94694400000.0, + y: 82204, + }, + { + x: -63158400000.0, + y: 81785, + }, + { + x: -31536000000.0, + y: 84893, + }, + { + x: 0.0, + y: 85015, + }, + { + x: 31536000000.0, + y: 77321, + }, + { + x: 63072000000.0, + y: 71197, + }, + { + x: 94694400000.0, + y: 67598, + }, + { + x: 126230400000.0, + y: 67304, + }, + { + x: 157766400000.0, + y: 68149, + }, + { + x: 189302400000.0, + y: 66686, + }, + { + x: 220924800000.0, + y: 67344, + }, + { + x: 252460800000.0, + y: 66875, + }, + { + x: 283996800000.0, + y: 67473, + }, + { + x: 315532800000.0, + y: 68375, + }, + { + x: 347155200000.0, + y: 68467, + }, + { + x: 378691200000.0, + y: 67904, + }, + { + x: 410227200000.0, + y: 67708, + }, + { + x: 441763200000.0, + y: 67457, + }, + { + x: 473385600000.0, + y: 64667, + }, + { + x: 504921600000.0, + y: 63959, + }, + { + x: 536457600000.0, + y: 63442, + }, + { + x: 567993600000.0, + y: 63924, + }, + { + x: 599616000000.0, + y: 65233, + }, + { + x: 631152000000.0, + y: 65138, + }, + { + x: 662688000000.0, + y: 60646, + }, + { + x: 694224000000.0, + y: 54216, + }, + { + x: 725846400000.0, + y: 49443, + }, + { + x: 757382400000.0, + y: 44361, + }, + { + x: 788918400000.0, + y: 41311, + }, + { + x: 820454400000.0, + y: 38284, + }, + { + x: 852076800000.0, + y: 37459, + }, + { + x: 883612800000.0, + y: 36525, + }, + { + x: 915148800000.0, + y: 33820, + }, + { + x: 946684800000.0, + y: 31956, + }, + { + x: 978307200000.0, + y: 29612, + }, + { + x: 1009843200000.0, + y: 28156, + }, + { + x: 1041379200000.0, + y: 27031, + }, + { + x: 1072915200000.0, + y: 25418, + }, + { + x: 1104537600000.0, + y: 23678, + }, + { + x: 1136073600000.0, + y: 22498, + }, + { + x: 1167609600000.0, + y: 21805, + }, + { + x: 1199145600000.0, + y: 20271, + }, + ], + }, +]; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Compare/index.js b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Compare/index.js similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Compare/index.js rename to temporary-plugins/superset-ui-plugins-demo/storybook/stories/Compare/index.js diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/DistBar/ManyBarStories.tsx b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/DistBar/ManyBarStories.tsx similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/DistBar/ManyBarStories.tsx rename to temporary-plugins/superset-ui-plugins-demo/storybook/stories/DistBar/ManyBarStories.tsx diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/DistBar/Stories.tsx b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/DistBar/Stories.tsx similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/DistBar/Stories.tsx rename to temporary-plugins/superset-ui-plugins-demo/storybook/stories/DistBar/Stories.tsx diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/DistBar/data.js b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/DistBar/data.js new file mode 100644 index 0000000000..00540a0912 --- /dev/null +++ b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/DistBar/data.js @@ -0,0 +1,93 @@ +/* eslint-disable sort-keys, no-magic-numbers */ +export default [ + { + key: 'sum__sum_boys', + values: [ + { + x: 'CA', + y: 5430796, + }, + { + x: 'TX', + y: 3311985, + }, + { + x: 'NY', + y: 3543961, + }, + { + x: 'OH', + y: 2376385, + }, + { + x: 'PA', + y: 2390275, + }, + { + x: 'IL', + y: 2357411, + }, + { + x: 'MI', + y: 1938321, + }, + { + x: 'FL', + y: 1968060, + }, + { + x: 'NJ', + y: 1486126, + }, + { + x: 'MA', + y: 1285126, + }, + ], + }, + { + key: 'sum__sum_girls', + values: [ + { + x: 'CA', + y: 3567754, + }, + { + x: 'TX', + y: 2313186, + }, + { + x: 'NY', + y: 2280733, + }, + { + x: 'OH', + y: 1622814, + }, + { + x: 'PA', + y: 1615383, + }, + { + x: 'IL', + y: 1614427, + }, + { + x: 'MI', + y: 1326229, + }, + { + x: 'FL', + y: 1312593, + }, + { + x: 'NJ', + y: 992702, + }, + { + x: 'MA', + y: 842146, + }, + ], + }, +]; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/DistBar/index.js b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/DistBar/index.js similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/DistBar/index.js rename to temporary-plugins/superset-ui-plugins-demo/storybook/stories/DistBar/index.js diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/DualLine/Stories.tsx b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/DualLine/Stories.tsx similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/DualLine/Stories.tsx rename to temporary-plugins/superset-ui-plugins-demo/storybook/stories/DualLine/Stories.tsx diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/DualLine/data.js b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/DualLine/data.js new file mode 100644 index 0000000000..911d35c2c7 --- /dev/null +++ b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/DualLine/data.js @@ -0,0 +1,371 @@ +/* eslint-disable sort-keys, no-magic-numbers */ +export default [ + { + key: 'avg__num', + classed: '', + values: [ + { + x: -157766400000.0, + y: 1435.6116838487972, + }, + { + x: -126230400000.0, + y: 1359.0295103957076, + }, + { + x: -94694400000.0, + y: 1291.0963777490297, + }, + { + x: -63158400000.0, + y: 1254.5405915670233, + }, + { + x: -31536000000.0, + y: 1244.9671332927571, + }, + { + x: 0.0, + y: 1248.7126843657818, + }, + { + x: 31536000000.0, + y: 1147.4195205479452, + }, + { + x: 63072000000.0, + y: 1036.6540632054175, + }, + { + x: 94694400000.0, + y: 980.8740906547285, + }, + { + x: 126230400000.0, + y: 971.1190345584201, + }, + { + x: 157766400000.0, + y: 947.5531453362256, + }, + { + x: 189302400000.0, + y: 962.4153005464481, + }, + { + x: 220924800000.0, + y: 1004.2832876712329, + }, + { + x: 252460800000.0, + y: 1000.6107784431138, + }, + { + x: 283996800000.0, + y: 1045.711965349215, + }, + { + x: 315532800000.0, + y: 1089.5097402597403, + }, + { + x: 347155200000.0, + y: 1094.7375201288244, + }, + { + x: 378691200000.0, + y: 1113.3569511540527, + }, + { + x: 410227200000.0, + y: 1117.585260892953, + }, + { + x: 441763200000.0, + y: 1117.1530230069557, + }, + { + x: 473385600000.0, + y: 1143.6297297297297, + }, + { + x: 504921600000.0, + y: 1131.3461538461538, + }, + { + x: 536457600000.0, + y: 1137.0865800865802, + }, + { + x: 567993600000.0, + y: 1144.3100483610963, + }, + { + x: 599616000000.0, + y: 1153.075821845175, + }, + { + x: 631152000000.0, + y: 1170.1328, + }, + { + x: 662688000000.0, + y: 1134.3757412398922, + }, + { + x: 694224000000.0, + y: 1102.478189749182, + }, + { + x: 725846400000.0, + y: 1065.1231527093596, + }, + { + x: 757382400000.0, + y: 1035.223574986165, + }, + { + x: 788918400000.0, + y: 997.9584026622297, + }, + { + x: 820454400000.0, + y: 976.4625698324022, + }, + { + x: 852076800000.0, + y: 953.0983698707139, + }, + { + x: 883612800000.0, + y: 961.3199079401611, + }, + { + x: 915148800000.0, + y: 962.3351032448378, + }, + { + x: 946684800000.0, + y: 967.1753012048192, + }, + { + x: 978307200000.0, + y: 955.8330218068536, + }, + { + x: 1009843200000.0, + y: 947.7684413085311, + }, + { + x: 1041379200000.0, + y: 951.2866622428667, + }, + { + x: 1072915200000.0, + y: 913.469184890656, + }, + { + x: 1104537600000.0, + y: 910.3797643797644, + }, + { + x: 1136073600000.0, + y: 910.0478229835832, + }, + { + x: 1167609600000.0, + y: 886.5323636363636, + }, + { + x: 1199145600000.0, + y: 854.5530769230769, + }, + ], + yAxis: 1, + type: 'line', + }, + { + key: 'sum__num', + classed: '', + values: [ + { + x: -157766400000.0, + y: 2088815, + }, + { + x: -126230400000.0, + y: 2026313, + }, + { + x: -94694400000.0, + y: 1996035, + }, + { + x: -63158400000.0, + y: 1993465, + }, + { + x: -31536000000.0, + y: 2045481, + }, + { + x: 0.0, + y: 2116568, + }, + { + x: 31536000000.0, + y: 2010279, + }, + { + x: 63072000000.0, + y: 1836951, + }, + { + x: 94694400000.0, + y: 1752822, + }, + { + x: 126230400000.0, + y: 1770350, + }, + { + x: 157766400000.0, + y: 1747288, + }, + { + x: 189302400000.0, + y: 1761220, + }, + { + x: 220924800000.0, + y: 1832817, + }, + { + x: 252460800000.0, + y: 1838122, + }, + { + x: 283996800000.0, + y: 1931430, + }, + { + x: 315532800000.0, + y: 2013414, + }, + { + x: 347155200000.0, + y: 2039496, + }, + { + x: 378691200000.0, + y: 2074184, + }, + { + x: 410227200000.0, + y: 2077591, + }, + { + x: 441763200000.0, + y: 2087959, + }, + { + x: 473385600000.0, + y: 2115715, + }, + { + x: 504921600000.0, + y: 2088465, + }, + { + x: 536457600000.0, + y: 2101336, + }, + { + x: 567993600000.0, + y: 2129561, + }, + { + x: 599616000000.0, + y: 2174701, + }, + { + x: 631152000000.0, + y: 2193999, + }, + { + x: 662688000000.0, + y: 2104267, + }, + { + x: 694224000000.0, + y: 2021945, + }, + { + x: 725846400000.0, + y: 1945980, + }, + { + x: 757382400000.0, + y: 1870649, + }, + { + x: 788918400000.0, + y: 1799319, + }, + { + x: 820454400000.0, + y: 1747868, + }, + { + x: 852076800000.0, + y: 1695562, + }, + { + x: 883612800000.0, + y: 1670774, + }, + { + x: 915148800000.0, + y: 1631158, + }, + { + x: 946684800000.0, + y: 1605511, + }, + { + x: 978307200000.0, + y: 1534112, + }, + { + x: 1009843200000.0, + y: 1477571, + }, + { + x: 1041379200000.0, + y: 1433589, + }, + { + x: 1072915200000.0, + y: 1378425, + }, + { + x: 1104537600000.0, + y: 1313678, + }, + { + x: 1136073600000.0, + y: 1274977, + }, + { + x: 1167609600000.0, + y: 1218982, + }, + { + x: 1199145600000.0, + y: 1110919, + }, + ], + yAxis: 2, + type: 'line', + }, +]; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/DualLine/index.js b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/DualLine/index.js similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/DualLine/index.js rename to temporary-plugins/superset-ui-plugins-demo/storybook/stories/DualLine/index.js diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Line/LogStories.tsx b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Line/LogStories.tsx similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Line/LogStories.tsx rename to temporary-plugins/superset-ui-plugins-demo/storybook/stories/Line/LogStories.tsx diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Line/Stories.tsx b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Line/Stories.tsx similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Line/Stories.tsx rename to temporary-plugins/superset-ui-plugins-demo/storybook/stories/Line/Stories.tsx diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Line/YAxisStories.tsx b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Line/YAxisStories.tsx similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Line/YAxisStories.tsx rename to temporary-plugins/superset-ui-plugins-demo/storybook/stories/Line/YAxisStories.tsx diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Line/data.js b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Line/data.js new file mode 100644 index 0000000000..17c1032935 --- /dev/null +++ b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Line/data.js @@ -0,0 +1,908 @@ +/* eslint-disable sort-keys, no-magic-numbers */ +export default [ + { + key: ['Christopher'], + values: [ + { + x: -157766400000.0, + y: 24703, + }, + { + x: -126230400000.0, + y: 27861, + }, + { + x: -94694400000.0, + y: 29436, + }, + { + x: -63158400000.0, + y: 31463, + }, + { + x: -31536000000.0, + y: 35718, + }, + { + x: 0.0, + y: 41758, + }, + { + x: 31536000000.0, + y: 48172, + }, + { + x: 63072000000.0, + y: 52092, + }, + { + x: 94694400000.0, + y: 48217, + }, + { + x: 126230400000.0, + y: 48476, + }, + { + x: 157766400000.0, + y: 46438, + }, + { + x: 189302400000.0, + y: 45086, + }, + { + x: 220924800000.0, + y: 46610, + }, + { + x: 252460800000.0, + y: 47107, + }, + { + x: 283996800000.0, + y: 50514, + }, + { + x: 315532800000.0, + y: 48969, + }, + { + x: 347155200000.0, + y: 50108, + }, + { + x: 378691200000.0, + y: 59055, + }, + { + x: 410227200000.0, + y: 59188, + }, + { + x: 441763200000.0, + y: 59859, + }, + { + x: 473385600000.0, + y: 59516, + }, + { + x: 504921600000.0, + y: 56633, + }, + { + x: 536457600000.0, + y: 54466, + }, + { + x: 567993600000.0, + y: 52996, + }, + { + x: 599616000000.0, + y: 53205, + }, + { + x: 631152000000.0, + y: 52322, + }, + { + x: 662688000000.0, + y: 47109, + }, + { + x: 694224000000.0, + y: 42470, + }, + { + x: 725846400000.0, + y: 38257, + }, + { + x: 757382400000.0, + y: 34823, + }, + { + x: 788918400000.0, + y: 32728, + }, + { + x: 820454400000.0, + y: 30988, + }, + { + x: 852076800000.0, + y: 29179, + }, + { + x: 883612800000.0, + y: 27083, + }, + { + x: 915148800000.0, + y: 25700, + }, + { + x: 946684800000.0, + y: 24959, + }, + { + x: 978307200000.0, + y: 23180, + }, + { + x: 1009843200000.0, + y: 21731, + }, + { + x: 1041379200000.0, + y: 20793, + }, + { + x: 1072915200000.0, + y: 19739, + }, + { + x: 1104537600000.0, + y: 19190, + }, + { + x: 1136073600000.0, + y: 19674, + }, + { + x: 1167609600000.0, + y: 19986, + }, + { + x: 1199145600000.0, + y: 17771, + }, + ], + }, + { + key: ['David'], + values: [ + { + x: -157766400000.0, + y: 67646, + }, + { + x: -126230400000.0, + y: 66207, + }, + { + x: -94694400000.0, + y: 66581, + }, + { + x: -63158400000.0, + y: 63531, + }, + { + x: -31536000000.0, + y: 63502, + }, + { + x: 0.0, + y: 61570, + }, + { + x: 31536000000.0, + y: 52948, + }, + { + x: 63072000000.0, + y: 46218, + }, + { + x: 94694400000.0, + y: 40968, + }, + { + x: 126230400000.0, + y: 41654, + }, + { + x: 157766400000.0, + y: 39019, + }, + { + x: 189302400000.0, + y: 39165, + }, + { + x: 220924800000.0, + y: 40407, + }, + { + x: 252460800000.0, + y: 40533, + }, + { + x: 283996800000.0, + y: 41898, + }, + { + x: 315532800000.0, + y: 41743, + }, + { + x: 347155200000.0, + y: 40486, + }, + { + x: 378691200000.0, + y: 40283, + }, + { + x: 410227200000.0, + y: 39048, + }, + { + x: 441763200000.0, + y: 38346, + }, + { + x: 473385600000.0, + y: 38395, + }, + { + x: 504921600000.0, + y: 37021, + }, + { + x: 536457600000.0, + y: 36672, + }, + { + x: 567993600000.0, + y: 35214, + }, + { + x: 599616000000.0, + y: 35139, + }, + { + x: 631152000000.0, + y: 33661, + }, + { + x: 662688000000.0, + y: 30347, + }, + { + x: 694224000000.0, + y: 28344, + }, + { + x: 725846400000.0, + y: 26947, + }, + { + x: 757382400000.0, + y: 24784, + }, + { + x: 788918400000.0, + y: 22967, + }, + { + x: 820454400000.0, + y: 22941, + }, + { + x: 852076800000.0, + y: 21824, + }, + { + x: 883612800000.0, + y: 20816, + }, + { + x: 915148800000.0, + y: 20267, + }, + { + x: 946684800000.0, + y: 19695, + }, + { + x: 978307200000.0, + y: 19281, + }, + { + x: 1009843200000.0, + y: 18600, + }, + { + x: 1041379200000.0, + y: 18557, + }, + { + x: 1072915200000.0, + y: 18315, + }, + { + x: 1104537600000.0, + y: 18017, + }, + { + x: 1136073600000.0, + y: 17510, + }, + { + x: 1167609600000.0, + y: 17400, + }, + { + x: 1199145600000.0, + y: 16049, + }, + ], + }, + { + key: ['James'], + values: [ + { + x: -157766400000.0, + y: 67506, + }, + { + x: -126230400000.0, + y: 65036, + }, + { + x: -94694400000.0, + y: 61554, + }, + { + x: -63158400000.0, + y: 60584, + }, + { + x: -31536000000.0, + y: 59824, + }, + { + x: 0.0, + y: 61597, + }, + { + x: 31536000000.0, + y: 54463, + }, + { + x: 63072000000.0, + y: 46960, + }, + { + x: 94694400000.0, + y: 42782, + }, + { + x: 126230400000.0, + y: 41258, + }, + { + x: 157766400000.0, + y: 39471, + }, + { + x: 189302400000.0, + y: 38203, + }, + { + x: 220924800000.0, + y: 39916, + }, + { + x: 252460800000.0, + y: 39783, + }, + { + x: 283996800000.0, + y: 39237, + }, + { + x: 315532800000.0, + y: 39185, + }, + { + x: 347155200000.0, + y: 38176, + }, + { + x: 378691200000.0, + y: 38750, + }, + { + x: 410227200000.0, + y: 36228, + }, + { + x: 441763200000.0, + y: 35728, + }, + { + x: 473385600000.0, + y: 35750, + }, + { + x: 504921600000.0, + y: 33955, + }, + { + x: 536457600000.0, + y: 32552, + }, + { + x: 567993600000.0, + y: 32418, + }, + { + x: 599616000000.0, + y: 32658, + }, + { + x: 631152000000.0, + y: 32288, + }, + { + x: 662688000000.0, + y: 30460, + }, + { + x: 694224000000.0, + y: 28450, + }, + { + x: 725846400000.0, + y: 26193, + }, + { + x: 757382400000.0, + y: 24706, + }, + { + x: 788918400000.0, + y: 22691, + }, + { + x: 820454400000.0, + y: 21122, + }, + { + x: 852076800000.0, + y: 20368, + }, + { + x: 883612800000.0, + y: 19651, + }, + { + x: 915148800000.0, + y: 18508, + }, + { + x: 946684800000.0, + y: 17939, + }, + { + x: 978307200000.0, + y: 17023, + }, + { + x: 1009843200000.0, + y: 16905, + }, + { + x: 1041379200000.0, + y: 16832, + }, + { + x: 1072915200000.0, + y: 16459, + }, + { + x: 1104537600000.0, + y: 16046, + }, + { + x: 1136073600000.0, + y: 16139, + }, + { + x: 1167609600000.0, + y: 15821, + }, + { + x: 1199145600000.0, + y: 14920, + }, + ], + }, + { + key: ['John'], + values: [ + { + x: -157766400000.0, + y: 71390, + }, + { + x: -126230400000.0, + y: 64858, + }, + { + x: -94694400000.0, + y: 61480, + }, + { + x: -63158400000.0, + y: 60754, + }, + { + x: -31536000000.0, + y: 58644, + }, + { + x: 0.0, + y: 58348, + }, + { + x: 31536000000.0, + y: 51382, + }, + { + x: 63072000000.0, + y: 43028, + }, + { + x: 94694400000.0, + y: 39061, + }, + { + x: 126230400000.0, + y: 37553, + }, + { + x: 157766400000.0, + y: 34970, + }, + { + x: 189302400000.0, + y: 33876, + }, + { + x: 220924800000.0, + y: 34103, + }, + { + x: 252460800000.0, + y: 33895, + }, + { + x: 283996800000.0, + y: 35305, + }, + { + x: 315532800000.0, + y: 35131, + }, + { + x: 347155200000.0, + y: 34761, + }, + { + x: 378691200000.0, + y: 34560, + }, + { + x: 410227200000.0, + y: 33047, + }, + { + x: 441763200000.0, + y: 32484, + }, + { + x: 473385600000.0, + y: 31397, + }, + { + x: 504921600000.0, + y: 30103, + }, + { + x: 536457600000.0, + y: 29462, + }, + { + x: 567993600000.0, + y: 29301, + }, + { + x: 599616000000.0, + y: 29751, + }, + { + x: 631152000000.0, + y: 29011, + }, + { + x: 662688000000.0, + y: 27727, + }, + { + x: 694224000000.0, + y: 26156, + }, + { + x: 725846400000.0, + y: 24918, + }, + { + x: 757382400000.0, + y: 24119, + }, + { + x: 788918400000.0, + y: 23174, + }, + { + x: 820454400000.0, + y: 22104, + }, + { + x: 852076800000.0, + y: 21330, + }, + { + x: 883612800000.0, + y: 20556, + }, + { + x: 915148800000.0, + y: 20280, + }, + { + x: 946684800000.0, + y: 20032, + }, + { + x: 978307200000.0, + y: 18839, + }, + { + x: 1009843200000.0, + y: 17400, + }, + { + x: 1041379200000.0, + y: 17170, + }, + { + x: 1072915200000.0, + y: 16381, + }, + { + x: 1104537600000.0, + y: 15692, + }, + { + x: 1136073600000.0, + y: 15083, + }, + { + x: 1167609600000.0, + y: 14348, + }, + { + x: 1199145600000.0, + y: 13110, + }, + ], + }, + { + key: ['Michael'], + values: [ + { + x: -157766400000.0, + y: 80812, + }, + { + x: -126230400000.0, + y: 79709, + }, + { + x: -94694400000.0, + y: 82204, + }, + { + x: -63158400000.0, + y: 81785, + }, + { + x: -31536000000.0, + y: 84893, + }, + { + x: 0.0, + y: 85015, + }, + { + x: 31536000000.0, + y: 77321, + }, + { + x: 63072000000.0, + y: 71197, + }, + { + x: 94694400000.0, + y: 67598, + }, + { + x: 126230400000.0, + y: 67304, + }, + { + x: 157766400000.0, + y: 68149, + }, + { + x: 189302400000.0, + y: 66686, + }, + { + x: 220924800000.0, + y: 67344, + }, + { + x: 252460800000.0, + y: 66875, + }, + { + x: 283996800000.0, + y: 67473, + }, + { + x: 315532800000.0, + y: 68375, + }, + { + x: 347155200000.0, + y: 68467, + }, + { + x: 378691200000.0, + y: 67904, + }, + { + x: 410227200000.0, + y: 67708, + }, + { + x: 441763200000.0, + y: 67457, + }, + { + x: 473385600000.0, + y: 64667, + }, + { + x: 504921600000.0, + y: 63959, + }, + { + x: 536457600000.0, + y: 63442, + }, + { + x: 567993600000.0, + y: 63924, + }, + { + x: 599616000000.0, + y: 65233, + }, + { + x: 631152000000.0, + y: 65138, + }, + { + x: 662688000000.0, + y: 60646, + }, + { + x: 694224000000.0, + y: 54216, + }, + { + x: 725846400000.0, + y: 49443, + }, + { + x: 757382400000.0, + y: 44361, + }, + { + x: 788918400000.0, + y: 41311, + }, + { + x: 820454400000.0, + y: 38284, + }, + { + x: 852076800000.0, + y: 37459, + }, + { + x: 883612800000.0, + y: 36525, + }, + { + x: 915148800000.0, + y: 33820, + }, + { + x: 946684800000.0, + y: 31956, + }, + { + x: 978307200000.0, + y: 29612, + }, + { + x: 1009843200000.0, + y: 28156, + }, + { + x: 1041379200000.0, + y: 27031, + }, + { + x: 1072915200000.0, + y: 25418, + }, + { + x: 1104537600000.0, + y: 23678, + }, + { + x: 1136073600000.0, + y: 22498, + }, + { + x: 1167609600000.0, + y: 21805, + }, + { + x: 1199145600000.0, + y: 20271, + }, + ], + }, +]; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Line/index.js b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Line/index.js similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Line/index.js rename to temporary-plugins/superset-ui-plugins-demo/storybook/stories/Line/index.js diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Pie/Stories.tsx b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Pie/Stories.tsx similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Pie/Stories.tsx rename to temporary-plugins/superset-ui-plugins-demo/storybook/stories/Pie/Stories.tsx diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Pie/data.js b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Pie/data.js new file mode 100644 index 0000000000..09f61ae3b6 --- /dev/null +++ b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Pie/data.js @@ -0,0 +1,11 @@ +/* eslint-disable sort-keys, no-magic-numbers */ +export default [ + { + x: 'boy', + y: 48133355, + }, + { + x: 'girl', + y: 32546308, + }, +]; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Pie/index.js b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/Pie/index.js similarity index 100% rename from temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Pie/index.js rename to temporary-plugins/superset-ui-plugins-demo/storybook/stories/Pie/index.js diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Area/Stories.tsx b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Area/Stories.tsx deleted file mode 100644 index 045a222a7d..0000000000 --- a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Area/Stories.tsx +++ /dev/null @@ -1,179 +0,0 @@ -/* eslint-disable no-magic-numbers */ -import React from 'react'; -import { SuperChart } from '@superset-ui/chart'; -import dummyDatasource from '../../../shared/dummyDatasource'; -import data from './data'; - -export default [ - { - renderStory: () => ( - - ), - storyName: 'Stacked', - storyPath: 'legacy-|preset-chart-nvd3|AreaChartPlugin', - }, - { - renderStory: () => ( - - ), - storyName: 'Stacked with yAxisBounds', - storyPath: 'legacy-|preset-chart-nvd3|AreaChartPlugin', - }, - { - renderStory: () => ( - - ), - storyName: 'Stacked with yAxisBounds min only', - storyPath: 'legacy-|preset-chart-nvd3|AreaChartPlugin', - }, - { - renderStory: () => ( - - ), - storyName: 'Expanded', - storyPath: 'legacy-|preset-chart-nvd3|AreaChartPlugin', - }, - { - renderStory: () => ( - - ), - storyName: 'Controls Shown', - storyPath: 'legacy-|preset-chart-nvd3|AreaChartPlugin', - }, -]; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Area/index.js b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Area/index.js deleted file mode 100644 index 7ea6fde26d..0000000000 --- a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Area/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import { AreaChartPlugin } from '../../../../../superset-ui-legacy-preset-chart-nvd3'; -import Stories from './Stories'; - -new AreaChartPlugin().configure({ key: 'area' }).register(); - -export default { - examples: [...Stories], -}; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bar/Stories.tsx b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bar/Stories.tsx deleted file mode 100644 index 23f3d3319f..0000000000 --- a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bar/Stories.tsx +++ /dev/null @@ -1,154 +0,0 @@ -/* eslint-disable no-magic-numbers */ -import React from 'react'; -import { SuperChart } from '@superset-ui/chart'; -import data from './data'; -import dummyDatasource from '../../../shared/dummyDatasource'; - -export default [ - { - renderStory: () => ( - - ), - storyName: 'Basic', - storyPath: 'legacy-|preset-chart-nvd3|BarChartPlugin', - }, - { - renderStory: () => ( - - ), - storyName: 'Bar with values', - storyPath: 'legacy-|preset-chart-nvd3|BarChartPlugin', - }, - { - renderStory: () => ( - ({ - ...group, - values: group.values.map(pair => ({ ...pair, y: (i % 2 === 0 ? 1 : -1) * pair.y })), - })), - }} - formData={{ - bottomMargin: 'auto', - colorScheme: 'd3Category10', - contribution: false, - groupby: ['region'], - lineInterpolation: 'linear', - metrics: ['sum__SP_POP_TOTL'], - richTooltip: true, - showBarValue: true, - showBrush: 'auto', - showControls: false, - showLegend: true, - stackedStyle: 'stack', - vizType: 'bar', - xAxisFormat: '%Y', - xAxisLabel: '', - xAxisShowminmax: false, - xTicksLayout: 'auto', - yAxisBounds: [null, null], - yAxisFormat: '.3s', - yLogScale: false, - }} - /> - ), - storyName: 'Bar with positive and negative values', - storyPath: 'legacy-|preset-chart-nvd3|BarChartPlugin', - }, - { - renderStory: () => ( - - ), - storyName: 'Stacked bar with values', - storyPath: 'legacy-|preset-chart-nvd3|BarChartPlugin', - }, -]; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bar/index.js b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bar/index.js deleted file mode 100644 index ecf17d8205..0000000000 --- a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/Bar/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import { BarChartPlugin } from '../../../../../superset-ui-legacy-preset-chart-nvd3'; -import Stories from './Stories'; - -new BarChartPlugin().configure({ key: 'bar' }).register(); - -export default { - examples: [...Stories], -}; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/BoxPlot/Stories.tsx b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/BoxPlot/Stories.tsx deleted file mode 100644 index cdf0b79ce8..0000000000 --- a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/BoxPlot/Stories.tsx +++ /dev/null @@ -1,26 +0,0 @@ -/* eslint-disable no-magic-numbers */ -import React from 'react'; -import { SuperChart } from '@superset-ui/chart'; -import data from './data'; -import dummyDatasource from '../../../shared/dummyDatasource'; - -export default [ - { - renderStory: () => ( - - ), - storyName: 'Basic', - storyPath: 'legacy-|preset-chart-nvd3|BoxPlotChartPlugin', - }, -]; diff --git a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/BoxPlot/index.js b/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/BoxPlot/index.js deleted file mode 100644 index 0a802d7221..0000000000 --- a/temporary-plugins/superset-ui-plugins-demo/storybook/stories/legacy-preset-chart-nvd3/BoxPlot/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import { BoxPlotChartPlugin } from '../../../../../superset-ui-legacy-preset-chart-nvd3'; -import Stories from './Stories'; - -new BoxPlotChartPlugin().configure({ key: 'box-plot' }).register(); - -export default { - examples: [...Stories], -}; diff --git a/yarn.lock b/yarn.lock index 1ae643fe34..54dd5a5a2b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6329,6 +6329,11 @@ compare-versions@^3.6.0: resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62" integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA== +complex.js@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/complex.js/-/complex.js-2.0.4.tgz#d8e7cfb9652d1e853e723386421c1a0ca7a48373" + integrity sha512-Syl95HpxUTS0QjwNxencZsKukgh1zdS9uXeXX2Us0pHaqBR6kiZZi0AkZ9VpZFwHJyVIUVzI4EumjWdXP3fy6w== + component-emitter@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" @@ -7314,6 +7319,11 @@ decamelize@^1.1.0, decamelize@^1.1.2, decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= +decimal.js@9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-9.0.1.tgz#1cc8b228177da7ab6498c1cc06eb130a290e6e1e" + integrity sha512-2h0iKbJwnImBk4TGk7CG1xadoA0g3LDPlQhQzbZ221zvG0p2YVUedbKIPsOZXKZGx6YmZMJKYOalpCMxSdDqTQ== + decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" @@ -7622,6 +7632,11 @@ domhandler@^2.3.0: dependencies: domelementtype "1" +dompurify@^2.0.6: + version "2.0.10" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.0.10.tgz#d193f36d8148b4297a3a420b992d20eeff47a4d3" + integrity sha512-ok1dcSztsIuVxWG6Cx0ujyDIzNclz9W9OIU0cOb0IT+VAtSLrOelZF4miUvSm1U4PoCw8D7sIOLCnCQOaVpr3w== + domutils@1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" @@ -8094,6 +8109,11 @@ escape-html@^1.0.3, escape-html@~1.0.3: resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= +escape-latex@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/escape-latex/-/escape-latex-1.2.0.tgz#07c03818cf7dac250cce517f4fda1b001ef2bca1" + integrity sha512-nV5aVWW1K0wEiUIEdZ4erkGGH8mDxGyxSeqPzRNtWP7ataw+/olFObw7hujFWlVjNsaDFw5VZ5NzVSIqRgfTiw== + escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -8683,6 +8703,11 @@ fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= +fast-safe-stringify@^2.0.6: + version "2.0.7" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz#124aa885899261f68aedb42a7c080de9da608743" + integrity sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA== + fast-xml-parser@^3.12.17: version "3.16.0" resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-3.16.0.tgz#d905e7e6b28fc4648cabebcb074363867fb56ee2" @@ -9060,6 +9085,11 @@ forwarded@~0.1.2: resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= +fraction.js@4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.0.4.tgz#04e567110718adf7b52974a10434ab4c67a5183e" + integrity sha512-aK/oGatyYLTtXRHjfEsytX5fieeR5H4s8sLorzcT12taFS+dbMZejnvm9gRa8mZAPwci24ucjq9epDyaq5u8Iw== + fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" @@ -10849,6 +10879,11 @@ java-properties@^1.0.0: resolved "https://registry.yarnpkg.com/java-properties/-/java-properties-1.0.2.tgz#ccd1fa73907438a5b5c38982269d0e771fe78211" integrity sha512-qjdpeo2yKlYTH7nFdK0vbZWuTCesk4o63v5iVOlhMQPfuIZQfW/HI35SjfhA+4qpg36rnFSvUK5b1m+ckIblQQ== +javascript-natural-sort@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz#f9e2303d4507f6d74355a73664d1440fb5a0ef59" + integrity sha1-+eIwPUUH9tdDVac2ZNFED7Wg71k= + jed@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/jed/-/jed-1.1.1.tgz#7a549bbd9ffe1585b0cd0a191e203055bee574b4" @@ -12087,6 +12122,20 @@ mathfn@^1.0.0: resolved "https://registry.yarnpkg.com/mathfn/-/mathfn-1.1.0.tgz#5b88048479508cd693a8131125f621d8b75b8352" integrity sha512-glxPY9PZqaoGUySN1QOVnKfnWH4Az2PnHEYMRVWUnR1RZpWTLNzdCm7RxEiEJ0SJ7G95ruF6Q2/1s/LuQnhXyg== +mathjs@^3.20.2: + version "3.20.2" + resolved "https://registry.yarnpkg.com/mathjs/-/mathjs-3.20.2.tgz#3218aebde7de8cb5627c8fe3a1a216bf399ba91d" + integrity sha512-3f6/+uf1cUtIz1rYFz775wekl/UEDSQ3mU6xdxW7qzpvvhc2v28i3UtLsGTRB+u8OqDWoSX6Dz8gehaGFs6tCA== + dependencies: + complex.js "2.0.4" + decimal.js "9.0.1" + escape-latex "^1.0.0" + fraction.js "4.0.4" + javascript-natural-sort "0.7.1" + seed-random "2.2.0" + tiny-emitter "2.0.2" + typed-function "0.10.7" + md5.js@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" @@ -12512,6 +12561,11 @@ modify-values@^1.0.0: resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== +moment@^2.20.1: + version "2.24.0" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" + integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== + moo@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/moo/-/moo-0.5.1.tgz#7aae7f384b9b09f620b6abf6f74ebbcd1b65dbc4" @@ -15239,6 +15293,11 @@ scoped-regex@^1.0.0: resolved "https://registry.yarnpkg.com/scoped-regex/-/scoped-regex-1.0.0.tgz#a346bb1acd4207ae70bd7c0c7ca9e566b6baddb8" integrity sha1-o0a7Gs1CB65wvXwMfKnlZra63bg= +seed-random@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/seed-random/-/seed-random-2.2.0.tgz#2a9b19e250a817099231a5b99a4daf80b7fbed54" + integrity sha1-KpsZ4lCoFwmSMaW5mk2vgLf77VQ= + select@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" @@ -16493,6 +16552,11 @@ timers-browserify@^2.0.4: dependencies: setimmediate "^1.0.4" +tiny-emitter@2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.0.2.tgz#82d27468aca5ade8e5fd1e6d22b57dd43ebdfb7c" + integrity sha512-2NM0auVBGft5tee/OxP4PI3d8WItkDM+fPnaRAVo6xTDI2knbz9eC5ArWGqtGlYqiH3RU5yMpdyTTO7MguC4ow== + tiny-emitter@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423" @@ -16756,6 +16820,11 @@ type-is@~1.6.17, type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +typed-function@0.10.7: + version "0.10.7" + resolved "https://registry.yarnpkg.com/typed-function/-/typed-function-0.10.7.tgz#f702af7d77a64b61abf86799ff2d74266ebc4477" + integrity sha512-3mlZ5AwRMbLvUKkc8a1TI4RUJUS2H27pmD5q0lHRObgsoWzhDAX01yg82kwSP1FUw922/4Y9ZliIEh0qJZcz+g== + typed-styles@^0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/typed-styles/-/typed-styles-0.0.7.tgz#93392a008794c4595119ff62dde6809dbc40a3d9" @@ -16934,6 +17003,11 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +urijs@^1.18.10: + version "1.19.2" + resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.2.tgz#f9be09f00c4c5134b7cb3cf475c1dd394526265a" + integrity sha512-s/UIq9ap4JPZ7H1EB5ULo/aOUbWqfDi7FKzMC2Nz+0Si8GiT1rIEaprt8hy3Vy2Ex2aJPpOQv4P4DuOZ+K1c6w== + urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"