@apia/charts 0.3.3 → 0.3.5

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 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
@@ -38,9 +38,10 @@ type TApiaChartColumn = {
38
38
  name: string;
39
39
  };
40
40
  type TApiaChartDefinition = {
41
- chartType: 'barH2D' | 'barV2D' | 'linear' | 'waterfall' | 'pie2D';
42
- axisXTitle: string;
43
- axisYTitle: string;
41
+ chartType?: 'barH2D' | 'barV2D' | 'linear' | 'waterfall' | 'pie2D';
42
+ axisXTitle?: string;
43
+ axisYTitle?: string;
44
+ hideSelector?: boolean;
44
45
  /**
45
46
  * The colors of the waterfall chart are defined by the bars with positive
46
47
  * values and the bars with negative values. So in order to mantain cohesion
@@ -56,7 +57,7 @@ type TApiaChartDefinition = {
56
57
  /**
57
58
  * Name of the schema of colors shown in the chart. Pie charts must always include a schema
58
59
  */
59
- colorSchema: string;
60
+ colorSchema?: string;
60
61
  /**
61
62
  * Main data to be parsed and shown in the chart.
62
63
  * Depending on the ```chartType``` and the amount of ```column``` objects,
@@ -145,12 +146,18 @@ type TApiaChartDefinition = {
145
146
  dataSets: {
146
147
  data: TApiaChartColumn | TApiaChartColumn[];
147
148
  };
149
+ margin?: {
150
+ top: number;
151
+ left: number;
152
+ bottom: number;
153
+ right: number;
154
+ } | number;
148
155
  pnl_id?: string;
149
- showAxisXTitle: boolean;
150
- showAxisYTitle: boolean;
151
- showGrid: boolean;
152
- showLegend: boolean;
153
- showValues: boolean;
156
+ showAxisXTitle?: boolean;
157
+ showAxisYTitle?: boolean;
158
+ showGrid?: boolean;
159
+ showLegend?: boolean;
160
+ showValues?: boolean;
154
161
  /**
155
162
  * Specific for waterfall charts to show the total sum of the values of the
156
163
  * chart at the end while each column shows its value. Otherwise the values
@@ -235,8 +242,9 @@ type TWidgetData = {
235
242
  };
236
243
  };
237
244
 
238
- declare const WidgetContainer: ({ data }: {
245
+ declare const WidgetContainer: ({ data, id }: {
239
246
  data: TWidgetData;
247
+ id: string;
240
248
  }) => React$1.JSX.Element;
241
249
 
242
250
  export { ChartRenderer, EmptyGrid, TApiaChartColumn, TApiaChartDefinition, TWidgetData, WidgetContainer };