@apia/charts 0.1.0 → 0.1.3

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/index.d.ts CHANGED
@@ -37,15 +37,10 @@ type TApiaChartColumn = {
37
37
  */
38
38
  name: string;
39
39
  };
40
- type TPie = {
41
- chartType: 'pie2D';
42
- };
43
- type TNoPie = {
44
- chartType: 'barH2D' | 'barV2D' | 'linear' | 'waterfall';
40
+ type TApiaChartDefinition = {
41
+ chartType: 'barH2D' | 'barV2D' | 'linear' | 'waterfall' | 'pie2D';
45
42
  axisXTitle: string;
46
43
  axisYTitle: string;
47
- };
48
- type TApiaChartDefinitionBase = {
49
44
  /**
50
45
  * The colors of the waterfall chart are defined by the bars with positive
51
46
  * values and the bars with negative values. So in order to mantain cohesion
@@ -169,10 +164,6 @@ type TApiaChartDefinitionBase = {
169
164
  maxWidth: number;
170
165
  };
171
166
  };
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
167
  type TChartMargin = {
177
168
  top: number;
178
169
  bottom: number;
@@ -201,7 +192,47 @@ declare const ChartRenderer: React$1.FC<{
201
192
  id: _apia_util.TId;
202
193
  }>;
203
194
 
204
- declare const WidgetContainer: () => theme_ui_jsx_runtime.JSX.Element;
195
+ type TWidgetZone = {
196
+ minimum: number;
197
+ maximum: number;
198
+ transparency: number;
199
+ color: string;
200
+ };
201
+ type TWidgetData = {
202
+ border: boolean;
203
+ backgroundColor: string;
204
+ currentValue: number;
205
+ forceProp?: Record<string, unknown>;
206
+ height: number;
207
+ maxValue: number;
208
+ minValue: number;
209
+ noValueColor: string;
210
+ pointerColor: string;
211
+ ringAnchor: number;
212
+ scaleFontSize: string | number;
213
+ valueColor: string;
214
+ valueDecimals: number;
215
+ valueFontSize: string | number;
216
+ valueType: string | number;
217
+ viewBtnDshAssociated: boolean;
218
+ viewBtnHistory: boolean;
219
+ viewBtnInfo: boolean;
220
+ viewBtnComments: boolean;
221
+ viewBtnUpdate: boolean;
222
+ viewBtnOpenCbe: boolean;
223
+ viewBtnOpenQry: boolean;
224
+ viewBtnOpenOtherQry: boolean;
225
+ viewBtnOpenOtherQbe: boolean;
226
+ viewWidName: boolean;
227
+ widKpiType: string | number;
228
+ width: number;
229
+ zones: {
230
+ Zone: TWidgetZone | TWidgetZone[];
231
+ };
232
+ };
233
+
234
+ declare const WidgetContainer: ({ data }: {
235
+ data: TWidgetData;
236
+ }) => theme_ui_jsx_runtime.JSX.Element;
205
237
 
206
- export { ChartRenderer, TApiaChartDefinition, WidgetContainer, isPieChart };
207
- //# sourceMappingURL=index.d.ts.map
238
+ export { ChartRenderer, TApiaChartColumn, TApiaChartDefinition, TWidgetData, WidgetContainer };