@sis-cc/dotstatsuite-components 13.5.3 → 13.5.4
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
CHANGED
|
@@ -87,12 +87,12 @@ var Chart = function Chart(_ref) {
|
|
|
87
87
|
return _react2.default.createElement(
|
|
88
88
|
'div',
|
|
89
89
|
{ className: (0, _classnames2.default)((0, _defineProperty3.default)({}, classes.chartContainer, !R.equals(_constants.SCATTER, type))) },
|
|
90
|
+
R.is(Number, width) && width < 370 ? null : _react2.default.createElement(_AxisLegend2.default, { axis: 'y', data: { series: series }, type: type }),
|
|
90
91
|
_react2.default.createElement(ChartClass, {
|
|
91
92
|
data: series,
|
|
92
93
|
options: options,
|
|
93
94
|
getAxisOptions: getAxisOptions
|
|
94
|
-
})
|
|
95
|
-
R.is(Number, width) && width < 370 ? null : _react2.default.createElement(_AxisLegend2.default, { axis: 'y', data: { series: series }, type: type })
|
|
95
|
+
})
|
|
96
96
|
);
|
|
97
97
|
};
|
|
98
98
|
|
|
@@ -37,7 +37,7 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
|
|
|
37
37
|
yLegend: (0, _extends3.default)({}, legendFont, {
|
|
38
38
|
left: 10,
|
|
39
39
|
position: 'absolute',
|
|
40
|
-
|
|
40
|
+
zIndex: 1
|
|
41
41
|
})
|
|
42
42
|
};
|
|
43
43
|
});
|
|
@@ -51,8 +51,8 @@ var AxisLegend = function AxisLegend(_ref) {
|
|
|
51
51
|
data = _ref.data,
|
|
52
52
|
type = _ref.type;
|
|
53
53
|
|
|
54
|
-
if (!R.equals(_constants.SCATTER, type)) return null;
|
|
55
54
|
var classes = useStyles();
|
|
55
|
+
if (!R.equals(_constants.SCATTER, type)) return null;
|
|
56
56
|
switch (axis) {
|
|
57
57
|
case 'x':
|
|
58
58
|
return _react2.default.createElement(
|
package/package.json
CHANGED
package/src/viewer/src/chart.js
CHANGED
|
@@ -42,16 +42,16 @@ const Chart = ({ options, series, type, width, getAxisOptions }) => {
|
|
|
42
42
|
const ChartClass = charts[type];
|
|
43
43
|
return (
|
|
44
44
|
<div className={cx({ [classes.chartContainer]: !R.equals(SCATTER, type) })}>
|
|
45
|
-
<ChartClass
|
|
46
|
-
data={series}
|
|
47
|
-
options={options}
|
|
48
|
-
getAxisOptions={getAxisOptions}
|
|
49
|
-
/>
|
|
50
45
|
{
|
|
51
46
|
(R.is(Number, width) && width < 370)
|
|
52
47
|
? null
|
|
53
48
|
: <AxisLegend axis="y" data={{ series }} type={type} />
|
|
54
49
|
}
|
|
50
|
+
<ChartClass
|
|
51
|
+
data={series}
|
|
52
|
+
options={options}
|
|
53
|
+
getAxisOptions={getAxisOptions}
|
|
54
|
+
/>
|
|
55
55
|
</div>
|
|
56
56
|
);
|
|
57
57
|
};
|
|
@@ -13,7 +13,7 @@ const useStyles = makeStyles(theme => {
|
|
|
13
13
|
...legendFont,
|
|
14
14
|
left: 10,
|
|
15
15
|
position: 'absolute',
|
|
16
|
-
|
|
16
|
+
zIndex: 1,
|
|
17
17
|
}
|
|
18
18
|
})
|
|
19
19
|
});
|
|
@@ -26,9 +26,9 @@ const getAxisLabel = axis => R.pipe(
|
|
|
26
26
|
);
|
|
27
27
|
|
|
28
28
|
const AxisLegend = ({ axis, data, type }) => {
|
|
29
|
+
const classes = useStyles();
|
|
29
30
|
if (!R.equals(SCATTER, type))
|
|
30
31
|
return null;
|
|
31
|
-
const classes = useStyles();
|
|
32
32
|
switch (axis) {
|
|
33
33
|
case 'x':
|
|
34
34
|
return <span className={classes.xLegend}>→ {getAxisLabel('x')(data)}</span>;
|