mirror of
https://github.com/apache/superset.git
synced 2024-09-17 11:09:47 -04:00
docs: add storybook for arc
This commit is contained in:
parent
54b5be5c7a
commit
fd6b2b6ebe
@ -33,6 +33,7 @@
|
|||||||
"d3-color": "^1.2.0",
|
"d3-color": "^1.2.0",
|
||||||
"d3-scale": "^2.1.2",
|
"d3-scale": "^2.1.2",
|
||||||
"deck.gl": "^5.3.5",
|
"deck.gl": "^5.3.5",
|
||||||
|
"jquery": "^3.4.1",
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.15",
|
||||||
"mapbox-gl": "^0.53.0",
|
"mapbox-gl": "^0.53.0",
|
||||||
"moment": "^2.20.1",
|
"moment": "^2.20.1",
|
||||||
|
@ -26,6 +26,7 @@ const metadata = new ChartMetadata({
|
|||||||
description: '',
|
description: '',
|
||||||
name: t('deck.gl Arc'),
|
name: t('deck.gl Arc'),
|
||||||
thumbnail,
|
thumbnail,
|
||||||
|
useLegacyApi: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
export default class ArcChartPlugin extends ChartPlugin {
|
export default class ArcChartPlugin extends ChartPlugin {
|
||||||
|
@ -2,7 +2,7 @@ import { addParameters, configure } from '@storybook/react';
|
|||||||
|
|
||||||
addParameters({
|
addParameters({
|
||||||
options: {
|
options: {
|
||||||
name: '@superset-ui/plugins 🔌💡',
|
name: '@superset-ui/plugins-deckgl 🔌💡',
|
||||||
addonPanelInRight: false,
|
addonPanelInRight: false,
|
||||||
enableShortcuts: false,
|
enableShortcuts: false,
|
||||||
goFullScreen: false,
|
goFullScreen: false,
|
||||||
|
@ -23,12 +23,6 @@ const SIBLING_PACKAGES_PATH_REGEXP = new RegExp(
|
|||||||
module.exports = async ({ config }) => {
|
module.exports = async ({ config }) => {
|
||||||
config.resolve = config.resolve || {};
|
config.resolve = config.resolve || {};
|
||||||
config.resolve.extensions = ['.tsx', '.ts', '.jsx', '.js'];
|
config.resolve.extensions = ['.tsx', '.ts', '.jsx', '.js'];
|
||||||
config.resolve.alias = {
|
|
||||||
...config.resolve.alias,
|
|
||||||
d3$: path.resolve(__dirname, '../../../node_modules/d3/d3.min.js'),
|
|
||||||
nvd3$: path.resolve(__dirname, '../../../node_modules/nvd3/build/nv.d3.min.js'),
|
|
||||||
'datatables.net$': path.resolve(__dirname, '../../../node_modules/datatables.net/js/jquery.dataTables.min.js'),
|
|
||||||
}
|
|
||||||
|
|
||||||
config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/));
|
config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/));
|
||||||
// Avoid parsing large libraries to speed up build
|
// Avoid parsing large libraries to speed up build
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@superset-ui/plugins-deck-gl-demo",
|
"name": "@superset-ui/plugins-demo",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"description": "Storybook for Superset UI Plugins 🔌💡",
|
"description": "Storybook for Superset UI Plugins 🔌💡",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
|
|
||||||
export type Props = {
|
|
||||||
error: Error;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function ErrorMessage({ error }: Props) {
|
|
||||||
return (
|
|
||||||
<div className="alert alert-danger">
|
|
||||||
{error.stack || error.message}
|
|
||||||
{!error.message &&
|
|
||||||
!error.stack &&
|
|
||||||
(typeof error === 'object' ? JSON.stringify(error) : String(error))}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
@ -1,42 +0,0 @@
|
|||||||
import React, { ReactNode } from 'react';
|
|
||||||
|
|
||||||
export type Props = {
|
|
||||||
children: ReactNode;
|
|
||||||
expandableWhat?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
type State = {
|
|
||||||
open: boolean;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default class Expandable extends React.Component<Props, State> {
|
|
||||||
constructor(props: Props) {
|
|
||||||
super(props);
|
|
||||||
this.state = { open: false };
|
|
||||||
this.handleToggle = this.handleToggle.bind(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
handleToggle() {
|
|
||||||
this.setState(({ open }) => ({ open: !open }));
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const { open } = this.state;
|
|
||||||
const { children, expandableWhat } = this.props;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onClick={this.handleToggle}
|
|
||||||
className="btn btn-outline-primary btn-sm"
|
|
||||||
>
|
|
||||||
{`${open ? 'Hide' : 'Show'} ${expandableWhat}`}
|
|
||||||
</button>
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
{open ? children : null}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,116 +0,0 @@
|
|||||||
import React, { ReactNode } from 'react';
|
|
||||||
import { SupersetClient } from '@superset-ui/connection';
|
|
||||||
import ErrorMessage from './ErrorMessage';
|
|
||||||
|
|
||||||
export type Props = {
|
|
||||||
children: ({ payload }: { payload?: object }) => ReactNode;
|
|
||||||
endpoint?: string;
|
|
||||||
host: string;
|
|
||||||
method?: 'POST' | 'GET';
|
|
||||||
postPayload?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
type State = {
|
|
||||||
didVerify: boolean;
|
|
||||||
error?: Error;
|
|
||||||
payload?: object;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const renderError = (error: Error) => (
|
|
||||||
<div>
|
|
||||||
The following error occurred, make sure you have <br />
|
|
||||||
1) configured CORS in Superset to receive requests from this domain. <br />
|
|
||||||
2) set the Superset host correctly below. <br />
|
|
||||||
3) debug the CORS configuration under the `@superset-ui/connection` stories.
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<ErrorMessage error={error} />
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
|
|
||||||
export default class VerifyCORS extends React.Component<Props, State> {
|
|
||||||
constructor(props: Props) {
|
|
||||||
super(props);
|
|
||||||
this.state = { didVerify: false };
|
|
||||||
this.handleVerify = this.handleVerify.bind(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidUpdate(prevProps: Props) {
|
|
||||||
const { endpoint, host, postPayload, method } = this.props;
|
|
||||||
if (
|
|
||||||
(this.state.didVerify || this.state.error) &&
|
|
||||||
(prevProps.endpoint !== endpoint ||
|
|
||||||
prevProps.host !== host ||
|
|
||||||
prevProps.postPayload !== postPayload ||
|
|
||||||
prevProps.method !== method)
|
|
||||||
) {
|
|
||||||
// eslint-disable-next-line react/no-did-update-set-state
|
|
||||||
this.setState({ didVerify: false, error: undefined });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
handleVerify() {
|
|
||||||
const { endpoint, host, postPayload, method } = this.props;
|
|
||||||
|
|
||||||
SupersetClient.reset();
|
|
||||||
|
|
||||||
SupersetClient.configure({
|
|
||||||
credentials: 'include',
|
|
||||||
host,
|
|
||||||
mode: 'cors',
|
|
||||||
})
|
|
||||||
.init()
|
|
||||||
.then(() =>
|
|
||||||
// Test an endpoint if specified
|
|
||||||
endpoint
|
|
||||||
? SupersetClient.request({
|
|
||||||
endpoint,
|
|
||||||
method,
|
|
||||||
postPayload: postPayload ? JSON.parse(postPayload) : '',
|
|
||||||
})
|
|
||||||
: Promise.resolve({}),
|
|
||||||
)
|
|
||||||
.then(response => this.setState({ didVerify: true, error: undefined, payload: response }))
|
|
||||||
.catch((error: Response) => {
|
|
||||||
const { status, statusText = error } = error;
|
|
||||||
this.setState({ error: Error(`${status || ''}${status ? ':' : ''} ${statusText}`) });
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const { didVerify, error, payload } = this.state;
|
|
||||||
const { children } = this.props;
|
|
||||||
|
|
||||||
return didVerify ? (
|
|
||||||
children({ payload })
|
|
||||||
) : (
|
|
||||||
<div className="row">
|
|
||||||
<div className="col-md-10">
|
|
||||||
This example requires CORS requests from this domain. <br />
|
|
||||||
<br />
|
|
||||||
1) enable CORS requests in your Superset App from{' '}
|
|
||||||
<code>{`${window.location.origin}`}</code>
|
|
||||||
<br />
|
|
||||||
2) configure your Superset App host name below <br />
|
|
||||||
3) click "Verify" to authenticate and fetch data for your test UI. <br />
|
|
||||||
<br />
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onClick={this.handleVerify}
|
|
||||||
className="btn btn-outline-primary btn-sm"
|
|
||||||
>
|
|
||||||
Verify
|
|
||||||
</button>
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{error && (
|
|
||||||
<div className="col-md-8">
|
|
||||||
<ErrorMessage error={error} />
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,82 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import { text, select } from '@storybook/addon-knobs';
|
|
||||||
import { SuperChart, ChartDataProvider } from '@superset-ui/chart';
|
|
||||||
import { SupersetClient } from '@superset-ui/connection';
|
|
||||||
import Expandable from './Expandable';
|
|
||||||
import VerifyCORS, { renderError } from './VerifyCORS';
|
|
||||||
|
|
||||||
export default function createQueryStory({
|
|
||||||
choices,
|
|
||||||
storyName = 'Queries',
|
|
||||||
storyPath = '',
|
|
||||||
}: {
|
|
||||||
choices: {
|
|
||||||
[key: string]: {
|
|
||||||
chartType: string;
|
|
||||||
formData: {
|
|
||||||
[key: string]: any;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
storyName: string;
|
|
||||||
storyPath: string;
|
|
||||||
}) {
|
|
||||||
const keys = Object.keys(choices);
|
|
||||||
|
|
||||||
return {
|
|
||||||
renderStory: () => {
|
|
||||||
const host = text('Set Superset App host for CORS request', 'localhost:8088');
|
|
||||||
const mode = select('Choose mode:', keys, keys[0]);
|
|
||||||
const { formData: presetFormData, chartType } = choices[mode];
|
|
||||||
const width = text('Vis width', '400');
|
|
||||||
const height = text('Vis height', '400');
|
|
||||||
const formData = text('Override formData', JSON.stringify(presetFormData, null, 2));
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div style={{ margin: 16 }}>
|
|
||||||
<VerifyCORS host={host}>
|
|
||||||
{() => (
|
|
||||||
<ChartDataProvider
|
|
||||||
client={SupersetClient}
|
|
||||||
formData={JSON.parse(formData.replace(/"/g, '"'))}
|
|
||||||
>
|
|
||||||
{({ loading, payload, error }) => {
|
|
||||||
if (loading) return <div>Loading!</div>;
|
|
||||||
|
|
||||||
if (error) return renderError(error);
|
|
||||||
|
|
||||||
if (payload)
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<SuperChart
|
|
||||||
chartType={chartType}
|
|
||||||
width={width}
|
|
||||||
height={height}
|
|
||||||
formData={payload.formData}
|
|
||||||
// @TODO fix typing
|
|
||||||
// all vis's now expect objects but api/v1/ returns an array
|
|
||||||
queryData={
|
|
||||||
Array.isArray(payload.queryData)
|
|
||||||
? payload.queryData[0]
|
|
||||||
: payload.queryData
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
<br />
|
|
||||||
<Expandable expandableWhat="payload">
|
|
||||||
<pre style={{ fontSize: 11 }}>{JSON.stringify(payload, null, 2)}</pre>
|
|
||||||
</Expandable>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}}
|
|
||||||
</ChartDataProvider>
|
|
||||||
)}
|
|
||||||
</VerifyCORS>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
storyName,
|
|
||||||
storyPath,
|
|
||||||
};
|
|
||||||
}
|
|
@ -0,0 +1,80 @@
|
|||||||
|
/* eslint-disable no-magic-numbers */
|
||||||
|
import React from 'react';
|
||||||
|
import { SuperChart } from '@superset-ui/chart';
|
||||||
|
import payload from './payload';
|
||||||
|
import dummyDatasource from '../../../shared/dummyDatasource';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
renderStory: () => (
|
||||||
|
<SuperChart
|
||||||
|
chartType="deck_arc"
|
||||||
|
width={400}
|
||||||
|
height={400}
|
||||||
|
datasource={dummyDatasource}
|
||||||
|
queryData={payload}
|
||||||
|
formData={{
|
||||||
|
"datasource": "10__table",
|
||||||
|
"viz_type": "deck_arc",
|
||||||
|
"granularity_sqla": "dttm",
|
||||||
|
"time_grain_sqla": null,
|
||||||
|
"time_range": " : ",
|
||||||
|
"start_spatial": {
|
||||||
|
"latCol": "LATITUDE",
|
||||||
|
"lonCol": "LONGITUDE",
|
||||||
|
"type": "latlong"
|
||||||
|
},
|
||||||
|
"end_spatial": {
|
||||||
|
"latCol": "LATITUDE_DEST",
|
||||||
|
"lonCol": "LONGITUDE_DEST",
|
||||||
|
"type": "latlong"
|
||||||
|
},
|
||||||
|
"row_limit": 5000,
|
||||||
|
"filter_nulls": true,
|
||||||
|
"adhoc_filters": [],
|
||||||
|
"mapbox_style": "mapbox://styles/mapbox/light-v9",
|
||||||
|
"viewport": {
|
||||||
|
"altitude": 1.5,
|
||||||
|
"bearing": 8.546256357301871,
|
||||||
|
"height": 642,
|
||||||
|
"latitude": 44.596651438714254,
|
||||||
|
"longitude": -91.84340711201104,
|
||||||
|
"maxLatitude": 85.05113,
|
||||||
|
"maxPitch": 60,
|
||||||
|
"maxZoom": 20,
|
||||||
|
"minLatitude": -85.05113,
|
||||||
|
"minPitch": 0,
|
||||||
|
"minZoom": 0,
|
||||||
|
"pitch": 60,
|
||||||
|
"width": 997,
|
||||||
|
"zoom": 2.929837070560775
|
||||||
|
},
|
||||||
|
"autozoom": true,
|
||||||
|
"color_picker": {
|
||||||
|
"a": 1,
|
||||||
|
"b": 135,
|
||||||
|
"g": 122,
|
||||||
|
"r": 0
|
||||||
|
},
|
||||||
|
"target_color_picker": {
|
||||||
|
"r": 0,
|
||||||
|
"g": 122,
|
||||||
|
"b": 135,
|
||||||
|
"a": 1
|
||||||
|
},
|
||||||
|
"dimension": null,
|
||||||
|
"label_colors": {},
|
||||||
|
"stroke_width": 1,
|
||||||
|
"legend_position": "tr",
|
||||||
|
"legend_format": null,
|
||||||
|
"js_columns": [],
|
||||||
|
"js_data_mutator": "",
|
||||||
|
"js_tooltip": "",
|
||||||
|
"js_onclick_href": ""
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
storyName: 'Basic',
|
||||||
|
storyPath: 'legacy-|preset-chart-deckgl|ArcChartPlugin',
|
||||||
|
},
|
||||||
|
];
|
@ -0,0 +1,8 @@
|
|||||||
|
import { ArcChartPlugin } from '../../../../../superset-ui-legacy-preset-chart-deckgl/src';
|
||||||
|
import Stories from './Stories';
|
||||||
|
|
||||||
|
new ArcChartPlugin().configure({ key: 'deck_arc' }).register();
|
||||||
|
|
||||||
|
export default {
|
||||||
|
examples: [...Stories],
|
||||||
|
};
|
@ -0,0 +1,363 @@
|
|||||||
|
/* eslint-disable sort-keys, no-magic-numbers */
|
||||||
|
|
||||||
|
export default {
|
||||||
|
"cache_key": null,
|
||||||
|
"cached_dttm": null,
|
||||||
|
"cache_timeout": 86400,
|
||||||
|
"error": null,
|
||||||
|
"form_data": {
|
||||||
|
"datasource": "10__table",
|
||||||
|
"viz_type": "deck_arc",
|
||||||
|
"slice_id": 71,
|
||||||
|
"url_params": {},
|
||||||
|
"granularity_sqla": "dttm",
|
||||||
|
"time_grain_sqla": null,
|
||||||
|
"time_range": " : ",
|
||||||
|
"start_spatial": {
|
||||||
|
"type": "latlong",
|
||||||
|
"latCol": "LATITUDE",
|
||||||
|
"lonCol": "LONGITUDE"
|
||||||
|
},
|
||||||
|
"end_spatial": {
|
||||||
|
"type": "latlong",
|
||||||
|
"latCol": "LATITUDE_DEST",
|
||||||
|
"lonCol": "LONGITUDE_DEST"
|
||||||
|
},
|
||||||
|
"row_limit": 5000,
|
||||||
|
"filter_nulls": true,
|
||||||
|
"adhoc_filters": [
|
||||||
|
{
|
||||||
|
"clause": "WHERE",
|
||||||
|
"expressionType": "SIMPLE",
|
||||||
|
"filterOptionName": "1b92e906-53a1-48e2-8e45-056fc5c9d2dc",
|
||||||
|
"comparator": "",
|
||||||
|
"operator": "IS NOT NULL",
|
||||||
|
"subject": "LATITUDE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"clause": "WHERE",
|
||||||
|
"expressionType": "SIMPLE",
|
||||||
|
"filterOptionName": "0ec864e8-e3e1-42cc-b0f8-4620dfc1c806",
|
||||||
|
"comparator": "",
|
||||||
|
"operator": "IS NOT NULL",
|
||||||
|
"subject": "LATITUDE_DEST"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"clause": "WHERE",
|
||||||
|
"expressionType": "SIMPLE",
|
||||||
|
"filterOptionName": "ecf4d524-eb35-45a8-b928-91398ebcf498",
|
||||||
|
"comparator": "",
|
||||||
|
"operator": "IS NOT NULL",
|
||||||
|
"subject": "LONGITUDE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"clause": "WHERE",
|
||||||
|
"expressionType": "SIMPLE",
|
||||||
|
"filterOptionName": "5297586e-9c42-4c5a-bd5d-8a5fed4d698f",
|
||||||
|
"comparator": "",
|
||||||
|
"operator": "IS NOT NULL",
|
||||||
|
"subject": "LONGITUDE_DEST"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"mapbox_style": "mapbox://styles/mapbox/light-v9",
|
||||||
|
"viewport": {
|
||||||
|
"altitude": 1.5,
|
||||||
|
"bearing": 8.546256357301871,
|
||||||
|
"height": 642,
|
||||||
|
"latitude": 44.596651438714254,
|
||||||
|
"longitude": -91.84340711201104,
|
||||||
|
"maxLatitude": 85.05113,
|
||||||
|
"maxPitch": 60,
|
||||||
|
"maxZoom": 20,
|
||||||
|
"minLatitude": -85.05113,
|
||||||
|
"minPitch": 0,
|
||||||
|
"minZoom": 0,
|
||||||
|
"pitch": 60,
|
||||||
|
"width": 997,
|
||||||
|
"zoom": 2.929837070560775
|
||||||
|
},
|
||||||
|
"autozoom": true,
|
||||||
|
"color_picker": {
|
||||||
|
"a": 1,
|
||||||
|
"b": 135,
|
||||||
|
"g": 122,
|
||||||
|
"r": 0
|
||||||
|
},
|
||||||
|
"target_color_picker": {
|
||||||
|
"r": 0,
|
||||||
|
"g": 122,
|
||||||
|
"b": 135,
|
||||||
|
"a": 1
|
||||||
|
},
|
||||||
|
"dimension": null,
|
||||||
|
"color_scheme": "bnbColors",
|
||||||
|
"label_colors": {},
|
||||||
|
"stroke_width": 1,
|
||||||
|
"legend_position": "tr",
|
||||||
|
"legend_format": null,
|
||||||
|
"js_columns": [],
|
||||||
|
"where": "",
|
||||||
|
"having": "",
|
||||||
|
"having_filters": [],
|
||||||
|
"filters": [
|
||||||
|
{
|
||||||
|
"col": "LATITUDE",
|
||||||
|
"op": "IS NOT NULL",
|
||||||
|
"val": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"col": "LATITUDE_DEST",
|
||||||
|
"op": "IS NOT NULL",
|
||||||
|
"val": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"col": "LONGITUDE",
|
||||||
|
"op": "IS NOT NULL",
|
||||||
|
"val": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"col": "LONGITUDE_DEST",
|
||||||
|
"op": "IS NOT NULL",
|
||||||
|
"val": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"is_cached": false,
|
||||||
|
"query": "SELECT \"LATITUDE\" AS \"LATITUDE\",\n \"LONGITUDE\" AS \"LONGITUDE\",\n \"LONGITUDE_DEST\" AS \"LONGITUDE_DEST\",\n \"LATITUDE_DEST\" AS \"LATITUDE_DEST\"\nFROM flights\nWHERE \"LATITUDE\" IS NOT NULL\n AND \"LATITUDE_DEST\" IS NOT NULL\n AND \"LONGITUDE\" IS NOT NULL\n AND \"LONGITUDE_DEST\" IS NOT NULL\nLIMIT 5000\nOFFSET 0",
|
||||||
|
"status": "success",
|
||||||
|
"stacktrace": null,
|
||||||
|
"rowcount": 5000,
|
||||||
|
"data": {
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"sourcePosition": [
|
||||||
|
-149.99618999999998,
|
||||||
|
61.174319999999994
|
||||||
|
],
|
||||||
|
"targetPosition": [
|
||||||
|
-122.30931000000001,
|
||||||
|
47.44898
|
||||||
|
],
|
||||||
|
"cat_color": null,
|
||||||
|
"__timestamp": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sourcePosition": [
|
||||||
|
-118.40807,
|
||||||
|
33.94254
|
||||||
|
],
|
||||||
|
"targetPosition": [
|
||||||
|
-80.09559,
|
||||||
|
26.683159999999997
|
||||||
|
],
|
||||||
|
"cat_color": null,
|
||||||
|
"__timestamp": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sourcePosition": [
|
||||||
|
-122.37483999999999,
|
||||||
|
37.619
|
||||||
|
],
|
||||||
|
"targetPosition": [
|
||||||
|
-80.94313000000001,
|
||||||
|
35.214009999999995
|
||||||
|
],
|
||||||
|
"cat_color": null,
|
||||||
|
"__timestamp": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sourcePosition": [
|
||||||
|
-118.40807,
|
||||||
|
33.94254
|
||||||
|
],
|
||||||
|
"targetPosition": [
|
||||||
|
-80.29056,
|
||||||
|
25.79325
|
||||||
|
],
|
||||||
|
"cat_color": null,
|
||||||
|
"__timestamp": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sourcePosition": [
|
||||||
|
-122.30931000000001,
|
||||||
|
47.44898
|
||||||
|
],
|
||||||
|
"targetPosition": [
|
||||||
|
-149.99618999999998,
|
||||||
|
61.174319999999994
|
||||||
|
],
|
||||||
|
"cat_color": null,
|
||||||
|
"__timestamp": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sourcePosition": [
|
||||||
|
-122.37483999999999,
|
||||||
|
37.619
|
||||||
|
],
|
||||||
|
"targetPosition": [
|
||||||
|
-93.21692,
|
||||||
|
44.88055
|
||||||
|
],
|
||||||
|
"cat_color": null,
|
||||||
|
"__timestamp": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sourcePosition": [
|
||||||
|
-115.15233,
|
||||||
|
36.08036
|
||||||
|
],
|
||||||
|
"targetPosition": [
|
||||||
|
-93.21692,
|
||||||
|
44.88055
|
||||||
|
],
|
||||||
|
"cat_color": null,
|
||||||
|
"__timestamp": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sourcePosition": [
|
||||||
|
-118.40807,
|
||||||
|
33.94254
|
||||||
|
],
|
||||||
|
"targetPosition": [
|
||||||
|
-80.94313000000001,
|
||||||
|
35.214009999999995
|
||||||
|
],
|
||||||
|
"cat_color": null,
|
||||||
|
"__timestamp": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sourcePosition": [
|
||||||
|
-122.37483999999999,
|
||||||
|
37.619
|
||||||
|
],
|
||||||
|
"targetPosition": [
|
||||||
|
-97.0372,
|
||||||
|
32.89595
|
||||||
|
],
|
||||||
|
"cat_color": null,
|
||||||
|
"__timestamp": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sourcePosition": [
|
||||||
|
-115.15233,
|
||||||
|
36.08036
|
||||||
|
],
|
||||||
|
"targetPosition": [
|
||||||
|
-84.42694,
|
||||||
|
33.640440000000005
|
||||||
|
],
|
||||||
|
"cat_color": null,
|
||||||
|
"__timestamp": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sourcePosition": [
|
||||||
|
-104.667,
|
||||||
|
39.85841
|
||||||
|
],
|
||||||
|
"targetPosition": [
|
||||||
|
-84.42694,
|
||||||
|
33.640440000000005
|
||||||
|
],
|
||||||
|
"cat_color": null,
|
||||||
|
"__timestamp": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sourcePosition": [
|
||||||
|
-115.15233,
|
||||||
|
36.08036
|
||||||
|
],
|
||||||
|
"targetPosition": [
|
||||||
|
-80.29056,
|
||||||
|
25.79325
|
||||||
|
],
|
||||||
|
"cat_color": null,
|
||||||
|
"__timestamp": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sourcePosition": [
|
||||||
|
-118.40807,
|
||||||
|
33.94254
|
||||||
|
],
|
||||||
|
"targetPosition": [
|
||||||
|
-93.21692,
|
||||||
|
44.88055
|
||||||
|
],
|
||||||
|
"cat_color": null,
|
||||||
|
"__timestamp": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sourcePosition": [
|
||||||
|
-111.97776999999999,
|
||||||
|
40.78839
|
||||||
|
],
|
||||||
|
"targetPosition": [
|
||||||
|
-84.42694,
|
||||||
|
33.640440000000005
|
||||||
|
],
|
||||||
|
"cat_color": null,
|
||||||
|
"__timestamp": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sourcePosition": [
|
||||||
|
-122.30931000000001,
|
||||||
|
47.44898
|
||||||
|
],
|
||||||
|
"targetPosition": [
|
||||||
|
-93.21692,
|
||||||
|
44.88055
|
||||||
|
],
|
||||||
|
"cat_color": null,
|
||||||
|
"__timestamp": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sourcePosition": [
|
||||||
|
-149.99618999999998,
|
||||||
|
61.174319999999994
|
||||||
|
],
|
||||||
|
"targetPosition": [
|
||||||
|
-122.30931000000001,
|
||||||
|
47.44898
|
||||||
|
],
|
||||||
|
"cat_color": null,
|
||||||
|
"__timestamp": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sourcePosition": [
|
||||||
|
-149.99618999999998,
|
||||||
|
61.174319999999994
|
||||||
|
],
|
||||||
|
"targetPosition": [
|
||||||
|
-122.30931000000001,
|
||||||
|
47.44898
|
||||||
|
],
|
||||||
|
"cat_color": null,
|
||||||
|
"__timestamp": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sourcePosition": [
|
||||||
|
-122.37483999999999,
|
||||||
|
37.619
|
||||||
|
],
|
||||||
|
"targetPosition": [
|
||||||
|
-95.33972,
|
||||||
|
29.98047
|
||||||
|
],
|
||||||
|
"cat_color": null,
|
||||||
|
"__timestamp": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sourcePosition": [
|
||||||
|
-149.99618999999998,
|
||||||
|
61.174319999999994
|
||||||
|
],
|
||||||
|
"targetPosition": [
|
||||||
|
-122.5975,
|
||||||
|
45.58872
|
||||||
|
],
|
||||||
|
"cat_color": null,
|
||||||
|
"__timestamp": null
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"mapboxApiKey": "pk.eyJ1Ijoia3Jpc3R3IiwiYSI6ImNqbGg1N242NTFlczczdnBhazViMjgzZ2sifQ.lUneM-o3NucXN189EYyXxQ"
|
||||||
|
}
|
||||||
|
}
|
@ -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: () => (
|
|
||||||
<SuperChart
|
|
||||||
id="stacked-area-chart"
|
|
||||||
chartType="area"
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
bottomMargin: 'auto',
|
|
||||||
colorScheme: 'd3Category10',
|
|
||||||
contribution: false,
|
|
||||||
groupby: ['region'],
|
|
||||||
lineInterpolation: 'linear',
|
|
||||||
metrics: ['sum__SP_POP_TOTL'],
|
|
||||||
richTooltip: true,
|
|
||||||
showBrush: 'auto',
|
|
||||||
showControls: false,
|
|
||||||
showLegend: true,
|
|
||||||
stackedStyle: 'stack',
|
|
||||||
vizType: 'area',
|
|
||||||
xAxisFormat: '%Y',
|
|
||||||
xAxisLabel: '',
|
|
||||||
xAxisShowminmax: false,
|
|
||||||
xTicksLayout: 'auto',
|
|
||||||
yAxisBounds: [null, null],
|
|
||||||
yAxisFormat: '.3s',
|
|
||||||
yLogScale: false,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
storyName: 'Stacked',
|
|
||||||
storyPath: 'legacy-|preset-chart-nvd3|AreaChartPlugin',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
renderStory: () => (
|
|
||||||
<SuperChart
|
|
||||||
chartType="area"
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
bottomMargin: 'auto',
|
|
||||||
colorCcheme: 'd3Category10',
|
|
||||||
contribution: false,
|
|
||||||
groupby: ['region'],
|
|
||||||
lineInterpolation: 'linear',
|
|
||||||
metrics: ['sum__SP_POP_TOTL'],
|
|
||||||
richTooltip: true,
|
|
||||||
showBrush: 'auto',
|
|
||||||
showControls: false,
|
|
||||||
showLegend: true,
|
|
||||||
stackedStyle: 'stack',
|
|
||||||
vizType: 'area',
|
|
||||||
xAxisFormat: '%Y',
|
|
||||||
xAxisLabel: '',
|
|
||||||
xAxisShowminmax: false,
|
|
||||||
xTicksLayout: 'auto',
|
|
||||||
yAxisBounds: [0, 3000000000],
|
|
||||||
yAxisFormat: '.3s',
|
|
||||||
yLogScale: false,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
storyName: 'Stacked with yAxisBounds',
|
|
||||||
storyPath: 'legacy-|preset-chart-nvd3|AreaChartPlugin',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
renderStory: () => (
|
|
||||||
<SuperChart
|
|
||||||
chartType="area"
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
bottomMargin: 'auto',
|
|
||||||
colorCcheme: 'd3Category10',
|
|
||||||
contribution: false,
|
|
||||||
groupby: ['region'],
|
|
||||||
lineInterpolation: 'linear',
|
|
||||||
metrics: ['sum__SP_POP_TOTL'],
|
|
||||||
richTooltip: true,
|
|
||||||
showBrush: 'auto',
|
|
||||||
showControls: true,
|
|
||||||
showLegend: true,
|
|
||||||
stackedStyle: 'stack',
|
|
||||||
vizType: 'area',
|
|
||||||
xAxisFormat: '%Y',
|
|
||||||
xAxisLabel: '',
|
|
||||||
xAxisShowminmax: false,
|
|
||||||
xTicksLayout: 'auto',
|
|
||||||
yAxisBounds: [1000000000, null],
|
|
||||||
yAxisFormat: '.3s',
|
|
||||||
yLogScale: false,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
storyName: 'Stacked with yAxisBounds min only',
|
|
||||||
storyPath: 'legacy-|preset-chart-nvd3|AreaChartPlugin',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
renderStory: () => (
|
|
||||||
<SuperChart
|
|
||||||
chartType="area"
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
bottomMargin: 'auto',
|
|
||||||
colorCcheme: 'd3Category10',
|
|
||||||
contribution: false,
|
|
||||||
groupby: ['region'],
|
|
||||||
lineInterpolation: 'linear',
|
|
||||||
metrics: ['sum__SP_POP_TOTL'],
|
|
||||||
richTooltip: true,
|
|
||||||
showBrush: 'auto',
|
|
||||||
showControls: false,
|
|
||||||
showLegend: true,
|
|
||||||
stackedStyle: 'expand',
|
|
||||||
vizType: 'area',
|
|
||||||
xAxisFormat: '%Y',
|
|
||||||
xAxisLabel: '',
|
|
||||||
xAxisShowminmax: false,
|
|
||||||
xTicksLayout: 'auto',
|
|
||||||
yAxisBounds: [null, null],
|
|
||||||
yAxisFormat: '.3s',
|
|
||||||
yLogScale: false,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
storyName: 'Expanded',
|
|
||||||
storyPath: 'legacy-|preset-chart-nvd3|AreaChartPlugin',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
renderStory: () => (
|
|
||||||
<SuperChart
|
|
||||||
chartType="area"
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
bottomMargin: 'auto',
|
|
||||||
colorCcheme: 'd3Category10',
|
|
||||||
contribution: false,
|
|
||||||
groupby: ['region'],
|
|
||||||
lineInterpolation: 'linear',
|
|
||||||
metrics: ['sum__SP_POP_TOTL'],
|
|
||||||
richTooltip: true,
|
|
||||||
showBrush: 'auto',
|
|
||||||
showControls: true,
|
|
||||||
showLegend: true,
|
|
||||||
stackedStyle: 'stack',
|
|
||||||
vizType: 'area',
|
|
||||||
xAxisFormat: '%Y',
|
|
||||||
xAxisLabel: '',
|
|
||||||
xAxisShowminmax: false,
|
|
||||||
xTicksLayout: 'auto',
|
|
||||||
yAxisBounds: [null, null],
|
|
||||||
yAxisFormat: '.3s',
|
|
||||||
yLogScale: false,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
storyName: 'Controls Shown',
|
|
||||||
storyPath: 'legacy-|preset-chart-nvd3|AreaChartPlugin',
|
|
||||||
},
|
|
||||||
];
|
|
File diff suppressed because it is too large
Load Diff
@ -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],
|
|
||||||
};
|
|
@ -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: () => (
|
|
||||||
<SuperChart
|
|
||||||
chartType="bar"
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
bottomMargin: 'auto',
|
|
||||||
colorScheme: 'd3Category10',
|
|
||||||
contribution: false,
|
|
||||||
groupby: ['region'],
|
|
||||||
lineInterpolation: 'linear',
|
|
||||||
metrics: ['sum__SP_POP_TOTL'],
|
|
||||||
richTooltip: true,
|
|
||||||
showBarValue: false,
|
|
||||||
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: 'Basic',
|
|
||||||
storyPath: 'legacy-|preset-chart-nvd3|BarChartPlugin',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
renderStory: () => (
|
|
||||||
<SuperChart
|
|
||||||
chartType="bar"
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
bottomMargin: 'auto',
|
|
||||||
colorCcheme: '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 values',
|
|
||||||
storyPath: 'legacy-|preset-chart-nvd3|BarChartPlugin',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
renderStory: () => (
|
|
||||||
<SuperChart
|
|
||||||
chartType="bar"
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{
|
|
||||||
data: data.map((group, i) => ({
|
|
||||||
...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: () => (
|
|
||||||
<SuperChart
|
|
||||||
chartType="bar"
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
barStacked: true,
|
|
||||||
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: 'Stacked bar with values',
|
|
||||||
storyPath: 'legacy-|preset-chart-nvd3|BarChartPlugin',
|
|
||||||
},
|
|
||||||
];
|
|
@ -1,228 +0,0 @@
|
|||||||
/* eslint-disable sort-keys */
|
|
||||||
export default [
|
|
||||||
{
|
|
||||||
key: ['East Asia & Pacific'],
|
|
||||||
values: [
|
|
||||||
{
|
|
||||||
x: -315619200000.0,
|
|
||||||
y: 1031863394.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -283996800000.0,
|
|
||||||
y: 1034767718.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -252460800000.0,
|
|
||||||
y: 1048537618.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -220924800000.0,
|
|
||||||
y: 1073600747.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -189388800000.0,
|
|
||||||
y: 1098305025.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -157766400000.0,
|
|
||||||
y: 1124077872.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -126230400000.0,
|
|
||||||
y: 1153296196.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -94694400000.0,
|
|
||||||
y: 1181582226.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -63158400000.0,
|
|
||||||
y: 1210302481.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -31536000000.0,
|
|
||||||
y: 1242569208.0,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: ['South Asia'],
|
|
||||||
values: [
|
|
||||||
{
|
|
||||||
x: -315619200000.0,
|
|
||||||
y: 572036107.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -283996800000.0,
|
|
||||||
y: 584143236.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -252460800000.0,
|
|
||||||
y: 596701125.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -220924800000.0,
|
|
||||||
y: 609571502.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -189388800000.0,
|
|
||||||
y: 623073110.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -157766400000.0,
|
|
||||||
y: 636963781.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -126230400000.0,
|
|
||||||
y: 651325994.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -94694400000.0,
|
|
||||||
y: 666134328.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -63158400000.0,
|
|
||||||
y: 681405837.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -31536000000.0,
|
|
||||||
y: 697060567.0,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: ['Europe & Central Asia'],
|
|
||||||
values: [
|
|
||||||
{
|
|
||||||
x: -315619200000.0,
|
|
||||||
y: 660881033.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -283996800000.0,
|
|
||||||
y: 668526708.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -252460800000.0,
|
|
||||||
y: 676418331.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -220924800000.0,
|
|
||||||
y: 684369825.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -189388800000.0,
|
|
||||||
y: 692233988.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -157766400000.0,
|
|
||||||
y: 699849949.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -126230400000.0,
|
|
||||||
y: 706459925.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -94694400000.0,
|
|
||||||
y: 712871897.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -63158400000.0,
|
|
||||||
y: 719034272.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -31536000000.0,
|
|
||||||
y: 725099571.0,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: ['Sub-Saharan Africa'],
|
|
||||||
values: [
|
|
||||||
{
|
|
||||||
x: -315619200000.0,
|
|
||||||
y: 228268752.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -283996800000.0,
|
|
||||||
y: 233759990.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -252460800000.0,
|
|
||||||
y: 239403621.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -220924800000.0,
|
|
||||||
y: 245217050.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -189388800000.0,
|
|
||||||
y: 251215851.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -157766400000.0,
|
|
||||||
y: 257414930.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -126230400000.0,
|
|
||||||
y: 263830697.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -94694400000.0,
|
|
||||||
y: 270477558.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -63158400000.0,
|
|
||||||
y: 277365472.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -31536000000.0,
|
|
||||||
y: 284502453.0,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: ['Latin America & Caribbean'],
|
|
||||||
values: [
|
|
||||||
{
|
|
||||||
x: -315619200000.0,
|
|
||||||
y: 220564224.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -283996800000.0,
|
|
||||||
y: 226764342.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -252460800000.0,
|
|
||||||
y: 233183206.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -220924800000.0,
|
|
||||||
y: 239771182.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -189388800000.0,
|
|
||||||
y: 246458356.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -157766400000.0,
|
|
||||||
y: 253195267.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -126230400000.0,
|
|
||||||
y: 259965218.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -94694400000.0,
|
|
||||||
y: 266776414.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -63158400000.0,
|
|
||||||
y: 273654630.0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
x: -31536000000.0,
|
|
||||||
y: 280641049.0,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
@ -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],
|
|
||||||
};
|
|
@ -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: () => (
|
|
||||||
<SuperChart
|
|
||||||
chartType="box-plot"
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
colorScheme: 'd3Category10',
|
|
||||||
vizType: 'box_plot',
|
|
||||||
whiskerOptions: 'Min/max (no outliers)',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
storyName: 'Basic',
|
|
||||||
storyPath: 'legacy-|preset-chart-nvd3|BoxPlotChartPlugin',
|
|
||||||
},
|
|
||||||
];
|
|
@ -1,58 +0,0 @@
|
|||||||
/* eslint-disable sort-keys, no-magic-numbers */
|
|
||||||
export default [
|
|
||||||
{
|
|
||||||
label: 'East Asia & Pacific',
|
|
||||||
values: {
|
|
||||||
Q1: 1384725172.5,
|
|
||||||
Q2: 1717904169.0,
|
|
||||||
Q3: 2032724922.5,
|
|
||||||
whisker_high: 2240687901.0,
|
|
||||||
whisker_low: 1031863394.0,
|
|
||||||
outliers: [],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'Europe & Central Asia',
|
|
||||||
values: {
|
|
||||||
Q1: 751386460.5,
|
|
||||||
Q2: 820716895.0,
|
|
||||||
Q3: 862814192.5,
|
|
||||||
whisker_high: 903095786.0,
|
|
||||||
whisker_low: 660881033.0,
|
|
||||||
outliers: [],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'Latin America & Caribbean',
|
|
||||||
values: {
|
|
||||||
Q1: 313690832.5,
|
|
||||||
Q2: 421490233.0,
|
|
||||||
Q3: 529668114.5,
|
|
||||||
whisker_high: 626270167.0,
|
|
||||||
whisker_low: 220564224.0,
|
|
||||||
outliers: [],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'South Asia',
|
|
||||||
values: {
|
|
||||||
Q1: 772373036.5,
|
|
||||||
Q2: 1059570231.0,
|
|
||||||
Q3: 1398841234.0,
|
|
||||||
whisker_high: 1720976995.0,
|
|
||||||
whisker_low: 572036107.0,
|
|
||||||
outliers: [],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'Sub-Saharan Africa',
|
|
||||||
values: {
|
|
||||||
Q1: 320037758.0,
|
|
||||||
Q2: 467337821.0,
|
|
||||||
Q3: 676768689.0,
|
|
||||||
whisker_high: 974315323.0,
|
|
||||||
whisker_low: 228268752.0,
|
|
||||||
outliers: [],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
@ -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],
|
|
||||||
};
|
|
@ -1,44 +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: () => (
|
|
||||||
<SuperChart
|
|
||||||
chartType="bubble"
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
annotationData: {},
|
|
||||||
bottomMargin: 'auto',
|
|
||||||
colorScheme: 'd3Category10',
|
|
||||||
entity: 'country_name',
|
|
||||||
leftMargin: 'auto',
|
|
||||||
maxBubbleSize: '50',
|
|
||||||
series: 'region',
|
|
||||||
showLegend: true,
|
|
||||||
size: 'sum__SP_POP_TOTL',
|
|
||||||
vizType: 'bubble',
|
|
||||||
x: 'sum__SP_RUR_TOTL_ZS',
|
|
||||||
xAxisFormat: '.3s',
|
|
||||||
xAxisLabel: 'x-axis label',
|
|
||||||
xAxisShowminmax: false,
|
|
||||||
xLogScale: false,
|
|
||||||
xTicksLayout: 'auto',
|
|
||||||
y: 'sum__SP_DYN_LE00_IN',
|
|
||||||
yAxisFormat: '.3s',
|
|
||||||
yAxisLabel: '',
|
|
||||||
yAxisShowminmax: false,
|
|
||||||
yLogScale: false,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
storyName: 'Basic',
|
|
||||||
storyPath: 'legacy-|preset-chart-nvd3|BubbleChartPlugin',
|
|
||||||
},
|
|
||||||
];
|
|
@ -1,338 +0,0 @@
|
|||||||
/* 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',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
@ -1,8 +0,0 @@
|
|||||||
import { BubbleChartPlugin } from '../../../../../superset-ui-legacy-preset-chart-nvd3';
|
|
||||||
import Stories from './Stories';
|
|
||||||
|
|
||||||
new BubbleChartPlugin().configure({ key: 'bubble' }).register();
|
|
||||||
|
|
||||||
export default {
|
|
||||||
examples: [...Stories],
|
|
||||||
};
|
|
@ -1,37 +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: () => (
|
|
||||||
<SuperChart
|
|
||||||
chartType="compare"
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
bottomMargin: 'auto',
|
|
||||||
colorScheme: 'd3Category10',
|
|
||||||
contribution: false,
|
|
||||||
leftMargin: 'auto',
|
|
||||||
vizType: 'compare',
|
|
||||||
xAxisFormat: 'smart_date',
|
|
||||||
xAxisLabel: '',
|
|
||||||
xAxisShowminmax: false,
|
|
||||||
xTicksLayout: 'auto',
|
|
||||||
yAxisBounds: [null, null],
|
|
||||||
yAxisFormat: '.3s',
|
|
||||||
yAxisLabel: '',
|
|
||||||
yAxisShowminmax: false,
|
|
||||||
yLogscale: false,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
storyName: 'Basic',
|
|
||||||
storyPath: 'legacy-|preset-chart-nvd3|CompareChartPlugin',
|
|
||||||
},
|
|
||||||
];
|
|
@ -1,908 +0,0 @@
|
|||||||
/* 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,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
@ -1,8 +0,0 @@
|
|||||||
import { CompareChartPlugin } from '../../../../../superset-ui-legacy-preset-chart-nvd3';
|
|
||||||
import Stories from './Stories';
|
|
||||||
|
|
||||||
new CompareChartPlugin().configure({ key: 'compare' }).register();
|
|
||||||
|
|
||||||
export default {
|
|
||||||
examples: [...Stories],
|
|
||||||
};
|
|
@ -1,43 +0,0 @@
|
|||||||
/* eslint-disable no-magic-numbers */
|
|
||||||
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 default [
|
|
||||||
{
|
|
||||||
renderStory: () => (
|
|
||||||
<SuperChart
|
|
||||||
chartType="dist-bar"
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
showBarValue: false,
|
|
||||||
showLegend: true,
|
|
||||||
vizType: 'dist_bar',
|
|
||||||
xTicksLayout: 'auto',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
storyName: 'Many bars',
|
|
||||||
storyPath: 'legacy-|preset-chart-nvd3|DistBarChartPlugin',
|
|
||||||
},
|
|
||||||
];
|
|
@ -1,37 +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: () => (
|
|
||||||
<SuperChart
|
|
||||||
chartType="dist-bar"
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
barstacked: false,
|
|
||||||
bottomMargin: 'auto',
|
|
||||||
colorScheme: 'd3Category10',
|
|
||||||
contribution: false,
|
|
||||||
orderBars: false,
|
|
||||||
reduceXTicks: false,
|
|
||||||
showBarValue: false,
|
|
||||||
showControls: false,
|
|
||||||
showLegend: true,
|
|
||||||
vizType: 'dist_bar',
|
|
||||||
xAxisLabel: 'ddd',
|
|
||||||
xTicksLayout: 'auto',
|
|
||||||
yAxisFormat: '.3s',
|
|
||||||
yAxisLabel: 'ddd',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
storyName: 'Basic',
|
|
||||||
storyPath: 'legacy-|preset-chart-nvd3|DistBarChartPlugin',
|
|
||||||
},
|
|
||||||
];
|
|
@ -1,93 +0,0 @@
|
|||||||
/* 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,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
@ -1,9 +0,0 @@
|
|||||||
import { DistBarChartPlugin } from '../../../../../superset-ui-legacy-preset-chart-nvd3';
|
|
||||||
import Stories from './Stories';
|
|
||||||
import ManyBarStories from './ManyBarStories';
|
|
||||||
|
|
||||||
new DistBarChartPlugin().configure({ key: 'dist-bar' }).register();
|
|
||||||
|
|
||||||
export default {
|
|
||||||
examples: [...Stories, ...ManyBarStories],
|
|
||||||
};
|
|
@ -1,69 +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';
|
|
||||||
|
|
||||||
const reverseData = data.map(series => ({
|
|
||||||
...series,
|
|
||||||
yAxis: series.yAxis === 1 ? 2 : 1,
|
|
||||||
}));
|
|
||||||
|
|
||||||
export default [
|
|
||||||
{
|
|
||||||
renderStory: () => (
|
|
||||||
<SuperChart
|
|
||||||
chartType="dual-line"
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
colorScheme: 'd3Category10',
|
|
||||||
vizType: 'dual_line',
|
|
||||||
xAxisFormat: 'smart_date',
|
|
||||||
yAxis2Format: '.3s',
|
|
||||||
yAxisFormat: '.3s',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
storyName: 'Basic',
|
|
||||||
storyPath: 'legacy-|preset-chart-nvd3|DualLineChartPlugin',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
renderStory: () => (
|
|
||||||
<div>
|
|
||||||
<SuperChart
|
|
||||||
chartType="dual-line"
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
colorScheme: 'd3Category10',
|
|
||||||
vizType: 'dual_line',
|
|
||||||
xAxisFormat: 'smart_date',
|
|
||||||
yAxis2Format: '.3s',
|
|
||||||
yAxisFormat: '.3s',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<SuperChart
|
|
||||||
chartType="dual-line"
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{ data: reverseData }}
|
|
||||||
formData={{
|
|
||||||
colorScheme: 'd3Category10',
|
|
||||||
vizType: 'dual_line',
|
|
||||||
xAxisFormat: 'smart_date',
|
|
||||||
yAxis2Format: '.3s',
|
|
||||||
yAxisFormat: '.3s',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
),
|
|
||||||
storyName: 'Swap y-axis with consistent color',
|
|
||||||
storyPath: 'legacy-|preset-chart-nvd3|DualLineChartPlugin',
|
|
||||||
},
|
|
||||||
];
|
|
@ -1,371 +0,0 @@
|
|||||||
/* 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',
|
|
||||||
},
|
|
||||||
];
|
|
@ -1,8 +0,0 @@
|
|||||||
import { DualLineChartPlugin } from '../../../../../superset-ui-legacy-preset-chart-nvd3';
|
|
||||||
import Stories from './Stories';
|
|
||||||
|
|
||||||
new DualLineChartPlugin().configure({ key: 'dual-line' }).register();
|
|
||||||
|
|
||||||
export default {
|
|
||||||
examples: [...Stories],
|
|
||||||
};
|
|
@ -1,28 +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: () => (
|
|
||||||
<SuperChart
|
|
||||||
chartType="line"
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
richTooltip: true,
|
|
||||||
vizType: 'line',
|
|
||||||
yAxisBounds: [1, 60000],
|
|
||||||
yAxisFormat: ',d',
|
|
||||||
yLogScale: true,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
storyName: 'Log scale',
|
|
||||||
storyPath: 'legacy-|preset-chart-nvd3|LineChartPlugin',
|
|
||||||
},
|
|
||||||
];
|
|
@ -1,74 +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: () => (
|
|
||||||
<SuperChart
|
|
||||||
chartType="line"
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
bottomMargin: 'auto',
|
|
||||||
colorScheme: 'd3Category10',
|
|
||||||
leftMargin: 'auto',
|
|
||||||
lineInterpolation: 'linear',
|
|
||||||
richTooltip: true,
|
|
||||||
showBrush: 'auto',
|
|
||||||
showLegend: true,
|
|
||||||
showMarkers: false,
|
|
||||||
vizType: 'line',
|
|
||||||
xAxisFormat: 'smart_date',
|
|
||||||
xAxisLabel: '',
|
|
||||||
xAxisShowminmax: false,
|
|
||||||
xTicksLayout: 'auto',
|
|
||||||
yAxisBounds: [null, null],
|
|
||||||
yAxisFormat: '.3s',
|
|
||||||
yAxisLabel: '',
|
|
||||||
yAxisShowminmax: false,
|
|
||||||
yLogScale: false,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
storyName: 'Basic',
|
|
||||||
storyPath: 'legacy-|preset-chart-nvd3|LineChartPlugin',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
renderStory: () => (
|
|
||||||
<SuperChart
|
|
||||||
chartType="line"
|
|
||||||
width={400}
|
|
||||||
height={400}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
bottomMargin: 'auto',
|
|
||||||
colorScheme: 'd3Category10',
|
|
||||||
leftMargin: 'auto',
|
|
||||||
lineInterpolation: 'linear',
|
|
||||||
richTooltip: true,
|
|
||||||
showBrush: 'auto',
|
|
||||||
showLegend: true,
|
|
||||||
showMarkers: true,
|
|
||||||
vizType: 'line',
|
|
||||||
xAxisFormat: 'smart_date',
|
|
||||||
xAxisLabel: '',
|
|
||||||
xAxisShowminmax: false,
|
|
||||||
xTicksLayout: 'auto',
|
|
||||||
yAxisBounds: [null, null],
|
|
||||||
yAxisFormat: '.3s',
|
|
||||||
yAxisLabel: '',
|
|
||||||
yAxisShowminmax: false,
|
|
||||||
yLogScale: false,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
storyName: 'Markers',
|
|
||||||
storyPath: 'legacy-|preset-chart-nvd3|LineChartPlugin',
|
|
||||||
},
|
|
||||||
];
|
|
@ -1,86 +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: () => (
|
|
||||||
<div className="container">
|
|
||||||
<h2>yAxisBounds</h2>
|
|
||||||
<pre>yAxisBounds=undefined</pre>
|
|
||||||
<SuperChart
|
|
||||||
chartType="line"
|
|
||||||
width={400}
|
|
||||||
height={200}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
richTooltip: true,
|
|
||||||
showLegend: false,
|
|
||||||
vizType: 'line',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<pre>yAxisBounds=[0, 60000]</pre>
|
|
||||||
<SuperChart
|
|
||||||
chartType="line"
|
|
||||||
width={400}
|
|
||||||
height={200}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
richTooltip: true,
|
|
||||||
showLegend: false,
|
|
||||||
vizType: 'line',
|
|
||||||
yAxisBounds: [0, 60000],
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<pre>yAxisBounds=[null, 60000]</pre>
|
|
||||||
<SuperChart
|
|
||||||
chartType="line"
|
|
||||||
width={400}
|
|
||||||
height={200}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
richTooltip: true,
|
|
||||||
showLegend: false,
|
|
||||||
vizType: 'line',
|
|
||||||
yAxisBounds: [null, 60000],
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<pre>yAxisBounds=[40000, null]</pre>
|
|
||||||
<SuperChart
|
|
||||||
chartType="line"
|
|
||||||
width={400}
|
|
||||||
height={200}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
richTooltip: true,
|
|
||||||
showLegend: false,
|
|
||||||
vizType: 'line',
|
|
||||||
yAxisBounds: [40000, null],
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<pre>yAxisBounds=[40000, null] with Legend</pre>
|
|
||||||
<SuperChart
|
|
||||||
chartType="line"
|
|
||||||
width={400}
|
|
||||||
height={200}
|
|
||||||
datasource={dummyDatasource}
|
|
||||||
queryData={{ data }}
|
|
||||||
formData={{
|
|
||||||
richTooltip: true,
|
|
||||||
showLegend: true,
|
|
||||||
vizType: 'line',
|
|
||||||
yAxisBounds: [40000, null],
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
),
|
|
||||||
storyName: 'yAxisBounds',
|
|
||||||
storyPath: 'legacy-|preset-chart-nvd3|LineChartPlugin',
|
|
||||||
},
|
|
||||||
];
|
|
@ -1,908 +0,0 @@
|
|||||||
/* 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,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
@ -1,10 +0,0 @@
|
|||||||
import { LineChartPlugin } from '../../../../../superset-ui-legacy-preset-chart-nvd3';
|
|
||||||
import Stories from './Stories';
|
|
||||||
import YAxisStories from './YAxisStories';
|
|
||||||
import LogStories from './LogStories';
|
|
||||||
|
|
||||||
new LineChartPlugin().configure({ key: 'line' }).register();
|
|
||||||
|
|
||||||
export default {
|
|
||||||
examples: [...Stories, ...YAxisStories, ...LogStories],
|
|
||||||
};
|
|
Loading…
Reference in New Issue
Block a user