@dhis2/analytics 23.8.5 → 23.8.6

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 (269) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/build/cjs/__demo__/FileMenu.stories.js +4 -2
  3. package/build/cjs/__demo__/Filter.stories.js +2 -2
  4. package/build/cjs/__demo__/FixedPeriodSelect.stories.js +2 -2
  5. package/build/cjs/__demo__/OpenFileDialog.stories.js +4 -2
  6. package/build/cjs/__demo__/OrgUnitDimension.stories.js +2 -2
  7. package/build/cjs/__demo__/PivotTable.stories.js +206 -153
  8. package/build/cjs/api/__tests__/dimensions.spec.js +2 -1
  9. package/build/cjs/api/analytics/Analytics.js +8 -7
  10. package/build/cjs/api/analytics/AnalyticsBase.js +58 -43
  11. package/build/cjs/api/analytics/AnalyticsRequest.js +2 -1
  12. package/build/cjs/api/analytics/AnalyticsRequestBase.js +22 -17
  13. package/build/cjs/api/analytics/AnalyticsRequestPropertiesMixin.js +38 -19
  14. package/build/cjs/api/analytics/AnalyticsResponseHeader.js +7 -5
  15. package/build/cjs/api/analytics/__tests__/AnalyticsRequest.spec.js +2 -1
  16. package/build/cjs/api/dimensions.js +150 -120
  17. package/build/cjs/api/organisationUnits.js +36 -24
  18. package/build/cjs/components/AboutAOUnit/AboutAOUnit.js +19 -12
  19. package/build/cjs/components/CachedDataQueryProvider.js +8 -7
  20. package/build/cjs/components/DataDimension/DataDimension.js +8 -6
  21. package/build/cjs/components/DataDimension/DataTypeSelector.js +6 -5
  22. package/build/cjs/components/DataDimension/DetailSelector.js +6 -5
  23. package/build/cjs/components/DataDimension/GroupSelector.js +12 -11
  24. package/build/cjs/components/DataDimension/ItemSelector.js +87 -73
  25. package/build/cjs/components/DataDimension/MetricSelector.js +6 -5
  26. package/build/cjs/components/DimensionMenu.js +14 -13
  27. package/build/cjs/components/DimensionsPanel/DimensionsPanel.js +4 -4
  28. package/build/cjs/components/DimensionsPanel/List/DimensionItem.js +4 -4
  29. package/build/cjs/components/DimensionsPanel/List/DimensionLabel.js +4 -4
  30. package/build/cjs/components/DimensionsPanel/List/DimensionList.js +4 -4
  31. package/build/cjs/components/DimensionsPanel/List/OptionsButton.js +10 -7
  32. package/build/cjs/components/DimensionsPanel/List/RecommendedIcon.js +14 -11
  33. package/build/cjs/components/DynamicDimension/DynamicDimension.js +9 -8
  34. package/build/cjs/components/DynamicDimension/ItemSelector.js +58 -44
  35. package/build/cjs/components/FileMenu/DeleteDialog.js +16 -12
  36. package/build/cjs/components/FileMenu/FileMenu.js +19 -18
  37. package/build/cjs/components/FileMenu/GetLinkDialog.js +6 -5
  38. package/build/cjs/components/FileMenu/RenameDialog.js +38 -25
  39. package/build/cjs/components/FileMenu/SaveAsDialog.js +21 -14
  40. package/build/cjs/components/FileMenu/utils.js +1 -1
  41. package/build/cjs/components/Filter/Filter.js +22 -19
  42. package/build/cjs/components/LegendKey/LegendKey.js +4 -3
  43. package/build/cjs/components/OpenFileDialog/CreatedByFilter.js +26 -20
  44. package/build/cjs/components/OpenFileDialog/CustomSelectOption.js +26 -23
  45. package/build/cjs/components/OpenFileDialog/DateField.js +4 -3
  46. package/build/cjs/components/OpenFileDialog/FileList.js +22 -19
  47. package/build/cjs/components/OpenFileDialog/NameFilter.js +21 -15
  48. package/build/cjs/components/OpenFileDialog/OpenFileDialog.js +43 -35
  49. package/build/cjs/components/OpenFileDialog/PaginationControls.js +28 -22
  50. package/build/cjs/components/OpenFileDialog/VisTypeFilter.js +37 -28
  51. package/build/cjs/components/OpenFileDialog/utils.js +1 -1
  52. package/build/cjs/components/Options/VisualizationOptions.js +46 -36
  53. package/build/cjs/components/Options/styles/VisualizationOptions.style.js +1 -1
  54. package/build/cjs/components/OrgUnitDimension/OrgUnitDimension.js +50 -34
  55. package/build/cjs/components/PeriodDimension/FixedPeriodFilter.js +22 -15
  56. package/build/cjs/components/PeriodDimension/FixedPeriodSelect.js +19 -14
  57. package/build/cjs/components/PeriodDimension/PeriodDimension.js +8 -6
  58. package/build/cjs/components/PeriodDimension/PeriodTransfer.js +24 -19
  59. package/build/cjs/components/PeriodDimension/RelativePeriodFilter.js +30 -24
  60. package/build/cjs/components/PeriodDimension/utils/fixedPeriods.js +1 -1
  61. package/build/cjs/components/PeriodDimension/utils/index.js +6 -2
  62. package/build/cjs/components/PeriodDimension/utils/relativePeriods.js +1 -1
  63. package/build/cjs/components/PivotTable/PivotTable.js +10 -9
  64. package/build/cjs/components/PivotTable/PivotTableBody.js +29 -20
  65. package/build/cjs/components/PivotTable/PivotTableCell.js +9 -8
  66. package/build/cjs/components/PivotTable/PivotTableClippedAxis.js +17 -14
  67. package/build/cjs/components/PivotTable/PivotTableColumnHeaderCell.js +8 -7
  68. package/build/cjs/components/PivotTable/PivotTableColumnHeaders.js +29 -22
  69. package/build/cjs/components/PivotTable/PivotTableContainer.js +6 -5
  70. package/build/cjs/components/PivotTable/PivotTableDimensionLabelCell.js +5 -4
  71. package/build/cjs/components/PivotTable/PivotTableEmptyCell.js +3 -2
  72. package/build/cjs/components/PivotTable/PivotTableEmptyRow.js +5 -4
  73. package/build/cjs/components/PivotTable/PivotTableEngineContext.js +7 -6
  74. package/build/cjs/components/PivotTable/PivotTableHead.js +16 -13
  75. package/build/cjs/components/PivotTable/PivotTableHeaderCell.js +9 -8
  76. package/build/cjs/components/PivotTable/PivotTableRow.js +27 -20
  77. package/build/cjs/components/PivotTable/PivotTableRowHeaderCell.js +6 -5
  78. package/build/cjs/components/PivotTable/PivotTableSortIcon.js +5 -4
  79. package/build/cjs/components/PivotTable/PivotTableTitleRow.js +9 -8
  80. package/build/cjs/components/PivotTable/PivotTableTitleRows.js +5 -4
  81. package/build/cjs/components/PivotTable/PivotTableValueCell.js +8 -7
  82. package/build/cjs/components/PivotTable/styles/PivotTable.style.js +1 -1
  83. package/build/cjs/components/TransferOption.js +15 -13
  84. package/build/cjs/components/TranslationDialog/TranslationModal/LocalesSelect.js +28 -19
  85. package/build/cjs/components/TranslationDialog/TranslationModal/TranslationForm.js +25 -18
  86. package/build/cjs/components/TranslationDialog/TranslationModal/TranslationModal.js +9 -8
  87. package/build/cjs/components/TranslationDialog/TranslationModal/TranslationModalActions.js +17 -14
  88. package/build/cjs/components/TranslationDialog/TranslationModal/useTranslationsResults.js +4 -3
  89. package/build/cjs/components/VisTypeIcon.js +6 -5
  90. package/build/cjs/index.js +464 -464
  91. package/build/cjs/locales/en/translations.json +1 -1
  92. package/build/cjs/locales/nl/translations.json +30 -30
  93. package/build/cjs/modules/axis.js +1 -1
  94. package/build/cjs/modules/dataSets.js +1 -1
  95. package/build/cjs/modules/dataTypes.js +2 -2
  96. package/build/cjs/modules/dimensionSelectorHelper.js +1 -1
  97. package/build/cjs/modules/fontStyle.js +1 -1
  98. package/build/cjs/modules/layout/axis.js +1 -1
  99. package/build/cjs/modules/layout/dimension.js +1 -1
  100. package/build/cjs/modules/layout/dimensionCreate.js +3 -1
  101. package/build/cjs/modules/layout/dimensionIsValid.js +5 -3
  102. package/build/cjs/modules/layout/item.js +1 -1
  103. package/build/cjs/modules/layout/testResources.js +1 -1
  104. package/build/cjs/modules/layoutTypes.js +1 -1
  105. package/build/cjs/modules/layoutUiRules/index.js +20 -20
  106. package/build/cjs/modules/layoutUiRules/rules.js +1 -1
  107. package/build/cjs/modules/layoutUiRules/rulesHelper.js +2 -1
  108. package/build/cjs/modules/layoutUiRules/rulesUtils.js +1 -1
  109. package/build/cjs/modules/legends.js +1 -1
  110. package/build/cjs/modules/outliers/index.js +4 -2
  111. package/build/cjs/modules/outliers/iqr.js +8 -5
  112. package/build/cjs/modules/outliers/modZScore.js +15 -7
  113. package/build/cjs/modules/outliers/zScore.js +5 -4
  114. package/build/cjs/modules/pivotTable/AdaptiveClippingController.js +17 -12
  115. package/build/cjs/modules/pivotTable/PivotTableEngine.js +57 -44
  116. package/build/cjs/modules/pivotTable/clipAxis.js +8 -7
  117. package/build/cjs/modules/pivotTable/clipPartitionedAxis.js +10 -9
  118. package/build/cjs/modules/pivotTable/getHeaderForDisplay.js +9 -8
  119. package/build/cjs/modules/pivotTable/measureText.js +10 -7
  120. package/build/cjs/modules/pivotTable/pivotTableConstants.js +1 -1
  121. package/build/cjs/modules/pivotTable/useParentSize.js +2 -1
  122. package/build/cjs/modules/pivotTable/useScrollPosition.js +2 -1
  123. package/build/cjs/modules/pivotTable/useTableClipping.js +7 -6
  124. package/build/cjs/modules/predefinedDimensions.js +2 -2
  125. package/build/cjs/modules/relativeItems/index.js +4 -1
  126. package/build/cjs/modules/valueTypes.js +1 -1
  127. package/build/cjs/modules/visTypes.js +1 -1
  128. package/build/cjs/visualizations/config/adapters/dhis_dhis/index.js +7 -6
  129. package/build/cjs/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +9 -4
  130. package/build/cjs/visualizations/config/adapters/dhis_highcharts/axis.js +5 -2
  131. package/build/cjs/visualizations/config/adapters/dhis_highcharts/customAxes.js +9 -5
  132. package/build/cjs/visualizations/config/adapters/dhis_highcharts/getTrimmedConfig.js +4 -3
  133. package/build/cjs/visualizations/config/adapters/dhis_highcharts/index.js +11 -9
  134. package/build/cjs/visualizations/config/adapters/dhis_highcharts/legend.js +32 -28
  135. package/build/cjs/visualizations/config/adapters/dhis_highcharts/legendSet.js +24 -20
  136. package/build/cjs/visualizations/config/adapters/dhis_highcharts/plotOptions.js +9 -8
  137. package/build/cjs/visualizations/config/adapters/dhis_highcharts/xAxis/index.js +1 -1
  138. package/build/cjs/visualizations/config/adapters/dhis_highcharts/yAxis/gauge.js +3 -1
  139. package/build/cjs/visualizations/config/generators/dhis/singleValue.js +28 -24
  140. package/build/cjs/visualizations/config/generators/highcharts/index.js +5 -1
  141. package/build/cjs/visualizations/config/index.js +13 -11
  142. package/build/cjs/visualizations/config/validators/dhis/index.js +4 -3
  143. package/build/cjs/visualizations/index.js +6 -2
  144. package/build/cjs/visualizations/store/adapters/dhis_dhis/index.js +7 -6
  145. package/build/cjs/visualizations/store/adapters/dhis_highcharts/index.js +8 -7
  146. package/build/cjs/visualizations/store/index.js +18 -15
  147. package/build/cjs/visualizations/store/validators/dhis/index.js +7 -5
  148. package/build/cjs/visualizations/util/colors/colorSets.js +1 -1
  149. package/build/cjs/visualizations/util/colors/themes.js +1 -1
  150. package/build/cjs/visualizations/util/getFilterText.js +9 -6
  151. package/build/es/__demo__/FileMenu.stories.js +4 -2
  152. package/build/es/__demo__/OpenFileDialog.stories.js +4 -2
  153. package/build/es/__demo__/PivotTable.stories.js +204 -151
  154. package/build/es/api/__tests__/dimensions.spec.js +2 -1
  155. package/build/es/api/analytics/Analytics.js +8 -7
  156. package/build/es/api/analytics/AnalyticsBase.js +58 -43
  157. package/build/es/api/analytics/AnalyticsRequest.js +2 -1
  158. package/build/es/api/analytics/AnalyticsRequestBase.js +22 -17
  159. package/build/es/api/analytics/AnalyticsRequestPropertiesMixin.js +38 -19
  160. package/build/es/api/analytics/AnalyticsResponseHeader.js +7 -5
  161. package/build/es/api/analytics/__tests__/AnalyticsRequest.spec.js +2 -1
  162. package/build/es/api/dimensions.js +149 -119
  163. package/build/es/api/organisationUnits.js +35 -23
  164. package/build/es/components/AboutAOUnit/AboutAOUnit.js +17 -10
  165. package/build/es/components/CachedDataQueryProvider.js +6 -5
  166. package/build/es/components/DataDimension/DataDimension.js +8 -6
  167. package/build/es/components/DataDimension/DataTypeSelector.js +6 -5
  168. package/build/es/components/DataDimension/DetailSelector.js +6 -5
  169. package/build/es/components/DataDimension/GroupSelector.js +10 -9
  170. package/build/es/components/DataDimension/ItemSelector.js +85 -71
  171. package/build/es/components/DataDimension/MetricSelector.js +6 -5
  172. package/build/es/components/DimensionMenu.js +14 -13
  173. package/build/es/components/DimensionsPanel/DimensionsPanel.js +2 -2
  174. package/build/es/components/DimensionsPanel/List/DimensionItem.js +2 -2
  175. package/build/es/components/DimensionsPanel/List/DimensionLabel.js +2 -2
  176. package/build/es/components/DimensionsPanel/List/DimensionList.js +2 -2
  177. package/build/es/components/DimensionsPanel/List/OptionsButton.js +10 -7
  178. package/build/es/components/DimensionsPanel/List/RecommendedIcon.js +14 -11
  179. package/build/es/components/DynamicDimension/DynamicDimension.js +9 -8
  180. package/build/es/components/DynamicDimension/ItemSelector.js +56 -42
  181. package/build/es/components/FileMenu/DeleteDialog.js +14 -10
  182. package/build/es/components/FileMenu/FileMenu.js +17 -16
  183. package/build/es/components/FileMenu/GetLinkDialog.js +6 -5
  184. package/build/es/components/FileMenu/RenameDialog.js +36 -23
  185. package/build/es/components/FileMenu/SaveAsDialog.js +19 -12
  186. package/build/es/components/Filter/Filter.js +22 -19
  187. package/build/es/components/LegendKey/LegendKey.js +4 -3
  188. package/build/es/components/OpenFileDialog/CreatedByFilter.js +26 -20
  189. package/build/es/components/OpenFileDialog/CustomSelectOption.js +26 -23
  190. package/build/es/components/OpenFileDialog/DateField.js +4 -3
  191. package/build/es/components/OpenFileDialog/FileList.js +22 -19
  192. package/build/es/components/OpenFileDialog/NameFilter.js +21 -15
  193. package/build/es/components/OpenFileDialog/OpenFileDialog.js +41 -33
  194. package/build/es/components/OpenFileDialog/PaginationControls.js +28 -22
  195. package/build/es/components/OpenFileDialog/VisTypeFilter.js +37 -28
  196. package/build/es/components/Options/VisualizationOptions.js +43 -33
  197. package/build/es/components/OrgUnitDimension/OrgUnitDimension.js +48 -32
  198. package/build/es/components/PeriodDimension/FixedPeriodFilter.js +22 -15
  199. package/build/es/components/PeriodDimension/FixedPeriodSelect.js +17 -12
  200. package/build/es/components/PeriodDimension/PeriodDimension.js +8 -6
  201. package/build/es/components/PeriodDimension/PeriodTransfer.js +22 -17
  202. package/build/es/components/PeriodDimension/RelativePeriodFilter.js +30 -24
  203. package/build/es/components/PeriodDimension/utils/index.js +5 -1
  204. package/build/es/components/PivotTable/PivotTable.js +8 -7
  205. package/build/es/components/PivotTable/PivotTableBody.js +29 -20
  206. package/build/es/components/PivotTable/PivotTableCell.js +9 -8
  207. package/build/es/components/PivotTable/PivotTableClippedAxis.js +17 -14
  208. package/build/es/components/PivotTable/PivotTableColumnHeaderCell.js +8 -7
  209. package/build/es/components/PivotTable/PivotTableColumnHeaders.js +29 -22
  210. package/build/es/components/PivotTable/PivotTableContainer.js +6 -5
  211. package/build/es/components/PivotTable/PivotTableDimensionLabelCell.js +5 -4
  212. package/build/es/components/PivotTable/PivotTableEmptyCell.js +3 -2
  213. package/build/es/components/PivotTable/PivotTableEmptyRow.js +5 -4
  214. package/build/es/components/PivotTable/PivotTableEngineContext.js +5 -4
  215. package/build/es/components/PivotTable/PivotTableHead.js +16 -13
  216. package/build/es/components/PivotTable/PivotTableHeaderCell.js +9 -8
  217. package/build/es/components/PivotTable/PivotTableRow.js +27 -20
  218. package/build/es/components/PivotTable/PivotTableRowHeaderCell.js +6 -5
  219. package/build/es/components/PivotTable/PivotTableSortIcon.js +5 -4
  220. package/build/es/components/PivotTable/PivotTableTitleRow.js +7 -6
  221. package/build/es/components/PivotTable/PivotTableTitleRows.js +5 -4
  222. package/build/es/components/PivotTable/PivotTableValueCell.js +6 -5
  223. package/build/es/components/TransferOption.js +15 -13
  224. package/build/es/components/TranslationDialog/TranslationModal/LocalesSelect.js +28 -19
  225. package/build/es/components/TranslationDialog/TranslationModal/TranslationForm.js +23 -16
  226. package/build/es/components/TranslationDialog/TranslationModal/TranslationModal.js +7 -6
  227. package/build/es/components/TranslationDialog/TranslationModal/TranslationModalActions.js +17 -14
  228. package/build/es/components/TranslationDialog/TranslationModal/useTranslationsResults.js +4 -3
  229. package/build/es/components/VisTypeIcon.js +6 -5
  230. package/build/es/locales/en/translations.json +1 -1
  231. package/build/es/locales/nl/translations.json +30 -30
  232. package/build/es/modules/layout/dimensionCreate.js +3 -1
  233. package/build/es/modules/layout/dimensionIsValid.js +5 -3
  234. package/build/es/modules/outliers/index.js +3 -1
  235. package/build/es/modules/outliers/iqr.js +7 -4
  236. package/build/es/modules/outliers/modZScore.js +14 -6
  237. package/build/es/modules/outliers/zScore.js +4 -3
  238. package/build/es/modules/pivotTable/AdaptiveClippingController.js +17 -12
  239. package/build/es/modules/pivotTable/PivotTableEngine.js +57 -44
  240. package/build/es/modules/pivotTable/clipAxis.js +8 -7
  241. package/build/es/modules/pivotTable/clipPartitionedAxis.js +10 -9
  242. package/build/es/modules/pivotTable/getHeaderForDisplay.js +9 -8
  243. package/build/es/modules/pivotTable/measureText.js +10 -7
  244. package/build/es/modules/pivotTable/useParentSize.js +2 -1
  245. package/build/es/modules/pivotTable/useScrollPosition.js +2 -1
  246. package/build/es/modules/pivotTable/useTableClipping.js +7 -6
  247. package/build/es/modules/predefinedDimensions.js +1 -1
  248. package/build/es/modules/relativeItems/index.js +4 -1
  249. package/build/es/visualizations/config/adapters/dhis_dhis/index.js +6 -5
  250. package/build/es/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +8 -3
  251. package/build/es/visualizations/config/adapters/dhis_highcharts/axis.js +4 -1
  252. package/build/es/visualizations/config/adapters/dhis_highcharts/customAxes.js +6 -2
  253. package/build/es/visualizations/config/adapters/dhis_highcharts/getTrimmedConfig.js +4 -3
  254. package/build/es/visualizations/config/adapters/dhis_highcharts/index.js +9 -7
  255. package/build/es/visualizations/config/adapters/dhis_highcharts/legend.js +32 -28
  256. package/build/es/visualizations/config/adapters/dhis_highcharts/legendSet.js +23 -19
  257. package/build/es/visualizations/config/adapters/dhis_highcharts/plotOptions.js +9 -8
  258. package/build/es/visualizations/config/adapters/dhis_highcharts/yAxis/gauge.js +3 -1
  259. package/build/es/visualizations/config/generators/dhis/singleValue.js +28 -24
  260. package/build/es/visualizations/config/generators/highcharts/index.js +5 -1
  261. package/build/es/visualizations/config/index.js +13 -11
  262. package/build/es/visualizations/config/validators/dhis/index.js +4 -3
  263. package/build/es/visualizations/index.js +5 -1
  264. package/build/es/visualizations/store/adapters/dhis_dhis/index.js +7 -6
  265. package/build/es/visualizations/store/adapters/dhis_highcharts/index.js +8 -7
  266. package/build/es/visualizations/store/index.js +18 -15
  267. package/build/es/visualizations/store/validators/dhis/index.js +7 -5
  268. package/build/es/visualizations/util/getFilterText.js +9 -6
  269. package/package.json +11 -11
@@ -46,7 +46,7 @@
46
46
  "Not available for {{visualizationType}}": "",
47
47
  "Remove Assigned Categories": "",
48
48
  "Add Assigned Categories": "",
49
- "Remove": "",
49
+ "Remove": "Verwijderen",
50
50
  "Filter dimensions": "",
51
51
  "Main dimensions": "",
52
52
  "Your dimensions": "",
@@ -122,7 +122,7 @@
122
122
  "No line lists found. Try adjusting your search or filter options to find what you're looking for.": "",
123
123
  "New line list": "",
124
124
  "Options": "Opties",
125
- "Hide": "",
125
+ "Hide": "Verbergen",
126
126
  "Update": "Bijwerken",
127
127
  "{{count}} org units": "",
128
128
  "{{count}} org units_plural": "",
@@ -160,25 +160,25 @@
160
160
  "December": "",
161
161
  "Week {{weekNumber}}": "",
162
162
  "Bi-Week {{biWeekNumber}}": "",
163
- "Daily": "",
164
- "Weekly": "",
165
- "Weekly (Start Wednesday)": "",
166
- "Weekly (Start Thursday)": "",
167
- "Weekly (Start Saturday)": "",
168
- "Weekly (Start Sunday)": "",
169
- "Bi-weekly": "",
170
- "Monthly": "",
171
- "Bi-monthly": "",
163
+ "Daily": "Dagelijks",
164
+ "Weekly": "Wekelijks",
165
+ "Weekly (Start Wednesday)": "Wekelijks (Start op woensdag)",
166
+ "Weekly (Start Thursday)": "Wekelijks (Start op donderdag)",
167
+ "Weekly (Start Saturday)": "Wekelijks (Start op zaterdag)",
168
+ "Weekly (Start Sunday)": "Wekelijks (Start op zondag)",
169
+ "Bi-weekly": "Tweewekelijks",
170
+ "Monthly": "Maandelijks",
171
+ "Bi-monthly": "Tweemaandelijks",
172
172
  "Quarterly": "",
173
173
  "Six-monthly": "",
174
174
  "Six-monthly April": "",
175
- "Yearly": "",
176
- "Financial year (Start November)": "",
177
- "Financial year (Start October)": "",
178
- "Financial year (Start July)": "",
179
- "Financial year (Start April)": "",
180
- "Today": "",
181
- "Yesterday": "",
175
+ "Yearly": "Jaarlijks",
176
+ "Financial year (Start November)": "Financieel jaar (Start november)",
177
+ "Financial year (Start October)": "Financieel jaar (Start oktober)",
178
+ "Financial year (Start July)": "Financieel jaar (Start juli)",
179
+ "Financial year (Start April)": "Financieel jaar (Start april)",
180
+ "Today": "Vandaag",
181
+ "Yesterday": "Gisteren",
182
182
  "Last 3 days": "",
183
183
  "Last 7 days": "",
184
184
  "Last 14 days": "",
@@ -236,8 +236,8 @@
236
236
  "Save translations": "",
237
237
  "Could not load translations": "",
238
238
  "Retry": "",
239
- "Series": "",
240
- "Category": "",
239
+ "Series": "Reeks",
240
+ "Category": "Categorie",
241
241
  "Filter": "Filter",
242
242
  "Columns": "",
243
243
  "Rows": "",
@@ -298,22 +298,22 @@
298
298
  "{{thresholdFactor}} × Z-score low": "",
299
299
  "{{thresholdFactor}} × Z-score high": "",
300
300
  "Data": "Gegevens",
301
- "Organisation Unit": "",
301
+ "Organisation Unit": "Organisatieëenheid",
302
302
  "Assigned Categories": "",
303
303
  "Pivot table": "",
304
- "Area": "",
304
+ "Area": "Oppervlakte",
305
305
  "Stacked area": "",
306
- "Bar": "",
307
- "Stacked bar": "",
308
- "Column": "",
306
+ "Bar": "Staaf",
307
+ "Stacked bar": "Gestapelde staaf",
308
+ "Column": "Kolom",
309
309
  "Year over year (column)": "",
310
- "Stacked column": "",
311
- "Gauge": "",
312
- "Line": "",
310
+ "Stacked column": "Gestapelde kolom",
311
+ "Gauge": "Graadmeter",
312
+ "Line": "Lijn",
313
313
  "Line list": "",
314
314
  "Year over year (line)": "",
315
- "Pie": "",
316
- "Radar": "",
315
+ "Pie": "Taart",
316
+ "Radar": "Radar",
317
317
  "Scatter": "",
318
318
  "Single value": "",
319
319
  "All charts": "",
@@ -1,5 +1,7 @@
1
1
  import { DIMENSION_PROP_ID, DIMENSION_PROP_ITEMS, DIMENSION_PROP_FILTER, DIMENSION_PROP_LEGEND_SET, DIMENSION_PROP_PROGRAM_STAGE, DIMENSION_PROP_REPETITION } from './dimension.js';
2
- export const dimensionCreate = (dimensionId, itemIds = [], args = {}) => {
2
+ export const dimensionCreate = function (dimensionId) {
3
+ let itemIds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
4
+ let args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
3
5
  const dimension = {
4
6
  [DIMENSION_PROP_ID.name]: dimensionId,
5
7
  ...(itemIds.length && {
@@ -1,8 +1,10 @@
1
1
  import { DIMENSION, DIMENSION_PROPS } from './dimension.js';
2
2
  import { dimensionIsEmpty } from './dimensionIsEmpty.js';
3
- export const dimensionIsValid = (dimension, {
4
- requireItems
5
- } = {}) => {
3
+ export const dimensionIsValid = function (dimension) {
4
+ let {
5
+ requireItems
6
+ } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
7
+
6
8
  if (!DIMENSION.isValid(dimension)) {
7
9
  return false;
8
10
  }
@@ -60,7 +60,9 @@ const getMinMaxValue = (outlierHelper, isVertical, isMax) => {
60
60
  return [...outlierHelper.thresholds.map(t => getXYStats([t.line[0], t.line[t.line.length - 1]])[prop]), extremeFactor].filter(isNumeric).sort(isMax ? (a, b) => b - a : (a, b) => a - b)[0];
61
61
  };
62
62
 
63
- export const getOutlierHelper = (data, userConfig = {}) => {
63
+ export const getOutlierHelper = function (data) {
64
+ let userConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
65
+
64
66
  if (data.length < 3) {
65
67
  return null;
66
68
  }
@@ -19,7 +19,9 @@ export const getQuartilePosition = (data, quartile) => {
19
19
  return pos;
20
20
  }
21
21
  };
22
- export const getQuartileValue = (data, quartile = Q1) => {
22
+ export const getQuartileValue = function (data) {
23
+ let quartile = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Q1;
24
+
23
25
  if (data.length < 3) {
24
26
  return;
25
27
  }
@@ -35,9 +37,10 @@ export const getQuartileValue = (data, quartile = Q1) => {
35
37
  var diff = data[base] - data[base - 1];
36
38
  return data[base - 1] + diff * rest;
37
39
  };
38
- export const getIQRHelper = (normalizationHelper, config, {
39
- xyStats
40
- }) => {
40
+ export const getIQRHelper = (normalizationHelper, config, _ref) => {
41
+ let {
42
+ xyStats
43
+ } = _ref;
41
44
  const sortedNormalized = normalizationHelper.normalized.slice().sort((a, b) => a - b);
42
45
  const q1 = getQuartileValue(sortedNormalized, Q1);
43
46
  const q3 = getQuartileValue(sortedNormalized, Q3);
@@ -10,15 +10,22 @@ export const getMedian = values => {
10
10
  return hl % 1 ? values[Math.floor(hl)] : getMean([values[hl - 1], values[hl]]);
11
11
  }; // Absolute deviation
12
12
 
13
- export const getMedianAbsoluteDeviation = (values, median = getMedian(values)) => getMedian(values.map(value => Math.abs(value - median)).sort((a, b) => a - b));
14
- export const getMeanAbsoluteDeviation = (values, mean = getMean(values)) => getMean(values.map(value => Math.abs(value - mean))); // Modified z-scores
13
+ export const getMedianAbsoluteDeviation = function (values) {
14
+ let median = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getMedian(values);
15
+ return getMedian(values.map(value => Math.abs(value - median)).sort((a, b) => a - b));
16
+ };
17
+ export const getMeanAbsoluteDeviation = function (values) {
18
+ let mean = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getMean(values);
19
+ return getMean(values.map(value => Math.abs(value - mean)));
20
+ }; // Modified z-scores
15
21
 
16
22
  export const getModZScore = (value, median, medianAD) => MEDIAN_AD_CORRECTION * (value - median) / medianAD;
17
23
  export const getModZScoreMAD0 = (value, median, meanAD) => (value - median) / (meanAD * MEAN_AD_CORRECTION); // Thresholds
18
24
 
19
25
  export const getModZScoreThresholds = (thresholdFactor, medianAD, median) => [median - medianAD * thresholdFactor / MEDIAN_AD_CORRECTION, median + medianAD * thresholdFactor / MEDIAN_AD_CORRECTION];
20
26
  export const getModZScoreMAD0Thresholds = (thresholdFactor, meanAD, median) => [median - thresholdFactor * meanAD * MEAN_AD_CORRECTION, median + thresholdFactor * meanAD * MEAN_AD_CORRECTION];
21
- export const getDataWithZScore = (dataWithNormalization, cache = {}) => {
27
+ export const getDataWithZScore = function (dataWithNormalization) {
28
+ let cache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
22
29
  const normalizedData = cache.normalizedData || dataWithNormalization.map(obj => obj.normalized);
23
30
  const median = isNumber(cache.median) ? cache.median : getMedian(normalizedData);
24
31
  const medianAD = isNumber(cache.medianAD) ? cache.medianAD : getMedianAbsoluteDeviation();
@@ -37,9 +44,10 @@ export const getDataWithZScore = (dataWithNormalization, cache = {}) => {
37
44
 
38
45
  return dataWithZScore;
39
46
  };
40
- export const getModZScoreHelper = (normalizationHelper, config, {
41
- xyStats
42
- }) => {
47
+ export const getModZScoreHelper = (normalizationHelper, config, _ref) => {
48
+ let {
49
+ xyStats
50
+ } = _ref;
43
51
  const sortedNormalized = normalizationHelper.normalized.slice().sort((a, b) => a - b);
44
52
  const median = getMedian(sortedNormalized);
45
53
  const medianAD = getMedianAbsoluteDeviation(sortedNormalized, median);
@@ -4,9 +4,10 @@ import { PROP_THRESHOLD_FACTOR } from './index.js';
4
4
  export const STANDARD_Z_SCORE = 'STANDARD_Z_SCORE';
5
5
  export const getStdDev = data => std(data, 'unbiased');
6
6
  export const getMean = data => mean(data);
7
- export const getZScoreHelper = (normalizationHelper, config, {
8
- xyStats
9
- }) => {
7
+ export const getZScoreHelper = (normalizationHelper, config, _ref) => {
8
+ let {
9
+ xyStats
10
+ } = _ref;
10
11
  const sortedNormalized = normalizationHelper.normalized.slice().sort((a, b) => a - b);
11
12
  const stdDev = getStdDev(sortedNormalized);
12
13
  const zScoreThreshold = stdDev * config[PROP_THRESHOLD_FACTOR];
@@ -14,13 +14,16 @@ export class AdaptiveClippingController {
14
14
  this.reset();
15
15
  }
16
16
 
17
- addSize({
18
- row,
19
- column
20
- }, {
21
- width,
22
- height
23
- }) {
17
+ addSize(_ref, _ref2) {
18
+ let {
19
+ row,
20
+ column
21
+ } = _ref;
22
+ let {
23
+ width,
24
+ height
25
+ } = _ref2;
26
+
24
27
  if (column >= 0) {
25
28
  const columnSize = this.columns.sizes[column] || {
26
29
  pre: 0,
@@ -46,17 +49,19 @@ export class AdaptiveClippingController {
46
49
  }
47
50
  }
48
51
 
49
- add({
50
- row,
51
- column
52
- }, renderedValue) {
52
+ add(_ref3, renderedValue) {
53
+ let {
54
+ row,
55
+ column
56
+ } = _ref3;
53
57
  this.addSize({
54
58
  row,
55
59
  column
56
60
  }, this.measureText(renderedValue));
57
61
  }
58
62
 
59
- measureText(renderedValue, options = {}) {
63
+ measureText(renderedValue) {
64
+ let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
60
65
  return measureTextWithWrapping(renderedValue, {
61
66
  fontSize: this.engine.fontSize,
62
67
  ...options
@@ -114,10 +114,11 @@ const buildDimensionLookup = (visualization, metadata, headers) => {
114
114
  };
115
115
  };
116
116
 
117
- const lookup = (dataRow, dimensionLookup, {
118
- doColumnSubtotals,
119
- doRowSubtotals
120
- }) => {
117
+ const lookup = (dataRow, dimensionLookup, _ref) => {
118
+ let {
119
+ doColumnSubtotals,
120
+ doRowSubtotals
121
+ } = _ref;
121
122
  let row = 0;
122
123
 
123
124
  for (const headerIndex of dimensionLookup.rowHeaders) {
@@ -158,14 +159,16 @@ const lookup = (dataRow, dimensionLookup, {
158
159
  };
159
160
  };
160
161
 
161
- const applyTotalAggregationType = ({
162
- totalAggregationType,
163
- value,
164
- numerator,
165
- denominator,
166
- multiplier,
167
- divisor
168
- }, overrideTotalAggregationType) => {
162
+ const applyTotalAggregationType = (_ref2, overrideTotalAggregationType) => {
163
+ let {
164
+ totalAggregationType,
165
+ value,
166
+ numerator,
167
+ denominator,
168
+ multiplier,
169
+ divisor
170
+ } = _ref2;
171
+
169
172
  switch (overrideTotalAggregationType || totalAggregationType) {
170
173
  case AGGREGATE_TYPE_NA:
171
174
  return 'N/A';
@@ -236,12 +239,13 @@ export class PivotTableEngine {
236
239
  this.buildMatrix();
237
240
  }
238
241
 
239
- getRaw({
240
- row,
241
- column
242
- }) {
242
+ getRaw(_ref3) {
243
243
  var _headers$find, _headers$find2;
244
244
 
245
+ let {
246
+ row,
247
+ column
248
+ } = _ref3;
245
249
  const cellType = this.getRawCellType({
246
250
  row,
247
251
  column
@@ -298,10 +302,11 @@ export class PivotTableEngine {
298
302
  };
299
303
  }
300
304
 
301
- get({
302
- row,
303
- column
304
- }) {
305
+ get(_ref4) {
306
+ let {
307
+ row,
308
+ column
309
+ } = _ref4;
305
310
  const mappedRow = this.rowMap[row],
306
311
  mappedColumn = this.columnMap[column];
307
312
 
@@ -315,10 +320,11 @@ export class PivotTableEngine {
315
320
  });
316
321
  }
317
322
 
318
- getRawCellType({
319
- row,
320
- column
321
- }) {
323
+ getRawCellType(_ref5) {
324
+ let {
325
+ row,
326
+ column
327
+ } = _ref5;
322
328
  const isRowTotal = this.doRowTotals && column === this.dataWidth - 1;
323
329
  const isColumnTotal = this.doColumnTotals && row === this.dataHeight - 1;
324
330
 
@@ -336,10 +342,11 @@ export class PivotTableEngine {
336
342
  return CELL_TYPE_VALUE;
337
343
  }
338
344
 
339
- getCellType({
340
- row,
341
- column
342
- }) {
345
+ getCellType(_ref6) {
346
+ let {
347
+ row,
348
+ column
349
+ } = _ref6;
343
350
  row = this.rowMap[row];
344
351
  column = this.columnMap[column];
345
352
  return this.getRawCellType({
@@ -377,20 +384,23 @@ export class PivotTableEngine {
377
384
  }
378
385
  }
379
386
 
380
- getCellDxDimension({
381
- row,
382
- column
383
- }) {
387
+ getCellDxDimension(_ref7) {
388
+ let {
389
+ row,
390
+ column
391
+ } = _ref7;
384
392
  return this.getRawCellDxDimension({
385
393
  row: this.rowMap[row],
386
394
  column: this.columnMap[column]
387
395
  });
388
396
  }
389
397
 
390
- getRawCellDxDimension({
391
- row,
392
- column
393
- }) {
398
+ getRawCellDxDimension(_ref8) {
399
+ let {
400
+ row,
401
+ column
402
+ } = _ref8;
403
+
394
404
  if (!this.data[row]) {
395
405
  return undefined;
396
406
  }
@@ -502,12 +512,13 @@ export class PivotTableEngine {
502
512
  return this.getRawRowHeader(this.rowMap[row]);
503
513
  }
504
514
 
505
- getDependantTotalCells({
506
- row,
507
- column
508
- }) {
515
+ getDependantTotalCells(_ref9) {
509
516
  var _this$dimensionLookup, _this$dimensionLookup2;
510
517
 
518
+ let {
519
+ row,
520
+ column
521
+ } = _ref9;
511
522
  const rowSubtotalSize = ((_this$dimensionLookup = this.dimensionLookup.columns[0]) === null || _this$dimensionLookup === void 0 ? void 0 : _this$dimensionLookup.size) + 1;
512
523
  const rowSubtotal = rowSubtotalSize && this.doRowSubtotals && {
513
524
  row,
@@ -723,10 +734,12 @@ export class PivotTableEngine {
723
734
  }
724
735
  }
725
736
 
726
- finalizeTotal({
727
- row,
728
- column
729
- }) {
737
+ finalizeTotal(_ref10) {
738
+ let {
739
+ row,
740
+ column
741
+ } = _ref10;
742
+
730
743
  if (!this.data[row]) {
731
744
  return;
732
745
  }
@@ -1,11 +1,12 @@
1
1
  import times from 'lodash/times';
2
- export const clipAxis = ({
3
- position,
4
- size,
5
- step,
6
- totalCount,
7
- headerCount
8
- }) => {
2
+ export const clipAxis = _ref => {
3
+ let {
4
+ position,
5
+ size,
6
+ step,
7
+ totalCount,
8
+ headerCount
9
+ } = _ref;
9
10
  // position: scroll Y position
10
11
  // size: height of table container
11
12
  // step: height of cell in px
@@ -1,12 +1,13 @@
1
- export const clipPartitionedAxis = ({
2
- partitionSize,
3
- partitions,
4
- axisMap,
5
- widthMap,
6
- viewportWidth,
7
- viewportPosition,
8
- totalWidth
9
- }) => {
1
+ export const clipPartitionedAxis = _ref => {
2
+ let {
3
+ partitionSize,
4
+ partitions,
5
+ axisMap,
6
+ widthMap,
7
+ viewportWidth,
8
+ viewportPosition,
9
+ totalWidth
10
+ } = _ref;
10
11
  const partition = Math.floor(viewportPosition / partitionSize);
11
12
 
12
13
  if (partitions[partition] === undefined) {
@@ -8,14 +8,15 @@ const headerStacksAreEqual = (a, b, limit) => {
8
8
  return true;
9
9
  };
10
10
 
11
- export const getHeaderForDisplay = ({
12
- start,
13
- count,
14
- index,
15
- dimensionLevel,
16
- getHeader,
17
- showHierarchy
18
- }) => {
11
+ export const getHeaderForDisplay = _ref => {
12
+ let {
13
+ start,
14
+ count,
15
+ index,
16
+ dimensionLevel,
17
+ getHeader,
18
+ showHierarchy
19
+ } = _ref;
19
20
  const header = getHeader(index);
20
21
  const showHeader = index === start || !headerStacksAreEqual(header, getHeader(index - 1), dimensionLevel);
21
22
 
@@ -11,18 +11,21 @@ const getContext = fontSize => {
11
11
  return ctx;
12
12
  };
13
13
 
14
- const measureText = (text, fontSize = 11) => {
14
+ const measureText = function (text) {
15
+ let fontSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 11;
15
16
  const ctx = getContext(fontSize);
16
17
  const textMetrics = ctx.measureText(text);
17
18
  return textMetrics.width;
18
19
  };
19
20
 
20
- export const measureTextWithWrapping = (text, {
21
- fontSize = 11,
22
- maxWidth = CLIPPED_CELL_MAX_SIZE,
23
- justifyBuffer = WRAPPED_TEXT_JUSTIFY_BUFFER,
24
- lineHeight = WRAPPED_TEXT_LINE_HEIGHT
25
- }) => {
21
+ export const measureTextWithWrapping = (text, _ref) => {
22
+ let {
23
+ fontSize = 11,
24
+ maxWidth = CLIPPED_CELL_MAX_SIZE,
25
+ justifyBuffer = WRAPPED_TEXT_JUSTIFY_BUFFER,
26
+ lineHeight = WRAPPED_TEXT_LINE_HEIGHT
27
+ } = _ref;
28
+
26
29
  if (!text) {
27
30
  return {
28
31
  width: 0,
@@ -4,7 +4,8 @@ const initialState = {
4
4
  width: 0,
5
5
  height: 0
6
6
  };
7
- export const useParentSize = (elementRef, renderCounter, initialSize = initialState) => {
7
+ export const useParentSize = function (elementRef, renderCounter) {
8
+ let initialSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : initialState;
8
9
  const [size, setSize] = useState({
9
10
  width: initialSize.width || 0,
10
11
  height: initialSize.height || 0
@@ -1,6 +1,7 @@
1
1
  import debounce from 'lodash/debounce';
2
2
  import { useState, useCallback, useEffect } from 'react';
3
- export const useScrollPosition = (containerRef, debounceWait = 10) => {
3
+ export const useScrollPosition = function (containerRef) {
4
+ let debounceWait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
4
5
  const [scrollPosition, setScrollPosition] = useState({
5
6
  x: 0,
6
7
  y: 0
@@ -2,12 +2,13 @@ import { useMemo } from 'react';
2
2
  import { clipPartitionedAxis } from './clipPartitionedAxis.js';
3
3
  import { CLIPPED_AXIS_PARTITION_SIZE_PX } from './pivotTableConstants.js';
4
4
  import { useScrollPosition } from './useScrollPosition.js';
5
- export const useTableClipping = ({
6
- containerRef,
7
- width,
8
- height,
9
- engine
10
- }) => {
5
+ export const useTableClipping = _ref => {
6
+ let {
7
+ containerRef,
8
+ width,
9
+ height,
10
+ engine
11
+ } = _ref;
11
12
  const scrollPosition = useScrollPosition(containerRef);
12
13
  const lineHeight = engine.fontSize + engine.cellPadding * 2 + 2;
13
14
  const rows = useMemo(() => {
@@ -21,7 +21,7 @@ export const getFixedDimensions = () => ({
21
21
  },
22
22
  [DIMENSION_ID_ORGUNIT]: {
23
23
  id: DIMENSION_ID_ORGUNIT,
24
- name: i18n.t('Organisation Unit'),
24
+ name: i18n.t('Organisation unit'),
25
25
  iconName: 'OrgUnitIcon',
26
26
  icon: IconDimensionOrgUnit16
27
27
  }
@@ -1,4 +1,7 @@
1
1
  import { getRelativePeriodIds } from '../../components/PeriodDimension/utils/relativePeriods.js';
2
2
  import { ouIdHelper, USER_ORG_UNIT, USER_ORG_UNIT_CHILDREN, USER_ORG_UNIT_GRANDCHILDREN } from '../ouIdHelper/index.js';
3
3
  import { DIMENSION_ID_ASSIGNED_CATEGORIES, DIMENSION_ID_ORGUNIT, DIMENSION_ID_PERIOD } from '../predefinedDimensions.js';
4
- export const hasRelativeItems = (dimension, itemIds = []) => dimension === DIMENSION_ID_ASSIGNED_CATEGORIES || dimension === DIMENSION_ID_ORGUNIT && Array.isArray(itemIds) && itemIds.some(id => ouIdHelper.hasLevelPrefix(id) || ouIdHelper.hasGroupPrefix(id) || [USER_ORG_UNIT, USER_ORG_UNIT_CHILDREN, USER_ORG_UNIT_GRANDCHILDREN].includes(id)) || dimension === DIMENSION_ID_PERIOD && Array.isArray(itemIds) && itemIds.some(id => getRelativePeriodIds().includes(id));
4
+ export const hasRelativeItems = function (dimension) {
5
+ let itemIds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
6
+ return dimension === DIMENSION_ID_ASSIGNED_CATEGORIES || dimension === DIMENSION_ID_ORGUNIT && Array.isArray(itemIds) && itemIds.some(id => ouIdHelper.hasLevelPrefix(id) || ouIdHelper.hasGroupPrefix(id) || [USER_ORG_UNIT, USER_ORG_UNIT_CHILDREN, USER_ORG_UNIT_GRANDCHILDREN].includes(id)) || dimension === DIMENSION_ID_PERIOD && Array.isArray(itemIds) && itemIds.some(id => getRelativePeriodIds().includes(id));
7
+ };
@@ -2,11 +2,12 @@ import getSubtitle from './subtitle/index.js';
2
2
  import getTitle from './title/index.js';
3
3
  import getValue from './value/index.js';
4
4
  export const INDICATOR_FACTOR_100 = 100;
5
- export default function ({
6
- store,
7
- layout,
8
- extraOptions
9
- }) {
5
+ export default function (_ref) {
6
+ let {
7
+ store,
8
+ layout,
9
+ extraOptions
10
+ } = _ref;
10
11
  const data = store.generateData({
11
12
  type: layout.type,
12
13
  seriesId: layout.columns && layout.columns.length ? layout.columns[0].dimension : null,
@@ -212,7 +212,8 @@ function gaussianElimination(a, o) {
212
212
  // correlation = N * Σ(XY) - Σ(X) * Σ (Y) / √ ( N * Σ(X^2) - Σ(X) ) * ( N * Σ(Y^2) - Σ(Y)^2 ) ) )
213
213
 
214
214
 
215
- export function linear(data, decimalPlaces = 2) {
215
+ export function linear(data) {
216
+ let decimalPlaces = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
216
217
  const sum = [0, 0, 0, 0, 0],
217
218
  results = [];
218
219
  let N = data.length;
@@ -271,7 +272,10 @@ export function linear(data, decimalPlaces = 2) {
271
272
  };
272
273
  } // Code extracted from https://github.com/Tom-Alexander/regression-js/
273
274
 
274
- function polynomial(data, order = 2, extrapolate = 0, decimalPlaces = 2) {
275
+ function polynomial(data) {
276
+ let order = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
277
+ let extrapolate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
278
+ let decimalPlaces = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 2;
275
279
  const lhs = [],
276
280
  rhs = [],
277
281
  results = [],
@@ -369,7 +373,8 @@ function polynomial(data, order = 2, extrapolate = 0, decimalPlaces = 2) {
369
373
  // - https://gist.github.com/avibryant/1151823
370
374
 
371
375
 
372
- function loess(data, bandwidth = 0.25) {
376
+ function loess(data) {
377
+ let bandwidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.25;
373
378
  const xval = data.map(pair => {
374
379
  return pair[0];
375
380
  });