awing-library 2.1.69-beta → 2.1.70-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.
|
@@ -7,6 +7,7 @@ interface IChartJsContainer extends ChartProps {
|
|
|
7
7
|
optionCustom?: any;
|
|
8
8
|
chart: any;
|
|
9
9
|
dataChart: any;
|
|
10
|
+
optionsDefault?: boolean;
|
|
10
11
|
}
|
|
11
12
|
declare const BarLineComponent: (props: IChartJsContainer) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export default BarLineComponent;
|
|
@@ -24,6 +24,7 @@ var Enums_1 = require("./Enums");
|
|
|
24
24
|
var i18n_1 = __importDefault(require("../../i18n"));
|
|
25
25
|
var BarLineComponent = function (props) {
|
|
26
26
|
var t = (0, react_i18next_1.useTranslation)(undefined, { i18n: i18n_1.default }).t;
|
|
27
|
+
var optionsDefault = props.optionsDefault;
|
|
27
28
|
var chart = props.chart, _a = props.width, width = _a === void 0 ? 'auto' : _a, _b = props.height, height = _b === void 0 ? 350 : _b, _c = props.timeline, timeline = _c === void 0 ? Enums_1.TYPE_TIMELINE.DAY : _c, _d = props.optionCustom, optionCustom = _d === void 0 ? {} : _d, dataChart = props.dataChart, type = props.type, _e = props.options, options = _e === void 0 ? {
|
|
28
29
|
responsive: true,
|
|
29
30
|
maintainAspectRatio: false,
|
|
@@ -91,33 +92,46 @@ var BarLineComponent = function (props) {
|
|
|
91
92
|
},
|
|
92
93
|
},
|
|
93
94
|
scales: {
|
|
94
|
-
x:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
: 'YYYYMMDDHH',
|
|
102
|
-
unit: timeline === Enums_1.TYPE_TIMELINE.DAY ? 'day' : 'hour',
|
|
95
|
+
x: optionsDefault
|
|
96
|
+
? {
|
|
97
|
+
type: 'timeseries',
|
|
98
|
+
time: {
|
|
99
|
+
parser: 'YYYYMMDD',
|
|
100
|
+
},
|
|
101
|
+
unit: 'month',
|
|
103
102
|
displayFormats: {
|
|
104
|
-
|
|
105
|
-
hour: 'HH:mm',
|
|
103
|
+
month: 'DD/MM'
|
|
106
104
|
},
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
105
|
+
}
|
|
106
|
+
: {
|
|
107
|
+
type: 'time',
|
|
108
|
+
display: true,
|
|
109
|
+
grid: { display: false },
|
|
110
|
+
time: {
|
|
111
|
+
parser: timeline === Enums_1.TYPE_TIMELINE.DAY
|
|
112
|
+
? 'YYYYMMDD'
|
|
113
|
+
: 'YYYYMMDDHH',
|
|
114
|
+
unit: timeline === Enums_1.TYPE_TIMELINE.DAY
|
|
115
|
+
? 'day'
|
|
116
|
+
: 'hour',
|
|
117
|
+
displayFormats: {
|
|
118
|
+
day: 'DD/MM',
|
|
119
|
+
hour: 'HH:mm',
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
offset: true,
|
|
123
|
+
ticks: {
|
|
124
|
+
maxTicksLimit: 10,
|
|
125
|
+
autoSkipPadding: 16,
|
|
126
|
+
maxRotation: 0,
|
|
127
|
+
},
|
|
128
|
+
title: {
|
|
129
|
+
font: {
|
|
130
|
+
size: 14,
|
|
131
|
+
family: 'Roboto',
|
|
132
|
+
},
|
|
118
133
|
},
|
|
119
134
|
},
|
|
120
|
-
},
|
|
121
135
|
y: {
|
|
122
136
|
type: 'linear',
|
|
123
137
|
display: true,
|