@sis-cc/dotstatsuite-components 14.3.6 → 14.3.7
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/viewer/src/chart.js +1 -43
- package/package.json +1 -1
- package/src/viewer/src/chart.js +1 -32
package/lib/viewer/src/chart.js
CHANGED
|
@@ -4,10 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
|
|
8
|
-
|
|
9
|
-
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
|
|
10
|
-
|
|
11
7
|
var _react = require('react');
|
|
12
8
|
|
|
13
9
|
var _react2 = _interopRequireDefault(_react);
|
|
@@ -18,20 +14,12 @@ var _ramda = require('ramda');
|
|
|
18
14
|
|
|
19
15
|
var R = _interopRequireWildcard(_ramda);
|
|
20
16
|
|
|
21
|
-
var _classnames = require('classnames');
|
|
22
|
-
|
|
23
|
-
var _classnames2 = _interopRequireDefault(_classnames);
|
|
24
|
-
|
|
25
|
-
var _styles = require('@material-ui/core/styles');
|
|
26
|
-
|
|
27
17
|
var _dotstatsuiteVisions = require('@sis-cc/dotstatsuite-visions');
|
|
28
18
|
|
|
29
19
|
var _src = require('../../bridge-d3-react/src');
|
|
30
20
|
|
|
31
21
|
var charts = _interopRequireWildcard(_src);
|
|
32
22
|
|
|
33
|
-
var _constants = require('../../rules/src/constants');
|
|
34
|
-
|
|
35
23
|
var _series = require('./chartUtils/series');
|
|
36
24
|
|
|
37
25
|
var _series2 = _interopRequireDefault(_series);
|
|
@@ -46,35 +34,6 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
46
34
|
|
|
47
35
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
48
36
|
|
|
49
|
-
var useStyles = (0, _styles.makeStyles)(function () {
|
|
50
|
-
return {
|
|
51
|
-
container: {
|
|
52
|
-
backgroundColor: 'none',
|
|
53
|
-
overflow: 'hidden',
|
|
54
|
-
position: 'relative',
|
|
55
|
-
direction: 'ltr !important'
|
|
56
|
-
},
|
|
57
|
-
chartContainer: {
|
|
58
|
-
'& .rcw-chart__chart__line--x:last-of-type': {
|
|
59
|
-
visibility: 'hidden'
|
|
60
|
-
},
|
|
61
|
-
'& .rcw-chart__chart__line--y:last-of-type': {
|
|
62
|
-
visibility: 'hidden'
|
|
63
|
-
},
|
|
64
|
-
'& .rcw-chart__chart__axis--x': {
|
|
65
|
-
'& .tick:last-of-type': {
|
|
66
|
-
visibility: 'hidden'
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
'& .rcw-chart__chart__axis--y': {
|
|
70
|
-
'& .tick:last-of-type': {
|
|
71
|
-
visibility: 'hidden'
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
});
|
|
77
|
-
|
|
78
37
|
var Chart = function Chart(_ref) {
|
|
79
38
|
var options = _ref.options,
|
|
80
39
|
series = _ref.series,
|
|
@@ -82,11 +41,10 @@ var Chart = function Chart(_ref) {
|
|
|
82
41
|
width = _ref.width,
|
|
83
42
|
getAxisOptions = _ref.getAxisOptions;
|
|
84
43
|
|
|
85
|
-
var classes = useStyles();
|
|
86
44
|
var ChartClass = charts[type];
|
|
87
45
|
return _react2.default.createElement(
|
|
88
46
|
'div',
|
|
89
|
-
|
|
47
|
+
null,
|
|
90
48
|
R.is(Number, width) && width < 370 ? null : _react2.default.createElement(_AxisLegend2.default, { axis: 'y', data: { series: series }, type: type }),
|
|
91
49
|
_react2.default.createElement(ChartClass, {
|
|
92
50
|
data: series,
|
package/package.json
CHANGED
package/src/viewer/src/chart.js
CHANGED
|
@@ -1,47 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { branch, compose, renderComponent, withProps } from 'recompose';
|
|
3
3
|
import * as R from 'ramda';
|
|
4
|
-
import cx from 'classnames';
|
|
5
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
6
4
|
import { NoData } from '@sis-cc/dotstatsuite-visions';
|
|
7
5
|
import * as charts from '../../bridge-d3-react/src';
|
|
8
|
-
import { SCATTER } from '../../rules/src/constants';
|
|
9
6
|
import filterSeriesRegardingDimensions from './chartUtils/series';
|
|
10
7
|
import AxisLegend from './legends/AxisLegend';
|
|
11
8
|
import { isChartNoData } from './utils';
|
|
12
9
|
|
|
13
|
-
const useStyles = makeStyles(() => ({
|
|
14
|
-
container: {
|
|
15
|
-
backgroundColor: 'none',
|
|
16
|
-
overflow: 'hidden',
|
|
17
|
-
position: 'relative',
|
|
18
|
-
direction: 'ltr !important',
|
|
19
|
-
},
|
|
20
|
-
chartContainer: {
|
|
21
|
-
'& .rcw-chart__chart__line--x:last-of-type': {
|
|
22
|
-
visibility: 'hidden',
|
|
23
|
-
},
|
|
24
|
-
'& .rcw-chart__chart__line--y:last-of-type': {
|
|
25
|
-
visibility: 'hidden',
|
|
26
|
-
},
|
|
27
|
-
'& .rcw-chart__chart__axis--x': {
|
|
28
|
-
'& .tick:last-of-type': {
|
|
29
|
-
visibility: 'hidden',
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
'& .rcw-chart__chart__axis--y': {
|
|
33
|
-
'& .tick:last-of-type': {
|
|
34
|
-
visibility: 'hidden',
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
}
|
|
38
|
-
}));
|
|
39
|
-
|
|
40
10
|
const Chart = ({ options, series, type, width, getAxisOptions }) => {
|
|
41
|
-
const classes = useStyles();
|
|
42
11
|
const ChartClass = charts[type];
|
|
43
12
|
return (
|
|
44
|
-
<div
|
|
13
|
+
<div>
|
|
45
14
|
{
|
|
46
15
|
(R.is(Number, width) && width < 370)
|
|
47
16
|
? null
|