@apia/charts 0.1.1 → 0.2.2
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/LICENSE.md +20 -20
- package/dist/index.d.ts +45 -15
- package/dist/index.js +3849 -2
- package/dist/index.js.map +1 -1
- package/package.json +8 -9
package/LICENSE.md
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) [year] [fullname]
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) [year] [fullname]
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as _apia_util from '@apia/util';
|
|
2
2
|
import React$1 from 'react';
|
|
3
|
-
import * as theme_ui_jsx_runtime from 'theme-ui/jsx-runtime';
|
|
4
3
|
|
|
5
4
|
type TApiaChartCoordinate = {
|
|
6
5
|
/**
|
|
@@ -37,15 +36,10 @@ type TApiaChartColumn = {
|
|
|
37
36
|
*/
|
|
38
37
|
name: string;
|
|
39
38
|
};
|
|
40
|
-
type
|
|
41
|
-
chartType: 'pie2D';
|
|
42
|
-
};
|
|
43
|
-
type TNoPie = {
|
|
44
|
-
chartType: 'barH2D' | 'barV2D' | 'linear' | 'waterfall';
|
|
39
|
+
type TApiaChartDefinition = {
|
|
40
|
+
chartType: 'barH2D' | 'barV2D' | 'linear' | 'waterfall' | 'pie2D';
|
|
45
41
|
axisXTitle: string;
|
|
46
42
|
axisYTitle: string;
|
|
47
|
-
};
|
|
48
|
-
type TApiaChartDefinitionBase = {
|
|
49
43
|
/**
|
|
50
44
|
* The colors of the waterfall chart are defined by the bars with positive
|
|
51
45
|
* values and the bars with negative values. So in order to mantain cohesion
|
|
@@ -169,10 +163,6 @@ type TApiaChartDefinitionBase = {
|
|
|
169
163
|
maxWidth: number;
|
|
170
164
|
};
|
|
171
165
|
};
|
|
172
|
-
type TApiaPieChartDefinition = TPie & TApiaChartDefinitionBase;
|
|
173
|
-
type TApiaNoPieChartDefinition = TNoPie & TApiaChartDefinitionBase;
|
|
174
|
-
type TApiaChartDefinition = TApiaPieChartDefinition | TApiaNoPieChartDefinition;
|
|
175
|
-
declare function isPieChart(chart: TApiaChartDefinition): chart is TApiaPieChartDefinition;
|
|
176
166
|
type TChartMargin = {
|
|
177
167
|
top: number;
|
|
178
168
|
bottom: number;
|
|
@@ -201,7 +191,47 @@ declare const ChartRenderer: React$1.FC<{
|
|
|
201
191
|
id: _apia_util.TId;
|
|
202
192
|
}>;
|
|
203
193
|
|
|
204
|
-
|
|
194
|
+
type TWidgetZone = {
|
|
195
|
+
minimum: number;
|
|
196
|
+
maximum: number;
|
|
197
|
+
transparency: number;
|
|
198
|
+
color: string;
|
|
199
|
+
};
|
|
200
|
+
type TWidgetData = {
|
|
201
|
+
border: boolean;
|
|
202
|
+
backgroundColor: string;
|
|
203
|
+
currentValue: number;
|
|
204
|
+
forceProp?: Record<string, unknown>;
|
|
205
|
+
height: number;
|
|
206
|
+
maxValue: number;
|
|
207
|
+
minValue: number;
|
|
208
|
+
noValueColor: string;
|
|
209
|
+
pointerColor: string;
|
|
210
|
+
ringAnchor: number;
|
|
211
|
+
scaleFontSize: string | number;
|
|
212
|
+
valueColor: string;
|
|
213
|
+
valueDecimals: number;
|
|
214
|
+
valueFontSize: string | number;
|
|
215
|
+
valueType: string | number;
|
|
216
|
+
viewBtnDshAssociated: boolean;
|
|
217
|
+
viewBtnHistory: boolean;
|
|
218
|
+
viewBtnInfo: boolean;
|
|
219
|
+
viewBtnComments: boolean;
|
|
220
|
+
viewBtnUpdate: boolean;
|
|
221
|
+
viewBtnOpenCbe: boolean;
|
|
222
|
+
viewBtnOpenQry: boolean;
|
|
223
|
+
viewBtnOpenOtherQry: boolean;
|
|
224
|
+
viewBtnOpenOtherQbe: boolean;
|
|
225
|
+
viewWidName: boolean;
|
|
226
|
+
widKpiType: string | number;
|
|
227
|
+
width: number;
|
|
228
|
+
zones: {
|
|
229
|
+
Zone: TWidgetZone | TWidgetZone[];
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
declare const WidgetContainer: ({ data }: {
|
|
234
|
+
data: TWidgetData;
|
|
235
|
+
}) => React$1.JSX.Element;
|
|
205
236
|
|
|
206
|
-
export { ChartRenderer, TApiaChartDefinition,
|
|
207
|
-
//# sourceMappingURL=index.d.ts.map
|
|
237
|
+
export { ChartRenderer, TApiaChartColumn, TApiaChartDefinition, TWidgetData, WidgetContainer };
|