mirror of
https://github.com/apache/superset.git
synced 2024-09-19 20:19:37 -04:00
add storybooks for nvd3
This commit is contained in:
parent
7376fdad1e
commit
6385b6b4b8
@ -0,0 +1,30 @@
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import React from 'react';
|
||||
import { SuperChart } from '@superset-ui/chart';
|
||||
import data from './data';
|
||||
|
||||
export default [
|
||||
{
|
||||
renderStory: () => (
|
||||
<SuperChart
|
||||
chartType="bullet"
|
||||
chartProps={{
|
||||
formData: {
|
||||
markerLabels: '',
|
||||
markerLineLabels: '',
|
||||
markerLines: '',
|
||||
markers: '',
|
||||
rangeLabels: '',
|
||||
ranges: '',
|
||||
vizType: 'bullet',
|
||||
},
|
||||
height: 400,
|
||||
payload: { data },
|
||||
width: 400,
|
||||
}}
|
||||
/>
|
||||
),
|
||||
storyName: 'Basic',
|
||||
storyPath: 'preset-chart-nvd3|BulletChartPlugin',
|
||||
},
|
||||
];
|
@ -1,100 +1,10 @@
|
||||
/* eslint-disable sort-keys */
|
||||
/* eslint-disable sort-keys, no-magic-numbers */
|
||||
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',
|
||||
measures: [75691],
|
||||
ranges: [0, 83260.1],
|
||||
rangeLabels: null,
|
||||
markers: null,
|
||||
markerLabels: null,
|
||||
markerLines: null,
|
||||
markerLineLabels: null,
|
||||
};
|
||||
|
@ -0,0 +1,8 @@
|
||||
import { BulletChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3';
|
||||
import Stories from './Stories';
|
||||
|
||||
new BulletChartPlugin().configure({ key: 'bullet' }).register();
|
||||
|
||||
export default {
|
||||
examples: [...Stories],
|
||||
};
|
@ -0,0 +1,38 @@
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import React from 'react';
|
||||
import { SuperChart } from '@superset-ui/chart';
|
||||
import data from './data';
|
||||
|
||||
export default [
|
||||
{
|
||||
renderStory: () => (
|
||||
<SuperChart
|
||||
chartType="compare"
|
||||
chartProps={{
|
||||
datasource: { verboseMap: {} },
|
||||
formData: {
|
||||
bottomMargin: 'auto',
|
||||
colorScheme: 'd3Category10',
|
||||
contribution: false,
|
||||
leftMargin: 'auto',
|
||||
vizType: 'compare',
|
||||
xAxisFormat: 'smart_date',
|
||||
xAxisLabel: '',
|
||||
xAxisShowminmax: false,
|
||||
xTicksLayout: 'auto',
|
||||
yAxisBounds: [null, null],
|
||||
yAxisFormat: '.3s',
|
||||
yAxisLabel: '',
|
||||
yAxisShowminmax: false,
|
||||
yLogscale: false,
|
||||
},
|
||||
height: 400,
|
||||
payload: { data },
|
||||
width: 400,
|
||||
}}
|
||||
/>
|
||||
),
|
||||
storyName: 'Basic',
|
||||
storyPath: 'preset-chart-nvd3|CompareChartPlugin',
|
||||
},
|
||||
];
|
@ -0,0 +1,908 @@
|
||||
/* eslint-disable sort-keys, no-magic-numbers */
|
||||
export default [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: 24703,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: 27861,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: 29436,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: 31463,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: 35718,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: 41758,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: 48172,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: 52092,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: 48217,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: 48476,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: 46438,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: 45086,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: 46610,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: 47107,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: 50514,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: 48969,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: 50108,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: 59055,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: 59188,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: 59859,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: 59516,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: 56633,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: 54466,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: 52996,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: 53205,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: 52322,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: 47109,
|
||||
},
|
||||
{
|
||||
x: 694224000000.0,
|
||||
y: 42470,
|
||||
},
|
||||
{
|
||||
x: 725846400000.0,
|
||||
y: 38257,
|
||||
},
|
||||
{
|
||||
x: 757382400000.0,
|
||||
y: 34823,
|
||||
},
|
||||
{
|
||||
x: 788918400000.0,
|
||||
y: 32728,
|
||||
},
|
||||
{
|
||||
x: 820454400000.0,
|
||||
y: 30988,
|
||||
},
|
||||
{
|
||||
x: 852076800000.0,
|
||||
y: 29179,
|
||||
},
|
||||
{
|
||||
x: 883612800000.0,
|
||||
y: 27083,
|
||||
},
|
||||
{
|
||||
x: 915148800000.0,
|
||||
y: 25700,
|
||||
},
|
||||
{
|
||||
x: 946684800000.0,
|
||||
y: 24959,
|
||||
},
|
||||
{
|
||||
x: 978307200000.0,
|
||||
y: 23180,
|
||||
},
|
||||
{
|
||||
x: 1009843200000.0,
|
||||
y: 21731,
|
||||
},
|
||||
{
|
||||
x: 1041379200000.0,
|
||||
y: 20793,
|
||||
},
|
||||
{
|
||||
x: 1072915200000.0,
|
||||
y: 19739,
|
||||
},
|
||||
{
|
||||
x: 1104537600000.0,
|
||||
y: 19190,
|
||||
},
|
||||
{
|
||||
x: 1136073600000.0,
|
||||
y: 19674,
|
||||
},
|
||||
{
|
||||
x: 1167609600000.0,
|
||||
y: 19986,
|
||||
},
|
||||
{
|
||||
x: 1199145600000.0,
|
||||
y: 17771,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: 67646,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: 66207,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: 66581,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: 63531,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: 63502,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: 61570,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: 52948,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: 46218,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: 40968,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: 41654,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: 39019,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: 39165,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: 40407,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: 40533,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: 41898,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: 41743,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: 40486,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: 40283,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: 39048,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: 38346,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: 38395,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: 37021,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: 36672,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: 35214,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: 35139,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: 33661,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: 30347,
|
||||
},
|
||||
{
|
||||
x: 694224000000.0,
|
||||
y: 28344,
|
||||
},
|
||||
{
|
||||
x: 725846400000.0,
|
||||
y: 26947,
|
||||
},
|
||||
{
|
||||
x: 757382400000.0,
|
||||
y: 24784,
|
||||
},
|
||||
{
|
||||
x: 788918400000.0,
|
||||
y: 22967,
|
||||
},
|
||||
{
|
||||
x: 820454400000.0,
|
||||
y: 22941,
|
||||
},
|
||||
{
|
||||
x: 852076800000.0,
|
||||
y: 21824,
|
||||
},
|
||||
{
|
||||
x: 883612800000.0,
|
||||
y: 20816,
|
||||
},
|
||||
{
|
||||
x: 915148800000.0,
|
||||
y: 20267,
|
||||
},
|
||||
{
|
||||
x: 946684800000.0,
|
||||
y: 19695,
|
||||
},
|
||||
{
|
||||
x: 978307200000.0,
|
||||
y: 19281,
|
||||
},
|
||||
{
|
||||
x: 1009843200000.0,
|
||||
y: 18600,
|
||||
},
|
||||
{
|
||||
x: 1041379200000.0,
|
||||
y: 18557,
|
||||
},
|
||||
{
|
||||
x: 1072915200000.0,
|
||||
y: 18315,
|
||||
},
|
||||
{
|
||||
x: 1104537600000.0,
|
||||
y: 18017,
|
||||
},
|
||||
{
|
||||
x: 1136073600000.0,
|
||||
y: 17510,
|
||||
},
|
||||
{
|
||||
x: 1167609600000.0,
|
||||
y: 17400,
|
||||
},
|
||||
{
|
||||
x: 1199145600000.0,
|
||||
y: 16049,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: ['James'],
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: 67506,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: 65036,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: 61554,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: 60584,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: 59824,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: 61597,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: 54463,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: 46960,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: 42782,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: 41258,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: 39471,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: 38203,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: 39916,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: 39783,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: 39237,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: 39185,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: 38176,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: 38750,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: 36228,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: 35728,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: 35750,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: 33955,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: 32552,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: 32418,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: 32658,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: 32288,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: 30460,
|
||||
},
|
||||
{
|
||||
x: 694224000000.0,
|
||||
y: 28450,
|
||||
},
|
||||
{
|
||||
x: 725846400000.0,
|
||||
y: 26193,
|
||||
},
|
||||
{
|
||||
x: 757382400000.0,
|
||||
y: 24706,
|
||||
},
|
||||
{
|
||||
x: 788918400000.0,
|
||||
y: 22691,
|
||||
},
|
||||
{
|
||||
x: 820454400000.0,
|
||||
y: 21122,
|
||||
},
|
||||
{
|
||||
x: 852076800000.0,
|
||||
y: 20368,
|
||||
},
|
||||
{
|
||||
x: 883612800000.0,
|
||||
y: 19651,
|
||||
},
|
||||
{
|
||||
x: 915148800000.0,
|
||||
y: 18508,
|
||||
},
|
||||
{
|
||||
x: 946684800000.0,
|
||||
y: 17939,
|
||||
},
|
||||
{
|
||||
x: 978307200000.0,
|
||||
y: 17023,
|
||||
},
|
||||
{
|
||||
x: 1009843200000.0,
|
||||
y: 16905,
|
||||
},
|
||||
{
|
||||
x: 1041379200000.0,
|
||||
y: 16832,
|
||||
},
|
||||
{
|
||||
x: 1072915200000.0,
|
||||
y: 16459,
|
||||
},
|
||||
{
|
||||
x: 1104537600000.0,
|
||||
y: 16046,
|
||||
},
|
||||
{
|
||||
x: 1136073600000.0,
|
||||
y: 16139,
|
||||
},
|
||||
{
|
||||
x: 1167609600000.0,
|
||||
y: 15821,
|
||||
},
|
||||
{
|
||||
x: 1199145600000.0,
|
||||
y: 14920,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: ['John'],
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: 71390,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: 64858,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: 61480,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: 60754,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: 58644,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: 58348,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: 51382,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: 43028,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: 39061,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: 37553,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: 34970,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: 33876,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: 34103,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: 33895,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: 35305,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: 35131,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: 34761,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: 34560,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: 33047,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: 32484,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: 31397,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: 30103,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: 29462,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: 29301,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: 29751,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: 29011,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: 27727,
|
||||
},
|
||||
{
|
||||
x: 694224000000.0,
|
||||
y: 26156,
|
||||
},
|
||||
{
|
||||
x: 725846400000.0,
|
||||
y: 24918,
|
||||
},
|
||||
{
|
||||
x: 757382400000.0,
|
||||
y: 24119,
|
||||
},
|
||||
{
|
||||
x: 788918400000.0,
|
||||
y: 23174,
|
||||
},
|
||||
{
|
||||
x: 820454400000.0,
|
||||
y: 22104,
|
||||
},
|
||||
{
|
||||
x: 852076800000.0,
|
||||
y: 21330,
|
||||
},
|
||||
{
|
||||
x: 883612800000.0,
|
||||
y: 20556,
|
||||
},
|
||||
{
|
||||
x: 915148800000.0,
|
||||
y: 20280,
|
||||
},
|
||||
{
|
||||
x: 946684800000.0,
|
||||
y: 20032,
|
||||
},
|
||||
{
|
||||
x: 978307200000.0,
|
||||
y: 18839,
|
||||
},
|
||||
{
|
||||
x: 1009843200000.0,
|
||||
y: 17400,
|
||||
},
|
||||
{
|
||||
x: 1041379200000.0,
|
||||
y: 17170,
|
||||
},
|
||||
{
|
||||
x: 1072915200000.0,
|
||||
y: 16381,
|
||||
},
|
||||
{
|
||||
x: 1104537600000.0,
|
||||
y: 15692,
|
||||
},
|
||||
{
|
||||
x: 1136073600000.0,
|
||||
y: 15083,
|
||||
},
|
||||
{
|
||||
x: 1167609600000.0,
|
||||
y: 14348,
|
||||
},
|
||||
{
|
||||
x: 1199145600000.0,
|
||||
y: 13110,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: 80812,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: 79709,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: 82204,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: 81785,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: 84893,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: 85015,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: 77321,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: 71197,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: 67598,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: 67304,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: 68149,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: 66686,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: 67344,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: 66875,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: 67473,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: 68375,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: 68467,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: 67904,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: 67708,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: 67457,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: 64667,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: 63959,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: 63442,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: 63924,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: 65233,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: 65138,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: 60646,
|
||||
},
|
||||
{
|
||||
x: 694224000000.0,
|
||||
y: 54216,
|
||||
},
|
||||
{
|
||||
x: 725846400000.0,
|
||||
y: 49443,
|
||||
},
|
||||
{
|
||||
x: 757382400000.0,
|
||||
y: 44361,
|
||||
},
|
||||
{
|
||||
x: 788918400000.0,
|
||||
y: 41311,
|
||||
},
|
||||
{
|
||||
x: 820454400000.0,
|
||||
y: 38284,
|
||||
},
|
||||
{
|
||||
x: 852076800000.0,
|
||||
y: 37459,
|
||||
},
|
||||
{
|
||||
x: 883612800000.0,
|
||||
y: 36525,
|
||||
},
|
||||
{
|
||||
x: 915148800000.0,
|
||||
y: 33820,
|
||||
},
|
||||
{
|
||||
x: 946684800000.0,
|
||||
y: 31956,
|
||||
},
|
||||
{
|
||||
x: 978307200000.0,
|
||||
y: 29612,
|
||||
},
|
||||
{
|
||||
x: 1009843200000.0,
|
||||
y: 28156,
|
||||
},
|
||||
{
|
||||
x: 1041379200000.0,
|
||||
y: 27031,
|
||||
},
|
||||
{
|
||||
x: 1072915200000.0,
|
||||
y: 25418,
|
||||
},
|
||||
{
|
||||
x: 1104537600000.0,
|
||||
y: 23678,
|
||||
},
|
||||
{
|
||||
x: 1136073600000.0,
|
||||
y: 22498,
|
||||
},
|
||||
{
|
||||
x: 1167609600000.0,
|
||||
y: 21805,
|
||||
},
|
||||
{
|
||||
x: 1199145600000.0,
|
||||
y: 20271,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
@ -0,0 +1,8 @@
|
||||
import { CompareChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3';
|
||||
import Stories from './Stories';
|
||||
|
||||
new CompareChartPlugin().configure({ key: 'compare' }).register();
|
||||
|
||||
export default {
|
||||
examples: [...Stories],
|
||||
};
|
@ -0,0 +1,38 @@
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import React from 'react';
|
||||
import { SuperChart } from '@superset-ui/chart';
|
||||
import data from './data';
|
||||
|
||||
export default [
|
||||
{
|
||||
renderStory: () => (
|
||||
<SuperChart
|
||||
chartType="dist-bar"
|
||||
chartProps={{
|
||||
datasource: { verboseMap: {} },
|
||||
formData: {
|
||||
barstacked: false,
|
||||
bottomMargin: 'auto',
|
||||
colorScheme: 'd3Category10',
|
||||
contribution: false,
|
||||
orderBars: false,
|
||||
reduceXTicks: false,
|
||||
showBarValue: false,
|
||||
showControls: false,
|
||||
showLegend: true,
|
||||
vizType: 'dist_bar',
|
||||
xAxisLabel: 'ddd',
|
||||
xTicksLayout: 'auto',
|
||||
yAxisFormat: '.3s',
|
||||
yAxisLabel: 'ddd',
|
||||
},
|
||||
height: 400,
|
||||
payload: { data },
|
||||
width: 400,
|
||||
}}
|
||||
/>
|
||||
),
|
||||
storyName: 'Basic',
|
||||
storyPath: 'preset-chart-nvd3|DistBarChartPlugin',
|
||||
},
|
||||
];
|
@ -0,0 +1,93 @@
|
||||
/* eslint-disable sort-keys, no-magic-numbers */
|
||||
export default [
|
||||
{
|
||||
key: 'sum__sum_boys',
|
||||
values: [
|
||||
{
|
||||
x: 'CA',
|
||||
y: 5430796,
|
||||
},
|
||||
{
|
||||
x: 'TX',
|
||||
y: 3311985,
|
||||
},
|
||||
{
|
||||
x: 'NY',
|
||||
y: 3543961,
|
||||
},
|
||||
{
|
||||
x: 'OH',
|
||||
y: 2376385,
|
||||
},
|
||||
{
|
||||
x: 'PA',
|
||||
y: 2390275,
|
||||
},
|
||||
{
|
||||
x: 'IL',
|
||||
y: 2357411,
|
||||
},
|
||||
{
|
||||
x: 'MI',
|
||||
y: 1938321,
|
||||
},
|
||||
{
|
||||
x: 'FL',
|
||||
y: 1968060,
|
||||
},
|
||||
{
|
||||
x: 'NJ',
|
||||
y: 1486126,
|
||||
},
|
||||
{
|
||||
x: 'MA',
|
||||
y: 1285126,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'sum__sum_girls',
|
||||
values: [
|
||||
{
|
||||
x: 'CA',
|
||||
y: 3567754,
|
||||
},
|
||||
{
|
||||
x: 'TX',
|
||||
y: 2313186,
|
||||
},
|
||||
{
|
||||
x: 'NY',
|
||||
y: 2280733,
|
||||
},
|
||||
{
|
||||
x: 'OH',
|
||||
y: 1622814,
|
||||
},
|
||||
{
|
||||
x: 'PA',
|
||||
y: 1615383,
|
||||
},
|
||||
{
|
||||
x: 'IL',
|
||||
y: 1614427,
|
||||
},
|
||||
{
|
||||
x: 'MI',
|
||||
y: 1326229,
|
||||
},
|
||||
{
|
||||
x: 'FL',
|
||||
y: 1312593,
|
||||
},
|
||||
{
|
||||
x: 'NJ',
|
||||
y: 992702,
|
||||
},
|
||||
{
|
||||
x: 'MA',
|
||||
y: 842146,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
@ -0,0 +1,8 @@
|
||||
import { DistBarChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3';
|
||||
import Stories from './Stories';
|
||||
|
||||
new DistBarChartPlugin().configure({ key: 'dist-bar' }).register();
|
||||
|
||||
export default {
|
||||
examples: [...Stories],
|
||||
};
|
@ -0,0 +1,31 @@
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import React from 'react';
|
||||
import { SuperChart } from '@superset-ui/chart';
|
||||
import data from './data';
|
||||
|
||||
export default [
|
||||
{
|
||||
renderStory: () => (
|
||||
<SuperChart
|
||||
chartType="dual-line"
|
||||
chartProps={{
|
||||
datasource: { verboseMap: {} },
|
||||
formData: {
|
||||
colorScheme: 'd3Category10',
|
||||
metric: 'avg__num',
|
||||
metric2: 'sum__num',
|
||||
vizType: 'dual_line',
|
||||
xAxisFormat: 'smart_date',
|
||||
yAxis2Format: '.3s',
|
||||
yAxisFormat: '.3s',
|
||||
},
|
||||
height: 400,
|
||||
payload: { data },
|
||||
width: 400,
|
||||
}}
|
||||
/>
|
||||
),
|
||||
storyName: 'Basic',
|
||||
storyPath: 'preset-chart-nvd3|DualLineChartPlugin',
|
||||
},
|
||||
];
|
@ -0,0 +1,371 @@
|
||||
/* eslint-disable sort-keys, no-magic-numbers */
|
||||
export default [
|
||||
{
|
||||
key: 'avg__num',
|
||||
classed: '',
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: 1435.6116838487972,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: 1359.0295103957076,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: 1291.0963777490297,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: 1254.5405915670233,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: 1244.9671332927571,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: 1248.7126843657818,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: 1147.4195205479452,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: 1036.6540632054175,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: 980.8740906547285,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: 971.1190345584201,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: 947.5531453362256,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: 962.4153005464481,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: 1004.2832876712329,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: 1000.6107784431138,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: 1045.711965349215,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: 1089.5097402597403,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: 1094.7375201288244,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: 1113.3569511540527,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: 1117.585260892953,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: 1117.1530230069557,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: 1143.6297297297297,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: 1131.3461538461538,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: 1137.0865800865802,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: 1144.3100483610963,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: 1153.075821845175,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: 1170.1328,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: 1134.3757412398922,
|
||||
},
|
||||
{
|
||||
x: 694224000000.0,
|
||||
y: 1102.478189749182,
|
||||
},
|
||||
{
|
||||
x: 725846400000.0,
|
||||
y: 1065.1231527093596,
|
||||
},
|
||||
{
|
||||
x: 757382400000.0,
|
||||
y: 1035.223574986165,
|
||||
},
|
||||
{
|
||||
x: 788918400000.0,
|
||||
y: 997.9584026622297,
|
||||
},
|
||||
{
|
||||
x: 820454400000.0,
|
||||
y: 976.4625698324022,
|
||||
},
|
||||
{
|
||||
x: 852076800000.0,
|
||||
y: 953.0983698707139,
|
||||
},
|
||||
{
|
||||
x: 883612800000.0,
|
||||
y: 961.3199079401611,
|
||||
},
|
||||
{
|
||||
x: 915148800000.0,
|
||||
y: 962.3351032448378,
|
||||
},
|
||||
{
|
||||
x: 946684800000.0,
|
||||
y: 967.1753012048192,
|
||||
},
|
||||
{
|
||||
x: 978307200000.0,
|
||||
y: 955.8330218068536,
|
||||
},
|
||||
{
|
||||
x: 1009843200000.0,
|
||||
y: 947.7684413085311,
|
||||
},
|
||||
{
|
||||
x: 1041379200000.0,
|
||||
y: 951.2866622428667,
|
||||
},
|
||||
{
|
||||
x: 1072915200000.0,
|
||||
y: 913.469184890656,
|
||||
},
|
||||
{
|
||||
x: 1104537600000.0,
|
||||
y: 910.3797643797644,
|
||||
},
|
||||
{
|
||||
x: 1136073600000.0,
|
||||
y: 910.0478229835832,
|
||||
},
|
||||
{
|
||||
x: 1167609600000.0,
|
||||
y: 886.5323636363636,
|
||||
},
|
||||
{
|
||||
x: 1199145600000.0,
|
||||
y: 854.5530769230769,
|
||||
},
|
||||
],
|
||||
yAxis: 1,
|
||||
type: 'line',
|
||||
},
|
||||
{
|
||||
key: 'sum__num',
|
||||
classed: '',
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: 2088815,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: 2026313,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: 1996035,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: 1993465,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: 2045481,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: 2116568,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: 2010279,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: 1836951,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: 1752822,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: 1770350,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: 1747288,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: 1761220,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: 1832817,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: 1838122,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: 1931430,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: 2013414,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: 2039496,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: 2074184,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: 2077591,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: 2087959,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: 2115715,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: 2088465,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: 2101336,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: 2129561,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: 2174701,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: 2193999,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: 2104267,
|
||||
},
|
||||
{
|
||||
x: 694224000000.0,
|
||||
y: 2021945,
|
||||
},
|
||||
{
|
||||
x: 725846400000.0,
|
||||
y: 1945980,
|
||||
},
|
||||
{
|
||||
x: 757382400000.0,
|
||||
y: 1870649,
|
||||
},
|
||||
{
|
||||
x: 788918400000.0,
|
||||
y: 1799319,
|
||||
},
|
||||
{
|
||||
x: 820454400000.0,
|
||||
y: 1747868,
|
||||
},
|
||||
{
|
||||
x: 852076800000.0,
|
||||
y: 1695562,
|
||||
},
|
||||
{
|
||||
x: 883612800000.0,
|
||||
y: 1670774,
|
||||
},
|
||||
{
|
||||
x: 915148800000.0,
|
||||
y: 1631158,
|
||||
},
|
||||
{
|
||||
x: 946684800000.0,
|
||||
y: 1605511,
|
||||
},
|
||||
{
|
||||
x: 978307200000.0,
|
||||
y: 1534112,
|
||||
},
|
||||
{
|
||||
x: 1009843200000.0,
|
||||
y: 1477571,
|
||||
},
|
||||
{
|
||||
x: 1041379200000.0,
|
||||
y: 1433589,
|
||||
},
|
||||
{
|
||||
x: 1072915200000.0,
|
||||
y: 1378425,
|
||||
},
|
||||
{
|
||||
x: 1104537600000.0,
|
||||
y: 1313678,
|
||||
},
|
||||
{
|
||||
x: 1136073600000.0,
|
||||
y: 1274977,
|
||||
},
|
||||
{
|
||||
x: 1167609600000.0,
|
||||
y: 1218982,
|
||||
},
|
||||
{
|
||||
x: 1199145600000.0,
|
||||
y: 1110919,
|
||||
},
|
||||
],
|
||||
yAxis: 2,
|
||||
type: 'line',
|
||||
},
|
||||
];
|
@ -0,0 +1,8 @@
|
||||
import { DualLineChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3';
|
||||
import Stories from './Stories';
|
||||
|
||||
new DualLineChartPlugin().configure({ key: 'dual-line' }).register();
|
||||
|
||||
export default {
|
||||
examples: [...Stories],
|
||||
};
|
@ -0,0 +1,42 @@
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import React from 'react';
|
||||
import { SuperChart } from '@superset-ui/chart';
|
||||
import data from './data';
|
||||
|
||||
export default [
|
||||
{
|
||||
renderStory: () => (
|
||||
<SuperChart
|
||||
chartType="line"
|
||||
chartProps={{
|
||||
datasource: { verboseMap: {} },
|
||||
formData: {
|
||||
bottomMargin: 'auto',
|
||||
colorScheme: 'd3Category10',
|
||||
leftMargin: 'auto',
|
||||
lineInterpolation: 'linear',
|
||||
richTooltip: true,
|
||||
showBrush: 'auto',
|
||||
showLegend: true,
|
||||
showMarkers: false,
|
||||
vizType: 'line',
|
||||
xAxisFormat: 'smart_date',
|
||||
xAxisLabel: '',
|
||||
xAxisShowminmax: false,
|
||||
xTicksLayout: 'auto',
|
||||
yAxisBounds: [null, null],
|
||||
yAxisFormat: '.3s',
|
||||
yAxisLabel: '',
|
||||
yAxisShowminmax: false,
|
||||
yLogScale: false,
|
||||
},
|
||||
height: 400,
|
||||
payload: { data },
|
||||
width: 400,
|
||||
}}
|
||||
/>
|
||||
),
|
||||
storyName: 'Basic',
|
||||
storyPath: 'preset-chart-nvd3|LineChartPlugin',
|
||||
},
|
||||
];
|
@ -0,0 +1,908 @@
|
||||
/* eslint-disable sort-keys, no-magic-numbers */
|
||||
export default [
|
||||
{
|
||||
key: ['Christopher'],
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: 24703,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: 27861,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: 29436,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: 31463,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: 35718,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: 41758,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: 48172,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: 52092,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: 48217,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: 48476,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: 46438,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: 45086,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: 46610,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: 47107,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: 50514,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: 48969,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: 50108,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: 59055,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: 59188,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: 59859,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: 59516,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: 56633,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: 54466,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: 52996,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: 53205,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: 52322,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: 47109,
|
||||
},
|
||||
{
|
||||
x: 694224000000.0,
|
||||
y: 42470,
|
||||
},
|
||||
{
|
||||
x: 725846400000.0,
|
||||
y: 38257,
|
||||
},
|
||||
{
|
||||
x: 757382400000.0,
|
||||
y: 34823,
|
||||
},
|
||||
{
|
||||
x: 788918400000.0,
|
||||
y: 32728,
|
||||
},
|
||||
{
|
||||
x: 820454400000.0,
|
||||
y: 30988,
|
||||
},
|
||||
{
|
||||
x: 852076800000.0,
|
||||
y: 29179,
|
||||
},
|
||||
{
|
||||
x: 883612800000.0,
|
||||
y: 27083,
|
||||
},
|
||||
{
|
||||
x: 915148800000.0,
|
||||
y: 25700,
|
||||
},
|
||||
{
|
||||
x: 946684800000.0,
|
||||
y: 24959,
|
||||
},
|
||||
{
|
||||
x: 978307200000.0,
|
||||
y: 23180,
|
||||
},
|
||||
{
|
||||
x: 1009843200000.0,
|
||||
y: 21731,
|
||||
},
|
||||
{
|
||||
x: 1041379200000.0,
|
||||
y: 20793,
|
||||
},
|
||||
{
|
||||
x: 1072915200000.0,
|
||||
y: 19739,
|
||||
},
|
||||
{
|
||||
x: 1104537600000.0,
|
||||
y: 19190,
|
||||
},
|
||||
{
|
||||
x: 1136073600000.0,
|
||||
y: 19674,
|
||||
},
|
||||
{
|
||||
x: 1167609600000.0,
|
||||
y: 19986,
|
||||
},
|
||||
{
|
||||
x: 1199145600000.0,
|
||||
y: 17771,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: ['David'],
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: 67646,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: 66207,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: 66581,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: 63531,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: 63502,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: 61570,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: 52948,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: 46218,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: 40968,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: 41654,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: 39019,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: 39165,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: 40407,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: 40533,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: 41898,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: 41743,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: 40486,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: 40283,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: 39048,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: 38346,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: 38395,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: 37021,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: 36672,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: 35214,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: 35139,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: 33661,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: 30347,
|
||||
},
|
||||
{
|
||||
x: 694224000000.0,
|
||||
y: 28344,
|
||||
},
|
||||
{
|
||||
x: 725846400000.0,
|
||||
y: 26947,
|
||||
},
|
||||
{
|
||||
x: 757382400000.0,
|
||||
y: 24784,
|
||||
},
|
||||
{
|
||||
x: 788918400000.0,
|
||||
y: 22967,
|
||||
},
|
||||
{
|
||||
x: 820454400000.0,
|
||||
y: 22941,
|
||||
},
|
||||
{
|
||||
x: 852076800000.0,
|
||||
y: 21824,
|
||||
},
|
||||
{
|
||||
x: 883612800000.0,
|
||||
y: 20816,
|
||||
},
|
||||
{
|
||||
x: 915148800000.0,
|
||||
y: 20267,
|
||||
},
|
||||
{
|
||||
x: 946684800000.0,
|
||||
y: 19695,
|
||||
},
|
||||
{
|
||||
x: 978307200000.0,
|
||||
y: 19281,
|
||||
},
|
||||
{
|
||||
x: 1009843200000.0,
|
||||
y: 18600,
|
||||
},
|
||||
{
|
||||
x: 1041379200000.0,
|
||||
y: 18557,
|
||||
},
|
||||
{
|
||||
x: 1072915200000.0,
|
||||
y: 18315,
|
||||
},
|
||||
{
|
||||
x: 1104537600000.0,
|
||||
y: 18017,
|
||||
},
|
||||
{
|
||||
x: 1136073600000.0,
|
||||
y: 17510,
|
||||
},
|
||||
{
|
||||
x: 1167609600000.0,
|
||||
y: 17400,
|
||||
},
|
||||
{
|
||||
x: 1199145600000.0,
|
||||
y: 16049,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: ['James'],
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: 67506,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: 65036,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: 61554,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: 60584,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: 59824,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: 61597,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: 54463,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: 46960,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: 42782,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: 41258,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: 39471,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: 38203,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: 39916,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: 39783,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: 39237,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: 39185,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: 38176,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: 38750,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: 36228,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: 35728,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: 35750,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: 33955,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: 32552,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: 32418,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: 32658,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: 32288,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: 30460,
|
||||
},
|
||||
{
|
||||
x: 694224000000.0,
|
||||
y: 28450,
|
||||
},
|
||||
{
|
||||
x: 725846400000.0,
|
||||
y: 26193,
|
||||
},
|
||||
{
|
||||
x: 757382400000.0,
|
||||
y: 24706,
|
||||
},
|
||||
{
|
||||
x: 788918400000.0,
|
||||
y: 22691,
|
||||
},
|
||||
{
|
||||
x: 820454400000.0,
|
||||
y: 21122,
|
||||
},
|
||||
{
|
||||
x: 852076800000.0,
|
||||
y: 20368,
|
||||
},
|
||||
{
|
||||
x: 883612800000.0,
|
||||
y: 19651,
|
||||
},
|
||||
{
|
||||
x: 915148800000.0,
|
||||
y: 18508,
|
||||
},
|
||||
{
|
||||
x: 946684800000.0,
|
||||
y: 17939,
|
||||
},
|
||||
{
|
||||
x: 978307200000.0,
|
||||
y: 17023,
|
||||
},
|
||||
{
|
||||
x: 1009843200000.0,
|
||||
y: 16905,
|
||||
},
|
||||
{
|
||||
x: 1041379200000.0,
|
||||
y: 16832,
|
||||
},
|
||||
{
|
||||
x: 1072915200000.0,
|
||||
y: 16459,
|
||||
},
|
||||
{
|
||||
x: 1104537600000.0,
|
||||
y: 16046,
|
||||
},
|
||||
{
|
||||
x: 1136073600000.0,
|
||||
y: 16139,
|
||||
},
|
||||
{
|
||||
x: 1167609600000.0,
|
||||
y: 15821,
|
||||
},
|
||||
{
|
||||
x: 1199145600000.0,
|
||||
y: 14920,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: ['John'],
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: 71390,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: 64858,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: 61480,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: 60754,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: 58644,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: 58348,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: 51382,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: 43028,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: 39061,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: 37553,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: 34970,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: 33876,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: 34103,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: 33895,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: 35305,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: 35131,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: 34761,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: 34560,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: 33047,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: 32484,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: 31397,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: 30103,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: 29462,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: 29301,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: 29751,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: 29011,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: 27727,
|
||||
},
|
||||
{
|
||||
x: 694224000000.0,
|
||||
y: 26156,
|
||||
},
|
||||
{
|
||||
x: 725846400000.0,
|
||||
y: 24918,
|
||||
},
|
||||
{
|
||||
x: 757382400000.0,
|
||||
y: 24119,
|
||||
},
|
||||
{
|
||||
x: 788918400000.0,
|
||||
y: 23174,
|
||||
},
|
||||
{
|
||||
x: 820454400000.0,
|
||||
y: 22104,
|
||||
},
|
||||
{
|
||||
x: 852076800000.0,
|
||||
y: 21330,
|
||||
},
|
||||
{
|
||||
x: 883612800000.0,
|
||||
y: 20556,
|
||||
},
|
||||
{
|
||||
x: 915148800000.0,
|
||||
y: 20280,
|
||||
},
|
||||
{
|
||||
x: 946684800000.0,
|
||||
y: 20032,
|
||||
},
|
||||
{
|
||||
x: 978307200000.0,
|
||||
y: 18839,
|
||||
},
|
||||
{
|
||||
x: 1009843200000.0,
|
||||
y: 17400,
|
||||
},
|
||||
{
|
||||
x: 1041379200000.0,
|
||||
y: 17170,
|
||||
},
|
||||
{
|
||||
x: 1072915200000.0,
|
||||
y: 16381,
|
||||
},
|
||||
{
|
||||
x: 1104537600000.0,
|
||||
y: 15692,
|
||||
},
|
||||
{
|
||||
x: 1136073600000.0,
|
||||
y: 15083,
|
||||
},
|
||||
{
|
||||
x: 1167609600000.0,
|
||||
y: 14348,
|
||||
},
|
||||
{
|
||||
x: 1199145600000.0,
|
||||
y: 13110,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: ['Michael'],
|
||||
values: [
|
||||
{
|
||||
x: -157766400000.0,
|
||||
y: 80812,
|
||||
},
|
||||
{
|
||||
x: -126230400000.0,
|
||||
y: 79709,
|
||||
},
|
||||
{
|
||||
x: -94694400000.0,
|
||||
y: 82204,
|
||||
},
|
||||
{
|
||||
x: -63158400000.0,
|
||||
y: 81785,
|
||||
},
|
||||
{
|
||||
x: -31536000000.0,
|
||||
y: 84893,
|
||||
},
|
||||
{
|
||||
x: 0.0,
|
||||
y: 85015,
|
||||
},
|
||||
{
|
||||
x: 31536000000.0,
|
||||
y: 77321,
|
||||
},
|
||||
{
|
||||
x: 63072000000.0,
|
||||
y: 71197,
|
||||
},
|
||||
{
|
||||
x: 94694400000.0,
|
||||
y: 67598,
|
||||
},
|
||||
{
|
||||
x: 126230400000.0,
|
||||
y: 67304,
|
||||
},
|
||||
{
|
||||
x: 157766400000.0,
|
||||
y: 68149,
|
||||
},
|
||||
{
|
||||
x: 189302400000.0,
|
||||
y: 66686,
|
||||
},
|
||||
{
|
||||
x: 220924800000.0,
|
||||
y: 67344,
|
||||
},
|
||||
{
|
||||
x: 252460800000.0,
|
||||
y: 66875,
|
||||
},
|
||||
{
|
||||
x: 283996800000.0,
|
||||
y: 67473,
|
||||
},
|
||||
{
|
||||
x: 315532800000.0,
|
||||
y: 68375,
|
||||
},
|
||||
{
|
||||
x: 347155200000.0,
|
||||
y: 68467,
|
||||
},
|
||||
{
|
||||
x: 378691200000.0,
|
||||
y: 67904,
|
||||
},
|
||||
{
|
||||
x: 410227200000.0,
|
||||
y: 67708,
|
||||
},
|
||||
{
|
||||
x: 441763200000.0,
|
||||
y: 67457,
|
||||
},
|
||||
{
|
||||
x: 473385600000.0,
|
||||
y: 64667,
|
||||
},
|
||||
{
|
||||
x: 504921600000.0,
|
||||
y: 63959,
|
||||
},
|
||||
{
|
||||
x: 536457600000.0,
|
||||
y: 63442,
|
||||
},
|
||||
{
|
||||
x: 567993600000.0,
|
||||
y: 63924,
|
||||
},
|
||||
{
|
||||
x: 599616000000.0,
|
||||
y: 65233,
|
||||
},
|
||||
{
|
||||
x: 631152000000.0,
|
||||
y: 65138,
|
||||
},
|
||||
{
|
||||
x: 662688000000.0,
|
||||
y: 60646,
|
||||
},
|
||||
{
|
||||
x: 694224000000.0,
|
||||
y: 54216,
|
||||
},
|
||||
{
|
||||
x: 725846400000.0,
|
||||
y: 49443,
|
||||
},
|
||||
{
|
||||
x: 757382400000.0,
|
||||
y: 44361,
|
||||
},
|
||||
{
|
||||
x: 788918400000.0,
|
||||
y: 41311,
|
||||
},
|
||||
{
|
||||
x: 820454400000.0,
|
||||
y: 38284,
|
||||
},
|
||||
{
|
||||
x: 852076800000.0,
|
||||
y: 37459,
|
||||
},
|
||||
{
|
||||
x: 883612800000.0,
|
||||
y: 36525,
|
||||
},
|
||||
{
|
||||
x: 915148800000.0,
|
||||
y: 33820,
|
||||
},
|
||||
{
|
||||
x: 946684800000.0,
|
||||
y: 31956,
|
||||
},
|
||||
{
|
||||
x: 978307200000.0,
|
||||
y: 29612,
|
||||
},
|
||||
{
|
||||
x: 1009843200000.0,
|
||||
y: 28156,
|
||||
},
|
||||
{
|
||||
x: 1041379200000.0,
|
||||
y: 27031,
|
||||
},
|
||||
{
|
||||
x: 1072915200000.0,
|
||||
y: 25418,
|
||||
},
|
||||
{
|
||||
x: 1104537600000.0,
|
||||
y: 23678,
|
||||
},
|
||||
{
|
||||
x: 1136073600000.0,
|
||||
y: 22498,
|
||||
},
|
||||
{
|
||||
x: 1167609600000.0,
|
||||
y: 21805,
|
||||
},
|
||||
{
|
||||
x: 1199145600000.0,
|
||||
y: 20271,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
@ -0,0 +1,8 @@
|
||||
import { LineChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3';
|
||||
import Stories from './Stories';
|
||||
|
||||
new LineChartPlugin().configure({ key: 'line' }).register();
|
||||
|
||||
export default {
|
||||
examples: [...Stories],
|
||||
};
|
@ -0,0 +1,32 @@
|
||||
/* eslint-disable no-magic-numbers */
|
||||
import React from 'react';
|
||||
import { SuperChart } from '@superset-ui/chart';
|
||||
import data from './data';
|
||||
|
||||
export default [
|
||||
{
|
||||
renderStory: () => (
|
||||
<SuperChart
|
||||
chartType="pie"
|
||||
chartProps={{
|
||||
datasource: { verboseMap: {} },
|
||||
formData: {
|
||||
colorScheme: 'd3Category10',
|
||||
donut: false,
|
||||
labelsOutside: true,
|
||||
numberFormat: '.3s',
|
||||
pieLabelType: 'key',
|
||||
showLabels: true,
|
||||
showLegend: true,
|
||||
vizType: 'pie',
|
||||
},
|
||||
height: 400,
|
||||
payload: { data },
|
||||
width: 400,
|
||||
}}
|
||||
/>
|
||||
),
|
||||
storyName: 'Basic',
|
||||
storyPath: 'preset-chart-nvd3|PieChartPlugin',
|
||||
},
|
||||
];
|
@ -0,0 +1,11 @@
|
||||
/* eslint-disable sort-keys, no-magic-numbers */
|
||||
export default [
|
||||
{
|
||||
x: 'boy',
|
||||
y: 48133355,
|
||||
},
|
||||
{
|
||||
x: 'girl',
|
||||
y: 32546308,
|
||||
},
|
||||
];
|
@ -0,0 +1,8 @@
|
||||
import { PieChartPlugin } from '@superset-ui/legacy-preset-chart-nvd3';
|
||||
import Stories from './Stories';
|
||||
|
||||
new PieChartPlugin().configure({ key: 'pie' }).register();
|
||||
|
||||
export default {
|
||||
examples: [...Stories],
|
||||
};
|
Loading…
Reference in New Issue
Block a user