@sis-cc/dotstatsuite-components 8.11.0 → 8.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app.js +13 -5
- package/lib/rules/src/factories/stacked-dimension.js +17 -23
- package/lib/rules/src/factories/stacked-series.js +82 -158
- package/lib/rules/src/index.js +3 -6
- package/lib/rules/src/properties/index.js +2 -1
- package/lib/rules/src/properties/stacked.js +35 -11
- package/lib/rules/src/properties/utils.js +7 -1
- package/lib/rules-driver/src/app.js +116 -167
- package/lib/viewer/src/app/use-case-3.js +52 -0
- package/lib/viewer/src/app.js +9 -0
- package/lib/viewer/src/index.js +1 -1
- package/lib/viewer/src/legends/SeriesLegend.js +3 -1
- package/package.json +2 -2
- package/src/app.js +10 -5
- package/src/rules/src/factories/stacked-dimension.js +14 -10
- package/src/rules/src/factories/stacked-series.js +102 -94
- package/src/rules/src/index.js +1 -2
- package/src/rules/src/properties/index.js +3 -1
- package/src/rules/src/properties/stacked.js +23 -7
- package/src/rules/src/properties/utils.js +8 -3
- package/src/rules-driver/src/app.js +116 -132
- package/src/rules-driver/src/mocks/data1.json +332 -0
- package/src/rules-driver/src/mocks/data2.json +309 -0
- package/src/viewer/src/app/use-case-3.js +18 -0
- package/src/viewer/src/app.js +6 -0
- package/src/viewer/src/index.js +2 -2
- package/src/viewer/src/legends/SeriesLegend.js +4 -1
- package/lib/rules-driver/src/app/chart.js +0 -52
- package/lib/rules-driver/src/app/config-axis.js +0 -95
- package/lib/rules-driver/src/app/config-buttons.js +0 -47
- package/lib/rules-driver/src/app/config-input.js +0 -51
- package/lib/rules-driver/src/app/config-select.js +0 -57
- package/lib/rules-driver/src/app/config-t4size.js +0 -61
- package/lib/rules-driver/src/app/config1.js +0 -148
- package/lib/rules-driver/src/app/menu.js +0 -44
- package/lib/rules-driver/src/app/viewer1.js +0 -39
- package/lib/rules-driver/src/app/viewer2.js +0 -115
- package/src/rules-driver/src/app/chart.js +0 -18
- package/src/rules-driver/src/app/config-axis.js +0 -54
- package/src/rules-driver/src/app/config-buttons.js +0 -27
- package/src/rules-driver/src/app/config-input.js +0 -35
- package/src/rules-driver/src/app/config-select.js +0 -25
- package/src/rules-driver/src/app/config-t4size.js +0 -50
- package/src/rules-driver/src/app/config1.js +0 -120
- package/src/rules-driver/src/app/menu.js +0 -27
- package/src/rules-driver/src/app/viewer1.js +0 -18
- package/src/rules-driver/src/app/viewer2.js +0 -77
- package/src/rules-driver/src/mocks/ecb.json +0 -2069
- package/src/rules-driver/src/mocks/ins.json +0 -264
- package/src/rules-driver/src/mocks/oecd-time.json +0 -864
- package/src/rules-driver/src/mocks/oecd.json +0 -372
- package/src/rules-driver/src/mocks/tunisia.json +0 -333
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _extends2 = require('babel-runtime/helpers/extends');
|
|
8
|
-
|
|
9
|
-
var _extends3 = _interopRequireDefault(_extends2);
|
|
10
|
-
|
|
11
|
-
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
|
12
|
-
|
|
13
|
-
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
|
14
|
-
|
|
15
|
-
var _react = require('react');
|
|
16
|
-
|
|
17
|
-
var _react2 = _interopRequireDefault(_react);
|
|
18
|
-
|
|
19
|
-
var _chart = require('./chart');
|
|
20
|
-
|
|
21
|
-
var _chart2 = _interopRequireDefault(_chart);
|
|
22
|
-
|
|
23
|
-
var _configT4size = require('./config-t4size');
|
|
24
|
-
|
|
25
|
-
var _configT4size2 = _interopRequireDefault(_configT4size);
|
|
26
|
-
|
|
27
|
-
var _ramda = require('ramda');
|
|
28
|
-
|
|
29
|
-
var R = _interopRequireWildcard(_ramda);
|
|
30
|
-
|
|
31
|
-
var _configSelect = require('./config-select');
|
|
32
|
-
|
|
33
|
-
var _configSelect2 = _interopRequireDefault(_configSelect);
|
|
34
|
-
|
|
35
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
36
|
-
|
|
37
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
38
|
-
|
|
39
|
-
var activeComponent = function activeComponent(Component) {
|
|
40
|
-
return function (_ref) {
|
|
41
|
-
var isActive = _ref.isActive,
|
|
42
|
-
rest = (0, _objectWithoutProperties3.default)(_ref, ['isActive']);
|
|
43
|
-
return isActive ? _react2.default.createElement(Component, rest) : null;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
var ConfigSelect = activeComponent(_configSelect2.default);
|
|
48
|
-
|
|
49
|
-
var Viewer = function Viewer(_ref2) {
|
|
50
|
-
var chartData = _ref2.chartData,
|
|
51
|
-
chartOptions = _ref2.chartOptions,
|
|
52
|
-
onChange = _ref2.onChange,
|
|
53
|
-
properties = _ref2.properties,
|
|
54
|
-
type = _ref2.type;
|
|
55
|
-
return _react2.default.createElement(
|
|
56
|
-
'div',
|
|
57
|
-
null,
|
|
58
|
-
_react2.default.createElement(_configT4size2.default, {
|
|
59
|
-
height: (0, _ramda.path)(['height', 'value'], properties),
|
|
60
|
-
onChange: onChange,
|
|
61
|
-
width: (0, _ramda.path)(['width', 'value'], properties)
|
|
62
|
-
}),
|
|
63
|
-
_react2.default.createElement(ConfigSelect, (0, _extends3.default)({}, properties.display, {
|
|
64
|
-
label: 'Display as',
|
|
65
|
-
onChange: function onChange(selection) {
|
|
66
|
-
return properties.display.onChange(selection.value);
|
|
67
|
-
},
|
|
68
|
-
clearable: false,
|
|
69
|
-
multi: false,
|
|
70
|
-
value: R.find(R.propEq('value', properties.display.value), properties.display.options)
|
|
71
|
-
})),
|
|
72
|
-
_react2.default.createElement(_chart2.default, {
|
|
73
|
-
data: chartData,
|
|
74
|
-
options: chartOptions,
|
|
75
|
-
type: type
|
|
76
|
-
}),
|
|
77
|
-
_react2.default.createElement(ConfigSelect, (0, _extends3.default)({}, R.prop('scatterDimension', properties), {
|
|
78
|
-
label: 'Scatter Dimension',
|
|
79
|
-
multi: false,
|
|
80
|
-
clearable: false
|
|
81
|
-
})),
|
|
82
|
-
_react2.default.createElement(ConfigSelect, (0, _extends3.default)({}, R.prop('scatterX', properties), {
|
|
83
|
-
label: 'Scatter Value For X Axis',
|
|
84
|
-
multi: false,
|
|
85
|
-
clearable: false
|
|
86
|
-
})),
|
|
87
|
-
_react2.default.createElement(ConfigSelect, (0, _extends3.default)({}, R.prop('scatterY', properties), {
|
|
88
|
-
label: 'Scatter Value For Y Axis',
|
|
89
|
-
multi: false,
|
|
90
|
-
clearable: false
|
|
91
|
-
})),
|
|
92
|
-
_react2.default.createElement(ConfigSelect, (0, _extends3.default)({}, R.prop('symbolDimension', properties), {
|
|
93
|
-
label: 'Symbol Dimension',
|
|
94
|
-
multi: false,
|
|
95
|
-
clearable: false
|
|
96
|
-
})),
|
|
97
|
-
_react2.default.createElement(ConfigSelect, (0, _extends3.default)({}, R.prop('stackedDimension', properties), {
|
|
98
|
-
label: 'Stacked Dimension',
|
|
99
|
-
multi: false,
|
|
100
|
-
clearable: false
|
|
101
|
-
})),
|
|
102
|
-
_react2.default.createElement(ConfigSelect, (0, _extends3.default)({}, R.prop('highlight', properties), {
|
|
103
|
-
label: 'Highlight Selection',
|
|
104
|
-
multi: true,
|
|
105
|
-
clearable: true
|
|
106
|
-
})),
|
|
107
|
-
_react2.default.createElement(ConfigSelect, (0, _extends3.default)({}, R.prop('baseline', properties), {
|
|
108
|
-
label: 'Baseline Selection',
|
|
109
|
-
multi: false,
|
|
110
|
-
clearable: true
|
|
111
|
-
}))
|
|
112
|
-
);
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
exports.default = Viewer;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import OecdChart from '../../../chart/src';
|
|
3
|
-
import { chartTypes } from '../../../rules/src';
|
|
4
|
-
import { has } from 'ramda';
|
|
5
|
-
import glamorous from 'glamorous';
|
|
6
|
-
|
|
7
|
-
const Container = glamorous.div({
|
|
8
|
-
marginBottom: 15,
|
|
9
|
-
marginTop: 15
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
const Chart = ({ type, ...rest }) => (
|
|
13
|
-
has(type, chartTypes)
|
|
14
|
-
? <Container><OecdChart {...rest} type={type} /></Container>
|
|
15
|
-
: <Container>Not a Chart Type</Container>
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
export default Chart;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import _ConfigInput from './config-input';
|
|
3
|
-
import glamorous from 'glamorous';
|
|
4
|
-
import { Classes } from '@blueprintjs/core';
|
|
5
|
-
|
|
6
|
-
const Content = glamorous.div({
|
|
7
|
-
display: 'flex',
|
|
8
|
-
flexDirection: 'row',
|
|
9
|
-
flexWrap: 'wrap',
|
|
10
|
-
justifyContent: 'space-between',
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
const Callout = glamorous.div({ marginBottom: 10 });
|
|
14
|
-
|
|
15
|
-
const activeComponent = (Component) => ({ isActive, ...rest }) => isActive ? <Component {...rest} /> : null;
|
|
16
|
-
|
|
17
|
-
const ConfigInput = activeComponent(_ConfigInput);
|
|
18
|
-
|
|
19
|
-
const ConfigAxis = ({ label, max, min, pivot, step }) => {
|
|
20
|
-
if (!max.isActive && !min.isActive && !pivot.isActive && !step.isActive) {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
return (
|
|
24
|
-
<Callout>
|
|
25
|
-
<div className={Classes.CALLOUT}>
|
|
26
|
-
<h5>{label}</h5>
|
|
27
|
-
<Content>
|
|
28
|
-
<ConfigInput
|
|
29
|
-
{...min}
|
|
30
|
-
label="Min Value"
|
|
31
|
-
isControlled={false}
|
|
32
|
-
/>
|
|
33
|
-
<ConfigInput
|
|
34
|
-
{...max}
|
|
35
|
-
label="Max Value"
|
|
36
|
-
isControlled={false}
|
|
37
|
-
/>
|
|
38
|
-
<ConfigInput
|
|
39
|
-
{...pivot}
|
|
40
|
-
label="Pivot Value"
|
|
41
|
-
isControlled={false}
|
|
42
|
-
/>
|
|
43
|
-
<ConfigInput
|
|
44
|
-
{...step}
|
|
45
|
-
label="Step Value"
|
|
46
|
-
isControlled={false}
|
|
47
|
-
/>
|
|
48
|
-
</Content>
|
|
49
|
-
</div>
|
|
50
|
-
</Callout>
|
|
51
|
-
);
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export default ConfigAxis;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { map } from 'ramda';
|
|
3
|
-
import { Button, ButtonGroup } from '@blueprintjs/core';
|
|
4
|
-
|
|
5
|
-
export const ConfigButtons = ({ label, onChange, options, value }) => (
|
|
6
|
-
<label className="pt-label pt-inline">
|
|
7
|
-
{label}
|
|
8
|
-
<ButtonGroup>
|
|
9
|
-
{
|
|
10
|
-
map(
|
|
11
|
-
option => (
|
|
12
|
-
<Button
|
|
13
|
-
active={option.value === value}
|
|
14
|
-
key={option.value}
|
|
15
|
-
onClick={() => onChange(option.value)}
|
|
16
|
-
>
|
|
17
|
-
{option.label}
|
|
18
|
-
</Button>
|
|
19
|
-
),
|
|
20
|
-
options
|
|
21
|
-
)
|
|
22
|
-
}
|
|
23
|
-
</ButtonGroup>
|
|
24
|
-
</label>
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
export default ConfigButtons;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { InputGroup } from '@blueprintjs/core';
|
|
3
|
-
|
|
4
|
-
const ConfigInput = ({ isControlled, label, leftIcon, onChange, placeholder, value }) => {
|
|
5
|
-
const submit = e => onChange(e.target.value);
|
|
6
|
-
|
|
7
|
-
const commit = e => {
|
|
8
|
-
if (e.key === 'Enter') {
|
|
9
|
-
e.preventDefault();
|
|
10
|
-
submit(e);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return (
|
|
14
|
-
<label className="pt-label">
|
|
15
|
-
{label}
|
|
16
|
-
{
|
|
17
|
-
isControlled
|
|
18
|
-
? <InputGroup
|
|
19
|
-
value={value}
|
|
20
|
-
leftIconName={leftIcon}
|
|
21
|
-
onChange={submit}
|
|
22
|
-
placeholder={placeholder}
|
|
23
|
-
/>
|
|
24
|
-
: <InputGroup
|
|
25
|
-
defaultValue={value}
|
|
26
|
-
leftIconName={leftIcon}
|
|
27
|
-
onKeyPress={commit}
|
|
28
|
-
placeholder={placeholder}
|
|
29
|
-
/>
|
|
30
|
-
}
|
|
31
|
-
</label>
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export default ConfigInput;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Select from 'react-select';
|
|
3
|
-
import glamorous from 'glamorous';
|
|
4
|
-
import { head, is } from 'ramda';
|
|
5
|
-
|
|
6
|
-
const Container = glamorous.div({
|
|
7
|
-
'& .Select-menu-outer': {
|
|
8
|
-
zIndex: 5,
|
|
9
|
-
},
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
const ConfigSelect = ({ label, multi, value, ...rest }) => (
|
|
13
|
-
<Container>
|
|
14
|
-
<label className="pt-label pt-inline">
|
|
15
|
-
{label}
|
|
16
|
-
<Select
|
|
17
|
-
{...rest}
|
|
18
|
-
multi={multi}
|
|
19
|
-
value={is(Array, value) && !multi ? head(value) : value}
|
|
20
|
-
/>
|
|
21
|
-
</label>
|
|
22
|
-
</Container>
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
export default ConfigSelect;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import * as R from 'ramda';
|
|
3
|
-
import ConfigSelect from './config-select';
|
|
4
|
-
|
|
5
|
-
const t4Options = [
|
|
6
|
-
{ label: 'oecd.org/T4: 3 columns (width 270 px)', value: 'T4/3' },
|
|
7
|
-
{ label: 'oecd.org/T4: 4 columns (width 370 px)', value: 'T4/4' },
|
|
8
|
-
{ label: 'oecd.org/T4: 6 columns (width 560 px)', value: 'T4/6' },
|
|
9
|
-
{ label: 'oecd.org/T4: 8 columns (width 760 px)', value: 'T4/8' },
|
|
10
|
-
{ label: 'oecd.org/T4: 9 columns (width 855 px)', value: 'T4/9' },
|
|
11
|
-
{ label: 'oecd.org/T4: 12 columns (width 1140 px)', value: 'T4/12' }
|
|
12
|
-
];
|
|
13
|
-
|
|
14
|
-
const t4Values = [
|
|
15
|
-
{ value: 'T4/3', width: 270, height: 203 },
|
|
16
|
-
{ value: 'T4/4', width: 370, height: 278 },
|
|
17
|
-
{ value: 'T4/6', width: 560, height: 420 },
|
|
18
|
-
{ value: 'T4/8', width: 760, height: 570 },
|
|
19
|
-
{ value: 'T4/9', width: 855, height: 642 },
|
|
20
|
-
{ value: 'T4/12', width: 1140, height: 855 }
|
|
21
|
-
];
|
|
22
|
-
|
|
23
|
-
const ConfigT4 = ({ height, onChange, width }) => {
|
|
24
|
-
const _value = R.find(val => R.propEq('width', width, val) && R.propEq('height', height, val), t4Values);
|
|
25
|
-
const value = R.isNil(_value) ? undefined : R.prop('value', _value);
|
|
26
|
-
const option = R.find(opt => R.propEq('value', value, opt), t4Options);
|
|
27
|
-
|
|
28
|
-
const onSelect = (selection) => {
|
|
29
|
-
if (R.isNil(selection)) {
|
|
30
|
-
onChange({ width: undefined, height: undefined });
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
const selectedValue = R.find(val => R.propEq('value', selection.value, val), t4Values);
|
|
34
|
-
onChange(R.pick(['height', 'width'], selectedValue));
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<ConfigSelect
|
|
40
|
-
label="T4 Formats"
|
|
41
|
-
multi={false}
|
|
42
|
-
clearable={true}
|
|
43
|
-
value={option}
|
|
44
|
-
onChange={onSelect}
|
|
45
|
-
options={t4Options}
|
|
46
|
-
/>
|
|
47
|
-
);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export default ConfigT4;
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import _ConfigSelect from './config-select';
|
|
3
|
-
import _ConfigInput from './config-input';
|
|
4
|
-
import _ConfigButtons from './config-buttons';
|
|
5
|
-
import ConfigAxis from './config-axis';
|
|
6
|
-
import { prop } from 'ramda';
|
|
7
|
-
import glamorous from 'glamorous';
|
|
8
|
-
|
|
9
|
-
const activeComponent = (Component) => ({ isActive, ...rest }) => isActive ? <Component {...rest} /> : null;
|
|
10
|
-
|
|
11
|
-
const ConfigSelect = activeComponent(_ConfigSelect);
|
|
12
|
-
const ConfigInput = activeComponent(_ConfigInput);
|
|
13
|
-
const ConfigButtons = activeComponent(_ConfigButtons);
|
|
14
|
-
|
|
15
|
-
const GDiv = glamorous.div({ width: '100%' });
|
|
16
|
-
|
|
17
|
-
const Axes = glamorous.div({
|
|
18
|
-
display: 'flex',
|
|
19
|
-
flexDirection: 'column',
|
|
20
|
-
justifyContent: 'space-between'
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
const Config = ({ properties }) => {
|
|
24
|
-
return (
|
|
25
|
-
<GDiv>
|
|
26
|
-
<ConfigInput
|
|
27
|
-
{...prop('title', properties)}
|
|
28
|
-
isControlled={true}
|
|
29
|
-
label="Title of the Chart"
|
|
30
|
-
placeholder="Enter a chart title"
|
|
31
|
-
/>
|
|
32
|
-
<ConfigInput
|
|
33
|
-
{...prop('subtitle', properties)}
|
|
34
|
-
isControlled={true}
|
|
35
|
-
label="Subtitle of the Chart"
|
|
36
|
-
placeholder="Enter a chart subtitle"
|
|
37
|
-
/>
|
|
38
|
-
<ConfigInput
|
|
39
|
-
{...prop('width', properties)}
|
|
40
|
-
isControlled={false}
|
|
41
|
-
label="Width of the Chart"
|
|
42
|
-
leftIcon="arrows-horizontal"
|
|
43
|
-
placeholder="Enter a numerical value"
|
|
44
|
-
/>
|
|
45
|
-
<ConfigInput
|
|
46
|
-
{...prop('height', properties)}
|
|
47
|
-
isControlled={false}
|
|
48
|
-
label="Height of the Chart"
|
|
49
|
-
leftIcon="arrows-vertical"
|
|
50
|
-
placeholder="Enter a numerical value"
|
|
51
|
-
/>
|
|
52
|
-
<ConfigSelect
|
|
53
|
-
{...prop('scatterDimension', properties)}
|
|
54
|
-
label="Scatter Dimension"
|
|
55
|
-
multi={false}
|
|
56
|
-
clearable={false}
|
|
57
|
-
/>
|
|
58
|
-
<ConfigSelect
|
|
59
|
-
{...prop('scatterX', properties)}
|
|
60
|
-
label="Scatter Value For X Axis"
|
|
61
|
-
multi={false}
|
|
62
|
-
clearable={false}
|
|
63
|
-
/>
|
|
64
|
-
<ConfigSelect
|
|
65
|
-
{...prop('scatterY', properties)}
|
|
66
|
-
label="Scatter Value For Y Axis"
|
|
67
|
-
multi={false}
|
|
68
|
-
clearable={false}
|
|
69
|
-
/>
|
|
70
|
-
<ConfigSelect
|
|
71
|
-
{...prop('symbolDimension', properties)}
|
|
72
|
-
label="Symbol Dimension"
|
|
73
|
-
multi={false}
|
|
74
|
-
clearable={false}
|
|
75
|
-
/>
|
|
76
|
-
<ConfigSelect
|
|
77
|
-
{...prop('stackedDimension', properties)}
|
|
78
|
-
label="Stacked Dimension"
|
|
79
|
-
multi={false}
|
|
80
|
-
clearable={false}
|
|
81
|
-
/>
|
|
82
|
-
<ConfigSelect
|
|
83
|
-
{...prop('highlight', properties)}
|
|
84
|
-
label="Highlight Selection"
|
|
85
|
-
multi={true}
|
|
86
|
-
clearable={true}
|
|
87
|
-
/>
|
|
88
|
-
<ConfigSelect
|
|
89
|
-
{...prop('baseline', properties)}
|
|
90
|
-
label="Baseline Selection"
|
|
91
|
-
multi={false}
|
|
92
|
-
clearable={true}
|
|
93
|
-
/>
|
|
94
|
-
<ConfigButtons
|
|
95
|
-
{...prop('display', properties)}
|
|
96
|
-
/>
|
|
97
|
-
<ConfigInput
|
|
98
|
-
{...prop('freqStep', properties)}
|
|
99
|
-
isControlled={false}
|
|
100
|
-
label="Timeline Axis Frequency Step"
|
|
101
|
-
/>
|
|
102
|
-
<ConfigAxis
|
|
103
|
-
label="Axe X"
|
|
104
|
-
max={prop('maxX', properties)}
|
|
105
|
-
min={prop('minX', properties)}
|
|
106
|
-
pivot={prop('pivotX', properties)}
|
|
107
|
-
step={prop('stepX', properties)}
|
|
108
|
-
/>
|
|
109
|
-
<ConfigAxis
|
|
110
|
-
label="Axe Y"
|
|
111
|
-
max={prop('maxY', properties)}
|
|
112
|
-
min={prop('minY', properties)}
|
|
113
|
-
pivot={prop('pivotY', properties)}
|
|
114
|
-
step={prop('stepY', properties)}
|
|
115
|
-
/>
|
|
116
|
-
</GDiv>
|
|
117
|
-
);
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
export default Config;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Button } from '@blueprintjs/core';
|
|
3
|
-
import { map } from 'ramda';
|
|
4
|
-
|
|
5
|
-
const Menu = ({ align, iconName, items, onChange, selected }) => {
|
|
6
|
-
return (
|
|
7
|
-
<div className={`pt-navbar-group pt-align-${align}`}>
|
|
8
|
-
{
|
|
9
|
-
map(
|
|
10
|
-
({ label, value }) => (
|
|
11
|
-
<Button
|
|
12
|
-
className="pt-minimal"
|
|
13
|
-
iconName={iconName}
|
|
14
|
-
onClick={() => onChange(value)}
|
|
15
|
-
active={value === selected}
|
|
16
|
-
key={value}
|
|
17
|
-
text={label}
|
|
18
|
-
/>
|
|
19
|
-
),
|
|
20
|
-
items
|
|
21
|
-
)
|
|
22
|
-
}
|
|
23
|
-
</div>
|
|
24
|
-
);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export default Menu;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Chart from './chart';
|
|
3
|
-
import Config from './config1';
|
|
4
|
-
|
|
5
|
-
const Viewer = ({ chartData, chartOptions, properties, type }) => {
|
|
6
|
-
return (
|
|
7
|
-
<div>
|
|
8
|
-
<Chart
|
|
9
|
-
data={chartData}
|
|
10
|
-
options={chartOptions}
|
|
11
|
-
type={type}
|
|
12
|
-
/>
|
|
13
|
-
<Config properties={properties} />
|
|
14
|
-
</div>
|
|
15
|
-
)
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default Viewer;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Chart from './chart';
|
|
3
|
-
import ConfigT4 from './config-t4size';
|
|
4
|
-
import { path } from 'ramda';
|
|
5
|
-
import _ConfigSelect from './config-select';
|
|
6
|
-
import * as R from 'ramda';
|
|
7
|
-
|
|
8
|
-
const activeComponent = (Component) => ({ isActive, ...rest }) => isActive ? <Component {...rest} /> : null;
|
|
9
|
-
|
|
10
|
-
const ConfigSelect = activeComponent(_ConfigSelect);
|
|
11
|
-
|
|
12
|
-
const Viewer = ({ chartData, chartOptions, onChange, properties, type }) => (
|
|
13
|
-
<div>
|
|
14
|
-
<ConfigT4
|
|
15
|
-
height={path(['height', 'value'], properties)}
|
|
16
|
-
onChange={onChange}
|
|
17
|
-
width={path(['width', 'value'], properties)}
|
|
18
|
-
/>
|
|
19
|
-
<ConfigSelect
|
|
20
|
-
{...properties.display}
|
|
21
|
-
label="Display as"
|
|
22
|
-
onChange={selection => properties.display.onChange(selection.value)}
|
|
23
|
-
clearable={false}
|
|
24
|
-
multi={false}
|
|
25
|
-
value={R.find(R.propEq('value', properties.display.value), properties.display.options)}
|
|
26
|
-
/>
|
|
27
|
-
<Chart
|
|
28
|
-
data={chartData}
|
|
29
|
-
options={chartOptions}
|
|
30
|
-
type={type}
|
|
31
|
-
/>
|
|
32
|
-
<ConfigSelect
|
|
33
|
-
{...R.prop('scatterDimension', properties)}
|
|
34
|
-
label="Scatter Dimension"
|
|
35
|
-
multi={false}
|
|
36
|
-
clearable={false}
|
|
37
|
-
/>
|
|
38
|
-
<ConfigSelect
|
|
39
|
-
{...R.prop('scatterX', properties)}
|
|
40
|
-
label="Scatter Value For X Axis"
|
|
41
|
-
multi={false}
|
|
42
|
-
clearable={false}
|
|
43
|
-
/>
|
|
44
|
-
<ConfigSelect
|
|
45
|
-
{...R.prop('scatterY', properties)}
|
|
46
|
-
label="Scatter Value For Y Axis"
|
|
47
|
-
multi={false}
|
|
48
|
-
clearable={false}
|
|
49
|
-
/>
|
|
50
|
-
<ConfigSelect
|
|
51
|
-
{...R.prop('symbolDimension', properties)}
|
|
52
|
-
label="Symbol Dimension"
|
|
53
|
-
multi={false}
|
|
54
|
-
clearable={false}
|
|
55
|
-
/>
|
|
56
|
-
<ConfigSelect
|
|
57
|
-
{...R.prop('stackedDimension', properties)}
|
|
58
|
-
label="Stacked Dimension"
|
|
59
|
-
multi={false}
|
|
60
|
-
clearable={false}
|
|
61
|
-
/>
|
|
62
|
-
<ConfigSelect
|
|
63
|
-
{...R.prop('highlight', properties)}
|
|
64
|
-
label="Highlight Selection"
|
|
65
|
-
multi={true}
|
|
66
|
-
clearable={true}
|
|
67
|
-
/>
|
|
68
|
-
<ConfigSelect
|
|
69
|
-
{...R.prop('baseline', properties)}
|
|
70
|
-
label="Baseline Selection"
|
|
71
|
-
multi={false}
|
|
72
|
-
clearable={true}
|
|
73
|
-
/>
|
|
74
|
-
</div>
|
|
75
|
-
);
|
|
76
|
-
|
|
77
|
-
export default Viewer;
|