@hisptz/dhis2-analytics 1.0.44 → 1.0.46

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.
Files changed (40) hide show
  1. package/build/cjs/components/CircularProgressDashboard/index.js +15 -0
  2. package/build/cjs/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.js +3 -2
  3. package/build/cjs/components/SingleValueContainer/index.js +16 -0
  4. package/build/cjs/components/Visualization/components/VisualizationSelector/index.js +4 -13
  5. package/build/cjs/components/Visualization/index.js +1 -11
  6. package/build/es/components/CircularProgressDashboard/index.js +1 -0
  7. package/build/es/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.js +2 -1
  8. package/build/es/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.js +1 -1
  9. package/build/es/components/SingleValueContainer/index.js +1 -0
  10. package/build/es/components/Visualization/components/VisualizationSelector/index.js +4 -13
  11. package/build/es/components/Visualization/index.js +1 -11
  12. package/build/types/components/CircularProgressDashboard/index.d.ts +1 -0
  13. package/build/types/components/SingleValueContainer/index.d.ts +1 -0
  14. package/build/types/components/Visualization/components/VisualizationSelector/index.d.ts +2 -4
  15. package/package.json +12 -8
  16. package/build/cjs/components/ChartAnalytics/ChartAnalytics.stories.js +0 -253
  17. package/build/cjs/components/ChartAnalytics/data/column-data.json +0 -210
  18. package/build/cjs/components/ChartAnalytics/data/complex-multi-series-data.json +0 -124
  19. package/build/cjs/components/ChartAnalytics/data/multi-series-data.json +0 -536
  20. package/build/cjs/components/ChartAnalytics/data/pie-data.json +0 -115
  21. package/build/cjs/components/ChartAnalytics/data/stacked-chart-data.json +0 -415
  22. package/build/cjs/components/CircularProgressDashboard/CircularProgressIndicator.stories.js +0 -45
  23. package/build/cjs/components/CustomPivotTable/CustomPivotTable.stories.js +0 -69
  24. package/build/cjs/components/Map/Map.stories.js +0 -352
  25. package/build/cjs/components/SingleValueContainer/SingleValueContainer.stories.js +0 -127
  26. package/build/cjs/components/Visualization/Visualization.stories.js +0 -138
  27. package/build/cjs/dataProviders/map.js +0 -31
  28. package/build/es/components/ChartAnalytics/ChartAnalytics.stories.js +0 -235
  29. package/build/es/components/ChartAnalytics/data/column-data.json +0 -210
  30. package/build/es/components/ChartAnalytics/data/complex-multi-series-data.json +0 -124
  31. package/build/es/components/ChartAnalytics/data/multi-series-data.json +0 -536
  32. package/build/es/components/ChartAnalytics/data/pie-data.json +0 -115
  33. package/build/es/components/ChartAnalytics/data/stacked-chart-data.json +0 -415
  34. package/build/es/components/CircularProgressDashboard/CircularProgressIndicator.stories.js +0 -34
  35. package/build/es/components/CustomPivotTable/CustomPivotTable.stories.js +0 -59
  36. package/build/es/components/Map/Map.stories.js +0 -334
  37. package/build/es/components/SingleValueContainer/SingleValueContainer.stories.js +0 -115
  38. package/build/es/components/Visualization/Visualization.stories.js +0 -129
  39. package/build/es/dataProviders/map.js +0 -24
  40. package/build/types/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.d.ts +0 -1
@@ -1,235 +0,0 @@
1
- import { CssReset } from "@dhis2/ui";
2
- import HighCharts from "highcharts";
3
- import React, { useState } from "react";
4
- import { ChartDownloadMenu } from "./components/DownloadMenu";
5
- import columnData from "./data/column-data.json";
6
- import complexMultiSeriesData from "./data/complex-multi-series-data.json";
7
- import multiSeriesData from "./data/multi-series-data.json";
8
- import pieData from "./data/pie-data.json";
9
- import stackedChartData from "./data/stacked-chart-data.json";
10
- import { setupHighchartsModules } from "./services/export";
11
- import { ChartAnalytics } from ".";
12
- const Template = args => /*#__PURE__*/React.createElement(ChartAnalytics, args);
13
- setupHighchartsModules(HighCharts);
14
- export const Column = Template.bind({});
15
- Column.args = {
16
- analytics: columnData,
17
- config: {
18
- layout: {
19
- series: ["dx"],
20
- category: ["ou"],
21
- filter: ["pe"]
22
- },
23
- type: "column",
24
- height: 500,
25
- colors: ["#2f7ed8", "#0d233a", "#8bbc21", "#910000", "#1aadce", "#492970", "#f28f43", "#77a1e5", "#c42525", "#a6c96a"]
26
- }
27
- };
28
- export const MultipleColumns = Template.bind({});
29
- MultipleColumns.args = {
30
- analytics: multiSeriesData,
31
- config: {
32
- layout: {
33
- series: ["ou"],
34
- category: ["pe"],
35
- filter: ["dx"]
36
- },
37
- type: "column",
38
- height: 1000,
39
- colors: ["#2f7ed8", "#0d233a", "#8bbc21", "#910000", "#1aadce", "#492970", "#f28f43", "#77a1e5", "#c42525", "#a6c96a"]
40
- }
41
- };
42
- export const StackedColumn = Template.bind({});
43
- StackedColumn.args = {
44
- analytics: stackedChartData,
45
- config: {
46
- layout: {
47
- series: ["ou"],
48
- category: ["pe"],
49
- filter: ["dx"]
50
- },
51
- type: "stacked-column",
52
- height: 1000,
53
- colors: ["#2f7ed8", "#0d233a", "#8bbc21", "#910000", "#1aadce", "#492970", "#f28f43", "#77a1e5", "#c42525", "#a6c96a"]
54
- }
55
- };
56
- export const Line = Template.bind({});
57
- Line.args = {
58
- analytics: columnData,
59
- config: {
60
- layout: {
61
- series: ["dx"],
62
- category: ["ou"],
63
- filter: ["pe"]
64
- },
65
- type: "line",
66
- height: 1000,
67
- colors: ["#2f7ed8", "#0d233a", "#8bbc21", "#910000", "#1aadce", "#492970", "#f28f43", "#77a1e5", "#c42525", "#a6c96a"]
68
- }
69
- };
70
- export const MultipleLines = Template.bind({});
71
- MultipleLines.args = {
72
- analytics: multiSeriesData,
73
- config: {
74
- layout: {
75
- series: ["ou"],
76
- category: ["pe"],
77
- filter: ["dx"]
78
- },
79
- type: "line",
80
- height: 500,
81
- colors: ["#2f7ed8", "#0d233a", "#8bbc21", "#910000", "#1aadce", "#492970", "#f28f43", "#77a1e5", "#c42525", "#a6c96a"]
82
- }
83
- };
84
- export const PieChart = Template.bind({});
85
- PieChart.args = {
86
- analytics: pieData,
87
- config: {
88
- layout: {
89
- series: ["dx"],
90
- category: [],
91
- filter: ["dx", "pe"]
92
- },
93
- type: "pie",
94
- height: 500,
95
- colors: ["#2f7ed8", "#0d233a", "#8bbc21", "#910000", "#1aadce", "#492970", "#f28f43", "#77a1e5", "#c4255", "#a6c96a"]
96
- }
97
- };
98
- export const MultiSeries = Template.bind({});
99
- MultiSeries.args = {
100
- analytics: multiSeriesData,
101
- config: {
102
- layout: {
103
- series: ["ou"],
104
- category: ["pe"],
105
- filter: ["dx"]
106
- },
107
- type: "multi-series",
108
- height: 500,
109
- colors: ["#2f7ed8", "#0d233a", "#8bbc21", "#910000", "#1aadce", "#492970", "#f28f43", "#77a1e5", "#c42525", "#a6c96a"],
110
- multiSeries: {
111
- series: [{
112
- id: "qhqAxPSTUXp",
113
- as: "column",
114
- yAxis: 0
115
- }, {
116
- id: "Vth0fbpFcsO",
117
- as: "line",
118
- cumulative: true,
119
- yAxis: 1
120
- }],
121
- yAxes: [{
122
- id: "yAxis1",
123
- title: {
124
- text: "Koinandugu"
125
- },
126
- labels: {
127
- format: "{value}"
128
- }
129
- }, {
130
- id: "yAxis2",
131
- title: {
132
- text: "Kono"
133
- },
134
- labels: {
135
- format: "{value}"
136
- },
137
- opposite: true
138
- }],
139
- target: {
140
- id: "",
141
- styles: {
142
- color: "blue"
143
- },
144
- value: 45,
145
- label: {
146
- text: "Target",
147
- textAlign: "center",
148
- verticalAlign: "middle"
149
- }
150
- }
151
- }
152
- }
153
- };
154
- export const ComplexMultiSeries = Template.bind({});
155
- ComplexMultiSeries.args = {
156
- analytics: complexMultiSeriesData,
157
- config: {
158
- layout: {
159
- series: ["dx"],
160
- category: ["pe"],
161
- filter: ["ou"]
162
- },
163
- type: "multi-series",
164
- height: 500,
165
- colors: ["#2f7ed8", "#0d233a", "#8bbc21", "#910000", "#1aadce", "#492970", "#f28f43", "#77a1e5", "#c42525", "#a6c96a"],
166
- multiSeries: {
167
- series: [{
168
- id: "QQkOAJFukyY",
169
- as: "column",
170
- yAxis: 0
171
- }, {
172
- id: "QQkOAJFukyY",
173
- as: "line",
174
- cumulative: true,
175
- yAxis: 1
176
- }],
177
- yAxes: [{
178
- id: "yAxis1",
179
- title: {
180
- text: "Koinandugu"
181
- },
182
- labels: {
183
- format: "{value}"
184
- }
185
- }, {
186
- id: "yAxis2",
187
- title: {
188
- text: "Kono"
189
- },
190
- labels: {
191
- format: "{value}"
192
- },
193
- opposite: true
194
- }],
195
- target: {
196
- id: "",
197
- styles: {
198
- color: "blue"
199
- },
200
- value: 45,
201
- label: {
202
- text: "Target",
203
- textAlign: "center",
204
- verticalAlign: "middle"
205
- }
206
- }
207
- }
208
- }
209
- };
210
- export default {
211
- title: "Analytics/Chart Analytics",
212
- component: ChartAnalytics,
213
- decorators: [ChartStory => {
214
- const [chartRef, setChartRef] = useState(null);
215
- return /*#__PURE__*/React.createElement("div", {
216
- style: {
217
- width: 1000,
218
- height: "100%",
219
- display: "flex",
220
- gap: 8,
221
- flexDirection: "column"
222
- }
223
- }, /*#__PURE__*/React.createElement(CssReset, null), /*#__PURE__*/React.createElement("div", {
224
- style: {
225
- width: "100%",
226
- display: "flex",
227
- justifyContent: "end"
228
- }
229
- }, /*#__PURE__*/React.createElement(ChartDownloadMenu, {
230
- chartRef: chartRef
231
- })), /*#__PURE__*/React.createElement(ChartStory, {
232
- ref: setChartRef
233
- }));
234
- }]
235
- };
@@ -1,210 +0,0 @@
1
- {
2
- "headers": [
3
- {
4
- "name": "dx",
5
- "column": "Data",
6
- "valueType": "TEXT",
7
- "type": "java.lang.String",
8
- "hidden": false,
9
- "meta": true
10
- },
11
- {
12
- "name": "ou",
13
- "column": "Organisation unit",
14
- "valueType": "TEXT",
15
- "type": "java.lang.String",
16
- "hidden": false,
17
- "meta": true
18
- },
19
- {
20
- "name": "value",
21
- "column": "Value",
22
- "valueType": "NUMBER",
23
- "type": "java.lang.Double",
24
- "hidden": false,
25
- "meta": false
26
- }
27
- ],
28
- "metaData": {
29
- "items": {
30
- "2022": {
31
- "name": "2022"
32
- },
33
- "KctpIIucige": {
34
- "name": "Selenga"
35
- },
36
- "YmmeuGbqOwR": {
37
- "name": "Gbo"
38
- },
39
- "daJPPxtIrQn": {
40
- "name": "Jaiama Bongor"
41
- },
42
- "tTUf91fCytl": {
43
- "uid": "tTUf91fCytl",
44
- "name": "Chiefdom"
45
- },
46
- "ou": {
47
- "name": "Organisation unit"
48
- },
49
- "sxRd2XOzFbz": {
50
- "name": "Tikonko"
51
- },
52
- "THIS_YEAR": {
53
- "name": "This year"
54
- },
55
- "O6uvpzGd5pu": {
56
- "uid": "O6uvpzGd5pu",
57
- "code": "OU_264",
58
- "name": "Bo"
59
- },
60
- "U6Kr7Gtpidn": {
61
- "name": "Kakua"
62
- },
63
- "YuQRtpLP10I": {
64
- "name": "Badjia"
65
- },
66
- "zFDYIgyGmXG": {
67
- "name": "Bargbo"
68
- },
69
- "I4jWcnFmgEC": {
70
- "name": "Niawa Lenga"
71
- },
72
- "dx": {
73
- "name": "Data"
74
- },
75
- "BGGmAwx33dj": {
76
- "name": "Bumpe Ngao"
77
- },
78
- "pe": {
79
- "name": "Period"
80
- },
81
- "Uvn6LCg7dVU": {
82
- "name": "ANC 1 Coverage"
83
- },
84
- "ARZ4y5i4reU": {
85
- "name": "Wonde"
86
- },
87
- "JdhagCUEMbj": {
88
- "name": "Komboya"
89
- },
90
- "vWbkYPRmKyS": {
91
- "name": "Baoma"
92
- },
93
- "dGheVylzol6": {
94
- "name": "Bargbe"
95
- },
96
- "kU8vhUkAGaT": {
97
- "name": "Lugbu"
98
- },
99
- "npWGUj37qDe": {
100
- "name": "Valunia"
101
- }
102
- },
103
- "dimensions": {
104
- "dx": [
105
- "Uvn6LCg7dVU"
106
- ],
107
- "pe": [
108
- "2022"
109
- ],
110
- "ou": [
111
- "YuQRtpLP10I",
112
- "vWbkYPRmKyS",
113
- "dGheVylzol6",
114
- "zFDYIgyGmXG",
115
- "BGGmAwx33dj",
116
- "YmmeuGbqOwR",
117
- "daJPPxtIrQn",
118
- "U6Kr7Gtpidn",
119
- "JdhagCUEMbj",
120
- "kU8vhUkAGaT",
121
- "I4jWcnFmgEC",
122
- "KctpIIucige",
123
- "sxRd2XOzFbz",
124
- "npWGUj37qDe",
125
- "ARZ4y5i4reU"
126
- ],
127
- "co": []
128
- }
129
- },
130
- "rows": [
131
- [
132
- "Uvn6LCg7dVU",
133
- "YuQRtpLP10I",
134
- "304.1"
135
- ],
136
- [
137
- "Uvn6LCg7dVU",
138
- "vWbkYPRmKyS",
139
- "213.7"
140
- ],
141
- [
142
- "Uvn6LCg7dVU",
143
- "dGheVylzol6",
144
- "126.5"
145
- ],
146
- [
147
- "Uvn6LCg7dVU",
148
- "zFDYIgyGmXG",
149
- "206.4"
150
- ],
151
- [
152
- "Uvn6LCg7dVU",
153
- "BGGmAwx33dj",
154
- "120.9"
155
- ],
156
- [
157
- "Uvn6LCg7dVU",
158
- "YmmeuGbqOwR",
159
- "203.1"
160
- ],
161
- [
162
- "Uvn6LCg7dVU",
163
- "daJPPxtIrQn",
164
- "89.3"
165
- ],
166
- [
167
- "Uvn6LCg7dVU",
168
- "U6Kr7Gtpidn",
169
- "104.4"
170
- ],
171
- [
172
- "Uvn6LCg7dVU",
173
- "JdhagCUEMbj",
174
- "187.1"
175
- ],
176
- [
177
- "Uvn6LCg7dVU",
178
- "kU8vhUkAGaT",
179
- "96.1"
180
- ],
181
- [
182
- "Uvn6LCg7dVU",
183
- "I4jWcnFmgEC",
184
- "147.9"
185
- ],
186
- [
187
- "Uvn6LCg7dVU",
188
- "KctpIIucige",
189
- "91.1"
190
- ],
191
- [
192
- "Uvn6LCg7dVU",
193
- "sxRd2XOzFbz",
194
- "203.2"
195
- ],
196
- [
197
- "Uvn6LCg7dVU",
198
- "npWGUj37qDe",
199
- "95.7"
200
- ],
201
- [
202
- "Uvn6LCg7dVU",
203
- "ARZ4y5i4reU",
204
- "84.3"
205
- ]
206
- ],
207
- "height": 15,
208
- "width": 3,
209
- "headerWidth": 3
210
- }
@@ -1,124 +0,0 @@
1
- {
2
- "headers": [
3
- {
4
- "name": "dx",
5
- "column": "Data",
6
- "valueType": "TEXT",
7
- "type": "java.lang.String",
8
- "hidden": false,
9
- "meta": true
10
- },
11
- {
12
- "name": "pe",
13
- "column": "Period",
14
- "valueType": "TEXT",
15
- "type": "java.lang.String",
16
- "hidden": false,
17
- "meta": true
18
- },
19
- {
20
- "name": "value",
21
- "column": "Value",
22
- "valueType": "NUMBER",
23
- "type": "java.lang.Double",
24
- "hidden": false,
25
- "meta": false
26
- }
27
- ],
28
- "metaData": {
29
- "items": {
30
- "202108": {
31
- "name": "August 2021"
32
- },
33
- "202109": {
34
- "name": "September 2021"
35
- },
36
- "202110": {
37
- "name": "October 2021"
38
- },
39
- "202111": {
40
- "name": "November 2021"
41
- },
42
- "202112": {
43
- "name": "December 2021"
44
- },
45
- "202201": {
46
- "name": "January 2022"
47
- },
48
- "202202": {
49
- "name": "February 2022"
50
- },
51
- "202203": {
52
- "name": "March 2022"
53
- },
54
- "202204": {
55
- "name": "April 2022"
56
- },
57
- "202205": {
58
- "name": "May 2022"
59
- },
60
- "202206": {
61
- "name": "June 2022"
62
- },
63
- "202207": {
64
- "name": "July 2022"
65
- },
66
- "ou": {
67
- "name": "Organisation unit"
68
- },
69
- "LAST_12_MONTHS": {
70
- "name": "Last 12 months"
71
- },
72
- "QQkOAJFukyY": {
73
- "name": "COV-C: Jumla ya Waliochanjwa (Fully vaccinated)"
74
- },
75
- "dx": {
76
- "name": "Data"
77
- },
78
- "pe": {
79
- "name": "Period"
80
- },
81
- "HllvX50cXC0": {
82
- "name": "default"
83
- },
84
- "acZHYslyJLt": {
85
- "name": "Dar Es Salaam Region"
86
- }
87
- },
88
- "dimensions": {
89
- "dx": [
90
- "QQkOAJFukyY"
91
- ],
92
- "pe": [
93
- "202108",
94
- "202109",
95
- "202110",
96
- "202111",
97
- "202112",
98
- "202201",
99
- "202202",
100
- "202203",
101
- "202204",
102
- "202205",
103
- "202206",
104
- "202207"
105
- ],
106
- "ou": [
107
- "acZHYslyJLt"
108
- ],
109
- "co": [
110
- "HllvX50cXC0"
111
- ]
112
- }
113
- },
114
- "width": 3,
115
- "height": 1,
116
- "rows": [
117
- [
118
- "QQkOAJFukyY",
119
- "202203",
120
- "1820.0"
121
- ]
122
- ],
123
- "headerWidth": 3
124
- }