mirror of
https://github.com/apache/superset.git
synced 2026-04-30 21:44:40 +00:00
Compare commits
1 Commits
file-handl
...
spring-cle
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7559dda61d |
180
.github/dependabot.yml
vendored
180
.github/dependabot.yml
vendored
@@ -60,46 +60,6 @@ updates:
|
||||
|
||||
# Now for all of our plugins and packages!
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/legacy-plugin-chart-calendar/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
labels:
|
||||
- npm
|
||||
- dependabot
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/legacy-plugin-chart-histogram/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
labels:
|
||||
- npm
|
||||
- dependabot
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/legacy-plugin-chart-partition/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
labels:
|
||||
- npm
|
||||
- dependabot
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/legacy-plugin-chart-world-map/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
labels:
|
||||
- npm
|
||||
- dependabot
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/plugin-chart-pivot-table/"
|
||||
schedule:
|
||||
@@ -110,46 +70,6 @@ updates:
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/legacy-plugin-chart-chord/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
labels:
|
||||
- npm
|
||||
- dependabot
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/legacy-plugin-chart-horizon/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
labels:
|
||||
- npm
|
||||
- dependabot
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/legacy-plugin-chart-rose/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
labels:
|
||||
- npm
|
||||
- dependabot
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/legacy-preset-chart-deckgl/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
labels:
|
||||
- npm
|
||||
- dependabot
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/plugin-chart-table/"
|
||||
schedule:
|
||||
@@ -160,46 +80,6 @@ updates:
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/legacy-plugin-chart-country-map/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
labels:
|
||||
- npm
|
||||
- dependabot
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/legacy-plugin-chart-map-box/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
labels:
|
||||
- npm
|
||||
- dependabot
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/legacy-plugin-chart-sankey/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
labels:
|
||||
- npm
|
||||
- dependabot
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/legacy-preset-chart-nvd3/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
labels:
|
||||
- npm
|
||||
- dependabot
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/plugin-chart-word-cloud/"
|
||||
schedule:
|
||||
@@ -210,36 +90,6 @@ updates:
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/legacy-plugin-chart-event-flow/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
labels:
|
||||
- npm
|
||||
- dependabot
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
labels:
|
||||
- npm
|
||||
- dependabot
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/legacy-plugin-chart-sankey-loop/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
labels:
|
||||
- npm
|
||||
- dependabot
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/plugin-chart-echarts/"
|
||||
schedule:
|
||||
@@ -260,36 +110,6 @@ updates:
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/legacy-plugin-chart-heatmap/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
labels:
|
||||
- npm
|
||||
- dependabot
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
labels:
|
||||
- npm
|
||||
- dependabot
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/legacy-plugin-chart-sunburst/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
labels:
|
||||
- npm
|
||||
- dependabot
|
||||
open-pull-requests-limit: 5
|
||||
versioning-strategy: increase
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/superset-frontend/plugins/plugin-chart-handlebars/"
|
||||
schedule:
|
||||
|
||||
3779
superset-frontend/package-lock.json
generated
3779
superset-frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -94,23 +94,6 @@
|
||||
"@scarf/scarf": "^1.4.0",
|
||||
"@superset-ui/chart-controls": "file:./packages/superset-ui-chart-controls",
|
||||
"@superset-ui/core": "file:./packages/superset-ui-core",
|
||||
"@superset-ui/legacy-plugin-chart-calendar": "file:./plugins/legacy-plugin-chart-calendar",
|
||||
"@superset-ui/legacy-plugin-chart-chord": "file:./plugins/legacy-plugin-chart-chord",
|
||||
"@superset-ui/legacy-plugin-chart-country-map": "file:./plugins/legacy-plugin-chart-country-map",
|
||||
"@superset-ui/legacy-plugin-chart-event-flow": "file:./plugins/legacy-plugin-chart-event-flow",
|
||||
"@superset-ui/legacy-plugin-chart-heatmap": "file:./plugins/legacy-plugin-chart-heatmap",
|
||||
"@superset-ui/legacy-plugin-chart-histogram": "file:./plugins/legacy-plugin-chart-histogram",
|
||||
"@superset-ui/legacy-plugin-chart-horizon": "file:./plugins/legacy-plugin-chart-horizon",
|
||||
"@superset-ui/legacy-plugin-chart-map-box": "file:./plugins/legacy-plugin-chart-map-box",
|
||||
"@superset-ui/legacy-plugin-chart-paired-t-test": "file:./plugins/legacy-plugin-chart-paired-t-test",
|
||||
"@superset-ui/legacy-plugin-chart-parallel-coordinates": "file:./plugins/legacy-plugin-chart-parallel-coordinates",
|
||||
"@superset-ui/legacy-plugin-chart-partition": "file:./plugins/legacy-plugin-chart-partition",
|
||||
"@superset-ui/legacy-plugin-chart-rose": "file:./plugins/legacy-plugin-chart-rose",
|
||||
"@superset-ui/legacy-plugin-chart-sankey": "file:./plugins/legacy-plugin-chart-sankey",
|
||||
"@superset-ui/legacy-plugin-chart-sankey-loop": "file:./plugins/legacy-plugin-chart-sankey-loop",
|
||||
"@superset-ui/legacy-plugin-chart-world-map": "file:./plugins/legacy-plugin-chart-world-map",
|
||||
"@superset-ui/legacy-preset-chart-deckgl": "file:./plugins/legacy-preset-chart-deckgl",
|
||||
"@superset-ui/legacy-preset-chart-nvd3": "file:./plugins/legacy-preset-chart-nvd3",
|
||||
"@superset-ui/plugin-chart-echarts": "file:./plugins/plugin-chart-echarts",
|
||||
"@superset-ui/plugin-chart-handlebars": "file:./plugins/plugin-chart-handlebars",
|
||||
"@superset-ui/plugin-chart-pivot-table": "file:./plugins/plugin-chart-pivot-table",
|
||||
|
||||
@@ -67,24 +67,6 @@
|
||||
"peerDependencies": {
|
||||
"@encodable/color": "=1.1.1",
|
||||
"@superset-ui/core": "*",
|
||||
"@superset-ui/legacy-plugin-chart-calendar": "*",
|
||||
"@superset-ui/legacy-plugin-chart-chord": "*",
|
||||
"@superset-ui/legacy-plugin-chart-country-map": "*",
|
||||
"@superset-ui/legacy-plugin-chart-event-flow": "*",
|
||||
"@superset-ui/legacy-plugin-chart-heatmap": "*",
|
||||
"@superset-ui/legacy-plugin-chart-histogram": "*",
|
||||
"@superset-ui/legacy-plugin-chart-horizon": "*",
|
||||
"@superset-ui/legacy-plugin-chart-map-box": "*",
|
||||
"@superset-ui/legacy-plugin-chart-paired-t-test": "*",
|
||||
"@superset-ui/legacy-plugin-chart-parallel-coordinates": "*",
|
||||
"@superset-ui/legacy-plugin-chart-partition": "*",
|
||||
"@superset-ui/legacy-plugin-chart-rose": "*",
|
||||
"@superset-ui/legacy-plugin-chart-sankey": "*",
|
||||
"@superset-ui/legacy-plugin-chart-sankey-loop": "*",
|
||||
"@superset-ui/legacy-plugin-chart-time-table": "*",
|
||||
"@superset-ui/legacy-plugin-chart-world-map": "*",
|
||||
"@superset-ui/legacy-preset-chart-deckgl": "*",
|
||||
"@superset-ui/legacy-preset-chart-nvd3": "*",
|
||||
"@superset-ui/plugin-chart-echarts": "*",
|
||||
"@superset-ui/plugin-chart-table": "*",
|
||||
"@superset-ui/plugin-chart-word-cloud": "*"
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart } from '@superset-ui/core';
|
||||
import CalendarChartPlugin from '@superset-ui/legacy-plugin-chart-calendar';
|
||||
import data from './data';
|
||||
import dummyDatasource from '../../../shared/dummyDatasource';
|
||||
|
||||
new CalendarChartPlugin().configure({ key: 'calendar' }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-plugin-chart-calendar',
|
||||
};
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType="calendar"
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
cellSize: 10,
|
||||
cellPadding: 2,
|
||||
cellRadius: 0,
|
||||
domainGranularity: 'month',
|
||||
subdomainGranularity: 'day',
|
||||
linearColorScheme: 'schemeRdYlBu',
|
||||
steps: 10,
|
||||
yAxisFormat: '.3s',
|
||||
xAxisTimeFormat: 'smart_date',
|
||||
showLegend: true,
|
||||
showValues: false,
|
||||
showMetricName: true,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,119 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
export default {
|
||||
data: {
|
||||
count: {
|
||||
'1518652800.0': 3,
|
||||
'1518048000.0': 2,
|
||||
'1518220800.0': 2,
|
||||
'1523145600.0': 2,
|
||||
'1529798400.0': 2,
|
||||
'1534204800.0': 2,
|
||||
'1541289600.0': 2,
|
||||
'1542672000.0': 2,
|
||||
'1543881600.0': 2,
|
||||
'1517616000.0': 1,
|
||||
'1517875200.0': 1,
|
||||
'1517961600.0': 1,
|
||||
'1518307200.0': 1,
|
||||
'1518393600.0': 1,
|
||||
'1519257600.0': 1,
|
||||
'1519516800.0': 1,
|
||||
'1519776000.0': 1,
|
||||
'1520208000.0': 1,
|
||||
'1520294400.0': 1,
|
||||
'1520985600.0': 1,
|
||||
'1521072000.0': 1,
|
||||
'1521244800.0': 1,
|
||||
'1521331200.0': 1,
|
||||
'1521676800.0': 1,
|
||||
'1522108800.0': 1,
|
||||
'1522627200.0': 1,
|
||||
'1522800000.0': 1,
|
||||
'1522972800.0': 1,
|
||||
'1523491200.0': 1,
|
||||
'1524096000.0': 1,
|
||||
'1524268800.0': 1,
|
||||
'1524614400.0': 1,
|
||||
'1524960000.0': 1,
|
||||
'1525305600.0': 1,
|
||||
'1525564800.0': 1,
|
||||
'1525737600.0': 1,
|
||||
'1525824000.0': 1,
|
||||
'1525910400.0': 1,
|
||||
'1526083200.0': 1,
|
||||
'1526256000.0': 1,
|
||||
'1526688000.0': 1,
|
||||
'1527033600.0': 1,
|
||||
'1527292800.0': 1,
|
||||
'1527465600.0': 1,
|
||||
'1527638400.0': 1,
|
||||
'1528070400.0': 1,
|
||||
'1528329600.0': 1,
|
||||
'1529539200.0': 1,
|
||||
'1529625600.0': 1,
|
||||
'1529712000.0': 1,
|
||||
'1529971200.0': 1,
|
||||
'1530144000.0': 1,
|
||||
'1530576000.0': 1,
|
||||
'1531267200.0': 1,
|
||||
'1531353600.0': 1,
|
||||
'1531440000.0': 1,
|
||||
'1532736000.0': 1,
|
||||
'1533081600.0': 1,
|
||||
'1533168000.0': 1,
|
||||
'1533945600.0': 1,
|
||||
'1534377600.0': 1,
|
||||
'1534809600.0': 1,
|
||||
'1535155200.0': 1,
|
||||
'1535328000.0': 1,
|
||||
'1535932800.0': 1,
|
||||
'1536710400.0': 1,
|
||||
'1537056000.0': 1,
|
||||
'1537142400.0': 1,
|
||||
'1537488000.0': 1,
|
||||
'1537660800.0': 1,
|
||||
'1538611200.0': 1,
|
||||
'1538697600.0': 1,
|
||||
'1539475200.0': 1,
|
||||
'1540771200.0': 1,
|
||||
'1541116800.0': 1,
|
||||
'1541376000.0': 1,
|
||||
'1541635200.0': 1,
|
||||
'1542153600.0': 1,
|
||||
'1542931200.0': 1,
|
||||
'1543190400.0': 1,
|
||||
'1545177600.0': 1,
|
||||
'1545436800.0': 1,
|
||||
'1545782400.0': 1,
|
||||
'1545868800.0': 1,
|
||||
'1546300800.0': 1,
|
||||
'1546732800.0': 1,
|
||||
'1547769600.0': 1,
|
||||
'1547942400.0': 1,
|
||||
'1548633600.0': 1,
|
||||
},
|
||||
},
|
||||
start: 1517270400000.0,
|
||||
domain: 'month',
|
||||
range: 13,
|
||||
subdomain: 'day',
|
||||
};
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import ChordChartPlugin from '@superset-ui/legacy-plugin-chart-chord';
|
||||
import data from './data';
|
||||
import { withResizableChartDemo } from '../../../shared/components/ResizableChartDemo';
|
||||
|
||||
new ChordChartPlugin().configure({ key: VizType.Chord }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-plugin-chart-chord',
|
||||
decorators: [withResizableChartDemo],
|
||||
};
|
||||
|
||||
export const basic = ({ width, height }) => (
|
||||
<SuperChart
|
||||
chartType={VizType.Chord}
|
||||
width={width}
|
||||
height={height}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
colorScheme: 'd3Category10',
|
||||
yAxisFormat: '.2f',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys, no-magic-numbers */
|
||||
export default {
|
||||
matrix: [
|
||||
[381, 16, 14, 5, 4, 6],
|
||||
[29, 535, 132, 20, 21, 16],
|
||||
[22, 18, 1, 3, 0, 214],
|
||||
[3, 4, 462, 152, 132, 0],
|
||||
[16, 32, 299, 123, 146, 1],
|
||||
[22, 83, 53, 21, 22, 6],
|
||||
],
|
||||
nodes: [
|
||||
'Hong Kong',
|
||||
'Tokyo',
|
||||
'Taipei',
|
||||
'Beijing',
|
||||
'Bangkok',
|
||||
'Jakarta',
|
||||
'Singapore',
|
||||
],
|
||||
};
|
||||
@@ -1,120 +0,0 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { useEffect, useState } from 'react';
|
||||
import {
|
||||
JsonObject,
|
||||
seed,
|
||||
SuperChart,
|
||||
SequentialD3,
|
||||
useTheme,
|
||||
} from '@superset-ui/core';
|
||||
import CountryMapChartPlugin, {
|
||||
countries,
|
||||
} from '@superset-ui/legacy-plugin-chart-country-map';
|
||||
import { withResizableChartDemo } from '../../../shared/components/ResizableChartDemo';
|
||||
|
||||
new CountryMapChartPlugin().configure({ key: 'country-map' }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-plugin-chart-country-map',
|
||||
decorators: [withResizableChartDemo],
|
||||
component: SuperChart,
|
||||
parameters: {
|
||||
initialSize: { width: 500, height: 300 },
|
||||
},
|
||||
};
|
||||
|
||||
function generateData(geojson: JsonObject) {
|
||||
return geojson.features.map(feat => ({
|
||||
metric: Math.round(Number(seed(feat.properties.ISO)()) * 10000) / 100,
|
||||
country_id: feat.properties.ISO,
|
||||
}));
|
||||
}
|
||||
|
||||
export const BasicCountryMapStory = (
|
||||
{
|
||||
country,
|
||||
colorSchema,
|
||||
}: {
|
||||
country: string;
|
||||
colorSchema: string;
|
||||
},
|
||||
{ width, height }: { width: number; height: number },
|
||||
) => {
|
||||
const theme = useTheme();
|
||||
const [data, setData] = useState<JsonObject>();
|
||||
|
||||
useEffect(() => {
|
||||
const controller = new AbortController();
|
||||
const { signal } = controller;
|
||||
fetch(countries[country], { signal })
|
||||
.then(resp => resp.json())
|
||||
.then(geojson => {
|
||||
setData(generateData(geojson));
|
||||
});
|
||||
return () => {
|
||||
controller.abort();
|
||||
};
|
||||
}, [country]);
|
||||
|
||||
if (!data) {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
color: theme.colors.grayscale.base,
|
||||
textAlign: 'center',
|
||||
padding: 20,
|
||||
}}
|
||||
>
|
||||
Loading...
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<SuperChart
|
||||
chartType="country-map"
|
||||
width={width}
|
||||
height={height}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
linearColorScheme: colorSchema,
|
||||
numberFormat: '.3s',
|
||||
selectCountry: country,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
BasicCountryMapStory.args = {
|
||||
country: 'finland',
|
||||
colorSchema: 'schemeOranges',
|
||||
};
|
||||
BasicCountryMapStory.argTypes = {
|
||||
country: {
|
||||
control: 'select',
|
||||
options: Object.keys(countries),
|
||||
},
|
||||
colorSchema: {
|
||||
control: 'select',
|
||||
options: SequentialD3.map(x => x.id),
|
||||
description: 'Choose a color schema',
|
||||
defaultValue: 'schemeOranges',
|
||||
},
|
||||
};
|
||||
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart } from '@superset-ui/core';
|
||||
import sampleEvents from '@data-ui/event-flow/build/sampleEvents';
|
||||
import EventFlowChartPlugin from '@superset-ui/legacy-plugin-chart-event-flow';
|
||||
|
||||
new EventFlowChartPlugin().configure({ key: 'event-flow' }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-plugin-chart-event-flow',
|
||||
};
|
||||
|
||||
const data = sampleEvents.twentyUsers.allEvents.map(
|
||||
({ ENTITY_ID, EVENT_NAME, TS }) => ({
|
||||
__timestamp: TS,
|
||||
eventName: EVENT_NAME,
|
||||
userId: ENTITY_ID,
|
||||
}),
|
||||
);
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType="event-flow"
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
allColumnsX: 'eventName',
|
||||
entity: 'userId',
|
||||
minLeafNodeEventCount: 1,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,147 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import HeatmapChartPlugin from '@superset-ui/legacy-plugin-chart-heatmap';
|
||||
import ResizableChartDemo from '../../../shared/components/ResizableChartDemo';
|
||||
import data from './data';
|
||||
|
||||
new HeatmapChartPlugin().configure({ key: VizType.LegacyHeatmap }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-plugin-chart-heatmap',
|
||||
};
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyHeatmap}
|
||||
width={500}
|
||||
height={500}
|
||||
formData={{
|
||||
allColumnsX: 'source',
|
||||
allColumnsY: 'target',
|
||||
bottomMargin: 'auto',
|
||||
canvasImageRendering: 'pixelated',
|
||||
leftMargin: 'auto',
|
||||
linearColorScheme: 'blue_white_yellow',
|
||||
metric: 'sum__value',
|
||||
normalized: false,
|
||||
showLegend: true,
|
||||
showPerc: true,
|
||||
showValues: false,
|
||||
sortXAxis: 'alpha_asc',
|
||||
sortYAxis: 'alpha_asc',
|
||||
xscaleInterval: '1',
|
||||
yAxisBounds: [null, null],
|
||||
yAxisFormat: '.3s',
|
||||
yscaleInterval: '1',
|
||||
}}
|
||||
queriesData={[
|
||||
{
|
||||
data: {
|
||||
records: data,
|
||||
extents: [0.1, 24.9],
|
||||
},
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
|
||||
export const resizable = () => (
|
||||
<ResizableChartDemo>
|
||||
{({ width, height }) => (
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyHeatmap}
|
||||
width={width}
|
||||
height={height}
|
||||
formData={{
|
||||
allColumnsX: 'source',
|
||||
allColumnsY: 'target',
|
||||
bottomMargin: 'auto',
|
||||
canvasImageRendering: 'pixelated',
|
||||
leftMargin: 'auto',
|
||||
linearColorScheme: 'blue_white_yellow',
|
||||
metric: 'sum__value',
|
||||
normalized: false,
|
||||
showLegend: true,
|
||||
showPerc: true,
|
||||
showValues: false,
|
||||
sortXAxis: 'alpha_asc',
|
||||
sortYAxis: 'alpha_asc',
|
||||
xscaleInterval: '1',
|
||||
yAxisBounds: [null, null],
|
||||
yAxisFormat: '.3s',
|
||||
yscaleInterval: '1',
|
||||
}}
|
||||
queriesData={[
|
||||
{
|
||||
data: {
|
||||
records: data,
|
||||
extents: [0.1, 24.9],
|
||||
},
|
||||
},
|
||||
]}
|
||||
/>
|
||||
)}
|
||||
</ResizableChartDemo>
|
||||
);
|
||||
|
||||
export const withNullData = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyHeatmap}
|
||||
width={500}
|
||||
height={500}
|
||||
formData={{
|
||||
allColumnsX: 'source',
|
||||
allColumnsY: 'target',
|
||||
bottomMargin: 'auto',
|
||||
canvasImageRendering: 'pixelated',
|
||||
leftMargin: 'auto',
|
||||
linearColorScheme: 'blue_white_yellow',
|
||||
metric: 'sum__value',
|
||||
normalized: false,
|
||||
showLegend: true,
|
||||
showPerc: true,
|
||||
showValues: false,
|
||||
sortXAxis: 'alpha_asc',
|
||||
sortYAxis: 'alpha_asc',
|
||||
xscaleInterval: '1',
|
||||
yAxisBounds: [null, null],
|
||||
yAxisFormat: '.3s',
|
||||
yscaleInterval: '1',
|
||||
}}
|
||||
queriesData={[
|
||||
{
|
||||
data: {
|
||||
records: [
|
||||
...data,
|
||||
{
|
||||
x: null,
|
||||
y: 'Electricity and heat',
|
||||
v: 25.9,
|
||||
perc: 0.43,
|
||||
rank: 1.0,
|
||||
},
|
||||
],
|
||||
extents: [0.1, 24.9],
|
||||
},
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
@@ -1,182 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export default [
|
||||
{
|
||||
x: 'Energy',
|
||||
y: 'Electricity and heat',
|
||||
v: 24.9,
|
||||
perc: 1.0,
|
||||
rank: 1.0,
|
||||
},
|
||||
{
|
||||
x: 'Energy',
|
||||
y: 'Industry',
|
||||
v: 14.7,
|
||||
perc: 0.5887096774193549,
|
||||
rank: 0.9882352941176471,
|
||||
},
|
||||
{
|
||||
x: 'Energy',
|
||||
y: 'Transportation',
|
||||
v: 14.3,
|
||||
perc: 0.5725806451612905,
|
||||
rank: 0.9764705882352941,
|
||||
},
|
||||
{
|
||||
x: 'Deforestation',
|
||||
y: 'Carbon Dioxide',
|
||||
v: 10.9,
|
||||
perc: 0.435483870967742,
|
||||
rank: 0.9588235294117647,
|
||||
},
|
||||
{
|
||||
x: 'Land Use Change',
|
||||
y: 'Deforestation',
|
||||
v: 10.9,
|
||||
perc: 0.435483870967742,
|
||||
rank: 0.9588235294117647,
|
||||
},
|
||||
{
|
||||
x: 'Road',
|
||||
y: 'Carbon Dioxide',
|
||||
v: 10.5,
|
||||
perc: 0.4193548387096775,
|
||||
rank: 0.9352941176470588,
|
||||
},
|
||||
{
|
||||
x: 'Transportation',
|
||||
y: 'Road',
|
||||
v: 10.5,
|
||||
perc: 0.4193548387096775,
|
||||
rank: 0.9352941176470588,
|
||||
},
|
||||
{
|
||||
x: 'Residential Buildings',
|
||||
y: 'Carbon Dioxide',
|
||||
v: 10.2,
|
||||
perc: 0.40725806451612906,
|
||||
rank: 0.9176470588235294,
|
||||
},
|
||||
{
|
||||
x: 'Energy',
|
||||
y: 'Other Fuel Combustion',
|
||||
v: 8.6,
|
||||
perc: 0.342741935483871,
|
||||
rank: 0.9058823529411765,
|
||||
},
|
||||
{
|
||||
x: 'Other Industry',
|
||||
y: 'Carbon Dioxide',
|
||||
v: 6.6,
|
||||
perc: 0.26209677419354843,
|
||||
rank: 0.8941176470588236,
|
||||
},
|
||||
{
|
||||
x: 'Commercial Buildings',
|
||||
y: 'Carbon Dioxide',
|
||||
v: 6.3,
|
||||
perc: 0.25000000000000006,
|
||||
rank: 0.8823529411764706,
|
||||
},
|
||||
{
|
||||
x: 'Agriculture',
|
||||
y: 'Livestock and Manure',
|
||||
v: 5.4,
|
||||
perc: 0.2137096774193549,
|
||||
rank: 0.8705882352941177,
|
||||
},
|
||||
{
|
||||
x: 'Agriculture',
|
||||
y: 'Agriculture Soils',
|
||||
v: 5.2,
|
||||
perc: 0.20564516129032262,
|
||||
rank: 0.8470588235294118,
|
||||
},
|
||||
{
|
||||
x: 'Agriculture Soils',
|
||||
y: 'Nitrous Oxide',
|
||||
v: 5.2,
|
||||
perc: 0.20564516129032262,
|
||||
rank: 0.8470588235294118,
|
||||
},
|
||||
{
|
||||
x: 'Oil and Gas Processing',
|
||||
y: 'Methane',
|
||||
v: 2.8,
|
||||
perc: 0.10887096774193548,
|
||||
rank: 0.6705882352941176,
|
||||
},
|
||||
{
|
||||
x: 'Electricity and heat',
|
||||
y: 'Other Industry',
|
||||
v: 2.7,
|
||||
perc: 0.10483870967741937,
|
||||
rank: 0.6470588235294118,
|
||||
},
|
||||
{
|
||||
x: 'Rail - Ship and Other Transport',
|
||||
y: 'Carbon Dioxide',
|
||||
v: 2.5,
|
||||
perc: 0.09677419354838711,
|
||||
rank: 0.6294117647058823,
|
||||
},
|
||||
{
|
||||
x: 'Transportation',
|
||||
y: 'Rail - Ship and Other Transport',
|
||||
v: 2.5,
|
||||
perc: 0.09677419354838711,
|
||||
rank: 0.6294117647058823,
|
||||
},
|
||||
{
|
||||
x: 'Electricity and heat',
|
||||
y: 'T and D Losses',
|
||||
v: 2.2,
|
||||
perc: 0.08467741935483872,
|
||||
rank: 0.6058823529411764,
|
||||
},
|
||||
{
|
||||
x: 'T and D Losses',
|
||||
y: 'Carbon Dioxide',
|
||||
v: 2.2,
|
||||
perc: 0.08467741935483872,
|
||||
rank: 0.6058823529411764,
|
||||
},
|
||||
{
|
||||
x: 'Electricity and heat',
|
||||
y: 'Unallocated Fuel Combustion',
|
||||
v: 2.0,
|
||||
perc: 0.07661290322580645,
|
||||
rank: 0.5882352941176471,
|
||||
},
|
||||
{
|
||||
x: 'Industry',
|
||||
y: 'Cement',
|
||||
v: 1.9,
|
||||
perc: 0.07258064516129033,
|
||||
rank: 0.5764705882352941,
|
||||
},
|
||||
{
|
||||
x: 'Other Fuel Combustion',
|
||||
y: 'Unallocated Fuel Combustion',
|
||||
v: 1.8,
|
||||
perc: 0.0685483870967742,
|
||||
rank: 0.5647058823529412,
|
||||
},
|
||||
];
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import HistogramChartPlugin from '@superset-ui/legacy-plugin-chart-histogram';
|
||||
import data from './data';
|
||||
|
||||
new HistogramChartPlugin()
|
||||
.configure({ key: VizType.LegacyHistogram })
|
||||
.register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-plugin-chart-histogram',
|
||||
};
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyHistogram}
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
colorScheme: 'd3Category10',
|
||||
globalOpacity: 1,
|
||||
linkLength: 15, // binCount
|
||||
normalized: false,
|
||||
xAxisLabel: 'Score',
|
||||
yAxisLabel: 'Count',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys, no-magic-numbers */
|
||||
export default [
|
||||
{
|
||||
key: 'Entrance exam',
|
||||
values: [
|
||||
0.87, 0.944, 1.0, 0.879, 0.69, 0.667, 0.794, 0.838, 0.875, 0.385, 0.968,
|
||||
0.804, 1.0, 0.943, 0.96, 0.333, 0.5, 0.929, 0.863, 0.75, 0.957, 0.914,
|
||||
1.0, 0.909, 0.742, 0.964, 0.25, 0.75, 0.5, 0.867, 0.909, 0.333, 0.867,
|
||||
0.952, 0.857, 0.949, 0.857, 0.333, 0.8, 0.707, 0.833, 0.75, 0.88, 0.771,
|
||||
1.0, 1.0, 0.769, 1.0, 0.769, 0.622, 0.909, 0.725, 0.951, 1.0,
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import HorizonChartPlugin from '@superset-ui/legacy-plugin-chart-horizon';
|
||||
import data from './data';
|
||||
|
||||
new HorizonChartPlugin().configure({ key: VizType.Horizon }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-plugin-chart-horizon',
|
||||
};
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.Horizon}
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
horizonColorScale: 'series',
|
||||
seriesHeight: '25',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,927 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
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: ['Daniel'],
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: 24717,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: 23168,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: 22128,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: 21940,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: 23103,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: 23427,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: 21704,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: 22022,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: 23579,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: 23759,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: 23720,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: 24621,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: 25971,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: 26324,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: 28403,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: 29759,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: 30868,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: 32480,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: 34580,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: 36370,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: 38409,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: 36440,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: 35746,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: 34589,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: 34909,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: 33740,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: 30826,
|
||||
},
|
||||
{
|
||||
x: 694224000000.0,
|
||||
y: 29047,
|
||||
},
|
||||
{
|
||||
x: 725846400000.0,
|
||||
y: 28587,
|
||||
},
|
||||
{
|
||||
x: 757382400000.0,
|
||||
y: 27978,
|
||||
},
|
||||
{
|
||||
x: 788918400000.0,
|
||||
y: 26631,
|
||||
},
|
||||
{
|
||||
x: 820454400000.0,
|
||||
y: 25029,
|
||||
},
|
||||
{
|
||||
x: 852076800000.0,
|
||||
y: 23873,
|
||||
},
|
||||
{
|
||||
x: 883612800000.0,
|
||||
y: 23089,
|
||||
},
|
||||
{
|
||||
x: 915148800000.0,
|
||||
y: 22623,
|
||||
},
|
||||
{
|
||||
x: 946684800000.0,
|
||||
y: 22250,
|
||||
},
|
||||
{
|
||||
x: 978307200000.0,
|
||||
y: 20925,
|
||||
},
|
||||
{
|
||||
x: 1009843200000.0,
|
||||
y: 21247,
|
||||
},
|
||||
{
|
||||
x: 1041379200000.0,
|
||||
y: 20980,
|
||||
},
|
||||
{
|
||||
x: 1072915200000.0,
|
||||
y: 20914,
|
||||
},
|
||||
{
|
||||
x: 1104537600000.0,
|
||||
y: 20130,
|
||||
},
|
||||
{
|
||||
x: 1136073600000.0,
|
||||
y: 19946,
|
||||
},
|
||||
{
|
||||
x: 1167609600000.0,
|
||||
y: 20108,
|
||||
},
|
||||
{
|
||||
x: 1199145600000.0,
|
||||
y: 18695,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
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: ['Jennifer'],
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: 15174,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: 18166,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: 18193,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: 26778,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: 33618,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: 46022,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: 56607,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: 63400,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: 62229,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: 62854,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: 57960,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: 59255,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: 58682,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: 56064,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: 56472,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: 58130,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: 56779,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: 56867,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: 54136,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: 50375,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: 42500,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: 36063,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: 32613,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: 27798,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: 24006,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: 22160,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: 20616,
|
||||
},
|
||||
{
|
||||
x: 694224000000.0,
|
||||
y: 17783,
|
||||
},
|
||||
{
|
||||
x: 725846400000.0,
|
||||
y: 15704,
|
||||
},
|
||||
{
|
||||
x: 757382400000.0,
|
||||
y: 13976,
|
||||
},
|
||||
{
|
||||
x: 788918400000.0,
|
||||
y: 12655,
|
||||
},
|
||||
{
|
||||
x: 820454400000.0,
|
||||
y: 11703,
|
||||
},
|
||||
{
|
||||
x: 852076800000.0,
|
||||
y: 11803,
|
||||
},
|
||||
{
|
||||
x: 883612800000.0,
|
||||
y: 10671,
|
||||
},
|
||||
{
|
||||
x: 915148800000.0,
|
||||
y: 10593,
|
||||
},
|
||||
{
|
||||
x: 946684800000.0,
|
||||
y: 9308,
|
||||
},
|
||||
{
|
||||
x: 978307200000.0,
|
||||
y: 8843,
|
||||
},
|
||||
{
|
||||
x: 1009843200000.0,
|
||||
y: 8317,
|
||||
},
|
||||
{
|
||||
x: 1041379200000.0,
|
||||
y: 7475,
|
||||
},
|
||||
{
|
||||
x: 1072915200000.0,
|
||||
y: 6079,
|
||||
},
|
||||
{
|
||||
x: 1104537600000.0,
|
||||
y: 5413,
|
||||
},
|
||||
{
|
||||
x: 1136073600000.0,
|
||||
y: 4736,
|
||||
},
|
||||
{
|
||||
x: 1167609600000.0,
|
||||
y: 4001,
|
||||
},
|
||||
{
|
||||
x: 1199145600000.0,
|
||||
y: 3010,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -1,57 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { SuperChart, useTheme } from '@superset-ui/core';
|
||||
import MapBoxChartPlugin from '@superset-ui/legacy-plugin-chart-map-box';
|
||||
import { generateData } from './data';
|
||||
|
||||
new MapBoxChartPlugin().configure({ key: 'map-box' }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-plugin-chart-map-box',
|
||||
};
|
||||
|
||||
export const Basic = () => {
|
||||
const theme = useTheme();
|
||||
return (
|
||||
<SuperChart
|
||||
chartType="map-box"
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ data: generateData(theme) }]}
|
||||
formData={{
|
||||
allColumnsX: 'LON',
|
||||
allColumnsY: 'LAT',
|
||||
clusteringRadius: '60',
|
||||
globalOpacity: 1,
|
||||
mapboxColor: 'rgb(244, 176, 42)',
|
||||
mapboxLabel: [],
|
||||
mapboxStyle: 'mapbox://styles/mapbox/light-v9',
|
||||
pandasAggfunc: 'sum',
|
||||
pointRadius: 'Auto',
|
||||
pointRadiusUnit: 'Pixels',
|
||||
renderWhileDragging: true,
|
||||
viewportLatitude: 37.78711146014447,
|
||||
viewportLongitude: -122.37633433151713,
|
||||
viewportZoom: 10.026425338292782,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { SuperChart } from '@superset-ui/core';
|
||||
import PairedTTestChartPlugin from '@superset-ui/legacy-plugin-chart-paired-t-test';
|
||||
import data from './data';
|
||||
|
||||
new PairedTTestChartPlugin().configure({ key: 'paired-t-test' }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-plugin-chart-paired-t-test',
|
||||
};
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType="paired-t-test"
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
groupby: ['name'],
|
||||
liftvaluePrecision: 4,
|
||||
metrics: ['sum__num'],
|
||||
pvaluePrecision: 6,
|
||||
significanceLevel: 0.05,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,702 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
export default {
|
||||
sum__num: [
|
||||
{
|
||||
group: ['Christopher'],
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: 59055.0,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: 59188.0,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: 59859.0,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: 59516.0,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: null,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
group: ['David'],
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: 67646.0,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: 66207.0,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: 66581.0,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: 63531.0,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: 63502.0,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: 61570.0,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: null,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
group: ['James'],
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: 67506.0,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: 65036.0,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: 61554.0,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: 60584.0,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: 59824.0,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: 61597.0,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: null,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
group: ['John'],
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: 71390.0,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: 64858.0,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: 61480.0,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: 60754.0,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: 58644.0,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: null,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
group: ['Michael'],
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: 80812.0,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: 79709.0,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: 82204.0,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: 81785.0,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: 84893.0,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: 85015.0,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: 77321.0,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: 71197.0,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: 67598.0,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: 67304.0,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: 68149.0,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: 66686.0,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: 67344.0,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: 66875.0,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: 67473.0,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: 68375.0,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: 68467.0,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: 67904.0,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: 67708.0,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: 67457.0,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: 64667.0,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: 63959.0,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: 63442.0,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: 63924.0,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: 65233.0,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: 65138.0,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: 60646.0,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
group: ['Robert'],
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: 62973.0,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: 59162.0,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: null,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: null,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart } from '@superset-ui/core';
|
||||
import ParallelCoordinatesChartPlugin from '@superset-ui/legacy-plugin-chart-parallel-coordinates';
|
||||
import data from './data';
|
||||
|
||||
new ParallelCoordinatesChartPlugin()
|
||||
.configure({ key: 'parallel-coordinates' })
|
||||
.register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-plugin-chart-parallel-coordinates',
|
||||
};
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType="parallel-coordinates"
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
includeSeries: false,
|
||||
linearColorScheme: 'schemeRdYlBu',
|
||||
metrics: ['sum__SP_POP_TOTL', 'sum__SP_RUR_TOTL_ZS', 'sum__SH_DYN_AIDS'],
|
||||
secondaryMetric: 'sum__SP_POP_TOTL',
|
||||
series: 'country_name',
|
||||
showDatatable: false,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,81 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export default [
|
||||
{
|
||||
country_name: 'China',
|
||||
sum__SP_POP_TOTL: 1344130000.0,
|
||||
sum__SP_RUR_TOTL_ZS: 49.427,
|
||||
sum__SH_DYN_AIDS: 0.0,
|
||||
},
|
||||
{
|
||||
country_name: 'India',
|
||||
sum__SP_POP_TOTL: 1247446011.0,
|
||||
sum__SP_RUR_TOTL_ZS: 68.724,
|
||||
sum__SH_DYN_AIDS: 0.0,
|
||||
},
|
||||
{
|
||||
country_name: 'United States',
|
||||
sum__SP_POP_TOTL: 311721632.0,
|
||||
sum__SP_RUR_TOTL_ZS: 19.06,
|
||||
sum__SH_DYN_AIDS: 0.0,
|
||||
},
|
||||
{
|
||||
country_name: 'Indonesia',
|
||||
sum__SP_POP_TOTL: 244808254.0,
|
||||
sum__SP_RUR_TOTL_ZS: 49.288,
|
||||
sum__SH_DYN_AIDS: 540000.0,
|
||||
},
|
||||
{
|
||||
country_name: 'Brazil',
|
||||
sum__SP_POP_TOTL: 200517584.0,
|
||||
sum__SP_RUR_TOTL_ZS: 15.377,
|
||||
sum__SH_DYN_AIDS: 0.0,
|
||||
},
|
||||
{
|
||||
country_name: 'Pakistan',
|
||||
sum__SP_POP_TOTL: 173669648.0,
|
||||
sum__SP_RUR_TOTL_ZS: 62.993,
|
||||
sum__SH_DYN_AIDS: 52000.0,
|
||||
},
|
||||
{
|
||||
country_name: 'Nigeria',
|
||||
sum__SP_POP_TOTL: 163770669.0,
|
||||
sum__SP_RUR_TOTL_ZS: 55.638,
|
||||
sum__SH_DYN_AIDS: 3000000.0,
|
||||
},
|
||||
{
|
||||
country_name: 'Bangladesh',
|
||||
sum__SP_POP_TOTL: 153405612.0,
|
||||
sum__SP_RUR_TOTL_ZS: 68.775,
|
||||
sum__SH_DYN_AIDS: 7800.0,
|
||||
},
|
||||
{
|
||||
country_name: 'Russian Federation',
|
||||
sum__SP_POP_TOTL: 142960868.0,
|
||||
sum__SP_RUR_TOTL_ZS: 26.268,
|
||||
sum__SH_DYN_AIDS: 0.0,
|
||||
},
|
||||
{
|
||||
country_name: 'Japan',
|
||||
sum__SP_POP_TOTL: 127817277.0,
|
||||
sum__SP_RUR_TOTL_ZS: 8.752,
|
||||
sum__SH_DYN_AIDS: 0.0,
|
||||
},
|
||||
];
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import PartitionChartPlugin from '@superset-ui/legacy-plugin-chart-partition';
|
||||
import data from './data';
|
||||
import dummyDatasource from '../../../shared/dummyDatasource';
|
||||
|
||||
new PartitionChartPlugin().configure({ key: VizType.Partition }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-plugin-chart-partition',
|
||||
};
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.Partition}
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
colorScheme: 'd3Category10',
|
||||
dateTimeFormat: '%Y-%m-%d',
|
||||
equalDateSize: true,
|
||||
groupby: ['region', 'country_code'],
|
||||
logScale: false,
|
||||
metrics: ['sum__SP_POP_TOTL'],
|
||||
numberFormat: '.3s',
|
||||
partitionLimit: '5',
|
||||
partitionThreshold: '0.05',
|
||||
richTooltip: true,
|
||||
timeSeriesOption: 'not-time',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,113 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export default [
|
||||
{
|
||||
name: 'World',
|
||||
val: 165709793794.0,
|
||||
children: [
|
||||
{
|
||||
name: 'East Asia & Pacific',
|
||||
val: 74157936990.0,
|
||||
children: [
|
||||
{
|
||||
name: 'CHN',
|
||||
val: 58345455000.0,
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
name: 'IDN',
|
||||
val: 9357861231.0,
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
name: 'JPN',
|
||||
val: 6454620759.0,
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Europe & Central Asia',
|
||||
val: 7667188460.0,
|
||||
children: [
|
||||
{
|
||||
name: 'RUS',
|
||||
val: 7667188460.0,
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Latin America & Caribbean',
|
||||
val: 7752058955.0,
|
||||
children: [
|
||||
{
|
||||
name: 'BRA',
|
||||
val: 7752058955.0,
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'North America',
|
||||
val: 13604468357.0,
|
||||
children: [
|
||||
{
|
||||
name: 'USA',
|
||||
val: 13604468357.0,
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'South Asia',
|
||||
val: 57268340539.0,
|
||||
children: [
|
||||
{
|
||||
name: 'BGD',
|
||||
val: 5549261462.0,
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
name: 'IND',
|
||||
val: 46023037597.0,
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
name: 'PAK',
|
||||
val: 5696041480.0,
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Sub-Saharan Africa',
|
||||
val: 5259800493.0,
|
||||
children: [
|
||||
{
|
||||
name: 'NGA',
|
||||
val: 5259800493.0,
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers, sort-keys */
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import RoseChartPlugin from '@superset-ui/legacy-plugin-chart-rose';
|
||||
import data from './data';
|
||||
|
||||
new RoseChartPlugin().configure({ key: VizType.Rose }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-plugin-chart-rose',
|
||||
};
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.Rose}
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
colorScheme: 'd3Category10',
|
||||
dateTimeFormat: '%Y-%m-%d',
|
||||
numberFormat: '.3s',
|
||||
richTooltip: true,
|
||||
roseAreaProportion: false,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,950 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys, no-magic-numbers */
|
||||
export default {
|
||||
'-157766400000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 0,
|
||||
name: ['Christopher'],
|
||||
time: -157766400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: -157766400000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 6820.0,
|
||||
name: ['David'],
|
||||
time: -157766400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: -157766400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 7835.0,
|
||||
name: ['Michael'],
|
||||
time: -157766400000.0,
|
||||
},
|
||||
],
|
||||
'-126230400000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 0,
|
||||
name: ['Christopher'],
|
||||
time: -126230400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: -126230400000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 6757.0,
|
||||
name: ['David'],
|
||||
time: -126230400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: -126230400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 7678.0,
|
||||
name: ['Michael'],
|
||||
time: -126230400000.0,
|
||||
},
|
||||
],
|
||||
'-94694400000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 0,
|
||||
name: ['Christopher'],
|
||||
time: -94694400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: -94694400000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 6923.0,
|
||||
name: ['David'],
|
||||
time: -94694400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: -94694400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 8132.0,
|
||||
name: ['Michael'],
|
||||
time: -94694400000.0,
|
||||
},
|
||||
],
|
||||
'-63158400000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 0,
|
||||
name: ['Christopher'],
|
||||
time: -63158400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: -63158400000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 6490.0,
|
||||
name: ['David'],
|
||||
time: -63158400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: -63158400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 8079.0,
|
||||
name: ['Michael'],
|
||||
time: -63158400000.0,
|
||||
},
|
||||
],
|
||||
'-31536000000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 0,
|
||||
name: ['Christopher'],
|
||||
time: -31536000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: -31536000000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 6563.0,
|
||||
name: ['David'],
|
||||
time: -31536000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: -31536000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 8245.0,
|
||||
name: ['Michael'],
|
||||
time: -31536000000.0,
|
||||
},
|
||||
],
|
||||
'0': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 0,
|
||||
name: ['Christopher'],
|
||||
time: 0.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 0.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 6367.0,
|
||||
name: ['David'],
|
||||
time: 0.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 0.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 8186.0,
|
||||
name: ['Michael'],
|
||||
time: 0.0,
|
||||
},
|
||||
],
|
||||
'31536000000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 0,
|
||||
name: ['Christopher'],
|
||||
time: 31536000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 31536000000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 31536000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 31536000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 6825.0,
|
||||
name: ['Michael'],
|
||||
time: 31536000000.0,
|
||||
},
|
||||
],
|
||||
'63072000000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 0,
|
||||
name: ['Christopher'],
|
||||
time: 63072000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 63072000000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 63072000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 6066.0,
|
||||
name: ['Jennifer'],
|
||||
time: 63072000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 6337.0,
|
||||
name: ['Michael'],
|
||||
time: 63072000000.0,
|
||||
},
|
||||
],
|
||||
'94694400000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 0,
|
||||
name: ['Christopher'],
|
||||
time: 94694400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 94694400000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 94694400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 94694400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 5877.0,
|
||||
name: ['Michael'],
|
||||
time: 94694400000.0,
|
||||
},
|
||||
],
|
||||
'126230400000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 0,
|
||||
name: ['Christopher'],
|
||||
time: 126230400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 126230400000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 126230400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 5672.0,
|
||||
name: ['Jennifer'],
|
||||
time: 126230400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 6058.0,
|
||||
name: ['Michael'],
|
||||
time: 126230400000.0,
|
||||
},
|
||||
],
|
||||
'157766400000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 0,
|
||||
name: ['Christopher'],
|
||||
time: 157766400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 157766400000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 157766400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 157766400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 6206.0,
|
||||
name: ['Michael'],
|
||||
time: 157766400000.0,
|
||||
},
|
||||
],
|
||||
'189302400000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 0,
|
||||
name: ['Christopher'],
|
||||
time: 189302400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 189302400000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 189302400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 189302400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 6178.0,
|
||||
name: ['Michael'],
|
||||
time: 189302400000.0,
|
||||
},
|
||||
],
|
||||
'220924800000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 0,
|
||||
name: ['Christopher'],
|
||||
time: 220924800000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 220924800000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 220924800000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 220924800000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 6313.0,
|
||||
name: ['Michael'],
|
||||
time: 220924800000.0,
|
||||
},
|
||||
],
|
||||
'252460800000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 0,
|
||||
name: ['Christopher'],
|
||||
time: 252460800000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 252460800000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 252460800000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 252460800000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 6489.0,
|
||||
name: ['Michael'],
|
||||
time: 252460800000.0,
|
||||
},
|
||||
],
|
||||
'283996800000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 0,
|
||||
name: ['Christopher'],
|
||||
time: 283996800000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 283996800000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 283996800000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 283996800000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 6580.0,
|
||||
name: ['Michael'],
|
||||
time: 283996800000.0,
|
||||
},
|
||||
],
|
||||
'315532800000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 0,
|
||||
name: ['Christopher'],
|
||||
time: 315532800000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 315532800000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 315532800000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 315532800000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 6896.0,
|
||||
name: ['Michael'],
|
||||
time: 315532800000.0,
|
||||
},
|
||||
],
|
||||
'347155200000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 0,
|
||||
name: ['Christopher'],
|
||||
time: 347155200000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 347155200000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 347155200000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 347155200000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 7142.0,
|
||||
name: ['Michael'],
|
||||
time: 347155200000.0,
|
||||
},
|
||||
],
|
||||
'378691200000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 6093.0,
|
||||
name: ['Christopher'],
|
||||
time: 378691200000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 378691200000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 378691200000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 5811.0,
|
||||
name: ['Jennifer'],
|
||||
time: 378691200000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 7155.0,
|
||||
name: ['Michael'],
|
||||
time: 378691200000.0,
|
||||
},
|
||||
],
|
||||
'410227200000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 6375.0,
|
||||
name: ['Christopher'],
|
||||
time: 410227200000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 410227200000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 410227200000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 5829.0,
|
||||
name: ['Jennifer'],
|
||||
time: 410227200000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 7386.0,
|
||||
name: ['Michael'],
|
||||
time: 410227200000.0,
|
||||
},
|
||||
],
|
||||
'441763200000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 6509.0,
|
||||
name: ['Christopher'],
|
||||
time: 441763200000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 441763200000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 441763200000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 441763200000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 7478.0,
|
||||
name: ['Michael'],
|
||||
time: 441763200000.0,
|
||||
},
|
||||
],
|
||||
'473385600000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 6744.0,
|
||||
name: ['Christopher'],
|
||||
time: 473385600000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 473385600000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 473385600000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 473385600000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 7210.0,
|
||||
name: ['Michael'],
|
||||
time: 473385600000.0,
|
||||
},
|
||||
],
|
||||
'504921600000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 6497.0,
|
||||
name: ['Christopher'],
|
||||
time: 504921600000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 504921600000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 504921600000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 504921600000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 7259.0,
|
||||
name: ['Michael'],
|
||||
time: 504921600000.0,
|
||||
},
|
||||
],
|
||||
'536457600000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 6549.0,
|
||||
name: ['Christopher'],
|
||||
time: 536457600000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 536457600000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 536457600000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 536457600000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 7448.0,
|
||||
name: ['Michael'],
|
||||
time: 536457600000.0,
|
||||
},
|
||||
],
|
||||
'567993600000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 6496.0,
|
||||
name: ['Christopher'],
|
||||
time: 567993600000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 567993600000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 567993600000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 567993600000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 7748.0,
|
||||
name: ['Michael'],
|
||||
time: 567993600000.0,
|
||||
},
|
||||
],
|
||||
'599616000000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 6526.0,
|
||||
name: ['Christopher'],
|
||||
time: 599616000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 599616000000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 599616000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 599616000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 7851.0,
|
||||
name: ['Michael'],
|
||||
time: 599616000000.0,
|
||||
},
|
||||
],
|
||||
'631152000000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 6641.0,
|
||||
name: ['Christopher'],
|
||||
time: 631152000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 5760.0,
|
||||
name: ['Daniel'],
|
||||
time: 631152000000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 631152000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 631152000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 8233.0,
|
||||
name: ['Michael'],
|
||||
time: 631152000000.0,
|
||||
},
|
||||
],
|
||||
'662688000000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 5784.0,
|
||||
name: ['Christopher'],
|
||||
time: 662688000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 662688000000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 662688000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 662688000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 7579.0,
|
||||
name: ['Michael'],
|
||||
time: 662688000000.0,
|
||||
},
|
||||
],
|
||||
'694224000000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 0,
|
||||
name: ['Christopher'],
|
||||
time: 694224000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 694224000000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 694224000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 694224000000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 6627.0,
|
||||
name: ['Michael'],
|
||||
time: 694224000000.0,
|
||||
},
|
||||
],
|
||||
'725846400000000000': [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
value: 0,
|
||||
name: ['Christopher'],
|
||||
time: 725846400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Daniel'],
|
||||
value: 0,
|
||||
name: ['Daniel'],
|
||||
time: 725846400000.0,
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
value: 0,
|
||||
name: ['David'],
|
||||
time: 725846400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Jennifer'],
|
||||
value: 0,
|
||||
name: ['Jennifer'],
|
||||
time: 725846400000.0,
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
value: 5839.0,
|
||||
name: ['Michael'],
|
||||
time: 725846400000.0,
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { SuperChart } from '@superset-ui/core';
|
||||
import SankeyLoopChartPlugin from '@superset-ui/legacy-plugin-chart-sankey-loop';
|
||||
import data from './data';
|
||||
|
||||
new SankeyLoopChartPlugin().configure({ key: 'sankey-loop' }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-plugin-chart-sankey-loop',
|
||||
};
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType="sankey-loop"
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
colorScheme: 'd3Category10',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys, no-magic-numbers */
|
||||
export default [
|
||||
{
|
||||
source: 'Lisdoonvarna',
|
||||
target: 'Cliffs of Moher',
|
||||
value: 50,
|
||||
},
|
||||
{
|
||||
source: 'Cliffs of Moher',
|
||||
target: 'Lisdoonvarna',
|
||||
value: 35,
|
||||
},
|
||||
{
|
||||
source: 'Cliffs of Moher',
|
||||
target: 'Killarney',
|
||||
value: 25,
|
||||
},
|
||||
{
|
||||
source: 'Lisdoonvarna',
|
||||
target: 'Killarney',
|
||||
value: 25,
|
||||
},
|
||||
{
|
||||
source: 'Lisdoonvarna',
|
||||
target: 'Kinvarra',
|
||||
value: 25,
|
||||
},
|
||||
{
|
||||
source: 'Kinvarra',
|
||||
target: 'Lisdoonvarna',
|
||||
value: 25,
|
||||
},
|
||||
];
|
||||
@@ -1,58 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import SankeyChartPlugin from '@superset-ui/legacy-plugin-chart-sankey';
|
||||
import ResizableChartDemo from '../../../shared/components/ResizableChartDemo';
|
||||
import data from './data';
|
||||
|
||||
new SankeyChartPlugin().configure({ key: VizType.LegacySankey }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-plugin-chart-sankey',
|
||||
};
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.LegacySankey}
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
colorScheme: 'd3Category10',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
export const resizable = () => (
|
||||
<ResizableChartDemo>
|
||||
{({ width, height }) => (
|
||||
<SuperChart
|
||||
chartType={VizType.LegacySankey}
|
||||
width={width}
|
||||
height={height}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
colorScheme: 'd3Category10',
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</ResizableChartDemo>
|
||||
);
|
||||
@@ -1,72 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys, no-magic-numbers */
|
||||
export default [
|
||||
{
|
||||
source: 'Energy',
|
||||
target: 'Electricity and heat',
|
||||
value: 24.9,
|
||||
},
|
||||
{
|
||||
source: 'Energy',
|
||||
target: 'Industry',
|
||||
value: 14.7,
|
||||
},
|
||||
{
|
||||
source: 'Energy',
|
||||
target: 'Transportation',
|
||||
value: 14.3,
|
||||
},
|
||||
{
|
||||
source: 'Deforestation',
|
||||
target: 'Carbon Dioxide',
|
||||
value: 10.9,
|
||||
},
|
||||
{
|
||||
source: 'Land Use Change',
|
||||
target: 'Deforestation',
|
||||
value: 10.9,
|
||||
},
|
||||
{
|
||||
source: 'Road',
|
||||
target: 'Carbon Dioxide',
|
||||
value: 10.5,
|
||||
},
|
||||
{
|
||||
source: 'Transportation',
|
||||
target: 'Road',
|
||||
value: 10.5,
|
||||
},
|
||||
{
|
||||
source: 'Residential Buildings',
|
||||
target: 'Carbon Dioxide',
|
||||
value: 10.2,
|
||||
},
|
||||
{
|
||||
source: 'Energy',
|
||||
target: 'Other Fuel Combustion',
|
||||
value: 8.6,
|
||||
},
|
||||
{
|
||||
source: 'Other Industry',
|
||||
target: 'Carbon Dioxide',
|
||||
value: 6.6,
|
||||
},
|
||||
];
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable no-magic-numbers, sort-keys */
|
||||
import { SuperChart } from '@superset-ui/core';
|
||||
import WorldMapChartPlugin from '@superset-ui/legacy-plugin-chart-world-map';
|
||||
import data from './data';
|
||||
|
||||
new WorldMapChartPlugin().configure({ key: 'world-map' }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-plugin-chart-world-map',
|
||||
};
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType="world-map"
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
maxBubbleSize: '25',
|
||||
showBubbles: true,
|
||||
colorPicker: {},
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,323 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
export default [
|
||||
{
|
||||
country: 'TTO',
|
||||
m1: 91.45,
|
||||
m2: 1354483.0,
|
||||
latitude: 11,
|
||||
longitude: -61,
|
||||
name: 'Trinidad and Tobago',
|
||||
},
|
||||
{
|
||||
country: 'BDI',
|
||||
m1: 88.239,
|
||||
m2: 10816860.0,
|
||||
latitude: -3.5,
|
||||
longitude: 30,
|
||||
name: 'Burundi',
|
||||
},
|
||||
{
|
||||
country: 'PNG',
|
||||
m1: 87.015,
|
||||
m2: 7463577.0,
|
||||
latitude: -6,
|
||||
longitude: 147,
|
||||
name: 'Papua New Guinea',
|
||||
},
|
||||
{
|
||||
country: 'LIE',
|
||||
m1: 85.695,
|
||||
m2: 37286.0,
|
||||
latitude: 47.26666666,
|
||||
longitude: 9.53333333,
|
||||
name: 'Liechtenstein',
|
||||
},
|
||||
{
|
||||
country: 'UGA',
|
||||
m1: 84.234,
|
||||
m2: 37782971.0,
|
||||
latitude: 1,
|
||||
longitude: 32,
|
||||
name: 'Uganda',
|
||||
},
|
||||
{
|
||||
country: 'MWI',
|
||||
m1: 83.898,
|
||||
m2: 16695253.0,
|
||||
latitude: -13.5,
|
||||
longitude: 34,
|
||||
name: 'Malawi',
|
||||
},
|
||||
{
|
||||
country: 'NPL',
|
||||
m1: 81.757,
|
||||
m2: 28174724.0,
|
||||
latitude: 28,
|
||||
longitude: 84,
|
||||
name: 'Nepal',
|
||||
},
|
||||
{
|
||||
country: 'LKA',
|
||||
m1: 81.68,
|
||||
m2: 20639000.0,
|
||||
latitude: 7,
|
||||
longitude: 81,
|
||||
name: 'Sri Lanka',
|
||||
},
|
||||
{
|
||||
country: 'NER',
|
||||
m1: 81.531,
|
||||
m2: 19113728.0,
|
||||
latitude: 16,
|
||||
longitude: 8,
|
||||
name: 'Niger',
|
||||
},
|
||||
{
|
||||
country: 'LCA',
|
||||
m1: 81.523,
|
||||
m2: 183645.0,
|
||||
latitude: 13.88333333,
|
||||
longitude: -60.96666666,
|
||||
name: 'Saint Lucia',
|
||||
},
|
||||
{
|
||||
country: 'SSD',
|
||||
m1: 81.409,
|
||||
m2: 11911184.0,
|
||||
latitude: 7,
|
||||
longitude: 30,
|
||||
name: 'South Sudan',
|
||||
},
|
||||
{
|
||||
country: 'ETH',
|
||||
m1: 80.972,
|
||||
m2: 96958732.0,
|
||||
latitude: 8,
|
||||
longitude: 38,
|
||||
name: 'Ethiopia',
|
||||
},
|
||||
{
|
||||
country: 'WSM',
|
||||
m1: 80.74,
|
||||
m2: 191845.0,
|
||||
latitude: -13.58333333,
|
||||
longitude: -172.33333333,
|
||||
name: 'Samoa',
|
||||
},
|
||||
{
|
||||
country: 'KHM',
|
||||
m1: 79.486,
|
||||
m2: 15328136.0,
|
||||
latitude: 13,
|
||||
longitude: 105,
|
||||
name: 'Cambodia',
|
||||
},
|
||||
{
|
||||
country: 'SWZ',
|
||||
m1: 78.685,
|
||||
m2: 1269112.0,
|
||||
latitude: -26.5,
|
||||
longitude: 31.5,
|
||||
name: 'Swaziland',
|
||||
},
|
||||
{
|
||||
country: 'SLB',
|
||||
m1: 78.124,
|
||||
m2: 572171.0,
|
||||
latitude: -8,
|
||||
longitude: 159,
|
||||
name: 'Solomon Islands',
|
||||
},
|
||||
{
|
||||
country: 'ERI',
|
||||
m1: 77.807,
|
||||
m2: 5110444.0,
|
||||
latitude: 15,
|
||||
longitude: 39,
|
||||
name: 'Eritrea',
|
||||
},
|
||||
{
|
||||
country: 'TCD',
|
||||
m1: 77.659,
|
||||
m2: 13587053.0,
|
||||
latitude: 15,
|
||||
longitude: 19,
|
||||
name: 'Chad',
|
||||
},
|
||||
{
|
||||
country: 'FSM',
|
||||
m1: 77.622,
|
||||
m2: 104044.0,
|
||||
latitude: 6.91666666,
|
||||
longitude: 158.25,
|
||||
name: 'Micronesia',
|
||||
},
|
||||
{
|
||||
country: 'TON',
|
||||
m1: 76.368,
|
||||
m2: 105586.0,
|
||||
latitude: -20,
|
||||
longitude: -175,
|
||||
name: 'Tonga',
|
||||
},
|
||||
{
|
||||
country: 'SLE',
|
||||
m1: 60.422,
|
||||
m2: 6315627.0,
|
||||
latitude: 8.5,
|
||||
longitude: -11.5,
|
||||
name: 'Sierra Leone',
|
||||
},
|
||||
{
|
||||
country: 'BIH',
|
||||
m1: 60.384,
|
||||
m2: 3817554.0,
|
||||
latitude: 44,
|
||||
longitude: 18,
|
||||
name: 'Bosnia and Herzegovina',
|
||||
},
|
||||
{
|
||||
country: 'GNQ',
|
||||
m1: 60.244,
|
||||
m2: 820885.0,
|
||||
latitude: 2,
|
||||
longitude: 10,
|
||||
name: 'Equatorial Guinea',
|
||||
},
|
||||
{
|
||||
country: 'CAF',
|
||||
m1: 60.241,
|
||||
m2: 4804316.0,
|
||||
latitude: 7,
|
||||
longitude: 21,
|
||||
name: 'Central African Republic',
|
||||
},
|
||||
{
|
||||
country: 'MUS',
|
||||
m1: 60.186,
|
||||
m2: 1260934.0,
|
||||
latitude: -20.28333333,
|
||||
longitude: 57.55,
|
||||
name: 'Mauritius',
|
||||
},
|
||||
{
|
||||
country: 'ZMB',
|
||||
m1: 59.528,
|
||||
m2: 15721343.0,
|
||||
latitude: -15,
|
||||
longitude: 30,
|
||||
name: 'Zambia',
|
||||
},
|
||||
{
|
||||
country: 'FRO',
|
||||
m1: 58.257,
|
||||
m2: 48221.0,
|
||||
latitude: 62,
|
||||
longitude: -7,
|
||||
name: 'Faroe Islands',
|
||||
},
|
||||
{
|
||||
country: 'ABW',
|
||||
m1: 58.221,
|
||||
m2: 103441.0,
|
||||
latitude: 12.5,
|
||||
longitude: -69.96666666,
|
||||
name: 'Aruba',
|
||||
},
|
||||
{
|
||||
country: 'XXX',
|
||||
m1: 58.024,
|
||||
m2: 74877030.0,
|
||||
},
|
||||
{
|
||||
country: 'EGY',
|
||||
m1: 56.931,
|
||||
m2: 89579670.0,
|
||||
latitude: 27,
|
||||
longitude: 30,
|
||||
name: 'Egypt',
|
||||
},
|
||||
{
|
||||
country: 'AGO',
|
||||
m1: 56.726,
|
||||
m2: 24227524.0,
|
||||
latitude: -12.5,
|
||||
longitude: 18.5,
|
||||
name: 'Angola',
|
||||
},
|
||||
{
|
||||
country: 'SEN',
|
||||
m1: 56.607,
|
||||
m2: 14672557.0,
|
||||
latitude: 14,
|
||||
longitude: -14,
|
||||
name: 'Senegal',
|
||||
},
|
||||
{
|
||||
country: 'BEN',
|
||||
m1: 56.486,
|
||||
m2: 10598482.0,
|
||||
latitude: 9.5,
|
||||
longitude: 2.25,
|
||||
name: 'Benin',
|
||||
},
|
||||
{
|
||||
country: 'BLZ',
|
||||
m1: 55.876,
|
||||
m2: 351706.0,
|
||||
latitude: 17.25,
|
||||
longitude: -88.75,
|
||||
name: 'Belize',
|
||||
},
|
||||
{
|
||||
country: 'KIR',
|
||||
m1: 55.827,
|
||||
m2: 110470.0,
|
||||
latitude: 1.41666666,
|
||||
longitude: 173,
|
||||
name: 'Kiribati',
|
||||
},
|
||||
{
|
||||
country: 'PHL',
|
||||
m1: 55.512,
|
||||
m2: 99138690.0,
|
||||
latitude: 13,
|
||||
longitude: 122,
|
||||
name: 'Philippines',
|
||||
},
|
||||
{
|
||||
country: 'MDV',
|
||||
m1: 55.506,
|
||||
m2: 357415.0,
|
||||
latitude: 3.25,
|
||||
longitude: 73,
|
||||
name: 'Maldives',
|
||||
},
|
||||
{
|
||||
country: 'MDA',
|
||||
m1: 55.075,
|
||||
m2: 3556400.0,
|
||||
latitude: 47,
|
||||
longitude: 29,
|
||||
name: 'Moldova',
|
||||
},
|
||||
];
|
||||
@@ -1,130 +0,0 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import { BigNumberChartPlugin } from '@superset-ui/plugin-chart-echarts';
|
||||
import testData from './data';
|
||||
|
||||
new BigNumberChartPlugin().configure({ key: 'big-number' }).register();
|
||||
|
||||
const TIME_COLUMN = '__timestamp';
|
||||
|
||||
const formData = {
|
||||
colorPicker: {
|
||||
r: 0,
|
||||
g: 122,
|
||||
b: 135,
|
||||
a: 1,
|
||||
},
|
||||
compareLag: 1,
|
||||
compareSuffix: 'over 10Y',
|
||||
metric: 'sum__SP_POP_TOTL',
|
||||
showTrendLine: true,
|
||||
startYAxisAtZero: true,
|
||||
timeGrainSqla: 'P1Y',
|
||||
vizType: VizType.BigNumber,
|
||||
yAxisFormat: '.3s',
|
||||
};
|
||||
|
||||
/**
|
||||
* Add null values to trendline data
|
||||
* @param data input data
|
||||
*/
|
||||
function withNulls(origData: object[], nullPosition = 3) {
|
||||
const data = [...origData];
|
||||
data[nullPosition] = {
|
||||
...data[nullPosition],
|
||||
sum__SP_POP_TOTL: null,
|
||||
};
|
||||
return data;
|
||||
}
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-preset-big-number/BigNumberWithTrendline',
|
||||
};
|
||||
|
||||
export const basicWithTrendline = () => (
|
||||
<SuperChart
|
||||
chartType="big-number"
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ data: testData }]}
|
||||
formData={formData}
|
||||
/>
|
||||
);
|
||||
|
||||
export const weeklyTimeGranularity = () => (
|
||||
<SuperChart
|
||||
chartType="big-number"
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ data: testData }]}
|
||||
formData={{
|
||||
...formData,
|
||||
timeGrainSqla: 'P1W',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
export const nullInTheMiddle = () => (
|
||||
<SuperChart
|
||||
chartType="big-number"
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ data: withNulls(testData, 3) }]}
|
||||
formData={formData}
|
||||
/>
|
||||
);
|
||||
|
||||
export const fixedRange = () => (
|
||||
<SuperChart
|
||||
chartType="big-number"
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[
|
||||
{
|
||||
data: testData.slice(0, 9),
|
||||
from_dttm: testData[testData.length - 1][TIME_COLUMN],
|
||||
to_dttm: null,
|
||||
},
|
||||
]}
|
||||
formData={{
|
||||
...formData,
|
||||
timeRangeFixed: true,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
export const noFixedRange = () => (
|
||||
<SuperChart
|
||||
chartType="big-number"
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[
|
||||
{
|
||||
data: testData.slice(0, 9),
|
||||
from_dttm: testData[testData.length - 1][TIME_COLUMN],
|
||||
to_dttm: testData[0][TIME_COLUMN],
|
||||
},
|
||||
]}
|
||||
formData={{
|
||||
...formData,
|
||||
timeRangeFixed: false,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,78 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
export default [
|
||||
{
|
||||
__timestamp: 1388534400000.0,
|
||||
sum__SP_POP_TOTL: 7237260256.0,
|
||||
},
|
||||
{
|
||||
__timestamp: 1356998400000.0,
|
||||
sum__SP_POP_TOTL: 7151135481.0,
|
||||
},
|
||||
{
|
||||
__timestamp: 1325376000000.0,
|
||||
sum__SP_POP_TOTL: 7066007165.0,
|
||||
},
|
||||
{
|
||||
__timestamp: 1293840000000.0,
|
||||
sum__SP_POP_TOTL: 6984252419.0,
|
||||
},
|
||||
{
|
||||
__timestamp: 1262304000000.0,
|
||||
sum__SP_POP_TOTL: 6901110512.0,
|
||||
},
|
||||
{
|
||||
__timestamp: 1230768000000.0,
|
||||
sum__SP_POP_TOTL: 6818457192.0,
|
||||
},
|
||||
{
|
||||
__timestamp: 1199145600000.0,
|
||||
sum__SP_POP_TOTL: 6735914031.0,
|
||||
},
|
||||
{
|
||||
__timestamp: 1167609600000.0,
|
||||
sum__SP_POP_TOTL: 6653571302.0,
|
||||
},
|
||||
{
|
||||
__timestamp: 1136073600000.0,
|
||||
sum__SP_POP_TOTL: 6572596462.0,
|
||||
},
|
||||
{
|
||||
__timestamp: 1104537600000.0,
|
||||
sum__SP_POP_TOTL: 6491857539.0,
|
||||
},
|
||||
{
|
||||
__timestamp: 1072915200000.0,
|
||||
sum__SP_POP_TOTL: 6411615629.0,
|
||||
},
|
||||
{
|
||||
__timestamp: 1041379200000.0,
|
||||
sum__SP_POP_TOTL: 6331766837.0,
|
||||
},
|
||||
{
|
||||
__timestamp: 1009843200000.0,
|
||||
sum__SP_POP_TOTL: 6252469127.0,
|
||||
},
|
||||
{
|
||||
__timestamp: 978307200000.0,
|
||||
sum__SP_POP_TOTL: 617333941.0,
|
||||
},
|
||||
];
|
||||
@@ -1,59 +0,0 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import { BigNumberTotalChartPlugin } from '@superset-ui/plugin-chart-echarts';
|
||||
import data from './data';
|
||||
|
||||
new BigNumberTotalChartPlugin()
|
||||
.configure({ key: 'big-number-total' })
|
||||
.register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-preset-big-number/BigNumberTotal',
|
||||
};
|
||||
|
||||
export const totalBasic = () => (
|
||||
<SuperChart
|
||||
chartType="big-number-total"
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
metric: 'sum__num',
|
||||
subheader: 'total female participants',
|
||||
vizType: VizType.BigNumberTotal,
|
||||
yAxisFormat: '.3s',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
export const totalNoData = () => (
|
||||
<SuperChart
|
||||
chartType="big-number-total"
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ data: [] }]}
|
||||
formData={{
|
||||
metric: 'sum__num',
|
||||
subheader: 'total female participants',
|
||||
vizType: VizType.BigNumberTotal,
|
||||
yAxisFormat: '.3s',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export default [
|
||||
{
|
||||
sum__num: 32546308,
|
||||
},
|
||||
];
|
||||
@@ -1,100 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { SuperChart } from '@superset-ui/core';
|
||||
import { ArcChartPlugin } from '@superset-ui/legacy-preset-chart-deckgl';
|
||||
import payload from './payload';
|
||||
import dummyDatasource from '../../../../shared/dummyDatasource';
|
||||
|
||||
new ArcChartPlugin().configure({ key: 'deck_arc' }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-preset-chart-deckgl/ArcChartPlugin',
|
||||
};
|
||||
|
||||
export const ArcChartViz = () => (
|
||||
<SuperChart
|
||||
chartType="deck_arc"
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[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: '',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,269 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* 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: '',
|
||||
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,71 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { SuperChart } from '@superset-ui/core';
|
||||
import { GridChartPlugin } from '@superset-ui/legacy-preset-chart-deckgl';
|
||||
import payload from './payload';
|
||||
import dummyDatasource from '../../../../shared/dummyDatasource';
|
||||
|
||||
new GridChartPlugin().configure({ key: 'deck_grid' }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-preset-chart-deckgl/GridChartPlugin',
|
||||
};
|
||||
|
||||
export const GridChartViz = () => (
|
||||
<SuperChart
|
||||
chartType="deck_grid"
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[payload]}
|
||||
formData={{
|
||||
datasource: '5__table',
|
||||
viz_type: 'deck_grid',
|
||||
slice_id: 69,
|
||||
url_params: {},
|
||||
granularity_sqla: 'dttm',
|
||||
time_grain_sqla: null,
|
||||
time_range: '+:+',
|
||||
spatial: { latCol: 'LAT', lonCol: 'LON', type: 'latlong' },
|
||||
size: 'count',
|
||||
row_limit: 5000,
|
||||
filter_nulls: true,
|
||||
adhoc_filters: [],
|
||||
mapbox_style: 'mapbox://styles/mapbox/satellite-streets-v9',
|
||||
viewport: {
|
||||
bearing: 155.80099696026355,
|
||||
latitude: 37.7942314882596,
|
||||
longitude: -122.42066918995666,
|
||||
pitch: 53.470800300695146,
|
||||
zoom: 12.699690845482069,
|
||||
},
|
||||
color_picker: { a: 1, b: 0, g: 255, r: 14 },
|
||||
autozoom: true,
|
||||
grid_size: 120,
|
||||
extruded: true,
|
||||
js_columns: [],
|
||||
js_data_mutator: '',
|
||||
js_tooltip: '',
|
||||
js_onclick_href: '',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,113 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
/* eslint-disable no-magic-numbers */
|
||||
export default {
|
||||
cache_key: null,
|
||||
cached_dttm: null,
|
||||
cache_timeout: 86400,
|
||||
error: null,
|
||||
form_data: {
|
||||
color_picker: { a: 1, b: 0, g: 255, r: 14 },
|
||||
datasource: '5__table',
|
||||
extruded: true,
|
||||
granularity_sqla: 'dttm',
|
||||
grid_size: 120,
|
||||
groupby: [],
|
||||
mapbox_style: 'mapbox://styles/mapbox/satellite-streets-v9',
|
||||
point_radius: 'Auto',
|
||||
point_radius_fixed: { type: 'fix', value: 2000 },
|
||||
point_radius_unit: 'Pixels',
|
||||
row_limit: 5000,
|
||||
size: 'count',
|
||||
spatial: { latCol: 'LAT', lonCol: 'LON', type: 'latlong' },
|
||||
time_grain_sqla: null,
|
||||
viewport: {
|
||||
bearing: 155.80099696026355,
|
||||
latitude: 37.7942314882596,
|
||||
longitude: -122.42066918995666,
|
||||
pitch: 53.470800300695146,
|
||||
zoom: 12.699690845482069,
|
||||
},
|
||||
viz_type: 'deck_grid',
|
||||
slice_id: 69,
|
||||
time_range: ' : ',
|
||||
adhoc_filters: [
|
||||
{
|
||||
clause: 'WHERE',
|
||||
expressionType: 'SIMPLE',
|
||||
filterOptionName: '72912258-6f4f-4f04-a570-58317ca49b11',
|
||||
comparator: '',
|
||||
operator: 'IS NOT NULL',
|
||||
subject: 'LAT',
|
||||
},
|
||||
{
|
||||
clause: 'WHERE',
|
||||
expressionType: 'SIMPLE',
|
||||
filterOptionName: '7e19669b-48ef-4be8-a7e1-8378dedb4c00',
|
||||
comparator: '',
|
||||
operator: 'IS NOT NULL',
|
||||
subject: 'LON',
|
||||
},
|
||||
],
|
||||
where: '',
|
||||
having: '',
|
||||
filters: [
|
||||
{ col: 'LAT', op: 'IS NOT NULL', val: '' },
|
||||
{ col: 'LON', op: 'IS NOT NULL', val: '' },
|
||||
],
|
||||
},
|
||||
is_cached: false,
|
||||
query:
|
||||
'SELECT "LAT" AS "LAT",\n "LON" AS "LON",\n COUNT(*) AS count\nFROM\n (SELECT datetime,\n ROUND(LON*10000000)/10000000 as LON,\n ROUND(LAT*10000000)/10000000 as LAT, NUMBER , STREET,\n UNIT,\n CITY,\n DISTRICT,\n REGION,\n POSTCODE,\n ID occupancy,\n radius_miles,\n geohash,\n delimited\n FROM long_lat) AS expr_qry\nWHERE "LAT" IS NOT NULL\n AND "LON" IS NOT NULL\nGROUP BY "LAT",\n "LON"\nORDER BY count DESC\nLIMIT 5000\nOFFSET 0',
|
||||
status: 'success',
|
||||
stacktrace: null,
|
||||
rowcount: 5000,
|
||||
data: {
|
||||
features: [
|
||||
{ position: [-122.4221936, 37.7786083], weight: 2415 },
|
||||
{ position: [-122.4101989, 37.7878771], weight: 2391 },
|
||||
{ position: [-122.4205965, 37.8054735], weight: 1349 },
|
||||
{ position: [-122.4125137, 37.7908413], weight: 1004 },
|
||||
{ position: [-122.4088144, 37.7912984], weight: 816 },
|
||||
{ position: [-122.3934248, 37.7776271], weight: 610 },
|
||||
{ position: [-122.390972, 37.789376], weight: 460 },
|
||||
{ position: [-122.3804676, 37.7334388], weight: 453 },
|
||||
{ position: [-122.4214063, 37.7813858], weight: 453 },
|
||||
{ position: [-122.3961419, 37.7905823], weight: 422 },
|
||||
{ position: [-122.3922757, 37.7858294], weight: 376 },
|
||||
{ position: [-122.3903881, 37.7826463], weight: 359 },
|
||||
{ position: [-122.3936422, 37.7870311], weight: 353 },
|
||||
{ position: [-122.435635, 37.7852314], weight: 306 },
|
||||
{ position: [-122.3971336, 37.7790975], weight: 301 },
|
||||
{ position: [-122.3921161, 37.7864536], weight: 300 },
|
||||
{ position: [-122.390611, 37.7876797], weight: 292 },
|
||||
{ position: [-122.4055041, 37.804244], weight: 291 },
|
||||
{ position: [-122.4136476, 37.7910263], weight: 264 },
|
||||
{ position: [-122.4224908, 37.7867552], weight: 247 },
|
||||
{ position: [-122.4123203, 37.7784493], weight: 240 },
|
||||
{ position: [-122.4368896, 37.7822303], weight: 239 },
|
||||
{ position: [-122.389625, 37.7806302], weight: 237 },
|
||||
],
|
||||
mapboxApiKey:
|
||||
'pk.eyJ1Ijoia3Jpc3R3IiwiYSI6ImNqbGg1N242NTFlczczdnBhazViMjgzZ2sifQ.lUneM-o3NucXN189EYyXxQ',
|
||||
metricLabels: ['count'],
|
||||
},
|
||||
};
|
||||
@@ -1,72 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { SuperChart } from '@superset-ui/core';
|
||||
import { HexChartPlugin } from '@superset-ui/legacy-preset-chart-deckgl';
|
||||
import payload from './payload';
|
||||
import dummyDatasource from '../../../../shared/dummyDatasource';
|
||||
|
||||
new HexChartPlugin().configure({ key: 'deck_hex' }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-preset-chart-deckgl/HexChartPlugin',
|
||||
};
|
||||
|
||||
export const HexChartViz = () => (
|
||||
<SuperChart
|
||||
chartType="deck_hex"
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[payload]}
|
||||
formData={{
|
||||
datasource: '5__table',
|
||||
viz_type: 'deck_hex',
|
||||
slice_id: 68,
|
||||
url_params: {},
|
||||
granularity_sqla: 'dttm',
|
||||
time_grain_sqla: null,
|
||||
time_range: '+:+',
|
||||
spatial: { latCol: 'LAT', lonCol: 'LON', type: 'latlong' },
|
||||
size: 'count',
|
||||
row_limit: 5000,
|
||||
filter_nulls: true,
|
||||
adhoc_filters: [],
|
||||
mapbox_style: 'mapbox://styles/mapbox/streets-v9',
|
||||
viewport: {
|
||||
bearing: -2.3984797349335167,
|
||||
latitude: 37.789795085160335,
|
||||
longitude: -122.40632230075536,
|
||||
pitch: 54.08961642447763,
|
||||
zoom: 13.835465702403654,
|
||||
},
|
||||
color_picker: { a: 1, b: 0, g: 255, r: 14 },
|
||||
autozoom: true,
|
||||
grid_size: 40,
|
||||
extruded: true,
|
||||
js_agg_function: 'sum',
|
||||
js_columns: [],
|
||||
js_data_mutator: '',
|
||||
js_tooltip: '',
|
||||
js_onclick_href: '',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,113 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
/* eslint-disable no-magic-numbers */
|
||||
export default {
|
||||
cache_key: null,
|
||||
cached_dttm: null,
|
||||
cache_timeout: 86400,
|
||||
error: null,
|
||||
form_data: {
|
||||
color_picker: { a: 1, b: 0, g: 255, r: 14 },
|
||||
datasource: '5__table',
|
||||
extruded: true,
|
||||
granularity_sqla: 'dttm',
|
||||
grid_size: 120,
|
||||
groupby: [],
|
||||
mapbox_style: 'mapbox://styles/mapbox/satellite-streets-v9',
|
||||
point_radius: 'Auto',
|
||||
point_radius_fixed: { type: 'fix', value: 2000 },
|
||||
point_radius_unit: 'Pixels',
|
||||
row_limit: 5000,
|
||||
size: 'count',
|
||||
spatial: { latCol: 'LAT', lonCol: 'LON', type: 'latlong' },
|
||||
time_grain_sqla: null,
|
||||
viewport: {
|
||||
bearing: 155.80099696026355,
|
||||
latitude: 37.7942314882596,
|
||||
longitude: -122.42066918995666,
|
||||
pitch: 53.470800300695146,
|
||||
zoom: 12.699690845482069,
|
||||
},
|
||||
viz_type: 'deck_grid',
|
||||
slice_id: 69,
|
||||
time_range: ' : ',
|
||||
adhoc_filters: [
|
||||
{
|
||||
clause: 'WHERE',
|
||||
expressionType: 'SIMPLE',
|
||||
filterOptionName: '72912258-6f4f-4f04-a570-58317ca49b11',
|
||||
comparator: '',
|
||||
operator: 'IS NOT NULL',
|
||||
subject: 'LAT',
|
||||
},
|
||||
{
|
||||
clause: 'WHERE',
|
||||
expressionType: 'SIMPLE',
|
||||
filterOptionName: '7e19669b-48ef-4be8-a7e1-8378dedb4c00',
|
||||
comparator: '',
|
||||
operator: 'IS NOT NULL',
|
||||
subject: 'LON',
|
||||
},
|
||||
],
|
||||
where: '',
|
||||
having: '',
|
||||
filters: [
|
||||
{ col: 'LAT', op: 'IS NOT NULL', val: '' },
|
||||
{ col: 'LON', op: 'IS NOT NULL', val: '' },
|
||||
],
|
||||
},
|
||||
is_cached: false,
|
||||
query:
|
||||
'SELECT "LAT" AS "LAT",\n "LON" AS "LON",\n COUNT(*) AS count\nFROM\n (SELECT datetime,\n ROUND(LON*10000000)/10000000 as LON,\n ROUND(LAT*10000000)/10000000 as LAT, NUMBER , STREET,\n UNIT,\n CITY,\n DISTRICT,\n REGION,\n POSTCODE,\n ID occupancy,\n radius_miles,\n geohash,\n delimited\n FROM long_lat) AS expr_qry\nWHERE "LAT" IS NOT NULL\n AND "LON" IS NOT NULL\nGROUP BY "LAT",\n "LON"\nORDER BY count DESC\nLIMIT 5000\nOFFSET 0',
|
||||
status: 'success',
|
||||
stacktrace: null,
|
||||
rowcount: 5000,
|
||||
data: {
|
||||
features: [
|
||||
{ position: [-122.4221936, 37.7786083], weight: 2415 },
|
||||
{ position: [-122.4101989, 37.7878771], weight: 2391 },
|
||||
{ position: [-122.4205965, 37.8054735], weight: 1349 },
|
||||
{ position: [-122.4125137, 37.7908413], weight: 1004 },
|
||||
{ position: [-122.4088144, 37.7912984], weight: 816 },
|
||||
{ position: [-122.3934248, 37.7776271], weight: 610 },
|
||||
{ position: [-122.390972, 37.789376], weight: 460 },
|
||||
{ position: [-122.3804676, 37.7334388], weight: 453 },
|
||||
{ position: [-122.4214063, 37.7813858], weight: 453 },
|
||||
{ position: [-122.3961419, 37.7905823], weight: 422 },
|
||||
{ position: [-122.3922757, 37.7858294], weight: 376 },
|
||||
{ position: [-122.3903881, 37.7826463], weight: 359 },
|
||||
{ position: [-122.3936422, 37.7870311], weight: 353 },
|
||||
{ position: [-122.435635, 37.7852314], weight: 306 },
|
||||
{ position: [-122.3971336, 37.7790975], weight: 301 },
|
||||
{ position: [-122.3921161, 37.7864536], weight: 300 },
|
||||
{ position: [-122.390611, 37.7876797], weight: 292 },
|
||||
{ position: [-122.4055041, 37.804244], weight: 291 },
|
||||
{ position: [-122.4136476, 37.7910263], weight: 264 },
|
||||
{ position: [-122.4224908, 37.7867552], weight: 247 },
|
||||
{ position: [-122.4123203, 37.7784493], weight: 240 },
|
||||
{ position: [-122.4368896, 37.7822303], weight: 239 },
|
||||
{ position: [-122.389625, 37.7806302], weight: 237 },
|
||||
],
|
||||
mapboxApiKey:
|
||||
'pk.eyJ1Ijoia3Jpc3R3IiwiYSI6ImNqbGg1N242NTFlczczdnBhazViMjgzZ2sifQ.lUneM-o3NucXN189EYyXxQ',
|
||||
metricLabels: ['count'],
|
||||
},
|
||||
};
|
||||
@@ -1,83 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { SuperChart, useTheme } from '@superset-ui/core';
|
||||
import { PathChartPlugin } from '@superset-ui/legacy-preset-chart-deckgl';
|
||||
import { payload } from './payload';
|
||||
import dummyDatasource from '../../../../shared/dummyDatasource';
|
||||
|
||||
new PathChartPlugin().configure({ key: 'deck_path' }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-preset-chart-deckgl/PathChartPlugin',
|
||||
};
|
||||
|
||||
export const PathChartViz = () => {
|
||||
const theme = useTheme();
|
||||
return (
|
||||
<SuperChart
|
||||
chartType="deck_path"
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[payload(theme)]}
|
||||
formData={{
|
||||
datasource: '11__table',
|
||||
viz_type: 'deck_path',
|
||||
slice_id: 72,
|
||||
url_params: {},
|
||||
granularity_sqla: null,
|
||||
time_grain_sqla: null,
|
||||
time_range: '+:+',
|
||||
line_column: 'path_json',
|
||||
line_type: 'json',
|
||||
row_limit: 5000,
|
||||
filter_nulls: true,
|
||||
adhoc_filters: [],
|
||||
mapbox_style: 'mapbox://styles/mapbox/light-v9',
|
||||
viewport: {
|
||||
altitude: 1.5,
|
||||
bearing: 0,
|
||||
height: 1094,
|
||||
latitude: 37.73671752604488,
|
||||
longitude: -122.18885402582598,
|
||||
maxLatitude: 85.05113,
|
||||
maxPitch: 60,
|
||||
maxZoom: 20,
|
||||
minLatitude: -85.05113,
|
||||
minPitch: 0,
|
||||
minZoom: 0,
|
||||
pitch: 0,
|
||||
width: 669,
|
||||
zoom: 9.51847667620428,
|
||||
},
|
||||
color_picker: { a: 1, b: 135, g: 122, r: 0 },
|
||||
line_width: 150,
|
||||
reverse_long_lat: false,
|
||||
autozoom: true,
|
||||
js_columns: ['color'],
|
||||
js_data_mutator: '',
|
||||
js_tooltip: '',
|
||||
js_onclick_href: '',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
@@ -1,227 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
/* eslint-disable no-magic-numbers */
|
||||
export const payload = theme => ({
|
||||
cache_key: null,
|
||||
cached_dttm: null,
|
||||
cache_timeout: 86400,
|
||||
error: null,
|
||||
form_data: {
|
||||
datasource: '11__table',
|
||||
viz_type: 'deck_path',
|
||||
slice_id: 72,
|
||||
url_params: {},
|
||||
granularity_sqla: null,
|
||||
time_grain_sqla: null,
|
||||
time_range: ' : ',
|
||||
line_column: 'path_json',
|
||||
line_type: 'json',
|
||||
row_limit: 5000,
|
||||
filter_nulls: true,
|
||||
adhoc_filters: [
|
||||
{
|
||||
clause: 'WHERE',
|
||||
expressionType: 'SIMPLE',
|
||||
filterOptionName: 'b4c1a7de-17ef-4505-b688-2760c0c22e1f',
|
||||
comparator: '',
|
||||
operator: 'IS NOT NULL',
|
||||
subject: 'path_json',
|
||||
},
|
||||
],
|
||||
mapbox_style: 'mapbox://styles/mapbox/light-v9',
|
||||
viewport: {
|
||||
altitude: 1.5,
|
||||
bearing: 0,
|
||||
height: 1094,
|
||||
latitude: 37.73671752604488,
|
||||
longitude: -122.18885402582598,
|
||||
maxLatitude: 85.05113,
|
||||
maxPitch: 60,
|
||||
maxZoom: 20,
|
||||
minLatitude: -85.05113,
|
||||
minPitch: 0,
|
||||
minZoom: 0,
|
||||
pitch: 0,
|
||||
width: 669,
|
||||
zoom: 9.51847667620428,
|
||||
},
|
||||
color_picker: { a: 1, b: 135, g: 122, r: 0 },
|
||||
line_width: 150,
|
||||
reverse_long_lat: false,
|
||||
autozoom: true,
|
||||
js_columns: ['color'],
|
||||
where: '',
|
||||
having: '',
|
||||
filters: [{ col: 'path_json', op: 'IS NOT NULL', val: '' }],
|
||||
},
|
||||
is_cached: false,
|
||||
query:
|
||||
'SELECT color AS color,\n path_json AS path_json\nFROM bart_lines\nWHERE path_json IS NOT NULL\nLIMIT 5000\nOFFSET 0',
|
||||
status: 'success',
|
||||
stacktrace: null,
|
||||
rowcount: 5,
|
||||
data: {
|
||||
features: [
|
||||
{
|
||||
color: theme.colors.primary.base,
|
||||
path: [
|
||||
[-122.3535851, 37.9360513],
|
||||
[-122.3179784, 37.9249513],
|
||||
[-122.300284, 37.902646],
|
||||
[-122.2843653, 37.8735039],
|
||||
[-122.269058, 37.8694562],
|
||||
[-122.2709185, 37.85301],
|
||||
[-122.2689342, 37.8283973],
|
||||
[-122.2707195, 37.8080566],
|
||||
[-122.2718706, 37.804996],
|
||||
[-122.2948251, 37.8064628],
|
||||
[-122.3971496, 37.794745],
|
||||
[-122.4030149, 37.7905282],
|
||||
[-122.4084631, 37.7862646],
|
||||
[-122.4157833, 37.7803439],
|
||||
[-122.4219476, 37.7653052],
|
||||
[-122.4206096, 37.7528545],
|
||||
[-122.4359052, 37.7340058],
|
||||
[-122.448995, 37.723273],
|
||||
[-122.471192, 37.7067871],
|
||||
[-122.4672607, 37.6842548],
|
||||
[-122.4449822, 37.6635925],
|
||||
[-122.4169649, 37.6372339],
|
||||
[-122.3876274, 37.5993171],
|
||||
],
|
||||
__timestamp: null,
|
||||
extraProps: { color: theme.colors.primary.base },
|
||||
},
|
||||
{
|
||||
color: theme.colors.warning.base,
|
||||
path: [
|
||||
[-122.353165, 37.936887],
|
||||
[-122.317269, 37.925655],
|
||||
[-122.299272, 37.903059],
|
||||
[-122.283451, 37.87404],
|
||||
[-122.268045, 37.869867],
|
||||
[-122.26978, 37.853024],
|
||||
[-122.2677961, 37.8284091],
|
||||
[-122.2695925, 37.8079322],
|
||||
[-122.2721546, 37.8035508],
|
||||
[-122.2666476, 37.7964139],
|
||||
[-122.2253433, 37.7739122],
|
||||
[-122.1985085, 37.7530763],
|
||||
[-122.1625282, 37.7216747],
|
||||
[-122.1280105, 37.6961822],
|
||||
[-122.0888196, 37.669805],
|
||||
[-122.0584803, 37.6342836],
|
||||
[-122.0187396, 37.5906334],
|
||||
[-121.9772135, 37.5567286],
|
||||
],
|
||||
__timestamp: null,
|
||||
extraProps: { color: theme.colors.warning.base },
|
||||
},
|
||||
{
|
||||
color: theme.colors.error.base,
|
||||
path: [
|
||||
[-121.945154, 38.018914],
|
||||
[-122.024597, 38.003275],
|
||||
[-122.029095, 37.973737],
|
||||
[-122.056013, 37.928403],
|
||||
[-122.067423, 37.905628],
|
||||
[-122.123801, 37.893394],
|
||||
[-122.183791, 37.878361],
|
||||
[-122.251793, 37.844601],
|
||||
[-122.2666934, 37.8282587],
|
||||
[-122.2684655, 37.8078078],
|
||||
[-122.2715151, 37.80322],
|
||||
[-122.2947035, 37.8055689],
|
||||
[-122.3969458, 37.7938605],
|
||||
[-122.402211, 37.7898921],
|
||||
[-122.40766, 37.7856278],
|
||||
[-122.4147696, 37.779936],
|
||||
[-122.4208208, 37.7651836],
|
||||
[-122.4195378, 37.7525542],
|
||||
[-122.4349986, 37.7334634],
|
||||
[-122.4482045, 37.722627],
|
||||
[-122.4701365, 37.7064541],
|
||||
[-122.466233, 37.684638],
|
||||
[-122.444116, 37.664174],
|
||||
[-122.416038, 37.637753000000004],
|
||||
[-122.392612, 37.616035],
|
||||
[-122.38666, 37.599787],
|
||||
],
|
||||
__timestamp: null,
|
||||
extraProps: { color: theme.colors.error.base },
|
||||
},
|
||||
{
|
||||
color: theme.colors.success.base,
|
||||
path: [
|
||||
[-121.900367, 37.701695],
|
||||
[-121.928099, 37.699759],
|
||||
[-122.075567, 37.690754],
|
||||
[-122.1266292, 37.6975918],
|
||||
[-122.160905, 37.7229335],
|
||||
[-122.1968609, 37.7543157],
|
||||
[-122.2239172, 37.7753131],
|
||||
[-122.2653405, 37.7978803],
|
||||
[-122.294582, 37.804675],
|
||||
[-122.396742, 37.792976],
|
||||
[-122.401407, 37.789256],
|
||||
[-122.406857, 37.784991],
|
||||
[-122.413756, 37.779528],
|
||||
[-122.419694, 37.765062],
|
||||
[-122.418466, 37.752254],
|
||||
[-122.434092, 37.732921],
|
||||
[-122.447414, 37.721981],
|
||||
[-122.469081, 37.706121],
|
||||
],
|
||||
__timestamp: null,
|
||||
extraProps: { color: theme.colors.success.base },
|
||||
},
|
||||
{
|
||||
color: theme.colors.warning.base,
|
||||
path: [
|
||||
[-121.9764, 37.557355],
|
||||
[-122.017867, 37.591208],
|
||||
[-122.057551, 37.6348],
|
||||
[-122.087967, 37.670399],
|
||||
[-122.1272512, 37.696851],
|
||||
[-122.161717, 37.7223045],
|
||||
[-122.1976851, 37.7536963],
|
||||
[-122.2246308, 37.7746129],
|
||||
[-122.2658775, 37.7970877],
|
||||
[-122.2945333, 37.8037768],
|
||||
[-122.3965382, 37.7920915],
|
||||
[-122.4006031, 37.7886199],
|
||||
[-122.406054, 37.7843542],
|
||||
[-122.4127424, 37.77912],
|
||||
[-122.4185672, 37.7649404],
|
||||
[-122.4173942, 37.7519538],
|
||||
[-122.4331854, 37.7323786],
|
||||
[-122.4466235, 37.721335],
|
||||
[-122.4683093, 37.705461],
|
||||
],
|
||||
__timestamp: null,
|
||||
extraProps: { color: theme.colors.warning.base },
|
||||
},
|
||||
],
|
||||
mapboxApiKey:
|
||||
'pk.eyJ1Ijoia3Jpc3R3IiwiYSI6ImNqbGg1N242NTFlczczdnBhazViMjgzZ2sifQ.lUneM-o3NucXN189EYyXxQ',
|
||||
metricLabels: [],
|
||||
},
|
||||
});
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { SuperChart } from '@superset-ui/core';
|
||||
import { PolygonChartPlugin } from '@superset-ui/legacy-preset-chart-deckgl';
|
||||
import payload from './payload';
|
||||
import geojsonPayload from './geojsonPayload';
|
||||
import dummyDatasource from '../../../../shared/dummyDatasource';
|
||||
|
||||
new PolygonChartPlugin().configure({ key: 'deck_polygon' }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-preset-chart-deckgl/PolygonChartPlugin',
|
||||
};
|
||||
|
||||
export const GeojsonPayload = () => (
|
||||
<SuperChart
|
||||
chartType="deck_polygon"
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[geojsonPayload]}
|
||||
formData={{
|
||||
datasource: '9__table',
|
||||
viz_type: 'deck_polygon',
|
||||
time_range: '+:+',
|
||||
line_column: 'contour',
|
||||
line_type: 'json',
|
||||
adhoc_filters: [],
|
||||
metric: 'count',
|
||||
point_radius_fixed: { type: 'fix', value: 1000 },
|
||||
row_limit: 10000,
|
||||
reverse_long_lat: false,
|
||||
filter_nulls: true,
|
||||
mapbox_style: 'mapbox://styles/mapbox/light-v9',
|
||||
viewport: {
|
||||
longitude: 6.85236157047845,
|
||||
latitude: 31.222656842808707,
|
||||
zoom: 1,
|
||||
bearing: 0,
|
||||
pitch: 0,
|
||||
},
|
||||
autozoom: true,
|
||||
fill_color_picker: { a: 1, b: 73, g: 65, r: 3 },
|
||||
stroke_color_picker: { a: 1, b: 135, g: 122, r: 0 },
|
||||
filled: true,
|
||||
stroked: false,
|
||||
extruded: true,
|
||||
multiplier: 1,
|
||||
line_width: 10,
|
||||
linear_color_scheme: 'blue_white_yellow',
|
||||
opacity: 80,
|
||||
num_buckets: 5,
|
||||
table_filter: false,
|
||||
toggle_polygons: true,
|
||||
legend_position: 'tr',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
export const Payload = () => (
|
||||
<SuperChart
|
||||
chartType="deck_polygon"
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[payload]}
|
||||
formData={{
|
||||
datasource: '9__table',
|
||||
viz_type: 'deck_polygon',
|
||||
slice_id: 70,
|
||||
url_params: {},
|
||||
granularity_sqla: null,
|
||||
time_grain_sqla: null,
|
||||
time_range: '+:+',
|
||||
line_column: 'contour',
|
||||
line_type: 'json',
|
||||
adhoc_filters: [],
|
||||
metric: 'population',
|
||||
point_radius_fixed: { type: 'fix', value: 1000 },
|
||||
row_limit: 10000,
|
||||
reverse_long_lat: false,
|
||||
filter_nulls: true,
|
||||
mapbox_style: 'mapbox://styles/mapbox/light-v9',
|
||||
viewport: {
|
||||
altitude: 1.5,
|
||||
bearing: 37.89506450385642,
|
||||
height: 906,
|
||||
latitude: 37.752020331384834,
|
||||
longitude: -122.43388541747726,
|
||||
maxLatitude: 85.05113,
|
||||
maxPitch: 60,
|
||||
maxZoom: 20,
|
||||
minLatitude: -85.05113,
|
||||
minPitch: 0,
|
||||
minZoom: 0,
|
||||
pitch: 60,
|
||||
width: 667,
|
||||
zoom: 11.133995608594631,
|
||||
},
|
||||
autozoom: true,
|
||||
fill_color_picker: { a: 1, b: 73, g: 65, r: 3 },
|
||||
stroke_color_picker: { a: 1, b: 135, g: 122, r: 0 },
|
||||
filled: true,
|
||||
stroked: false,
|
||||
extruded: true,
|
||||
multiplier: 1,
|
||||
line_width: 10,
|
||||
linear_color_scheme: 'blue_white_yellow',
|
||||
opacity: 80,
|
||||
num_buckets: 5,
|
||||
table_filter: false,
|
||||
toggle_polygons: true,
|
||||
legend_position: 'tr',
|
||||
legend_format: null,
|
||||
js_columns: ['population', 'area'],
|
||||
js_data_mutator: '',
|
||||
js_tooltip: '',
|
||||
js_onclick_href: '',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,130 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export default {
|
||||
cache_key: '31946c4488d1899827d283b668d83281',
|
||||
cached_dttm: '2020-03-04T22:40:59',
|
||||
cache_timeout: 129600,
|
||||
error: null,
|
||||
form_data: {
|
||||
datasource: '93829__table',
|
||||
viz_type: 'deck_polygon',
|
||||
url_params: {},
|
||||
granularity_sqla: null,
|
||||
time_range: '100 years ago : ',
|
||||
line_column: 'geometry',
|
||||
line_type: 'json',
|
||||
adhoc_filters: [
|
||||
{
|
||||
clause: 'WHERE',
|
||||
expressionType: 'SIMPLE',
|
||||
filterOptionName: '4ea1a468-43f9-45f0-9655-576d2ab04bc1',
|
||||
comparator: '',
|
||||
operator: 'IS NOT NULL',
|
||||
subject: 'geometry',
|
||||
},
|
||||
],
|
||||
metric: 'count',
|
||||
point_radius_fixed: {
|
||||
type: 'fix',
|
||||
value: 1000,
|
||||
},
|
||||
row_limit: 1000,
|
||||
reverse_long_lat: false,
|
||||
filter_nulls: true,
|
||||
mapbox_style: 'mapbox://styles/mapbox/light-v9',
|
||||
viewport: {
|
||||
longitude: 6.85236157047845,
|
||||
latitude: 31.222656842808707,
|
||||
zoom: 1,
|
||||
bearing: 0,
|
||||
pitch: 0,
|
||||
},
|
||||
autozoom: true,
|
||||
fill_color_picker: {
|
||||
r: 0,
|
||||
g: 122,
|
||||
b: 135,
|
||||
a: 1,
|
||||
},
|
||||
stroke_color_picker: {
|
||||
r: 0,
|
||||
g: 122,
|
||||
b: 135,
|
||||
a: 1,
|
||||
},
|
||||
filled: true,
|
||||
stroked: false,
|
||||
extruded: true,
|
||||
multiplier: 1,
|
||||
line_width: 10,
|
||||
linear_color_scheme: 'blue_white_yellow',
|
||||
opacity: 80,
|
||||
num_buckets: 5,
|
||||
table_filter: false,
|
||||
toggle_polygons: true,
|
||||
legend_position: 'tr',
|
||||
legend_format: null,
|
||||
js_columns: [],
|
||||
where: '',
|
||||
having: '',
|
||||
filters: [
|
||||
{
|
||||
col: 'geometry',
|
||||
op: 'IS NOT NULL',
|
||||
val: '',
|
||||
},
|
||||
],
|
||||
},
|
||||
is_cached: true,
|
||||
status: 'success',
|
||||
stacktrace: null,
|
||||
rowcount: 1,
|
||||
data: {
|
||||
features: [
|
||||
{
|
||||
count: 10,
|
||||
name: 'Test',
|
||||
polygon: {
|
||||
type: 'Feature',
|
||||
properties: {},
|
||||
geometry: {
|
||||
type: 'Polygon',
|
||||
coordinates: [
|
||||
[
|
||||
[-149.95132113447022, 61.1310423022678],
|
||||
[-149.95386039742468, 61.12975642234931],
|
||||
[-149.9529189574033, 61.128200857856946],
|
||||
[-149.94943860572158, 61.12793112735274],
|
||||
[-149.9468993514573, 61.12921688848983],
|
||||
[-149.94784044016444, 61.1307724989074],
|
||||
[-149.95132113447022, 61.1310423022678],
|
||||
],
|
||||
],
|
||||
},
|
||||
},
|
||||
__timestamp: null,
|
||||
elevation: 0,
|
||||
},
|
||||
],
|
||||
mapboxApiKey:
|
||||
'pk.eyJ1IjoiZ2tlZWUiLCJhIjoiY2lvbmN5dXhtMDA4NXRybTJjZWU2ZHVxOSJ9.CJG_6Oz52y5yI5cr3Ct_aQ',
|
||||
metricLabels: ['count'],
|
||||
},
|
||||
};
|
||||
@@ -1,382 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
/* eslint-disable no-magic-numbers */
|
||||
export default {
|
||||
cache_key: null,
|
||||
cached_dttm: null,
|
||||
cache_timeout: 86400,
|
||||
error: null,
|
||||
form_data: {
|
||||
datasource: '9__table',
|
||||
viz_type: 'deck_polygon',
|
||||
slice_id: 70,
|
||||
url_params: {},
|
||||
granularity_sqla: null,
|
||||
time_grain_sqla: null,
|
||||
time_range: ' : ',
|
||||
line_column: 'contour',
|
||||
line_type: 'json',
|
||||
adhoc_filters: [
|
||||
{
|
||||
clause: 'WHERE',
|
||||
expressionType: 'SIMPLE',
|
||||
filterOptionName: '8039e26e-6daa-4daa-87ae-a9932e3500e6',
|
||||
comparator: '',
|
||||
operator: 'IS NOT NULL',
|
||||
subject: 'contour',
|
||||
},
|
||||
],
|
||||
metric: 'count',
|
||||
point_radius_fixed: { type: 'fix', value: 1000 },
|
||||
row_limit: 10000,
|
||||
reverse_long_lat: false,
|
||||
filter_nulls: true,
|
||||
mapbox_style: 'mapbox://styles/mapbox/light-v9',
|
||||
viewport: {
|
||||
altitude: 1.5,
|
||||
bearing: 37.89506450385642,
|
||||
height: 906,
|
||||
latitude: 37.752020331384834,
|
||||
longitude: -122.43388541747726,
|
||||
maxLatitude: 85.05113,
|
||||
maxPitch: 60,
|
||||
maxZoom: 20,
|
||||
minLatitude: -85.05113,
|
||||
minPitch: 0,
|
||||
minZoom: 0,
|
||||
pitch: 60,
|
||||
width: 667,
|
||||
zoom: 11.133995608594631,
|
||||
},
|
||||
autozoom: true,
|
||||
fill_color_picker: { a: 1, b: 73, g: 65, r: 3 },
|
||||
stroke_color_picker: { a: 1, b: 135, g: 122, r: 0 },
|
||||
filled: true,
|
||||
stroked: false,
|
||||
extruded: true,
|
||||
multiplier: 1,
|
||||
line_width: 10,
|
||||
linear_color_scheme: 'blue_white_yellow',
|
||||
opacity: 80,
|
||||
num_buckets: 5,
|
||||
table_filter: false,
|
||||
toggle_polygons: true,
|
||||
legend_position: 'tr',
|
||||
legend_format: null,
|
||||
js_columns: ['population', 'area'],
|
||||
where: '',
|
||||
having: '',
|
||||
filters: [{ col: 'contour', op: 'IS NOT NULL', val: '' }],
|
||||
},
|
||||
is_cached: false,
|
||||
query:
|
||||
'SELECT population AS population,\n area AS area,\n contour AS contour,\n COUNT(*) AS count\nFROM sf_population_polygons\nWHERE contour IS NOT NULL\nGROUP BY population,\n area,\n contour\nORDER BY count DESC\nLIMIT 10000\nOFFSET 0',
|
||||
status: 'success',
|
||||
stacktrace: null,
|
||||
rowcount: 25,
|
||||
data: {
|
||||
features: [
|
||||
{
|
||||
population: 406,
|
||||
area: 0.18,
|
||||
count: 1,
|
||||
polygon: [
|
||||
[-122.4000672, 37.7903039],
|
||||
[-122.4020657, 37.7887212],
|
||||
[-122.4019604, 37.7889222],
|
||||
[-122.4021896, 37.7900391],
|
||||
[-122.4038416, 37.7898293],
|
||||
[-122.4046134, 37.7935651],
|
||||
[-122.4001488, 37.7941342],
|
||||
[-122.399572, 37.7913265],
|
||||
[-122.3994942, 37.7913249],
|
||||
[-122.3991486, 37.7910166],
|
||||
[-122.39948, 37.7907443],
|
||||
[-122.4000672, 37.7903039],
|
||||
],
|
||||
__timestamp: null,
|
||||
elevation: 1000,
|
||||
extraProps: { population: 406, area: 0.18 },
|
||||
},
|
||||
{
|
||||
population: 3183,
|
||||
area: 6.11,
|
||||
count: 1,
|
||||
polygon: [
|
||||
[-122.4709907, 37.7875345],
|
||||
[-122.4725434, 37.787369],
|
||||
[-122.474584, 37.7870491],
|
||||
[-122.4761622, 37.7869787],
|
||||
[-122.478708, 37.7869141],
|
||||
[-122.4813756, 37.7871989],
|
||||
[-122.4839107, 37.7877057],
|
||||
[-122.4840196, 37.7886714],
|
||||
[-122.4840713, 37.7895716],
|
||||
[-122.484215, 37.7897676],
|
||||
[-122.4862218, 37.7905133],
|
||||
[-122.4861481, 37.7906058],
|
||||
[-122.4861088, 37.7906875],
|
||||
[-122.4858962, 37.7908937],
|
||||
[-122.4857404, 37.7910213],
|
||||
[-122.4854114, 37.7914684],
|
||||
[-122.4852847, 37.791713],
|
||||
[-122.484995, 37.7919486],
|
||||
[-122.4847529, 37.7922157],
|
||||
[-122.4845413, 37.7925221],
|
||||
[-122.4843636, 37.7927401],
|
||||
[-122.4840721, 37.793295],
|
||||
[-122.4838582, 37.7936461],
|
||||
[-122.4835934, 37.7940352],
|
||||
[-122.4832937, 37.7946713],
|
||||
[-122.4835185, 37.79473],
|
||||
[-122.4830886, 37.7956115],
|
||||
[-122.4829995, 37.7959034],
|
||||
[-122.4811062, 37.7996127],
|
||||
[-122.4810689, 37.7997047],
|
||||
[-122.4810634, 37.7998236],
|
||||
[-122.4809868, 37.7999382],
|
||||
[-122.4809748, 37.8003312],
|
||||
[-122.480758, 37.8004434],
|
||||
[-122.4806561, 37.8006483],
|
||||
[-122.4805924, 37.800725],
|
||||
[-122.4803755, 37.8010946],
|
||||
[-122.480296, 37.8012937],
|
||||
[-122.4802023, 37.8014169],
|
||||
[-122.4801818, 37.8015573],
|
||||
[-122.4488026, 37.801772],
|
||||
[-122.4483597, 37.8015868],
|
||||
[-122.4479216, 37.8015323],
|
||||
[-122.4478196, 37.8016332],
|
||||
[-122.4473414, 37.7985527],
|
||||
[-122.447303, 37.798459199999996],
|
||||
[-122.4462995, 37.7918785],
|
||||
[-122.4493673, 37.791488],
|
||||
[-122.4509955, 37.7912099],
|
||||
[-122.4520356, 37.7909989],
|
||||
[-122.4590286, 37.789716],
|
||||
[-122.4594757, 37.7897106],
|
||||
[-122.4599255, 37.7895428],
|
||||
[-122.4686535, 37.7877835],
|
||||
[-122.4709907, 37.7875345],
|
||||
],
|
||||
__timestamp: null,
|
||||
elevation: 1000,
|
||||
extraProps: { population: 3183, area: 6.11 },
|
||||
},
|
||||
{
|
||||
population: 3713,
|
||||
area: 0.9,
|
||||
count: 1,
|
||||
polygon: [
|
||||
[-122.4000583, 37.7936936],
|
||||
[-122.4001488, 37.7941342],
|
||||
[-122.4046134, 37.7935651],
|
||||
[-122.405143, 37.796211],
|
||||
[-122.4018534, 37.7966262],
|
||||
[-122.4022286, 37.7984297],
|
||||
[-122.4031596, 37.8030984],
|
||||
[-122.4047983, 37.8029008],
|
||||
[-122.4055454, 37.8066342],
|
||||
[-122.4054957, 37.8066406],
|
||||
[-122.4046961, 37.8062647],
|
||||
[-122.4031944, 37.8051186],
|
||||
[-122.4017323, 37.8051922],
|
||||
[-122.400573, 37.806121],
|
||||
[-122.4009636, 37.8035634],
|
||||
[-122.4008425, 37.8034294],
|
||||
[-122.4004799, 37.8034661],
|
||||
[-122.3985512, 37.8046028],
|
||||
[-122.3985201, 37.8046033],
|
||||
[-122.3985596, 37.8045264],
|
||||
[-122.3982279, 37.8042811],
|
||||
[-122.3982256, 37.8042564],
|
||||
[-122.3999717, 37.803225],
|
||||
[-122.3996027, 37.8028079],
|
||||
[-122.3978247, 37.8038103],
|
||||
[-122.3977935, 37.8038108],
|
||||
[-122.3975172, 37.8034946],
|
||||
[-122.3975148, 37.8034706],
|
||||
[-122.3996153, 37.8022824],
|
||||
[-122.3997233, 37.8021763],
|
||||
[-122.3994097, 37.8018242],
|
||||
[-122.3992151, 37.8018645],
|
||||
[-122.3971156, 37.803021],
|
||||
[-122.3970844, 37.8030215],
|
||||
],
|
||||
__timestamp: null,
|
||||
elevation: 1000,
|
||||
extraProps: { population: 5846, area: 1.23 },
|
||||
},
|
||||
{
|
||||
population: 13768,
|
||||
area: 0.75,
|
||||
count: 1,
|
||||
polygon: [
|
||||
[-122.4042198, 37.7916906],
|
||||
[-122.4038416, 37.7898293],
|
||||
[-122.4021896, 37.7900391],
|
||||
[-122.4019604, 37.7889222],
|
||||
[-122.4020657, 37.7887212],
|
||||
[-122.4029031, 37.7880856],
|
||||
[-122.4034308, 37.7876418],
|
||||
[-122.4045833, 37.7867306],
|
||||
[-122.4048499, 37.78681],
|
||||
[-122.4080362, 37.7864096],
|
||||
[-122.408595, 37.7892256],
|
||||
[-122.4118857, 37.7888075],
|
||||
[-122.4122662, 37.7906728],
|
||||
[-122.4139159, 37.7904631],
|
||||
[-122.4148256, 37.7949882],
|
||||
[-122.405143, 37.796211],
|
||||
[-122.4049572, 37.7953267],
|
||||
[-122.4047106, 37.7940214],
|
||||
[-122.4042198, 37.7916906],
|
||||
],
|
||||
__timestamp: null,
|
||||
elevation: 1000,
|
||||
extraProps: { population: 13768, area: 0.75 },
|
||||
},
|
||||
{
|
||||
population: 19289,
|
||||
area: 4.4,
|
||||
count: 1,
|
||||
polygon: [
|
||||
[-122.4586889, 37.7307515],
|
||||
[-122.4591931, 37.730603],
|
||||
[-122.4593522, 37.7305158],
|
||||
[-122.4595637, 37.7303686],
|
||||
[-122.4597838, 37.7301095],
|
||||
[-122.4598784, 37.7298845],
|
||||
[-122.4599838, 37.7295225],
|
||||
[-122.460024, 37.7291957],
|
||||
[-122.4600025, 37.7287394],
|
||||
[-122.4604127, 37.7287392],
|
||||
[-122.4608163, 37.7286811],
|
||||
[-122.4614222, 37.7283303],
|
||||
[-122.4618248, 37.7281189],
|
||||
[-122.4620685, 37.7280496],
|
||||
[-122.4623783, 37.7280113],
|
||||
[-122.4627034, 37.7280243],
|
||||
[-122.4628883, 37.728055499999996],
|
||||
[-122.4627359, 37.7277841],
|
||||
[-122.4626158, 37.7275292],
|
||||
[-122.4625471, 37.7272254],
|
||||
[-122.4625456, 37.7269975],
|
||||
[-122.4626867, 37.7257749],
|
||||
[-122.4628155, 37.7254824],
|
||||
[-122.4622126, 37.7252655],
|
||||
[-122.4622803, 37.7251473],
|
||||
[-122.4622712, 37.7230211],
|
||||
[-122.4624314, 37.723008899999996],
|
||||
[-122.462655, 37.7229479],
|
||||
[-122.4628403, 37.7228017],
|
||||
[-122.463189, 37.7226046],
|
||||
[-122.4637514, 37.7223952],
|
||||
[-122.4639816, 37.722327],
|
||||
[-122.4642937, 37.7221137],
|
||||
[-122.4644348, 37.7219078],
|
||||
[-122.4644842, 37.72168],
|
||||
[-122.4716737, 37.7216313],
|
||||
[-122.4717603, 37.7216712],
|
||||
[-122.4723224, 37.7216238],
|
||||
[-122.4720569, 37.726824],
|
||||
[-122.4719072, 37.7289272],
|
||||
[-122.4715943, 37.7289021],
|
||||
[-122.4715487, 37.729784],
|
||||
[-122.4718665, 37.7297845],
|
||||
[-122.4715693, 37.7347068],
|
||||
[-122.4710681, 37.7356067],
|
||||
[-122.4705741, 37.736589],
|
||||
[-122.47068, 37.736647],
|
||||
[-122.4708059, 37.7367737],
|
||||
[-122.4708698, 37.7369516],
|
||||
[-122.4442995, 37.7322772],
|
||||
[-122.4442889, 37.7315689],
|
||||
[-122.4465784, 37.731549],
|
||||
[-122.4534113, 37.7315306],
|
||||
[-122.4535909, 37.7314884],
|
||||
[-122.4549159, 37.731465],
|
||||
[-122.4557626, 37.7313488],
|
||||
[-122.4566075, 37.7311877],
|
||||
[-122.4574742, 37.7309975],
|
||||
[-122.4582225, 37.7307774],
|
||||
[-122.4584725, 37.7307528],
|
||||
[-122.4586889, 37.7307515],
|
||||
],
|
||||
__timestamp: null,
|
||||
elevation: 1000,
|
||||
extraProps: { population: 19289, area: 4.4 },
|
||||
},
|
||||
{
|
||||
population: 23088,
|
||||
area: 2.74,
|
||||
count: 1,
|
||||
polygon: [
|
||||
[-122.4384025, 37.794807],
|
||||
[-122.446587, 37.7937653],
|
||||
[-122.4464465, 37.792813699999996],
|
||||
[-122.447303, 37.798459199999996],
|
||||
[-122.4473414, 37.7985527],
|
||||
[-122.4478196, 37.8016332],
|
||||
[-122.4479216, 37.8015323],
|
||||
[-122.4483597, 37.8015868],
|
||||
[-122.4488026, 37.801772],
|
||||
[-122.4491786, 37.8020739],
|
||||
[-122.4494602, 37.8024543],
|
||||
[-122.4495655, 37.8027914],
|
||||
[-122.4495837, 37.8031531],
|
||||
[-122.4494957, 37.8034703],
|
||||
[-122.4493881, 37.8037108],
|
||||
[-122.4491242, 37.8040079],
|
||||
[-122.4488145, 37.8042286],
|
||||
[-122.4482407, 37.8044777],
|
||||
[-122.4483233, 37.8050078],
|
||||
[-122.4485291, 37.8067632],
|
||||
[-122.4483226, 37.8068106],
|
||||
[-122.4481598, 37.8068744],
|
||||
[-122.4478339, 37.8070522],
|
||||
[-122.4471803, 37.8074771],
|
||||
[-122.446638, 37.8075252],
|
||||
[-122.4464767, 37.8075168],
|
||||
[-122.4452557, 37.8076269],
|
||||
[-122.4417181, 37.8077876],
|
||||
[-122.4418195, 37.8078923],
|
||||
[-122.4419352, 37.8078808],
|
||||
[-122.4419435, 37.8078669],
|
||||
[-122.4418599, 37.8077804],
|
||||
[-122.4418735, 37.8077713],
|
||||
[-122.4419766, 37.8078774],
|
||||
[-122.4419771, 37.8078952],
|
||||
[-122.4418165, 37.8079116],
|
||||
[-122.4418236, 37.8079843],
|
||||
[-122.4423208, 37.8079321],
|
||||
[-122.4423776, 37.8079182],
|
||||
],
|
||||
__timestamp: null,
|
||||
elevation: 1000,
|
||||
extraProps: { population: 79407, area: 8.9 },
|
||||
},
|
||||
],
|
||||
mapboxApiKey:
|
||||
'pk.eyJ1Ijoia3Jpc3R3IiwiYSI6ImNqbGg1N242NTFlczczdnBhazViMjgzZ2sifQ.lUneM-o3NucXN189EYyXxQ',
|
||||
metricLabels: ['count'],
|
||||
},
|
||||
};
|
||||
@@ -1,79 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { SuperChart } from '@superset-ui/core';
|
||||
import { ScatterChartPlugin } from '@superset-ui/legacy-preset-chart-deckgl';
|
||||
import payload from './payload';
|
||||
import dummyDatasource from '../../../../shared/dummyDatasource';
|
||||
|
||||
new ScatterChartPlugin().configure({ key: 'deck_scatter' }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-preset-chart-deckgl/ScatterChartPlugin',
|
||||
};
|
||||
|
||||
export const ScatterChartViz = () => (
|
||||
<SuperChart
|
||||
chartType="deck_scatter"
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[payload]}
|
||||
formData={{
|
||||
datasource: '5__table',
|
||||
viz_type: 'deck_scatter',
|
||||
slice_id: 66,
|
||||
url_params: {},
|
||||
granularity_sqla: 'dttm',
|
||||
time_grain_sqla: null,
|
||||
time_range: '+:+',
|
||||
spatial: { latCol: 'LAT', lonCol: 'LON', type: 'latlong' },
|
||||
row_limit: 5000,
|
||||
filter_nulls: true,
|
||||
adhoc_filters: [],
|
||||
mapbox_style: 'mapbox://styles/mapbox/light-v9',
|
||||
viewport: {
|
||||
bearing: -4.952916738791771,
|
||||
latitude: 37.78926922909199,
|
||||
longitude: -122.42613341901688,
|
||||
pitch: 4.750411100577438,
|
||||
zoom: 12.729132798697304,
|
||||
},
|
||||
autozoom: true,
|
||||
point_radius_fixed: { type: 'metric', value: 'count' },
|
||||
point_unit: 'square_m',
|
||||
min_radius: 2,
|
||||
max_radius: 250,
|
||||
multiplier: 10,
|
||||
color_picker: { a: 0.82, b: 3, g: 0, r: 205 },
|
||||
legend_position: 'tr',
|
||||
legend_format: null,
|
||||
dimension: null,
|
||||
color_scheme: 'bnbColors',
|
||||
label_colors: {},
|
||||
js_columns: [],
|
||||
js_data_mutator: '',
|
||||
js_tooltip: '',
|
||||
js_onclick_href: '',
|
||||
granularity: null,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,228 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
/* eslint-disable no-magic-numbers */
|
||||
export default {
|
||||
cache_key: null,
|
||||
cached_dttm: null,
|
||||
cache_timeout: 86400,
|
||||
error: null,
|
||||
form_data: {
|
||||
color_picker: { a: 0.82, b: 3, g: 0, r: 205 },
|
||||
datasource: '5__table',
|
||||
granularity_sqla: 'dttm',
|
||||
groupby: [],
|
||||
mapbox_style: 'mapbox://styles/mapbox/light-v9',
|
||||
multiplier: 10,
|
||||
point_radius_fixed: { type: 'metric', value: 'count' },
|
||||
point_unit: 'square_m',
|
||||
row_limit: 5000,
|
||||
size: 'count',
|
||||
spatial: { latCol: 'LAT', lonCol: 'LON', type: 'latlong' },
|
||||
time_grain_sqla: null,
|
||||
viewport: {
|
||||
bearing: -4.952916738791771,
|
||||
latitude: 37.78926922909199,
|
||||
longitude: -122.42613341901688,
|
||||
pitch: 4.750411100577438,
|
||||
zoom: 12.729132798697304,
|
||||
},
|
||||
viz_type: 'deck_scatter',
|
||||
slice_id: 66,
|
||||
time_range: ' : ',
|
||||
adhoc_filters: [
|
||||
{
|
||||
clause: 'WHERE',
|
||||
expressionType: 'SIMPLE',
|
||||
filterOptionName: 'b0487cd7-2139-476f-a388-1f0f9759530f',
|
||||
comparator: '',
|
||||
operator: 'IS NOT NULL',
|
||||
subject: 'LAT',
|
||||
},
|
||||
{
|
||||
clause: 'WHERE',
|
||||
expressionType: 'SIMPLE',
|
||||
filterOptionName: '9398a511-3673-468c-b47e-634f59358b6f',
|
||||
comparator: '',
|
||||
operator: 'IS NOT NULL',
|
||||
subject: 'LON',
|
||||
},
|
||||
],
|
||||
where: '',
|
||||
having: '',
|
||||
filters: [
|
||||
{ col: 'LAT', op: 'IS NOT NULL', val: '' },
|
||||
{ col: 'LON', op: 'IS NOT NULL', val: '' },
|
||||
],
|
||||
},
|
||||
is_cached: false,
|
||||
query:
|
||||
'SELECT "LAT" AS "LAT",\n "LON" AS "LON",\n COUNT(*) AS count\nFROM\n (SELECT datetime,\n ROUND(LON*10000000)/10000000 as LON,\n ROUND(LAT*10000000)/10000000 as LAT, NUMBER , STREET,\n UNIT,\n CITY,\n DISTRICT,\n REGION,\n POSTCODE,\n ID occupancy,\n radius_miles,\n geohash,\n delimited\n FROM long_lat) AS expr_qry\nWHERE "LAT" IS NOT NULL\n AND "LON" IS NOT NULL\nGROUP BY "LAT",\n "LON"\nORDER BY count DESC\nLIMIT 5000\nOFFSET 0',
|
||||
status: 'success',
|
||||
stacktrace: null,
|
||||
rowcount: 5000,
|
||||
data: {
|
||||
features: [
|
||||
{
|
||||
metric: 2415,
|
||||
radius: 2415,
|
||||
cat_color: null,
|
||||
position: [-122.4221936, 37.7786083],
|
||||
__timestamp: null,
|
||||
},
|
||||
{
|
||||
metric: 2391,
|
||||
radius: 2391,
|
||||
cat_color: null,
|
||||
position: [-122.4101989, 37.7878771],
|
||||
__timestamp: null,
|
||||
},
|
||||
{
|
||||
metric: 1349,
|
||||
radius: 1349,
|
||||
cat_color: null,
|
||||
position: [-122.4205965, 37.8054735],
|
||||
__timestamp: null,
|
||||
},
|
||||
{
|
||||
metric: 1004,
|
||||
radius: 1004,
|
||||
cat_color: null,
|
||||
position: [-122.4125137, 37.7908413],
|
||||
__timestamp: null,
|
||||
},
|
||||
{
|
||||
metric: 816,
|
||||
radius: 816,
|
||||
cat_color: null,
|
||||
position: [-122.4088144, 37.7912984],
|
||||
__timestamp: null,
|
||||
},
|
||||
{
|
||||
metric: 610,
|
||||
radius: 610,
|
||||
cat_color: null,
|
||||
position: [-122.3934248, 37.7776271],
|
||||
__timestamp: null,
|
||||
},
|
||||
{
|
||||
metric: 460,
|
||||
radius: 460,
|
||||
cat_color: null,
|
||||
position: [-122.390972, 37.789376],
|
||||
__timestamp: null,
|
||||
},
|
||||
{
|
||||
metric: 453,
|
||||
radius: 453,
|
||||
cat_color: null,
|
||||
position: [-122.3804676, 37.7334388],
|
||||
__timestamp: null,
|
||||
},
|
||||
{
|
||||
metric: 453,
|
||||
radius: 453,
|
||||
cat_color: null,
|
||||
position: [-122.4214063, 37.7813858],
|
||||
__timestamp: null,
|
||||
},
|
||||
{
|
||||
metric: 422,
|
||||
radius: 422,
|
||||
cat_color: null,
|
||||
position: [-122.3961419, 37.7905823],
|
||||
__timestamp: null,
|
||||
},
|
||||
{
|
||||
metric: 376,
|
||||
radius: 376,
|
||||
cat_color: null,
|
||||
position: [-122.3922757, 37.7858294],
|
||||
__timestamp: null,
|
||||
},
|
||||
{
|
||||
metric: 359,
|
||||
radius: 359,
|
||||
cat_color: null,
|
||||
position: [-122.3903881, 37.7826463],
|
||||
__timestamp: null,
|
||||
},
|
||||
{
|
||||
metric: 353,
|
||||
radius: 353,
|
||||
cat_color: null,
|
||||
position: [-122.3936422, 37.7870311],
|
||||
__timestamp: null,
|
||||
},
|
||||
{
|
||||
metric: 306,
|
||||
radius: 306,
|
||||
cat_color: null,
|
||||
position: [-122.435635, 37.7852314],
|
||||
__timestamp: null,
|
||||
},
|
||||
{
|
||||
metric: 301,
|
||||
radius: 301,
|
||||
cat_color: null,
|
||||
position: [-122.3971336, 37.7790975],
|
||||
__timestamp: null,
|
||||
},
|
||||
{
|
||||
metric: 300,
|
||||
radius: 300,
|
||||
cat_color: null,
|
||||
position: [-122.3921161, 37.7864536],
|
||||
__timestamp: null,
|
||||
},
|
||||
{
|
||||
metric: 292,
|
||||
radius: 292,
|
||||
cat_color: null,
|
||||
position: [-122.390611, 37.7876797],
|
||||
__timestamp: null,
|
||||
},
|
||||
{
|
||||
metric: 291,
|
||||
radius: 291,
|
||||
cat_color: null,
|
||||
position: [-122.4055041, 37.804244],
|
||||
__timestamp: null,
|
||||
},
|
||||
{
|
||||
metric: 264,
|
||||
radius: 264,
|
||||
cat_color: null,
|
||||
position: [-122.4136476, 37.7910263],
|
||||
__timestamp: null,
|
||||
},
|
||||
{
|
||||
metric: 247,
|
||||
radius: 247,
|
||||
cat_color: null,
|
||||
position: [-122.4224908, 37.7867552],
|
||||
__timestamp: null,
|
||||
},
|
||||
],
|
||||
mapboxApiKey:
|
||||
'pk.eyJ1Ijoia3Jpc3R3IiwiYSI6ImNqbGg1N242NTFlczczdnBhazViMjgzZ2sifQ.lUneM-o3NucXN189EYyXxQ',
|
||||
metricLabels: ['count'],
|
||||
},
|
||||
};
|
||||
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import { SuperChart } from '@superset-ui/core';
|
||||
import { ScreengridChartPlugin } from '@superset-ui/legacy-preset-chart-deckgl';
|
||||
import payload from './payload';
|
||||
import dummyDatasource from '../../../../shared/dummyDatasource';
|
||||
|
||||
new ScreengridChartPlugin().configure({ key: 'deck_screengrid' }).register();
|
||||
|
||||
export default {
|
||||
title:
|
||||
'Legacy Chart Plugins/legacy-preset-chart-deckgl/ScreengridChartPlugin',
|
||||
};
|
||||
|
||||
export const ScreengridChartViz = () => (
|
||||
<SuperChart
|
||||
chartType="deck_screengrid"
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[payload]}
|
||||
formData={{
|
||||
datasource: '5__table',
|
||||
viz_type: 'deck_screengrid',
|
||||
slice_id: 67,
|
||||
url_params: {},
|
||||
granularity_sqla: 'dttm',
|
||||
time_grain_sqla: null,
|
||||
time_range: '+:+',
|
||||
spatial: { latCol: 'LAT', lonCol: 'LON', type: 'latlong' },
|
||||
size: 'count',
|
||||
row_limit: 5000,
|
||||
filter_nulls: true,
|
||||
adhoc_filters: [],
|
||||
mapbox_style: 'mapbox://styles/mapbox/dark-v9',
|
||||
viewport: {
|
||||
bearing: -4.952916738791771,
|
||||
latitude: 37.76024135844065,
|
||||
longitude: -122.41827069521386,
|
||||
pitch: 4.750411100577438,
|
||||
zoom: 14.161641703941438,
|
||||
},
|
||||
autozoom: true,
|
||||
grid_size: 20,
|
||||
color_picker: { a: 1, b: 0, g: 255, r: 14 },
|
||||
js_columns: [],
|
||||
js_data_mutator: '',
|
||||
js_tooltip: '',
|
||||
js_onclick_href: '',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,135 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
/* eslint-disable no-magic-numbers */
|
||||
export default {
|
||||
cache_key: null,
|
||||
cached_dttm: null,
|
||||
cache_timeout: 86400,
|
||||
error: null,
|
||||
form_data: {
|
||||
color_picker: { a: 1, b: 0, g: 255, r: 14 },
|
||||
datasource: '5__table',
|
||||
granularity_sqla: 'dttm',
|
||||
grid_size: 20,
|
||||
groupby: [],
|
||||
mapbox_style: 'mapbox://styles/mapbox/dark-v9',
|
||||
point_radius: 'Auto',
|
||||
point_radius_fixed: { type: 'fix', value: 2000 },
|
||||
point_unit: 'square_m',
|
||||
row_limit: 5000,
|
||||
size: 'count',
|
||||
spatial: { latCol: 'LAT', lonCol: 'LON', type: 'latlong' },
|
||||
time_grain_sqla: null,
|
||||
viewport: {
|
||||
bearing: -4.952916738791771,
|
||||
latitude: 37.76024135844065,
|
||||
longitude: -122.41827069521386,
|
||||
pitch: 4.750411100577438,
|
||||
zoom: 14.161641703941438,
|
||||
},
|
||||
viz_type: 'deck_screengrid',
|
||||
slice_id: 67,
|
||||
time_range: ' : ',
|
||||
adhoc_filters: [
|
||||
{
|
||||
clause: 'WHERE',
|
||||
expressionType: 'SIMPLE',
|
||||
filterOptionName: '341bf332-81fe-4f9e-837e-90a4d8b8b9f0',
|
||||
comparator: '',
|
||||
operator: 'IS NOT NULL',
|
||||
subject: 'LAT',
|
||||
},
|
||||
{
|
||||
clause: 'WHERE',
|
||||
expressionType: 'SIMPLE',
|
||||
filterOptionName: '453dd738-e394-4ea2-bbe9-a7b59bf5e0cc',
|
||||
comparator: '',
|
||||
operator: 'IS NOT NULL',
|
||||
subject: 'LON',
|
||||
},
|
||||
],
|
||||
where: '',
|
||||
having: '',
|
||||
filters: [
|
||||
{ col: 'LAT', op: 'IS NOT NULL', val: '' },
|
||||
{ col: 'LON', op: 'IS NOT NULL', val: '' },
|
||||
],
|
||||
},
|
||||
is_cached: false,
|
||||
query:
|
||||
'SELECT "LAT" AS "LAT",\n "LON" AS "LON",\n COUNT(*) AS count\nFROM\n (SELECT datetime,\n ROUND(LON*10000000)/10000000 as LON,\n ROUND(LAT*10000000)/10000000 as LAT, NUMBER , STREET,\n UNIT,\n CITY,\n DISTRICT,\n REGION,\n POSTCODE,\n ID occupancy,\n radius_miles,\n geohash,\n delimited\n FROM long_lat) AS expr_qry\nWHERE "LAT" IS NOT NULL\n AND "LON" IS NOT NULL\nGROUP BY "LAT",\n "LON"\nORDER BY count DESC\nLIMIT 5000\nOFFSET 0',
|
||||
status: 'success',
|
||||
stacktrace: null,
|
||||
rowcount: 5000,
|
||||
data: {
|
||||
features: [
|
||||
{ position: [-122.4221936, 37.7786083], weight: 2415, __timestamp: null },
|
||||
{ position: [-122.4101989, 37.7878771], weight: 2391, __timestamp: null },
|
||||
{ position: [-122.4205965, 37.8054735], weight: 1349, __timestamp: null },
|
||||
{ position: [-122.4125137, 37.7908413], weight: 1004, __timestamp: null },
|
||||
{ position: [-122.4088144, 37.7912984], weight: 816, __timestamp: null },
|
||||
{ position: [-122.3934248, 37.7776271], weight: 610, __timestamp: null },
|
||||
{ position: [-122.390972, 37.789376], weight: 460, __timestamp: null },
|
||||
{ position: [-122.3804676, 37.7334388], weight: 453, __timestamp: null },
|
||||
{ position: [-122.4214063, 37.7813858], weight: 453, __timestamp: null },
|
||||
{ position: [-122.3961419, 37.7905823], weight: 422, __timestamp: null },
|
||||
{ position: [-122.3922757, 37.7858294], weight: 376, __timestamp: null },
|
||||
{ position: [-122.3903881, 37.7826463], weight: 359, __timestamp: null },
|
||||
{ position: [-122.3936422, 37.7870311], weight: 353, __timestamp: null },
|
||||
{ position: [-122.435635, 37.7852314], weight: 306, __timestamp: null },
|
||||
{ position: [-122.3971336, 37.7790975], weight: 301, __timestamp: null },
|
||||
{ position: [-122.3921161, 37.7864536], weight: 300, __timestamp: null },
|
||||
{ position: [-122.390611, 37.7876797], weight: 292, __timestamp: null },
|
||||
{ position: [-122.4055041, 37.804244], weight: 291, __timestamp: null },
|
||||
{ position: [-122.4136476, 37.7910263], weight: 264, __timestamp: null },
|
||||
{ position: [-122.4224908, 37.7867552], weight: 247, __timestamp: null },
|
||||
{ position: [-122.4123203, 37.7784493], weight: 240, __timestamp: null },
|
||||
{ position: [-122.4368896, 37.7822303], weight: 239, __timestamp: null },
|
||||
{ position: [-122.389625, 37.7806302], weight: 237, __timestamp: null },
|
||||
{ position: [-122.3990823, 37.7831803], weight: 237, __timestamp: null },
|
||||
{ position: [-122.3959614, 37.7740032], weight: 219, __timestamp: null },
|
||||
{ position: [-122.4041783, 37.8044503], weight: 216, __timestamp: null },
|
||||
{ position: [-122.4005582, 37.7706919], weight: 210, __timestamp: null },
|
||||
{ position: [-122.4040784, 37.8034687], weight: 209, __timestamp: null },
|
||||
{ position: [-122.418513, 37.7717131], weight: 208, __timestamp: null },
|
||||
{ position: [-122.4127266, 37.7899451], weight: 202, __timestamp: null },
|
||||
{ position: [-122.402292, 37.7808479], weight: 201, __timestamp: null },
|
||||
{ position: [-122.391326, 37.7892785], weight: 200, __timestamp: null },
|
||||
{ position: [-122.3882041, 37.7195347], weight: 198, __timestamp: null },
|
||||
{ position: [-122.3917766, 37.7876762], weight: 197, __timestamp: null },
|
||||
{ position: [-122.4151204, 37.78524], weight: 196, __timestamp: null },
|
||||
{ position: [-122.3902944, 37.7836002], weight: 191, __timestamp: null },
|
||||
{ position: [-122.4162567, 37.775248], weight: 190, __timestamp: null },
|
||||
{ position: [-122.404391, 37.7853957], weight: 190, __timestamp: null },
|
||||
{ position: [-122.479301, 37.7269377], weight: 180, __timestamp: null },
|
||||
{ position: [-122.396631, 37.7536653], weight: 176, __timestamp: null },
|
||||
{ position: [-122.3990994, 37.7866056], weight: 175, __timestamp: null },
|
||||
{ position: [-122.3990304, 37.7857742], weight: 166, __timestamp: null },
|
||||
{ position: [-122.4032414, 37.7640112], weight: 165, __timestamp: null },
|
||||
{ position: [-122.4242026, 37.7867158], weight: 165, __timestamp: null },
|
||||
{ position: [-122.4258311, 37.7863612], weight: 164, __timestamp: null },
|
||||
{ position: [-122.4125675, 37.7903477], weight: 161, __timestamp: null },
|
||||
],
|
||||
mapboxApiKey:
|
||||
'pk.eyJ1Ijoia3Jpc3R3IiwiYSI6ImNqbGg1N242NTFlczczdnBhazViMjgzZ2sifQ.lUneM-o3NucXN189EYyXxQ',
|
||||
metricLabels: ['count'],
|
||||
},
|
||||
};
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { VizType } from '@superset-ui/core';
|
||||
import { AreaChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3';
|
||||
|
||||
new AreaChartPlugin().configure({ key: VizType.LegacyArea }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-preset-chart-nvd3/Area',
|
||||
};
|
||||
|
||||
export { stacked } from './stories/stacked';
|
||||
export {
|
||||
stackedWithYAxisBounds,
|
||||
stackedWithYAxisBoundsMinOnly,
|
||||
} from './stories/stackedWithBounds';
|
||||
export { expanded } from './stories/expanded';
|
||||
export { controlsShown } from './stories/controlsShown';
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
import data from '../data';
|
||||
|
||||
export const controlsShown = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyArea}
|
||||
datasource={dummyDatasource}
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
bottomMargin: 'auto',
|
||||
colorScheme: 'd3Category10',
|
||||
contribution: false,
|
||||
groupby: ['region'],
|
||||
lineInterpolation: 'linear',
|
||||
metrics: ['sum__SP_POP_TOTL'],
|
||||
richTooltip: true,
|
||||
showBrush: 'auto',
|
||||
showControls: true,
|
||||
showLegend: true,
|
||||
stackedStyle: 'stack',
|
||||
vizType: VizType.LegacyArea,
|
||||
xAxisFormat: '%Y',
|
||||
xAxisLabel: '',
|
||||
xAxisShowminmax: false,
|
||||
xTicksLayout: 'auto',
|
||||
yAxisBounds: [null, null],
|
||||
yAxisFormat: '.3s',
|
||||
yLogScale: false,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
import data from '../data';
|
||||
|
||||
export const expanded = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyArea}
|
||||
datasource={dummyDatasource}
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ 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: 'expand',
|
||||
vizType: VizType.LegacyArea,
|
||||
xAxisFormat: '%Y',
|
||||
xAxisLabel: '',
|
||||
xAxisShowminmax: false,
|
||||
xTicksLayout: 'auto',
|
||||
yAxisBounds: [null, null],
|
||||
yAxisFormat: '.3s',
|
||||
yLogScale: false,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
import data from '../data';
|
||||
|
||||
export const stacked = () => (
|
||||
<SuperChart
|
||||
id="stacked-area-chart"
|
||||
chartType={VizType.LegacyArea}
|
||||
datasource={dummyDatasource}
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ 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: VizType.LegacyArea,
|
||||
xAxisFormat: '%Y',
|
||||
xAxisLabel: '',
|
||||
xAxisShowminmax: false,
|
||||
xTicksLayout: 'auto',
|
||||
yAxisBounds: [null, null],
|
||||
yAxisFormat: '.3s',
|
||||
yLogScale: false,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,88 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
import data from '../data';
|
||||
|
||||
export const stackedWithYAxisBounds = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyArea}
|
||||
datasource={dummyDatasource}
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ 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: VizType.LegacyArea,
|
||||
xAxisFormat: '%Y',
|
||||
xAxisLabel: '',
|
||||
xAxisShowminmax: false,
|
||||
xTicksLayout: 'auto',
|
||||
yAxisBounds: [0, 3000000000],
|
||||
yAxisFormat: '.3s',
|
||||
yLogScale: false,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
stackedWithYAxisBounds.storyName = 'Stacked with yAxisBounds';
|
||||
|
||||
export const stackedWithYAxisBoundsMinOnly = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyArea}
|
||||
datasource={dummyDatasource}
|
||||
width={400}
|
||||
height={400}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
bottomMargin: 'auto',
|
||||
colorScheme: 'd3Category10',
|
||||
contribution: false,
|
||||
groupby: ['region'],
|
||||
lineInterpolation: 'linear',
|
||||
metrics: ['sum__SP_POP_TOTL'],
|
||||
richTooltip: true,
|
||||
showBrush: 'auto',
|
||||
showControls: true,
|
||||
showLegend: true,
|
||||
stackedStyle: 'stack',
|
||||
vizType: VizType.LegacyArea,
|
||||
xAxisFormat: '%Y',
|
||||
xAxisLabel: '',
|
||||
xAxisShowminmax: false,
|
||||
xTicksLayout: 'auto',
|
||||
yAxisBounds: [1000000000, null],
|
||||
yAxisFormat: '.3s',
|
||||
yLogScale: false,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
stackedWithYAxisBoundsMinOnly.storyName = 'Stacked with yAxisBounds min only';
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { VizType } from '@superset-ui/core';
|
||||
import { BarChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3';
|
||||
|
||||
new BarChartPlugin().configure({ key: VizType.LegacyBar }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-preset-chart-nvd3/Bar',
|
||||
};
|
||||
|
||||
export { basic } from './stories/basic';
|
||||
export { barWithValues } from './stories/barWithValues';
|
||||
export { barWithPositiveAndNegativeValues } from './stories/barWithPositiveAndNegativeValues';
|
||||
export { stackedBarWithValues } from './stories/stackedBarWithValues';
|
||||
@@ -1,247 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* 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,64 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
import data from '../data';
|
||||
|
||||
export const barWithPositiveAndNegativeValues = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyBar}
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[
|
||||
{
|
||||
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: VizType.LegacyBar,
|
||||
xAxisFormat: '%Y',
|
||||
xAxisLabel: '',
|
||||
xAxisShowminmax: false,
|
||||
xTicksLayout: 'auto',
|
||||
yAxisBounds: [null, null],
|
||||
yAxisFormat: '.3s',
|
||||
yLogScale: false,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
import data from '../data';
|
||||
|
||||
export const barWithValues = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyBar}
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ 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: VizType.LegacyBar,
|
||||
xAxisFormat: '%Y',
|
||||
xAxisLabel: '',
|
||||
xAxisShowminmax: false,
|
||||
xTicksLayout: 'auto',
|
||||
yAxisBounds: [null, null],
|
||||
yAxisFormat: '.3s',
|
||||
yLogScale: false,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
import data from '../data';
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyBar}
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ 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: VizType.LegacyBar,
|
||||
xAxisFormat: '%Y',
|
||||
xAxisLabel: '',
|
||||
xAxisShowminmax: false,
|
||||
xTicksLayout: 'auto',
|
||||
yAxisBounds: [null, null],
|
||||
yAxisFormat: '.3s',
|
||||
yLogScale: false,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
import data from '../data';
|
||||
|
||||
export const stackedBarWithValues = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyBar}
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ 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: VizType.LegacyBar,
|
||||
xAxisFormat: '%Y',
|
||||
xAxisLabel: '',
|
||||
xAxisShowminmax: false,
|
||||
xTicksLayout: 'auto',
|
||||
yAxisBounds: [null, null],
|
||||
yAxisFormat: '.3s',
|
||||
yLogScale: false,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { BoxPlotChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3';
|
||||
|
||||
new BoxPlotChartPlugin().configure({ key: 'box-plot' }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-preset-chart-nvd3/BoxPlot',
|
||||
};
|
||||
|
||||
export { basic } from './stories/basic';
|
||||
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* 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,37 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
import data from '../data';
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType="box-plot"
|
||||
width={800}
|
||||
height={600}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
colorScheme: 'd3Category10',
|
||||
vizType: VizType.BoxPlot,
|
||||
whiskerOptions: 'Min/max (no outliers)',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { VizType } from '@superset-ui/core';
|
||||
import { BubbleChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3';
|
||||
|
||||
new BubbleChartPlugin().configure({ key: VizType.LegacyBubble }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-preset-chart-nvd3/Bubble',
|
||||
};
|
||||
|
||||
export { basic } from './stories/basic';
|
||||
@@ -1,357 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* 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,55 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
import data from '../data';
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyBubble}
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
annotationData: {},
|
||||
bottomMargin: 'auto',
|
||||
colorScheme: 'd3Category10',
|
||||
entity: 'country_name',
|
||||
leftMargin: 'auto',
|
||||
maxBubbleSize: '50',
|
||||
series: 'region',
|
||||
showLegend: true,
|
||||
size: 'sum__SP_POP_TOTL',
|
||||
vizType: VizType.LegacyBubble,
|
||||
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,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { VizType } from '@superset-ui/core';
|
||||
import { BulletChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3';
|
||||
|
||||
new BulletChartPlugin().configure({ key: VizType.Bullet }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-preset-chart-nvd3/Bullet',
|
||||
};
|
||||
|
||||
export { basic } from './stories/basic';
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys, no-magic-numbers */
|
||||
export default {
|
||||
measures: [75691],
|
||||
ranges: [0, 83260.1],
|
||||
rangeLabels: null,
|
||||
markers: null,
|
||||
markerLabels: null,
|
||||
markerLines: null,
|
||||
markerLineLabels: null,
|
||||
};
|
||||
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
import data from '../data';
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.Bullet}
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
markerLabels: '',
|
||||
markerLineLabels: '',
|
||||
markerLines: '',
|
||||
markers: '',
|
||||
rangeLabels: '',
|
||||
ranges: '',
|
||||
vizType: VizType.Bullet,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { VizType } from '@superset-ui/core';
|
||||
import { CompareChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3';
|
||||
|
||||
new CompareChartPlugin().configure({ key: VizType.Compare }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-preset-chart-nvd3/Compare',
|
||||
};
|
||||
|
||||
export { basic } from './stories/basic';
|
||||
export { timeFormat } from './stories/timeFormat';
|
||||
@@ -1,927 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* 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,48 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
import data from '../data';
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType="compare"
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
bottomMargin: 'auto',
|
||||
colorScheme: 'd3Category10',
|
||||
contribution: false,
|
||||
leftMargin: 'auto',
|
||||
vizType: VizType.Compare,
|
||||
xAxisFormat: 'smart_date',
|
||||
xAxisLabel: '',
|
||||
xAxisShowminmax: false,
|
||||
xTicksLayout: 'auto',
|
||||
yAxisBounds: [null, null],
|
||||
yAxisFormat: '.3s',
|
||||
yAxisLabel: '',
|
||||
yAxisShowminmax: false,
|
||||
yLogscale: false,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,249 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
|
||||
export const timeFormat = () => (
|
||||
<SuperChart
|
||||
chartType="compare"
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[
|
||||
{
|
||||
data: [
|
||||
{
|
||||
key: ['Africa and Middle East'],
|
||||
values: [
|
||||
{
|
||||
x: 1606348800000,
|
||||
y: 3985,
|
||||
},
|
||||
{
|
||||
x: 1606435200000,
|
||||
y: 5882,
|
||||
},
|
||||
{
|
||||
x: 1606521600000,
|
||||
y: 7983,
|
||||
},
|
||||
{
|
||||
x: 1606608000000,
|
||||
y: 16462,
|
||||
},
|
||||
{
|
||||
x: 1606694400000,
|
||||
y: 5542,
|
||||
},
|
||||
{
|
||||
x: 1606780800000,
|
||||
y: 2825,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: ['Asia'],
|
||||
values: [
|
||||
{
|
||||
x: 1606348800000,
|
||||
y: 34837,
|
||||
},
|
||||
{
|
||||
x: 1606435200000,
|
||||
y: 40718,
|
||||
},
|
||||
{
|
||||
x: 1606521600000,
|
||||
y: 58507,
|
||||
},
|
||||
{
|
||||
x: 1606608000000,
|
||||
y: 110120,
|
||||
},
|
||||
{
|
||||
x: 1606694400000,
|
||||
y: 43443,
|
||||
},
|
||||
{
|
||||
x: 1606780800000,
|
||||
y: 33538,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: ['Australia'],
|
||||
values: [
|
||||
{
|
||||
x: 1606348800000,
|
||||
y: 12975,
|
||||
},
|
||||
{
|
||||
x: 1606435200000,
|
||||
y: 18471,
|
||||
},
|
||||
{
|
||||
x: 1606521600000,
|
||||
y: 17880,
|
||||
},
|
||||
{
|
||||
x: 1606608000000,
|
||||
y: 52204,
|
||||
},
|
||||
{
|
||||
x: 1606694400000,
|
||||
y: 26690,
|
||||
},
|
||||
{
|
||||
x: 1606780800000,
|
||||
y: 16423,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: ['Europe'],
|
||||
values: [
|
||||
{
|
||||
x: 1606348800000,
|
||||
y: 127029,
|
||||
},
|
||||
{
|
||||
x: 1606435200000,
|
||||
y: 177637,
|
||||
},
|
||||
{
|
||||
x: 1606521600000,
|
||||
y: 172653,
|
||||
},
|
||||
{
|
||||
x: 1606608000000,
|
||||
y: 203654,
|
||||
},
|
||||
{
|
||||
x: 1606694400000,
|
||||
y: 79200,
|
||||
},
|
||||
{
|
||||
x: 1606780800000,
|
||||
y: 45238,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: ['LatAm'],
|
||||
values: [
|
||||
{
|
||||
x: 1606348800000,
|
||||
y: 22513,
|
||||
},
|
||||
{
|
||||
x: 1606435200000,
|
||||
y: 24594,
|
||||
},
|
||||
{
|
||||
x: 1606521600000,
|
||||
y: 32578,
|
||||
},
|
||||
{
|
||||
x: 1606608000000,
|
||||
y: 34733,
|
||||
},
|
||||
{
|
||||
x: 1606694400000,
|
||||
y: 71696,
|
||||
},
|
||||
{
|
||||
x: 1606780800000,
|
||||
y: 166611,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: ['North America'],
|
||||
values: [
|
||||
{
|
||||
x: 1606348800000,
|
||||
y: 104596,
|
||||
},
|
||||
{
|
||||
x: 1606435200000,
|
||||
y: 109850,
|
||||
},
|
||||
{
|
||||
x: 1606521600000,
|
||||
y: 136873,
|
||||
},
|
||||
{
|
||||
x: 1606608000000,
|
||||
y: 133243,
|
||||
},
|
||||
{
|
||||
x: 1606694400000,
|
||||
y: 327739,
|
||||
},
|
||||
{
|
||||
x: 1606780800000,
|
||||
y: 162711,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]}
|
||||
formData={{
|
||||
datasource: '24771__table',
|
||||
vizType: VizType.Compare,
|
||||
urlParams: {},
|
||||
timeRangeEndpoints: ['inclusive', 'exclusive'],
|
||||
granularitySqla: '__time',
|
||||
timeGrainSqla: 'P1D',
|
||||
timeRange: 'Last week',
|
||||
metrics: ['random_metric'],
|
||||
adhocFilters: [],
|
||||
groupby: ['dim_origin_region'],
|
||||
timeseriesLimitMetric: null,
|
||||
orderDesc: true,
|
||||
contribution: false,
|
||||
rowLimit: 10000,
|
||||
colorScheme: 'd3Category10',
|
||||
labelColors: {},
|
||||
xAxisLabel: '',
|
||||
bottomMargin: 'auto',
|
||||
xTicksLayout: 'auto',
|
||||
xAxisFormat: 'smart_date',
|
||||
xAxisShowminmax: false,
|
||||
yAxisLabel: '',
|
||||
leftMargin: 'auto',
|
||||
yAxisShowminmax: false,
|
||||
yLogScale: false,
|
||||
yAxisFormat: 'SMART_NUMBER',
|
||||
yAxisBounds: [null, null],
|
||||
rollingType: 'None',
|
||||
comparisonType: 'values',
|
||||
resampleRule: null,
|
||||
resampleMethod: null,
|
||||
annotationLayers: [],
|
||||
appliedTimeExtras: {},
|
||||
where: '',
|
||||
having: '',
|
||||
havingFilters: [],
|
||||
filters: [],
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { DistBarChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3';
|
||||
|
||||
new DistBarChartPlugin().configure({ key: 'dist-bar' }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-preset-chart-nvd3/DistBar',
|
||||
};
|
||||
|
||||
export { basic } from './stories/basic';
|
||||
export { manyBars } from './stories/manyBars';
|
||||
@@ -1,112 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* 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,48 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
import data from '../data';
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType="dist-bar"
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
barstacked: false,
|
||||
bottomMargin: 'auto',
|
||||
colorScheme: 'd3Category10',
|
||||
contribution: false,
|
||||
orderBars: false,
|
||||
reduceXTicks: false,
|
||||
showBarValue: false,
|
||||
showControls: false,
|
||||
showLegend: true,
|
||||
vizType: VizType.DistBar,
|
||||
xAxisLabel: 'ddd',
|
||||
xTicksLayout: 'auto',
|
||||
yAxisFormat: '.3s',
|
||||
yAxisLabel: 'ddd',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,58 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType, seedRandom } from '@superset-ui/core';
|
||||
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(seedRandom() * LONG_LABEL.length),
|
||||
)} ${i + 1}`,
|
||||
y: Math.round(seedRandom() * 10000),
|
||||
});
|
||||
}
|
||||
|
||||
export const manyBars = () => (
|
||||
<SuperChart
|
||||
chartType="dist-bar"
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
colorScheme: 'd3Category10',
|
||||
showBarValue: false,
|
||||
showLegend: true,
|
||||
vizType: VizType.DistBar,
|
||||
xTicksLayout: 'auto',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { VizType } from '@superset-ui/core';
|
||||
import { LineChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3';
|
||||
|
||||
new LineChartPlugin().configure({ key: VizType.LegacyLine }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-preset-chart-nvd3/Line',
|
||||
};
|
||||
|
||||
export { basic } from './stories/basic';
|
||||
export { markers } from './stories/markers';
|
||||
export { logScale } from './stories/logScale';
|
||||
export { yAxisBounds } from './stories/yAxisBounds';
|
||||
@@ -1,927 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* 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,52 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
import data from '../data';
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyLine}
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
bottomMargin: 'auto',
|
||||
colorScheme: 'd3Category10',
|
||||
leftMargin: 'auto',
|
||||
lineInterpolation: 'linear',
|
||||
richTooltip: true,
|
||||
showBrush: 'auto',
|
||||
showLegend: true,
|
||||
showMarkers: false,
|
||||
vizType: VizType.LegacyLine,
|
||||
xAxisFormat: 'smart_date',
|
||||
xAxisLabel: '',
|
||||
xAxisShowminmax: false,
|
||||
xTicksLayout: 'auto',
|
||||
yAxisBounds: [null, null],
|
||||
yAxisFormat: '.3s',
|
||||
yAxisLabel: '',
|
||||
yAxisShowminmax: false,
|
||||
yLogScale: false,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
import data from '../data';
|
||||
|
||||
export const logScale = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyLine}
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
richTooltip: true,
|
||||
vizType: VizType.LegacyLine,
|
||||
yAxisBounds: [1, 60000],
|
||||
yAxisFormat: ',d',
|
||||
yLogScale: true,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
import data from '../data';
|
||||
|
||||
export const markers = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyLine}
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
bottomMargin: 'auto',
|
||||
colorScheme: 'd3Category10',
|
||||
leftMargin: 'auto',
|
||||
lineInterpolation: 'linear',
|
||||
richTooltip: true,
|
||||
showBrush: 'auto',
|
||||
showLegend: true,
|
||||
showMarkers: true,
|
||||
vizType: VizType.LegacyLine,
|
||||
xAxisFormat: 'smart_date',
|
||||
xAxisLabel: '',
|
||||
xAxisShowminmax: false,
|
||||
xTicksLayout: 'auto',
|
||||
yAxisBounds: [null, null],
|
||||
yAxisFormat: '.3s',
|
||||
yAxisLabel: '',
|
||||
yAxisShowminmax: false,
|
||||
yLogScale: false,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,97 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
import data from '../data';
|
||||
|
||||
export const yAxisBounds = () => (
|
||||
<div className="container">
|
||||
<h2>yAxisBounds</h2>
|
||||
<pre>yAxisBounds=undefined</pre>
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyLine}
|
||||
width={400}
|
||||
height={200}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
richTooltip: true,
|
||||
showLegend: false,
|
||||
vizType: VizType.LegacyLine,
|
||||
}}
|
||||
/>
|
||||
<pre>yAxisBounds=[0, 60000]</pre>
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyLine}
|
||||
width={400}
|
||||
height={200}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
richTooltip: true,
|
||||
showLegend: false,
|
||||
vizType: VizType.LegacyLine,
|
||||
yAxisBounds: [0, 60000],
|
||||
}}
|
||||
/>
|
||||
<pre>yAxisBounds=[null, 60000]</pre>
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyLine}
|
||||
width={400}
|
||||
height={200}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
richTooltip: true,
|
||||
showLegend: false,
|
||||
vizType: VizType.LegacyLine,
|
||||
yAxisBounds: [null, 60000],
|
||||
}}
|
||||
/>
|
||||
<pre>yAxisBounds=[40000, null]</pre>
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyLine}
|
||||
width={400}
|
||||
height={200}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
richTooltip: true,
|
||||
showLegend: false,
|
||||
vizType: VizType.LegacyLine,
|
||||
yAxisBounds: [40000, null],
|
||||
}}
|
||||
/>
|
||||
<pre>yAxisBounds=[40000, null] with Legend</pre>
|
||||
<SuperChart
|
||||
chartType={VizType.LegacyLine}
|
||||
width={400}
|
||||
height={200}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
richTooltip: true,
|
||||
showLegend: true,
|
||||
vizType: VizType.LegacyLine,
|
||||
yAxisBounds: [40000, null],
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { VizType } from '@superset-ui/core';
|
||||
import { PieChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3';
|
||||
|
||||
new PieChartPlugin().configure({ key: VizType.Pie }).register();
|
||||
|
||||
export default {
|
||||
title: 'Legacy Chart Plugins/legacy-preset-chart-nvd3/Pie',
|
||||
};
|
||||
|
||||
export { basic } from './stories/basic';
|
||||
export { noData } from './stories/noData';
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable sort-keys, no-magic-numbers */
|
||||
export default [
|
||||
{
|
||||
x: 'boy',
|
||||
y: 48133355,
|
||||
},
|
||||
{
|
||||
x: 'girl',
|
||||
y: 32546308,
|
||||
},
|
||||
];
|
||||
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
import data from '../data';
|
||||
|
||||
export const basic = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.Pie}
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ data }]}
|
||||
formData={{
|
||||
colorScheme: 'd3Category10',
|
||||
donut: false,
|
||||
labelsOutside: true,
|
||||
numberFormat: '.3s',
|
||||
pieLabelType: 'key',
|
||||
showLabels: true,
|
||||
showLegend: true,
|
||||
vizType: VizType.Pie,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { SuperChart, VizType } from '@superset-ui/core';
|
||||
import dummyDatasource from '../../../../../shared/dummyDatasource';
|
||||
|
||||
export const noData = () => (
|
||||
<SuperChart
|
||||
chartType={VizType.Pie}
|
||||
width={400}
|
||||
height={400}
|
||||
datasource={dummyDatasource}
|
||||
queriesData={[{ data: [] }]}
|
||||
formData={{
|
||||
colorScheme: 'd3Category10',
|
||||
donut: false,
|
||||
labelsOutside: true,
|
||||
numberFormat: '.3s',
|
||||
pieLabelType: 'key',
|
||||
showLabels: true,
|
||||
showLegend: true,
|
||||
vizType: VizType.Pie,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -23,7 +23,6 @@ import {
|
||||
SupersetClient,
|
||||
} from '@superset-ui/core';
|
||||
import { BigNumberChartPlugin } from '@superset-ui/plugin-chart-echarts';
|
||||
import LegacySankeyPlugin from '@superset-ui/legacy-plugin-chart-sankey';
|
||||
import { WordCloudChartPlugin } from '@superset-ui/plugin-chart-word-cloud';
|
||||
|
||||
import {
|
||||
@@ -44,7 +43,6 @@ const WORD_CLOUD = 'new_word_cloud';
|
||||
|
||||
new BigNumberChartPlugin().configure({ key: BIG_NUMBER }).register();
|
||||
// eslint-disable-next-line
|
||||
new LegacySankeyPlugin().configure({ key: SANKEY }).register();
|
||||
// eslint-disable-next-line
|
||||
new WordCloudChartPlugin().configure({ key: WORD_CLOUD }).register();
|
||||
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [0.20.0](https://github.com/apache/superset/compare/v2021.41.0...v0.20.0) (2024-09-09)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- adding missing examples for bubble chart, bullet chart, calendar heatmap chart and country map chart in the gallery ([#22523](https://github.com/apache/superset/issues/22523)) ([839ec7c](https://github.com/apache/superset/commit/839ec7ceacc66c65928fd0ddead2b014db3d5563))
|
||||
- Calendar Heatmap day offset ([#24989](https://github.com/apache/superset/issues/24989)) ([025e4d4](https://github.com/apache/superset/commit/025e4d4772e778097da7b9e1675782b73eaa887c))
|
||||
- **legacy-plugin-chart-calendar:** fix timestamp timezone in Calendar ([#17664](https://github.com/apache/superset/issues/17664)) ([e660ea2](https://github.com/apache/superset/commit/e660ea25331b092ecb5976254abfc45a413f07d5))
|
||||
- Native time range filter in legacy charts ([#23865](https://github.com/apache/superset/issues/23865)) ([78833bc](https://github.com/apache/superset/commit/78833bcc3068968ac62959dd541afd00c7e11c24))
|
||||
|
||||
### Features
|
||||
|
||||
- **explore:** Apply denormalization to tier 2 charts form data ([#20524](https://github.com/apache/superset/issues/20524)) ([e12ee59](https://github.com/apache/superset/commit/e12ee59b13822241dca8d8015f1222c477edd4f3))
|
||||
|
||||
# [0.19.0](https://github.com/apache/superset/compare/v2021.41.0...v0.19.0) (2024-09-07)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- adding missing examples for bubble chart, bullet chart, calendar heatmap chart and country map chart in the gallery ([#22523](https://github.com/apache/superset/issues/22523)) ([839ec7c](https://github.com/apache/superset/commit/839ec7ceacc66c65928fd0ddead2b014db3d5563))
|
||||
- Calendar Heatmap day offset ([#24989](https://github.com/apache/superset/issues/24989)) ([025e4d4](https://github.com/apache/superset/commit/025e4d4772e778097da7b9e1675782b73eaa887c))
|
||||
- **legacy-plugin-chart-calendar:** fix timestamp timezone in Calendar ([#17664](https://github.com/apache/superset/issues/17664)) ([e660ea2](https://github.com/apache/superset/commit/e660ea25331b092ecb5976254abfc45a413f07d5))
|
||||
- Native time range filter in legacy charts ([#23865](https://github.com/apache/superset/issues/23865)) ([78833bc](https://github.com/apache/superset/commit/78833bcc3068968ac62959dd541afd00c7e11c24))
|
||||
|
||||
### Features
|
||||
|
||||
- **explore:** Apply denormalization to tier 2 charts form data ([#20524](https://github.com/apache/superset/issues/20524)) ([e12ee59](https://github.com/apache/superset/commit/e12ee59b13822241dca8d8015f1222c477edd4f3))
|
||||
|
||||
# [0.18.0](https://github.com/apache-superset/superset-ui/compare/v0.17.87...v0.18.0) (2021-08-30)
|
||||
|
||||
**Note:** Version bump only for package @superset-ui/legacy-plugin-chart-calendar
|
||||
|
||||
## [0.17.61](https://github.com/apache-superset/superset-ui/compare/v0.17.60...v0.17.61) (2021-07-02)
|
||||
|
||||
**Note:** Version bump only for package @superset-ui/legacy-plugin-chart-calendar
|
||||
@@ -1,52 +0,0 @@
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
## @superset-ui/legacy-plugin-chart-calendar
|
||||
|
||||
[](https://www.npmjs.com/package/@superset-ui/legacy-plugin-chart-calendar)
|
||||
[](https://libraries.io/npm/@superset-ui%2Flegacy-plugin-chart-calendar)
|
||||
|
||||
This plugin provides Calendar Heatmap for Superset.
|
||||
|
||||
### Usage
|
||||
|
||||
Configure `key`, which can be any `string`, and register the plugin. This `key` will be used to
|
||||
lookup this chart throughout the app.
|
||||
|
||||
```js
|
||||
import CalendarChartPlugin from '@superset-ui/legacy-plugin-chart-calendar';
|
||||
|
||||
new CalendarChartPlugin().configure({ key: 'calendar' }).register();
|
||||
```
|
||||
|
||||
Then use it via `SuperChart`. See
|
||||
[storybook](https://apache-superset.github.io/superset-ui-plugins/?selectedKind=plugin-chart-calendar)
|
||||
for more details.
|
||||
|
||||
```js
|
||||
<SuperChart
|
||||
chartType="calendar"
|
||||
width={600}
|
||||
height={600}
|
||||
formData={...}
|
||||
queriesData={[{
|
||||
data: {...},
|
||||
}]}
|
||||
/>
|
||||
```
|
||||
@@ -1,40 +0,0 @@
|
||||
{
|
||||
"name": "@superset-ui/legacy-plugin-chart-calendar",
|
||||
"version": "0.20.3",
|
||||
"description": "Superset Legacy Chart - Calendar Heatmap",
|
||||
"keywords": [
|
||||
"superset"
|
||||
],
|
||||
"homepage": "https://github.com/apache/superset/tree/master/superset-frontend/plugins/legacy-plugin-chart-calendar#readme",
|
||||
"bugs": {
|
||||
"url": "https://github.com/apache/superset/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/apache/superset.git",
|
||||
"directory": "superset-frontend/plugins/legacy-plugin-chart-calendar"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"author": "Superset",
|
||||
"main": "lib/index.js",
|
||||
"module": "esm/index.js",
|
||||
"files": [
|
||||
"esm",
|
||||
"lib"
|
||||
],
|
||||
"dependencies": {
|
||||
"d3-array": "^2.0.3",
|
||||
"d3-selection": "^3.0.0",
|
||||
"d3-tip": "^0.9.1",
|
||||
"prop-types": "^15.8.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@emotion/react": "^11.4.1",
|
||||
"@superset-ui/chart-controls": "*",
|
||||
"@superset-ui/core": "*",
|
||||
"react": "^16.13.1"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
||||
@@ -1,141 +0,0 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import PropTypes from 'prop-types';
|
||||
import { extent as d3Extent, range as d3Range } from 'd3-array';
|
||||
import { select as d3Select } from 'd3-selection';
|
||||
import { getSequentialSchemeRegistry, t } from '@superset-ui/core';
|
||||
import CalHeatMap from './vendor/cal-heatmap';
|
||||
|
||||
const propTypes = {
|
||||
data: PropTypes.shape({
|
||||
// Object hashed by metric name,
|
||||
// then hashed by timestamp (in seconds, not milliseconds) as float
|
||||
// the innermost value is count
|
||||
// e.g. { count_distinct_something: { 1535034236.0: 3 } }
|
||||
data: PropTypes.object,
|
||||
domain: PropTypes.string,
|
||||
range: PropTypes.number,
|
||||
// timestamp in milliseconds
|
||||
start: PropTypes.number,
|
||||
subdomain: PropTypes.string,
|
||||
}),
|
||||
height: PropTypes.number,
|
||||
// eslint-disable-next-line react/sort-prop-types
|
||||
cellPadding: PropTypes.number,
|
||||
// eslint-disable-next-line react/sort-prop-types
|
||||
cellRadius: PropTypes.number,
|
||||
// eslint-disable-next-line react/sort-prop-types
|
||||
cellSize: PropTypes.number,
|
||||
linearColorScheme: PropTypes.string,
|
||||
showLegend: PropTypes.bool,
|
||||
showMetricName: PropTypes.bool,
|
||||
showValues: PropTypes.bool,
|
||||
steps: PropTypes.number,
|
||||
timeFormatter: PropTypes.func,
|
||||
valueFormatter: PropTypes.func,
|
||||
verboseMap: PropTypes.object,
|
||||
theme: PropTypes.object,
|
||||
};
|
||||
|
||||
function Calendar(element, props) {
|
||||
const {
|
||||
data,
|
||||
height,
|
||||
cellPadding = 3,
|
||||
cellRadius = 0,
|
||||
cellSize = 10,
|
||||
domainGranularity,
|
||||
linearColorScheme,
|
||||
showLegend,
|
||||
showMetricName,
|
||||
showValues,
|
||||
steps,
|
||||
subdomainGranularity,
|
||||
timeFormatter,
|
||||
valueFormatter,
|
||||
verboseMap,
|
||||
theme,
|
||||
} = props;
|
||||
|
||||
const container = d3Select(element)
|
||||
.classed('superset-legacy-chart-calendar', true)
|
||||
.style('height', height);
|
||||
container.selectAll('*').remove();
|
||||
const div = container.append('div');
|
||||
|
||||
const subDomainTextFormat = showValues
|
||||
? (date, value) => valueFormatter(value)
|
||||
: null;
|
||||
|
||||
const metricsData = data.data;
|
||||
|
||||
const METRIC_TEXT = t('Metric');
|
||||
|
||||
Object.keys(metricsData).forEach(metric => {
|
||||
const calContainer = div.append('div');
|
||||
if (showMetricName) {
|
||||
calContainer.text(`${METRIC_TEXT}: ${verboseMap[metric] || metric}`);
|
||||
}
|
||||
const timestamps = metricsData[metric];
|
||||
const extents = d3Extent(Object.keys(timestamps), key => timestamps[key]);
|
||||
const step = (extents[1] - extents[0]) / (steps - 1);
|
||||
const colorScale = getSequentialSchemeRegistry()
|
||||
.get(linearColorScheme)
|
||||
.createLinearScale(extents);
|
||||
|
||||
const legend = d3Range(steps).map(i => extents[0] + step * i);
|
||||
const legendColors = legend.map(x => colorScale(x));
|
||||
|
||||
const cal = new CalHeatMap();
|
||||
cal.init({
|
||||
start: data.start,
|
||||
data: timestamps,
|
||||
itemSelector: calContainer.node(),
|
||||
legendVerticalPosition: 'top',
|
||||
cellSize,
|
||||
cellPadding,
|
||||
cellRadius,
|
||||
legendCellSize: cellSize,
|
||||
legendCellPadding: 2,
|
||||
legendCellRadius: cellRadius,
|
||||
tooltip: true,
|
||||
domain: domainGranularity,
|
||||
subDomain: subdomainGranularity,
|
||||
range: data.range,
|
||||
browsing: true,
|
||||
legend,
|
||||
legendColors: {
|
||||
colorScale,
|
||||
min: legendColors[0],
|
||||
max: legendColors[legendColors.length - 1],
|
||||
empty: theme.colors.grayscale.light5,
|
||||
},
|
||||
displayLegend: showLegend,
|
||||
itemName: '',
|
||||
valueFormatter,
|
||||
timeFormatter,
|
||||
subDomainTextFormat,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Calendar.displayName = 'Calendar';
|
||||
Calendar.propTypes = propTypes;
|
||||
|
||||
export default Calendar;
|
||||
@@ -1,239 +0,0 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import PropTypes from 'prop-types';
|
||||
import { reactify, styled, css, useTheme } from '@superset-ui/core';
|
||||
import { Global } from '@emotion/react';
|
||||
import Component from './Calendar';
|
||||
|
||||
const ReactComponent = reactify(Component);
|
||||
|
||||
const Calendar = ({ className, ...otherProps }) => {
|
||||
const theme = useTheme();
|
||||
return (
|
||||
<div className={className}>
|
||||
<Global
|
||||
styles={css`
|
||||
.d3-tip {
|
||||
line-height: 1;
|
||||
padding: ${theme.gridUnit * 3}px;
|
||||
background: ${theme.colors.grayscale.dark2};
|
||||
color: ${theme.colors.grayscale.light5};
|
||||
border-radius: 4px;
|
||||
pointer-events: none;
|
||||
z-index: 1000;
|
||||
font-size: ${theme.typography.sizes.s}px;
|
||||
}
|
||||
/* Creates a small triangle extender for the tooltip */
|
||||
.d3-tip:after {
|
||||
box-sizing: border-box;
|
||||
display: inline;
|
||||
font-size: ${theme.typography.sizes.xs};
|
||||
width: 100%;
|
||||
line-height: 1;
|
||||
color: ${theme.colors.grayscale.dark2};
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
/* Northward tooltips */
|
||||
.d3-tip.n:after {
|
||||
content: '\\25BC';
|
||||
margin: -${theme.gridUnit}px 0 0 0;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
text-align: center;
|
||||
}
|
||||
/* Eastward tooltips */
|
||||
.d3-tip.e:after {
|
||||
content: '\\25C0';
|
||||
margin: -${theme.gridUnit}px 0 0 0;
|
||||
top: 50%;
|
||||
left: -${theme.gridUnit * 2}px;
|
||||
}
|
||||
/* Southward tooltips */
|
||||
.d3-tip.s:after {
|
||||
content: '\\25B2';
|
||||
margin: 0;
|
||||
top: -${theme.gridUnit * 2}px;
|
||||
left: 0;
|
||||
text-align: center;
|
||||
}
|
||||
/* Westward tooltips */
|
||||
.d3-tip.w:after {
|
||||
content: '\\25B6';
|
||||
margin: -${theme.gridUnit}px 0 0 0px;
|
||||
top: 50%;
|
||||
left: 100%;
|
||||
}
|
||||
`}
|
||||
/>
|
||||
<ReactComponent {...otherProps} theme={theme} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Calendar.defaultProps = {
|
||||
otherProps: {},
|
||||
};
|
||||
|
||||
Calendar.propTypes = {
|
||||
className: PropTypes.string.isRequired,
|
||||
otherProps: PropTypes.objectOf(PropTypes.any),
|
||||
};
|
||||
|
||||
export default styled(Calendar)`
|
||||
${({ theme }) => `
|
||||
.superset-legacy-chart-calendar {
|
||||
padding: ${theme.gridUnit * 3}px;
|
||||
position: static !important;
|
||||
overflow: auto !important;
|
||||
}
|
||||
|
||||
.superset-legacy-chart-calendar .ch-tooltip {
|
||||
margin-left: ${theme.gridUnit * 5}px;
|
||||
margin-top: ${theme.gridUnit}px;
|
||||
}
|
||||
|
||||
.superset-legacy-chart-calendar .d3-tip {
|
||||
line-height: 1;
|
||||
padding: ${theme.gridUnit * 3}px;
|
||||
background: ${theme.colors.grayscale.dark2};
|
||||
color: ${theme.colors.grayscale.light5};
|
||||
border-radius: ${theme.borderRadius}px;
|
||||
pointer-events: none;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.cal-heatmap-container {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.cal-heatmap-container .graph-label {
|
||||
fill: ${theme.colors.grayscale.base};
|
||||
font-size: ${theme.typography.sizes.xs}px;
|
||||
}
|
||||
|
||||
.cal-heatmap-container .graph,
|
||||
.cal-heatmap-container .graph-legend rect {
|
||||
shape-rendering: crispedges;
|
||||
}
|
||||
|
||||
.cal-heatmap-container .graph-rect {
|
||||
fill: ${theme.colors.grayscale.light2};
|
||||
}
|
||||
|
||||
.cal-heatmap-container .graph-subdomain-group rect:hover {
|
||||
stroke: ${theme.colors.grayscale.dark2};
|
||||
stroke-width: 1px;
|
||||
}
|
||||
|
||||
.cal-heatmap-container .subdomain-text {
|
||||
font-size: ${theme.typography.sizes.xs}px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.cal-heatmap-container .hover_cursor:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cal-heatmap-container .qi {
|
||||
background-color: ${theme.colors.grayscale.base};
|
||||
fill: ${theme.colors.grayscale.base};
|
||||
}
|
||||
|
||||
.cal-heatmap-container .q1 {
|
||||
background-color: ${theme.colors.alert.light2};
|
||||
fill: ${theme.colors.alert.light2};
|
||||
}
|
||||
|
||||
.cal-heatmap-container .q2 {
|
||||
background-color: ${theme.colors.alert.light1};
|
||||
fill: ${theme.colors.alert.light1};
|
||||
}
|
||||
|
||||
.cal-heatmap-container .q3 {
|
||||
background-color: ${theme.colors.success.light1};
|
||||
fill: ${theme.colors.success.light1};
|
||||
}
|
||||
|
||||
.cal-heatmap-container .q4 {
|
||||
background-color: ${theme.colors.success.base};
|
||||
fill: ${theme.colors.success.base};
|
||||
}
|
||||
|
||||
.cal-heatmap-container .q5 {
|
||||
background-color: ${theme.colors.success.dark1};
|
||||
fill: ${theme.colors.success.dark1};
|
||||
}
|
||||
|
||||
.cal-heatmap-container rect.highlight {
|
||||
stroke: ${theme.colors.grayscale.dark1};
|
||||
stroke-width: 1;
|
||||
}
|
||||
|
||||
.cal-heatmap-container text.highlight {
|
||||
fill: ${theme.colors.grayscale.dark1};
|
||||
}
|
||||
|
||||
.cal-heatmap-container rect.highlight-now {
|
||||
stroke: ${theme.colors.error.base};
|
||||
}
|
||||
|
||||
.cal-heatmap-container text.highlight-now {
|
||||
fill: ${theme.colors.error.base};
|
||||
font-weight: ${theme.typography.weights.bold};
|
||||
}
|
||||
|
||||
.cal-heatmap-container .domain-background {
|
||||
fill: none;
|
||||
shape-rendering: crispedges;
|
||||
}
|
||||
|
||||
.ch-tooltip {
|
||||
padding: ${theme.gridUnit * 2}px;
|
||||
background: ${theme.colors.grayscale.dark1};
|
||||
color: ${theme.colors.grayscale.light1};
|
||||
font-size: ${theme.typography.sizes.s}px;
|
||||
line-height: 1.4;
|
||||
width: 140px;
|
||||
position: absolute;
|
||||
z-index: 99999;
|
||||
text-align: center;
|
||||
border-radius: ${theme.borderRadius}px;
|
||||
box-shadow: 2px 2px 2px ${theme.colors.grayscale.dark2};
|
||||
display: none;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.ch-tooltip::after {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
content: '';
|
||||
padding: 0;
|
||||
display: block;
|
||||
bottom: -${theme.gridUnit}px;
|
||||
left: 50%;
|
||||
margin-left: -${theme.gridUnit}px;
|
||||
border-width: ${theme.gridUnit}px ${theme.gridUnit}px 0;
|
||||
border-top-color: ${theme.colors.grayscale.dark1};
|
||||
}
|
||||
`}
|
||||
`;
|
||||
@@ -1,204 +0,0 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { t, legacyValidateInteger } from '@superset-ui/core';
|
||||
import {
|
||||
ControlPanelConfig,
|
||||
D3_FORMAT_DOCS,
|
||||
D3_TIME_FORMAT_OPTIONS,
|
||||
getStandardizedControls,
|
||||
} from '@superset-ui/chart-controls';
|
||||
|
||||
const config: ControlPanelConfig = {
|
||||
controlPanelSections: [
|
||||
{
|
||||
label: t('Time'),
|
||||
expanded: true,
|
||||
description: t('Time related form attributes'),
|
||||
controlSetRows: [['granularity_sqla'], ['time_range']],
|
||||
},
|
||||
{
|
||||
label: t('Query'),
|
||||
expanded: true,
|
||||
controlSetRows: [
|
||||
[
|
||||
{
|
||||
name: 'domain_granularity',
|
||||
config: {
|
||||
type: 'SelectControl',
|
||||
label: t('Domain'),
|
||||
default: 'month',
|
||||
choices: [
|
||||
['hour', t('hour')],
|
||||
['day', t('day')],
|
||||
['week', t('week')],
|
||||
['month', t('month')],
|
||||
['year', t('year')],
|
||||
],
|
||||
description: t('The time unit used for the grouping of blocks'),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'subdomain_granularity',
|
||||
config: {
|
||||
type: 'SelectControl',
|
||||
label: t('Subdomain'),
|
||||
default: 'day',
|
||||
choices: [
|
||||
['min', t('min')],
|
||||
['hour', t('hour')],
|
||||
['day', t('day')],
|
||||
['week', t('week')],
|
||||
['month', t('month')],
|
||||
],
|
||||
description: t(
|
||||
'The time unit for each block. Should be a smaller unit than ' +
|
||||
'domain_granularity. Should be larger or equal to Time Grain',
|
||||
),
|
||||
},
|
||||
},
|
||||
],
|
||||
['metrics'],
|
||||
['adhoc_filters'],
|
||||
],
|
||||
},
|
||||
{
|
||||
label: t('Chart Options'),
|
||||
expanded: true,
|
||||
tabOverride: 'customize',
|
||||
controlSetRows: [
|
||||
['linear_color_scheme'],
|
||||
[
|
||||
{
|
||||
name: 'cell_size',
|
||||
config: {
|
||||
type: 'TextControl',
|
||||
isInt: true,
|
||||
default: 10,
|
||||
validators: [legacyValidateInteger],
|
||||
renderTrigger: true,
|
||||
label: t('Cell Size'),
|
||||
description: t('The size of the square cell, in pixels'),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'cell_padding',
|
||||
config: {
|
||||
type: 'TextControl',
|
||||
isInt: true,
|
||||
validators: [legacyValidateInteger],
|
||||
renderTrigger: true,
|
||||
default: 2,
|
||||
label: t('Cell Padding'),
|
||||
description: t('The distance between cells, in pixels'),
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
name: 'cell_radius',
|
||||
config: {
|
||||
type: 'TextControl',
|
||||
isInt: true,
|
||||
validators: [legacyValidateInteger],
|
||||
renderTrigger: true,
|
||||
default: 0,
|
||||
label: t('Cell Radius'),
|
||||
description: t('The pixel radius'),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'steps',
|
||||
config: {
|
||||
type: 'TextControl',
|
||||
isInt: true,
|
||||
validators: [legacyValidateInteger],
|
||||
renderTrigger: true,
|
||||
default: 10,
|
||||
label: t('Color Steps'),
|
||||
description: t('The number color "steps"'),
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
'y_axis_format',
|
||||
{
|
||||
name: 'x_axis_time_format',
|
||||
config: {
|
||||
type: 'SelectControl',
|
||||
freeForm: true,
|
||||
label: t('Time Format'),
|
||||
renderTrigger: true,
|
||||
default: 'smart_date',
|
||||
choices: D3_TIME_FORMAT_OPTIONS,
|
||||
description: D3_FORMAT_DOCS,
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
name: 'show_legend',
|
||||
config: {
|
||||
type: 'CheckboxControl',
|
||||
label: t('Legend'),
|
||||
renderTrigger: true,
|
||||
default: true,
|
||||
description: t('Whether to display the legend (toggles)'),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'show_values',
|
||||
config: {
|
||||
type: 'CheckboxControl',
|
||||
label: t('Show Values'),
|
||||
renderTrigger: true,
|
||||
default: false,
|
||||
description: t(
|
||||
'Whether to display the numerical values within the cells',
|
||||
),
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
name: 'show_metric_name',
|
||||
config: {
|
||||
type: 'CheckboxControl',
|
||||
label: t('Show Metric Names'),
|
||||
renderTrigger: true,
|
||||
default: true,
|
||||
description: t('Whether to display the metric name as a title'),
|
||||
},
|
||||
},
|
||||
null,
|
||||
],
|
||||
],
|
||||
},
|
||||
],
|
||||
controlOverrides: {
|
||||
y_axis_format: {
|
||||
label: t('Number Format'),
|
||||
},
|
||||
},
|
||||
formDataOverrides: formData => ({
|
||||
...formData,
|
||||
metrics: getStandardizedControls().popAllMetrics(),
|
||||
}),
|
||||
};
|
||||
|
||||
export default config;
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 36 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 9.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.6 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user