awing-library 2.1.78-beta → 2.1.80-beta
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/ACM-AXN/Statistics/interface.d.ts +2 -2
- package/lib/AWING/Chart/BarLineComponent.d.ts +4 -2
- package/lib/AWING/Chart/BarLineComponent.js +3 -3
- package/lib/AWING/Chart/PieComponent.d.ts +7 -6
- package/lib/AWING/Chart/PieComponent.js +1 -1
- package/lib/Utils/Helpers.js +3 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChartOptions, ChartType } from 'chart.js';
|
|
2
2
|
import { TYPE_CHART } from './Enums';
|
|
3
3
|
export interface BaseStatistics<F> {
|
|
4
4
|
onChangeQueryInput: (input: any) => void;
|
|
@@ -30,5 +30,5 @@ export interface ILoadings {
|
|
|
30
30
|
}
|
|
31
31
|
export interface IConfigChart {
|
|
32
32
|
type: TYPE_CHART;
|
|
33
|
-
options?:
|
|
33
|
+
options?: ChartOptions<ChartType>;
|
|
34
34
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import { DataObject } from '../../AWING/interface';
|
|
2
|
+
import { ChartOptions, ChartType } from 'chart.js';
|
|
1
3
|
import 'chartjs-adapter-moment';
|
|
2
4
|
import { ChartProps } from 'react-chartjs-2/dist/types';
|
|
3
5
|
interface IChartJsContainer extends ChartProps {
|
|
4
6
|
width?: number;
|
|
5
7
|
height?: number;
|
|
6
8
|
timeline?: number;
|
|
7
|
-
optionCustom?:
|
|
9
|
+
optionCustom?: ChartOptions<ChartType>;
|
|
8
10
|
chart: any;
|
|
9
|
-
dataChart:
|
|
11
|
+
dataChart: DataObject[];
|
|
10
12
|
optionsDefault?: boolean;
|
|
11
13
|
}
|
|
12
14
|
declare const BarLineComponent: (props: IChartJsContainer) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,9 +19,9 @@ var Helpers_1 = require("../../Utils/Helpers");
|
|
|
19
19
|
require("chartjs-adapter-moment");
|
|
20
20
|
var moment_1 = __importDefault(require("moment"));
|
|
21
21
|
var react_i18next_1 = require("react-i18next");
|
|
22
|
-
var Styles_1 = require("./Styles");
|
|
23
|
-
var Enums_1 = require("./Enums");
|
|
24
22
|
var i18n_1 = __importDefault(require("../../i18n"));
|
|
23
|
+
var Enums_1 = require("./Enums");
|
|
24
|
+
var Styles_1 = require("./Styles");
|
|
25
25
|
var BarLineComponent = function (props) {
|
|
26
26
|
var t = (0, react_i18next_1.useTranslation)(undefined, { i18n: i18n_1.default }).t;
|
|
27
27
|
var optionsDefault = props.optionsDefault;
|
|
@@ -62,7 +62,7 @@ var BarLineComponent = function (props) {
|
|
|
62
62
|
.slice(0, -1)
|
|
63
63
|
.join(' ');
|
|
64
64
|
}
|
|
65
|
-
labels += ' ' + tooltipItem.formattedValue;
|
|
65
|
+
labels += ': ' + tooltipItem.formattedValue;
|
|
66
66
|
return ' ' + labels;
|
|
67
67
|
},
|
|
68
68
|
},
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChartData, ChartOptions, ChartType } from 'chart.js';
|
|
2
|
+
import { ChartProps, TypedChartComponent } from 'react-chartjs-2/dist/types';
|
|
2
3
|
export interface IPieComponent extends ChartProps {
|
|
3
|
-
dataConvert?:
|
|
4
|
-
widthChart?:
|
|
5
|
-
heightChart?:
|
|
6
|
-
optionCustom?:
|
|
7
|
-
chart:
|
|
4
|
+
dataConvert?: ChartData<ChartType>;
|
|
5
|
+
widthChart?: number;
|
|
6
|
+
heightChart?: number;
|
|
7
|
+
optionCustom?: ChartOptions<ChartType>;
|
|
8
|
+
chart: TypedChartComponent<"pie">;
|
|
8
9
|
}
|
|
9
10
|
declare const PieComponent: ({ chart, data, dataConvert, widthChart, heightChart, optionCustom, options, }: IPieComponent) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export default PieComponent;
|
package/lib/Utils/Helpers.js
CHANGED