amazing-react-charts 0.7.5 → 0.7.6
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/dist/core/AreaChart.d.ts +0 -4
- package/dist/core/AreaChart.js +1 -2
- package/dist/core/DonutChart.d.ts +0 -3
- package/dist/core/DonutChart.js +6 -7
- package/dist/core/ForecastAreaChart.js +6 -3
- package/dist/core/HorizontalBarChart.js +3 -3
- package/dist/core/LineChart.js +2 -2
- package/dist/core/MultipurposeChart.d.ts +0 -3
- package/dist/core/MultipurposeChart.js +4 -7
- package/dist/core/PieChart.js +3 -3
- package/dist/core/RadarChart.js +2 -2
- package/dist/core/StackedBarChart.js +3 -3
- package/dist/core/VerticalBarChart.js +3 -3
- package/dist/lib/constants.d.ts +3 -0
- package/dist/lib/constants.js +10 -0
- package/package.json +1 -1
- package/src/core/AreaChart.tsx +1 -1
- package/src/core/DonutChart.tsx +2 -4
- package/src/core/ForecastAreaChart.tsx +2 -1
- package/src/core/HorizontalBarChart.tsx +1 -1
- package/src/core/LineChart.tsx +1 -1
- package/src/core/MultipurposeChart.tsx +1 -3
- package/src/core/PieChart.tsx +1 -1
- package/src/core/RadarChart.tsx +1 -1
- package/src/core/StackedBarChart.tsx +1 -1
- package/src/core/VerticalBarChart.tsx +2 -2
- package/src/lib/constants.ts +1 -0
package/dist/core/AreaChart.d.ts
CHANGED
package/dist/core/AreaChart.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = exports.TOOLBOX_DEFAULT_PROPS =
|
|
8
|
+
exports.default = exports.TOOLBOX_DEFAULT_PROPS = void 0;
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
@@ -23,7 +23,6 @@ var STYLES = {
|
|
|
23
23
|
width: '99.9%',
|
|
24
24
|
height: 300
|
|
25
25
|
};
|
|
26
|
-
exports.STYLES = STYLES;
|
|
27
26
|
var TOOLBOX_DEFAULT_PROPS = {
|
|
28
27
|
showTitle: false,
|
|
29
28
|
right: '9.52%',
|
|
@@ -6,8 +6,5 @@ interface IDonutProps extends IProps {
|
|
|
6
6
|
centerPieValueFontSize?: number;
|
|
7
7
|
selectedMode?: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare const WIDTH_STYLE: {
|
|
10
|
-
width: string;
|
|
11
|
-
};
|
|
12
9
|
export declare const DonutChart: (props: IDonutProps) => JSX.Element;
|
|
13
10
|
export default DonutChart;
|
package/dist/core/DonutChart.js
CHANGED
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.default = exports.DonutChart =
|
|
10
|
+
exports.default = exports.DonutChart = void 0;
|
|
11
11
|
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
|
|
@@ -33,10 +33,6 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
33
33
|
|
|
34
34
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
35
35
|
|
|
36
|
-
var WIDTH_STYLE = {
|
|
37
|
-
width: '99.9%'
|
|
38
|
-
};
|
|
39
|
-
exports.WIDTH_STYLE = WIDTH_STYLE;
|
|
40
36
|
var titleStyle = {
|
|
41
37
|
position: 'absolute',
|
|
42
38
|
top: 5,
|
|
@@ -181,10 +177,13 @@ var DonutChart = function DonutChart(props) {
|
|
|
181
177
|
|
|
182
178
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
183
179
|
style: {
|
|
184
|
-
position: 'relative'
|
|
180
|
+
position: 'relative',
|
|
181
|
+
width: '100%'
|
|
185
182
|
}
|
|
186
183
|
}, title && /*#__PURE__*/_react.default.createElement(TitleChart, null), /*#__PURE__*/_react.default.createElement(_echartsForReact.default, {
|
|
187
|
-
style:
|
|
184
|
+
style: {
|
|
185
|
+
minWidth: '100%'
|
|
186
|
+
},
|
|
188
187
|
opts: (0, _auxiliarFunctions.getWidthOpts)(width),
|
|
189
188
|
option: options
|
|
190
189
|
}));
|
|
@@ -19,8 +19,6 @@ var _auxiliarFunctions = require("../lib/auxiliarFunctions");
|
|
|
19
19
|
|
|
20
20
|
var _take = _interopRequireDefault(require("ramda/es/take"));
|
|
21
21
|
|
|
22
|
-
var _AreaChart = require("./AreaChart");
|
|
23
|
-
|
|
24
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
23
|
|
|
26
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -29,6 +27,11 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
29
27
|
|
|
30
28
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
31
29
|
|
|
30
|
+
var STYLES = {
|
|
31
|
+
width: '99.9%',
|
|
32
|
+
height: 300
|
|
33
|
+
};
|
|
34
|
+
|
|
32
35
|
var ForecastAreaChart = function ForecastAreaChart(props) {
|
|
33
36
|
var data = props.data,
|
|
34
37
|
xType = props.xType,
|
|
@@ -281,7 +284,7 @@ var ForecastAreaChart = function ForecastAreaChart(props) {
|
|
|
281
284
|
return /*#__PURE__*/React.createElement(_echartsForReact.default, {
|
|
282
285
|
lazyUpdate: true,
|
|
283
286
|
notMerge: true,
|
|
284
|
-
style:
|
|
287
|
+
style: STYLES,
|
|
285
288
|
opts: (0, _auxiliarFunctions.getWidthOpts)(width || 'auto'),
|
|
286
289
|
onEvents: zoomEvent,
|
|
287
290
|
option: options
|
|
@@ -27,10 +27,10 @@ var _auxiliarFunctions = require("../lib/auxiliarFunctions");
|
|
|
27
27
|
|
|
28
28
|
var _reverse = _interopRequireDefault(require("ramda/es/reverse"));
|
|
29
29
|
|
|
30
|
-
var _DonutChart = require("./DonutChart");
|
|
31
|
-
|
|
32
30
|
var _AreaChart = require("./AreaChart");
|
|
33
31
|
|
|
32
|
+
var _constants = require("../lib/constants");
|
|
33
|
+
|
|
34
34
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
35
35
|
|
|
36
36
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -334,7 +334,7 @@ var HorizontalBarChart = function HorizontalBarChart(props) {
|
|
|
334
334
|
click: onClickBar
|
|
335
335
|
};
|
|
336
336
|
return /*#__PURE__*/_react.default.createElement(_echartsForReact.default, {
|
|
337
|
-
style:
|
|
337
|
+
style: _constants.WIDTH_STYLE,
|
|
338
338
|
opts: (0, _auxiliarFunctions.getWidthOpts)(width || 'auto'),
|
|
339
339
|
onEvents: clickEvent,
|
|
340
340
|
option: options
|
package/dist/core/LineChart.js
CHANGED
|
@@ -17,7 +17,7 @@ var _echartsForReact = _interopRequireDefault(require("echarts-for-react"));
|
|
|
17
17
|
|
|
18
18
|
var _auxiliarFunctions = require("../lib/auxiliarFunctions");
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _constants = require("../lib/constants");
|
|
21
21
|
|
|
22
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
23
|
|
|
@@ -204,7 +204,7 @@ var LineChart = function LineChart(props) {
|
|
|
204
204
|
return /*#__PURE__*/React.createElement(_echartsForReact.default, {
|
|
205
205
|
lazyUpdate: true,
|
|
206
206
|
notMerge: true,
|
|
207
|
-
style:
|
|
207
|
+
style: _constants.WIDTH_STYLE,
|
|
208
208
|
opts: (0, _auxiliarFunctions.getWidthOpts)(width || 'auto'),
|
|
209
209
|
option: options
|
|
210
210
|
});
|
|
@@ -14,8 +14,5 @@ interface MultipurposeChartProps {
|
|
|
14
14
|
yComplement?: (input: string) => string;
|
|
15
15
|
rangeSelector?: boolean;
|
|
16
16
|
}
|
|
17
|
-
export declare const WIDTH_STYLE: {
|
|
18
|
-
width: string;
|
|
19
|
-
};
|
|
20
17
|
declare const _default: React.MemoExoticComponent<(props: MultipurposeChartProps) => JSX.Element>;
|
|
21
18
|
export default _default;
|
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.default =
|
|
10
|
+
exports.default = void 0;
|
|
11
11
|
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
|
|
@@ -19,6 +19,8 @@ var _echartsForReact = _interopRequireDefault(require("echarts-for-react"));
|
|
|
19
19
|
|
|
20
20
|
var _auxiliarFunctions = require("../lib/auxiliarFunctions");
|
|
21
21
|
|
|
22
|
+
var _constants = require("../lib/constants");
|
|
23
|
+
|
|
22
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
25
|
|
|
24
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -27,11 +29,6 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
27
29
|
|
|
28
30
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
29
31
|
|
|
30
|
-
var WIDTH_STYLE = {
|
|
31
|
-
width: '99.9%'
|
|
32
|
-
};
|
|
33
|
-
exports.WIDTH_STYLE = WIDTH_STYLE;
|
|
34
|
-
|
|
35
32
|
var isDarkColor = function isDarkColor(color) {
|
|
36
33
|
var c = color.substring(1);
|
|
37
34
|
var rgb = parseInt(c, 16);
|
|
@@ -217,7 +214,7 @@ var MultipurposeChart = function MultipurposeChart(props) {
|
|
|
217
214
|
}
|
|
218
215
|
};
|
|
219
216
|
return /*#__PURE__*/_react.default.createElement(_echartsForReact.default, {
|
|
220
|
-
style: WIDTH_STYLE,
|
|
217
|
+
style: _constants.WIDTH_STYLE,
|
|
221
218
|
opts: (0, _auxiliarFunctions.getWidthOpts)(width || 'auto'),
|
|
222
219
|
option: options,
|
|
223
220
|
ref: ref,
|
package/dist/core/PieChart.js
CHANGED
|
@@ -23,10 +23,10 @@ var _sum = _interopRequireDefault(require("ramda/es/sum"));
|
|
|
23
23
|
|
|
24
24
|
var _auxiliarFunctions = require("../lib/auxiliarFunctions");
|
|
25
25
|
|
|
26
|
-
var _DonutChart = require("./DonutChart");
|
|
27
|
-
|
|
28
26
|
var _AreaChart = require("./AreaChart");
|
|
29
27
|
|
|
28
|
+
var _constants = require("../lib/constants");
|
|
29
|
+
|
|
30
30
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
31
|
|
|
32
32
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -152,7 +152,7 @@ var PieChart = function PieChart(props) {
|
|
|
152
152
|
toolbox: toolbox
|
|
153
153
|
};
|
|
154
154
|
return /*#__PURE__*/_react.default.createElement(_echartsForReact.default, {
|
|
155
|
-
style:
|
|
155
|
+
style: _constants.WIDTH_STYLE,
|
|
156
156
|
opts: (0, _auxiliarFunctions.getWidthOpts)(width || 'auto'),
|
|
157
157
|
option: options
|
|
158
158
|
});
|
package/dist/core/RadarChart.js
CHANGED
|
@@ -15,7 +15,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
|
|
16
16
|
var _auxiliarFunctions = require("../lib/auxiliarFunctions");
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _constants = require("../lib/constants");
|
|
19
19
|
|
|
20
20
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
21
21
|
|
|
@@ -80,7 +80,7 @@ var RadarChart = function RadarChart(props) {
|
|
|
80
80
|
}, emphasis)]
|
|
81
81
|
};
|
|
82
82
|
return /*#__PURE__*/_react.default.createElement(_echartsForReact.default, {
|
|
83
|
-
style:
|
|
83
|
+
style: _constants.WIDTH_STYLE,
|
|
84
84
|
opts: (0, _auxiliarFunctions.getWidthOpts)(width || 'auto'),
|
|
85
85
|
option: options
|
|
86
86
|
});
|
|
@@ -23,12 +23,12 @@ var _auxiliarFunctions = require("../lib/auxiliarFunctions");
|
|
|
23
23
|
|
|
24
24
|
var _VerticalBarChart = require("./VerticalBarChart");
|
|
25
25
|
|
|
26
|
-
var _DonutChart = require("./DonutChart");
|
|
27
|
-
|
|
28
26
|
var _concat = _interopRequireDefault(require("ramda/es/concat"));
|
|
29
27
|
|
|
30
28
|
var _move = _interopRequireDefault(require("ramda/es/move"));
|
|
31
29
|
|
|
30
|
+
var _constants = require("../lib/constants");
|
|
31
|
+
|
|
32
32
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
33
33
|
|
|
34
34
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -332,7 +332,7 @@ var StackedBarChart = function StackedBarChart(props) {
|
|
|
332
332
|
};
|
|
333
333
|
return /*#__PURE__*/React.createElement(_echartsForReact.default, {
|
|
334
334
|
notMerge: true,
|
|
335
|
-
style:
|
|
335
|
+
style: _constants.WIDTH_STYLE,
|
|
336
336
|
opts: (0, _auxiliarFunctions.getWidthOpts)(width || 'auto'),
|
|
337
337
|
onEvents: zoomEvent,
|
|
338
338
|
option: options
|
|
@@ -19,7 +19,7 @@ var _echartsForReact = _interopRequireDefault(require("echarts-for-react"));
|
|
|
19
19
|
|
|
20
20
|
var _auxiliarFunctions = require("../lib/auxiliarFunctions");
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _constants = require("../lib/constants");
|
|
23
23
|
|
|
24
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
25
|
|
|
@@ -210,7 +210,7 @@ var VerticalBarChart = function VerticalBarChart(props) {
|
|
|
210
210
|
var formatLabel = function formatLabel(chartValues) {
|
|
211
211
|
var value = chartValues.value;
|
|
212
212
|
var isTimeType = yType === 'time';
|
|
213
|
-
return isTimeType ? (0, _auxiliarFunctions.timeConvert)(Number(value)) +
|
|
213
|
+
return isTimeType ? (0, _auxiliarFunctions.timeConvert)(Number(value)) + 'h' : (0, _auxiliarFunctions.takeLabelComplement)(Number(value), yComplement);
|
|
214
214
|
};
|
|
215
215
|
|
|
216
216
|
var toolbox = toolboxTooltip && {
|
|
@@ -339,7 +339,7 @@ var VerticalBarChart = function VerticalBarChart(props) {
|
|
|
339
339
|
return /*#__PURE__*/React.createElement(_echartsForReact.default, {
|
|
340
340
|
lazyUpdate: true,
|
|
341
341
|
notMerge: true,
|
|
342
|
-
style:
|
|
342
|
+
style: _constants.WIDTH_STYLE,
|
|
343
343
|
opts: (0, _auxiliarFunctions.getWidthOpts)(width || 'auto'),
|
|
344
344
|
onEvents: events,
|
|
345
345
|
option: options
|
package/package.json
CHANGED
package/src/core/AreaChart.tsx
CHANGED
package/src/core/DonutChart.tsx
CHANGED
|
@@ -21,8 +21,6 @@ interface IDonutProps extends IProps {
|
|
|
21
21
|
selectedMode?: boolean
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
export const WIDTH_STYLE = { width: '99.9%' }
|
|
25
|
-
|
|
26
24
|
const titleStyle: CSSProperties = {
|
|
27
25
|
position: 'absolute',
|
|
28
26
|
top: 5,
|
|
@@ -177,10 +175,10 @@ export const DonutChart = (props: IDonutProps) => {
|
|
|
177
175
|
const TitleChart = () => <h1 style={titleStyle}>{titleProps}</h1>
|
|
178
176
|
|
|
179
177
|
return (
|
|
180
|
-
<div style={{ position: 'relative'}}>
|
|
178
|
+
<div style={{ position: 'relative', width: '100%'}}>
|
|
181
179
|
{title && <TitleChart />}
|
|
182
180
|
<ReactEcharts
|
|
183
|
-
style={{
|
|
181
|
+
style={{ minWidth: '100%' }}
|
|
184
182
|
opts={getWidthOpts(width)}
|
|
185
183
|
option={options}
|
|
186
184
|
/>
|
|
@@ -22,8 +22,8 @@ import {
|
|
|
22
22
|
formatLabelWithImage,
|
|
23
23
|
} from '../lib/auxiliarFunctions'
|
|
24
24
|
import { reverse } from 'ramda'
|
|
25
|
-
import { WIDTH_STYLE } from './DonutChart'
|
|
26
25
|
import { TOOLBOX_DEFAULT_PROPS } from './AreaChart'
|
|
26
|
+
import { WIDTH_STYLE } from '../lib/constants'
|
|
27
27
|
|
|
28
28
|
interface IProps extends IDefaultChartProps {
|
|
29
29
|
showTickInfos?: boolean;
|
package/src/core/LineChart.tsx
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
takeLabelComplement,
|
|
17
17
|
timeConvert
|
|
18
18
|
} from '../lib/auxiliarFunctions'
|
|
19
|
-
import { WIDTH_STYLE } from '
|
|
19
|
+
import { WIDTH_STYLE } from '../lib/constants'
|
|
20
20
|
|
|
21
21
|
interface IProps extends Omit<IDefaultChartProps, 'data'> {
|
|
22
22
|
data: EntryDataLine[]
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
timeConvert
|
|
10
10
|
} from '../lib/auxiliarFunctions'
|
|
11
11
|
import { IDefaultChartProps, WidthProps } from './types'
|
|
12
|
+
import { WIDTH_STYLE } from '../lib/constants'
|
|
12
13
|
|
|
13
14
|
interface MultipurposeChartProps {
|
|
14
15
|
series: Array<{
|
|
@@ -25,9 +26,6 @@ interface MultipurposeChartProps {
|
|
|
25
26
|
rangeSelector?: boolean
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
export const WIDTH_STYLE = { width: '99.9%' }
|
|
29
|
-
|
|
30
|
-
|
|
31
29
|
const isDarkColor = (color: string) => {
|
|
32
30
|
const c = color.substring(1)
|
|
33
31
|
const rgb = parseInt(c, 16)
|
package/src/core/PieChart.tsx
CHANGED
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
getPercentage,
|
|
15
15
|
getWidthOpts
|
|
16
16
|
} from '../lib/auxiliarFunctions'
|
|
17
|
-
import { WIDTH_STYLE } from './DonutChart'
|
|
18
17
|
import { TOOLBOX_DEFAULT_PROPS } from './AreaChart'
|
|
18
|
+
import { WIDTH_STYLE } from '../lib/constants'
|
|
19
19
|
|
|
20
20
|
export interface IProps extends Omit<IDefaultChartProps, 'data'> {
|
|
21
21
|
data: PieChartData[]
|
package/src/core/RadarChart.tsx
CHANGED
|
@@ -2,8 +2,8 @@ import ReactEcharts from 'echarts-for-react'
|
|
|
2
2
|
import { EChartOption } from 'echarts/lib/echarts'
|
|
3
3
|
import React from 'react'
|
|
4
4
|
import { getWidthOpts, takeLabelComplement } from '../lib/auxiliarFunctions'
|
|
5
|
-
import { WIDTH_STYLE } from './DonutChart'
|
|
6
5
|
import { WidthProps } from './types'
|
|
6
|
+
import { WIDTH_STYLE } from '../lib/constants'
|
|
7
7
|
|
|
8
8
|
interface RadarChartProps {
|
|
9
9
|
series: Array<{
|
|
@@ -31,8 +31,8 @@ import {
|
|
|
31
31
|
normalLabel,
|
|
32
32
|
rotatedLabel
|
|
33
33
|
} from './VerticalBarChart'
|
|
34
|
-
import { WIDTH_STYLE } from './DonutChart'
|
|
35
34
|
import { concat, move } from 'ramda'
|
|
35
|
+
import { WIDTH_STYLE } from '../lib/constants'
|
|
36
36
|
|
|
37
37
|
interface IProps extends Omit<IDefaultChartProps, 'data'> {
|
|
38
38
|
data: EntryDataNTuples
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
getWidthOpts,
|
|
23
23
|
getDateFormatType
|
|
24
24
|
} from '../lib/auxiliarFunctions'
|
|
25
|
-
import { WIDTH_STYLE } from '
|
|
25
|
+
import { WIDTH_STYLE } from '../lib/constants'
|
|
26
26
|
|
|
27
27
|
interface IProps extends IDefaultChartProps {
|
|
28
28
|
rotateTickLabel?: number
|
|
@@ -196,7 +196,7 @@ const VerticalBarChart = (props: IProps) => {
|
|
|
196
196
|
const isTimeType = yType === 'time'
|
|
197
197
|
|
|
198
198
|
return isTimeType
|
|
199
|
-
? timeConvert(Number(value)) +
|
|
199
|
+
? timeConvert(Number(value)) + 'h'
|
|
200
200
|
: takeLabelComplement(Number(value), yComplement)
|
|
201
201
|
}
|
|
202
202
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const WIDTH_STYLE = { width: '99.9%' }
|