@mwater/visualization 5.3.2 → 5.4.1

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 (309) hide show
  1. package/lib/ColorComponent.d.ts +1 -1
  2. package/lib/ColorComponent.js +2 -2
  3. package/lib/CustomColorsContext.d.ts +0 -1
  4. package/lib/DateRangeComponent.js +10 -10
  5. package/lib/LocaleContextInjector.js +2 -2
  6. package/lib/MWaterAddRelatedFormComponent.js +8 -8
  7. package/lib/MWaterAddRelatedIndicatorComponent.d.ts +0 -1
  8. package/lib/MWaterAddRelatedIndicatorComponent.js +6 -6
  9. package/lib/MWaterAssetSystemsListComponent.d.ts +3 -3
  10. package/lib/MWaterAssetSystemsListComponent.js +4 -3
  11. package/lib/MWaterCompleteTableSelectComponent.d.ts +33 -34
  12. package/lib/MWaterCompleteTableSelectComponent.js +39 -38
  13. package/lib/MWaterCustomTablesetListComponent.d.ts +3 -3
  14. package/lib/MWaterCustomTablesetListComponent.js +5 -4
  15. package/lib/MWaterGlobalFiltersComponent.js +4 -4
  16. package/lib/MWaterLoaderComponent.d.ts +5 -5
  17. package/lib/MWaterLoaderComponent.js +1 -1
  18. package/lib/MWaterMetricsTableListComponent.d.ts +3 -3
  19. package/lib/MWaterMetricsTableListComponent.js +4 -3
  20. package/lib/MWaterResponsesFilterComponent.js +4 -4
  21. package/lib/MWaterTableSelectComponent.d.ts +1 -1
  22. package/lib/MWaterTableSelectComponent.js +5 -5
  23. package/lib/PopoverComponent.d.ts +4 -4
  24. package/lib/UIComponents.d.ts +5 -2
  25. package/lib/axes/AxisBuilder.js +42 -43
  26. package/lib/axes/AxisColorEditorComponent.d.ts +4 -4
  27. package/lib/axes/AxisColorEditorComponent.js +25 -60
  28. package/lib/axes/AxisComponent.d.ts +2 -3
  29. package/lib/axes/AxisComponent.js +20 -20
  30. package/lib/axes/BinsComponent.js +6 -6
  31. package/lib/axes/CategoryMapComponent.d.ts +2 -1
  32. package/lib/axes/CategoryMapComponent.js +7 -5
  33. package/lib/axes/ColorPaletteCollectionComponent.js +3 -3
  34. package/lib/axes/RangesComponent.js +12 -12
  35. package/lib/compressJson.js +1 -1
  36. package/lib/dashboards/DashboardComponent.d.ts +2 -0
  37. package/lib/dashboards/DashboardComponent.js +15 -8
  38. package/lib/dashboards/DashboardUtils.js +2 -3
  39. package/lib/dashboards/DashboardViewComponent.js +4 -4
  40. package/lib/dashboards/FontStyleEditor.js +8 -8
  41. package/lib/dashboards/LayoutOptionsComponent.js +101 -74
  42. package/lib/dashboards/SettingsModalComponent.d.ts +3 -4
  43. package/lib/dashboards/SettingsModalComponent.js +54 -40
  44. package/lib/dashboards/WidgetComponent.d.ts +0 -1
  45. package/lib/dashboards/WidgetComponent.js +1 -2
  46. package/lib/dashboards/layoutOptions.js +11 -7
  47. package/lib/datagrids/DatagridComponent.d.ts +1 -8
  48. package/lib/datagrids/DatagridComponent.js +14 -13
  49. package/lib/datagrids/DatagridDesignerComponent.js +18 -18
  50. package/lib/datagrids/DatagridQueryBuilder.d.ts +4 -4
  51. package/lib/datagrids/DatagridUtils.js +2 -2
  52. package/lib/datagrids/DatagridViewComponent.js +4 -4
  53. package/lib/datagrids/ExprCellComponent.js +1 -1
  54. package/lib/datagrids/FindReplaceModalComponent.js +17 -17
  55. package/lib/datagrids/OrderBysDesignerComponent.js +2 -2
  56. package/lib/languages.js +2 -2
  57. package/lib/layouts/DecoratedBlockComponent.js +2 -2
  58. package/lib/layouts/blocks/BlocksDisplayComponent.js +13 -13
  59. package/lib/layouts/blocks/BlocksLayoutManager.d.ts +2 -1
  60. package/lib/layouts/blocks/ClipboardPaletteItemComponent.js +3 -3
  61. package/lib/layouts/blocks/HorizontalBlockComponent.js +3 -3
  62. package/lib/layouts/blocks/blockUtils.js +4 -5
  63. package/lib/mWaterLoader.js +1 -1
  64. package/lib/maps/AddLayerComponent.js +13 -13
  65. package/lib/maps/AdminScopeAndDetailLevelComponent.js +5 -5
  66. package/lib/maps/BaseLayerDesignerComponent.js +2 -2
  67. package/lib/maps/BufferLayer.js +7 -7
  68. package/lib/maps/BufferLayerDesignerComponent.js +8 -8
  69. package/lib/maps/ChoroplethLayer.js +6 -6
  70. package/lib/maps/ChoroplethLayerDesigner.js +16 -16
  71. package/lib/maps/ClusterLayer.js +3 -3
  72. package/lib/maps/ClusterLayerDesignerComponent.js +5 -5
  73. package/lib/maps/DetailLevelSelectComponent.d.ts +11 -1
  74. package/lib/maps/DetailLevelSelectComponent.js +3 -3
  75. package/lib/maps/DirectMapDataSource.js +1 -2
  76. package/lib/maps/EditHoverOver.js +7 -5
  77. package/lib/maps/EditPopupComponent.js +2 -2
  78. package/lib/maps/GridLayer.js +5 -5
  79. package/lib/maps/GridLayerDesigner.js +15 -15
  80. package/lib/maps/LayerSwitcherComponent.js +1 -2
  81. package/lib/maps/LeafletMapComponent.d.ts +1 -1
  82. package/lib/maps/LeafletMapComponent.js +1 -1
  83. package/lib/maps/LegendComponent.js +1 -1
  84. package/lib/maps/MWaterServerLayer.d.ts +0 -1
  85. package/lib/maps/MWaterServerLayer.js +1 -1
  86. package/lib/maps/MapComponent.js +8 -8
  87. package/lib/maps/MapControlComponent.js +1 -1
  88. package/lib/maps/MapDesignerComponent.js +16 -16
  89. package/lib/maps/MapFiltersDesignerComponent.js +2 -2
  90. package/lib/maps/MapLayerViewDesignerComponent.js +8 -8
  91. package/lib/maps/MapUtils.js +6 -7
  92. package/lib/maps/MapViewComponent.js +1 -2
  93. package/lib/maps/MarkerSymbolSelectComponent.js +3 -3
  94. package/lib/maps/MarkersLayer.js +6 -7
  95. package/lib/maps/MarkersLayerDesignerComponent.js +22 -22
  96. package/lib/maps/PopupFilterJoinsEditComponent.js +4 -4
  97. package/lib/maps/PopupFilterJoinsUtils.js +2 -3
  98. package/lib/maps/RasterMapViewComponent.d.ts +3 -3
  99. package/lib/maps/RasterMapViewComponent.js +4 -4
  100. package/lib/maps/RegionSelectComponent.d.ts +1 -3
  101. package/lib/maps/RegionSelectComponent.js +1 -2
  102. package/lib/maps/ScopeAndDetailLevelComponent.js +3 -3
  103. package/lib/maps/TileUrlLayer.d.ts +1 -1
  104. package/lib/maps/TileUrlLayer.js +3 -3
  105. package/lib/maps/VectorMapViewComponent.js +6 -7
  106. package/lib/maps/ZoomLevelsComponent.js +5 -5
  107. package/lib/maps/mapSymbols.d.ts +1 -1
  108. package/lib/maps/mapSymbols.js +51 -50
  109. package/lib/maps/mapboxUtils.js +2 -3
  110. package/lib/maps/maps.d.ts +0 -1
  111. package/lib/maps/vectorMaps.js +14 -15
  112. package/lib/memoizedDebounce.js +1 -2
  113. package/lib/quickfilter/DateExprComponent.d.ts +4 -0
  114. package/lib/quickfilter/DateExprComponent.js +17 -16
  115. package/lib/quickfilter/IdArrayQuickfilterComponent.js +1 -1
  116. package/lib/quickfilter/QuickfilterUtils.js +1 -2
  117. package/lib/quickfilter/QuickfiltersComponent.d.ts +23 -2
  118. package/lib/quickfilter/QuickfiltersComponent.js +2 -2
  119. package/lib/quickfilter/QuickfiltersDesignComponent.js +8 -8
  120. package/lib/quickfilter/TextLiteralComponent.d.ts +35 -2
  121. package/lib/quickfilter/TextLiteralComponent.js +6 -6
  122. package/lib/richtext/DropdownPaletteItem.js +1 -1
  123. package/lib/richtext/ExprItemsHtmlConverter.js +8 -10
  124. package/lib/richtext/FontColorPaletteItem.js +7 -7
  125. package/lib/richtext/ItemsHtmlConverter.js +0 -1
  126. package/lib/richtext/RichTextComponent.d.ts +1 -0
  127. package/lib/richtext/RichTextComponent.js +33 -29
  128. package/lib/valueFormatter.js +18 -19
  129. package/lib/wellknown.js +2 -3
  130. package/lib/widgets/IFrameWidgetComponent.d.ts +9 -1
  131. package/lib/widgets/IFrameWidgetComponent.js +3 -3
  132. package/lib/widgets/ImageUploaderComponent.js +5 -5
  133. package/lib/widgets/ImageWidget.js +2 -2
  134. package/lib/widgets/ImageWidgetComponent.d.ts +9 -1
  135. package/lib/widgets/ImageWidgetComponent.js +20 -20
  136. package/lib/widgets/ImagelistCarouselComponent.js +1 -1
  137. package/lib/widgets/MapWidget.js +2 -2
  138. package/lib/widgets/MarkdownWidget.d.ts +1 -1
  139. package/lib/widgets/MarkdownWidget.js +1 -1
  140. package/lib/widgets/TOCWidget.js +11 -12
  141. package/lib/widgets/WidgetScopesViewComponent.js +1 -1
  142. package/lib/widgets/charts/Chart.js +1 -1
  143. package/lib/widgets/charts/ChartViewComponent.js +9 -9
  144. package/lib/widgets/charts/ChartWidgetComponent.js +4 -4
  145. package/lib/widgets/charts/calendar/CalendarChart.js +4 -4
  146. package/lib/widgets/charts/calendar/CalendarChartDesignerComponent.js +7 -7
  147. package/lib/widgets/charts/calendar/CalendarChartViewComponent.js +3 -3
  148. package/lib/widgets/charts/imagemosaic/ImageMosaicChart.d.ts +18 -5
  149. package/lib/widgets/charts/imagemosaic/ImageMosaicChart.js +3 -4
  150. package/lib/widgets/charts/imagemosaic/ImageMosaicChartDesignerComponent.js +5 -5
  151. package/lib/widgets/charts/imagemosaic/ImageMosaicChartViewComponent.d.ts +5 -19
  152. package/lib/widgets/charts/imagemosaic/ImageMosaicChartViewComponent.js +66 -70
  153. package/lib/widgets/charts/imagemosaic/ImagePopupComponent.js +1 -1
  154. package/lib/widgets/charts/layered/LayeredChart.d.ts +1 -1
  155. package/lib/widgets/charts/layered/LayeredChart.js +9 -9
  156. package/lib/widgets/charts/layered/LayeredChartCompiler.d.ts +8 -8
  157. package/lib/widgets/charts/layered/LayeredChartCompiler.js +17 -17
  158. package/lib/widgets/charts/layered/LayeredChartDesignerComponent.js +33 -33
  159. package/lib/widgets/charts/layered/LayeredChartLayerDesignerComponent.js +16 -16
  160. package/lib/widgets/charts/layered/LayeredChartUtils.js +1 -2
  161. package/lib/widgets/charts/layered/LayeredChartViewComponent.js +4 -4
  162. package/lib/widgets/charts/pivot/IntersectionDesignerComponent.js +18 -17
  163. package/lib/widgets/charts/pivot/PivotChart.d.ts +1 -1
  164. package/lib/widgets/charts/pivot/PivotChart.js +12 -4
  165. package/lib/widgets/charts/pivot/PivotChartDesignerComponent.d.ts +6 -5
  166. package/lib/widgets/charts/pivot/PivotChartDesignerComponent.js +10 -10
  167. package/lib/widgets/charts/pivot/PivotChartLayoutComponent.js +5 -5
  168. package/lib/widgets/charts/pivot/PivotChartQueryBuilder.d.ts +1 -1
  169. package/lib/widgets/charts/pivot/PivotChartQueryBuilder.js +5 -6
  170. package/lib/widgets/charts/pivot/PivotChartUtils.js +11 -12
  171. package/lib/widgets/charts/pivot/PivotChartViewComponent.js +9 -9
  172. package/lib/widgets/charts/pivot/SegmentDesignerComponent.d.ts +36 -30
  173. package/lib/widgets/charts/pivot/SegmentDesignerComponent.js +28 -26
  174. package/lib/widgets/charts/table/OrderingsComponent.js +2 -2
  175. package/lib/widgets/charts/table/TableChart.js +3 -3
  176. package/lib/widgets/charts/table/TableChartDesignerComponent.js +17 -17
  177. package/lib/widgets/charts/table/TableChartViewComponent.js +3 -3
  178. package/lib/widgets/text/ExprInsertModalComponent.d.ts +2 -3
  179. package/lib/widgets/text/ExprInsertModalComponent.js +2 -14
  180. package/lib/widgets/text/ExprItemEditorComponent.js +4 -4
  181. package/lib/widgets/text/ExprUpdateModalComponent.d.ts +2 -3
  182. package/lib/widgets/text/ExprUpdateModalComponent.js +3 -15
  183. package/lib/widgets/text/TextComponent.js +3 -3
  184. package/lib/widgets/text/TextWidget.d.ts +1 -1
  185. package/lib/widgets/text/TextWidgetComponent.js +11 -11
  186. package/lib/widgets/text/TextWidgetDesign.d.ts +2 -1
  187. package/lib/widgets/text/TextWidgetDesign.js +1 -2
  188. package/package.json +3 -3
  189. package/src/ColorComponent.tsx +2 -2
  190. package/src/DateRangeComponent.ts +10 -10
  191. package/src/LocaleContextInjector.tsx +1 -1
  192. package/src/MWaterAddRelatedFormComponent.ts +7 -7
  193. package/src/MWaterAddRelatedIndicatorComponent.ts +5 -5
  194. package/src/MWaterAssetSystemsListComponent.tsx +3 -3
  195. package/src/MWaterCompleteTableSelectComponent.tsx +36 -35
  196. package/src/MWaterCustomTablesetListComponent.tsx +4 -4
  197. package/src/MWaterGlobalFiltersComponent.ts +4 -4
  198. package/src/MWaterLoaderComponent.ts +1 -1
  199. package/src/MWaterMetricsTableListComponent.tsx +3 -3
  200. package/src/MWaterResponsesFilterComponent.ts +6 -6
  201. package/src/MWaterTableSelectComponent.tsx +6 -7
  202. package/src/axes/AxisBuilder.ts +42 -44
  203. package/src/axes/AxisColorEditorComponent.tsx +178 -0
  204. package/src/axes/AxisComponent.ts +20 -20
  205. package/src/axes/BinsComponent.tsx +6 -6
  206. package/src/axes/CategoryMapComponent.ts +10 -10
  207. package/src/axes/ColorPaletteCollectionComponent.tsx +3 -3
  208. package/src/axes/RangesComponent.ts +14 -14
  209. package/src/dashboards/DashboardComponent.tsx +21 -9
  210. package/src/dashboards/DashboardViewComponent.tsx +3 -3
  211. package/src/dashboards/FontStyleEditor.tsx +8 -8
  212. package/src/dashboards/LayoutOptionsComponent.tsx +74 -74
  213. package/src/dashboards/SettingsModalComponent.tsx +134 -107
  214. package/src/dashboards/layoutOptions.tsx +5 -1
  215. package/src/datagrids/DatagridComponent.ts +65 -62
  216. package/src/datagrids/DatagridDesignerComponent.tsx +17 -17
  217. package/src/datagrids/DatagridUtils.ts +2 -2
  218. package/src/datagrids/DatagridViewComponent.ts +3 -3
  219. package/src/datagrids/ExprCellComponent.ts +1 -1
  220. package/src/datagrids/FindReplaceModalComponent.ts +13 -13
  221. package/src/datagrids/OrderBysDesignerComponent.tsx +2 -2
  222. package/src/globals.d.ts +7 -1
  223. package/src/languages.ts +2 -2
  224. package/src/layouts/blocks/BlocksDisplayComponent.tsx +13 -13
  225. package/src/layouts/blocks/BlocksLayoutManager.ts +3 -2
  226. package/src/layouts/blocks/ClipboardPaletteItemComponent.ts +3 -3
  227. package/src/maps/AddLayerComponent.ts +13 -13
  228. package/src/maps/AdminScopeAndDetailLevelComponent.ts +5 -5
  229. package/src/maps/BaseLayerDesignerComponent.ts +8 -8
  230. package/src/maps/BufferLayer.ts +5 -5
  231. package/src/maps/BufferLayerDesignerComponent.ts +8 -8
  232. package/src/maps/ChoroplethLayer.ts +3 -3
  233. package/src/maps/ChoroplethLayerDesigner.tsx +16 -16
  234. package/src/maps/ClusterLayer.ts +3 -3
  235. package/src/maps/ClusterLayerDesignerComponent.ts +5 -5
  236. package/src/maps/DetailLevelSelectComponent.ts +3 -3
  237. package/src/maps/EditHoverOver.tsx +5 -5
  238. package/src/maps/EditPopupComponent.ts +2 -2
  239. package/src/maps/GridLayer.ts +5 -5
  240. package/src/maps/GridLayerDesigner.tsx +15 -16
  241. package/src/maps/MWaterServerLayer.ts +1 -1
  242. package/src/maps/MapComponent.ts +6 -6
  243. package/src/maps/MapControlComponent.ts +1 -1
  244. package/src/maps/MapDesignerComponent.tsx +20 -20
  245. package/src/maps/MapFiltersDesignerComponent.tsx +3 -3
  246. package/src/maps/MapLayerViewDesignerComponent.ts +9 -9
  247. package/src/maps/MarkerSymbolSelectComponent.ts +4 -5
  248. package/src/maps/MarkersLayerDesignerComponent.ts +22 -22
  249. package/src/maps/PopupFilterJoinsEditComponent.ts +4 -4
  250. package/src/maps/RasterMapViewComponent.ts +2 -2
  251. package/src/maps/RegionSelectComponent.ts +1 -2
  252. package/src/maps/ScopeAndDetailLevelComponent.ts +3 -3
  253. package/src/maps/TileUrlLayer.tsx +3 -3
  254. package/src/maps/VectorMapViewComponent.tsx +5 -5
  255. package/src/maps/ZoomLevelsComponent.ts +6 -6
  256. package/src/maps/mapSymbols.ts +49 -49
  257. package/src/maps/vectorMaps.tsx +2 -2
  258. package/src/quickfilter/DateExprComponent.ts +19 -18
  259. package/src/quickfilter/IdArrayQuickfilterComponent.ts +1 -1
  260. package/src/quickfilter/QuickfiltersComponent.ts +1 -1
  261. package/src/quickfilter/QuickfiltersDesignComponent.tsx +9 -9
  262. package/src/quickfilter/TextLiteralComponent.ts +4 -4
  263. package/src/richtext/DropdownPaletteItem.tsx +1 -1
  264. package/src/richtext/ExprItemsHtmlConverter.ts +8 -10
  265. package/src/richtext/ItemsHtmlConverter.ts +0 -1
  266. package/src/richtext/RichTextComponent.tsx +31 -31
  267. package/src/valueFormatter.ts +14 -14
  268. package/src/widgets/IFrameWidgetComponent.ts +3 -3
  269. package/src/widgets/ImageUploaderComponent.tsx +5 -5
  270. package/src/widgets/ImageWidget.ts +2 -2
  271. package/src/widgets/ImageWidgetComponent.ts +26 -26
  272. package/src/widgets/ImagelistCarouselComponent.ts +2 -2
  273. package/src/widgets/MapWidget.ts +1 -1
  274. package/src/widgets/MarkdownWidget.ts +1 -1
  275. package/src/widgets/TOCWidget.ts +13 -14
  276. package/src/widgets/WidgetScopesViewComponent.ts +1 -1
  277. package/src/widgets/charts/Chart.ts +1 -1
  278. package/src/widgets/charts/ChartViewComponent.ts +4 -4
  279. package/src/widgets/charts/ChartWidgetComponent.tsx +3 -3
  280. package/src/widgets/charts/calendar/CalendarChart.ts +4 -4
  281. package/src/widgets/charts/calendar/CalendarChartDesignerComponent.ts +7 -7
  282. package/src/widgets/charts/calendar/CalendarChartViewComponent.tsx +2 -2
  283. package/src/widgets/charts/imagemosaic/ImageMosaicChart.ts +25 -8
  284. package/src/widgets/charts/imagemosaic/ImageMosaicChartDesignerComponent.ts +5 -5
  285. package/src/widgets/charts/imagemosaic/ImageMosaicChartViewComponent.tsx +128 -0
  286. package/src/widgets/charts/layered/LayeredChart.ts +9 -9
  287. package/src/widgets/charts/layered/LayeredChartCompiler.ts +47 -47
  288. package/src/widgets/charts/layered/LayeredChartDesignerComponent.tsx +39 -39
  289. package/src/widgets/charts/layered/LayeredChartLayerDesignerComponent.tsx +18 -19
  290. package/src/widgets/charts/layered/LayeredChartViewComponent.ts +1 -1
  291. package/src/widgets/charts/pivot/IntersectionDesignerComponent.tsx +22 -23
  292. package/src/widgets/charts/pivot/PivotChart.ts +15 -5
  293. package/src/widgets/charts/pivot/PivotChartDesignerComponent.tsx +12 -12
  294. package/src/widgets/charts/pivot/PivotChartLayoutComponent.tsx +5 -5
  295. package/src/widgets/charts/pivot/PivotChartQueryBuilder.ts +7 -8
  296. package/src/widgets/charts/pivot/PivotChartViewComponent.tsx +6 -6
  297. package/src/widgets/charts/pivot/SegmentDesignerComponent.tsx +30 -30
  298. package/src/widgets/charts/table/OrderingsComponent.tsx +2 -2
  299. package/src/widgets/charts/table/TableChart.ts +3 -3
  300. package/src/widgets/charts/table/TableChartDesignerComponent.ts +16 -16
  301. package/src/widgets/charts/table/TableChartViewComponent.ts +2 -2
  302. package/src/widgets/text/{ExprInsertModalComponent.ts → ExprInsertModalComponent.tsx} +18 -20
  303. package/src/widgets/text/ExprItemEditorComponent.tsx +4 -4
  304. package/src/widgets/text/{ExprUpdateModalComponent.ts → ExprUpdateModalComponent.tsx} +18 -20
  305. package/src/widgets/text/TextComponent.tsx +2 -2
  306. package/src/widgets/text/TextWidgetComponent.tsx +10 -10
  307. package/src/widgets/text/TextWidgetDesign.ts +3 -1
  308. package/src/axes/AxisColorEditorComponent.ts +0 -210
  309. package/src/widgets/charts/imagemosaic/ImageMosaicChartViewComponent.ts +0 -117
@@ -121,7 +121,7 @@ export default class LayeredChartDesignerComponent extends React.Component<Layer
121
121
  return R(
122
122
  "div",
123
123
  null,
124
- R("div", { className: "form-text text-muted" }, "To edit title of chart, click on it directly"),
124
+ R("div", { className: "form-text text-muted" }, T`To edit title of chart, click on it directly`),
125
125
  this.areAxesLabelsNeeded()
126
126
  ? R(
127
127
  "div",
@@ -132,13 +132,13 @@ export default class LayeredChartDesignerComponent extends React.Component<Layer
132
132
  R(
133
133
  "label",
134
134
  { className: "text-muted" },
135
- this.props.design.transpose ? "Vertical Axis Label" : "Horizontal Axis Label"
135
+ this.props.design.transpose ? T`Vertical Axis Label` : T`Horizontal Axis Label`
136
136
  ),
137
137
  " ",
138
138
  R(
139
139
  "button",
140
140
  { className: "btn btn-secondary btn-sm", onClick: this.handleToggleXAxisLabelClick },
141
- this.props.design.xAxisLabelText != null ? "Hide" : "Show"
141
+ this.props.design.xAxisLabelText != null ? T`Hide` : T`Show`
142
142
  )
143
143
  ),
144
144
  this.props.design.xAxisLabelText != null
@@ -162,13 +162,13 @@ export default class LayeredChartDesignerComponent extends React.Component<Layer
162
162
  R(
163
163
  "label",
164
164
  { className: "text-muted" },
165
- !this.props.design.transpose ? "Vertical Axis Label" : "Horizontal Axis Label"
165
+ !this.props.design.transpose ? T`Vertical Axis Label` : T`Horizontal Axis Label`
166
166
  ),
167
167
  " ",
168
168
  R(
169
169
  "button",
170
170
  { className: "btn btn-secondary btn-sm", onClick: this.handleToggleYAxisLabelClick },
171
- this.props.design.yAxisLabelText != null ? "Hide" : "Show"
171
+ this.props.design.yAxisLabelText != null ? T`Hide` : T`Show`
172
172
  )
173
173
  ),
174
174
  this.props.design.yAxisLabelText != null
@@ -189,10 +189,10 @@ export default class LayeredChartDesignerComponent extends React.Component<Layer
189
189
  return (
190
190
  <div>
191
191
  <Checkbox key="hideLegend" value={this.props.design.hideLegend} onChange={this.handleHideLegendChange}>
192
- Hide legend
192
+ {T`Hide legend`}
193
193
  </Checkbox>
194
194
  <Checkbox key="xAxisTickMultiline" value={this.props.design.xAxisTickMultiline ?? true} onChange={this.handleXAxisTickMultilineChange}>
195
- Multiline X-Axis Labels
195
+ {T`Multiline X-Axis Labels`}
196
196
  </Checkbox>
197
197
  </div>
198
198
  )
@@ -200,26 +200,26 @@ export default class LayeredChartDesignerComponent extends React.Component<Layer
200
200
 
201
201
  renderType() {
202
202
  const chartTypes = [
203
- { id: "bar", name: "Bar", desc: "Best for most charts" },
204
- { id: "pie", name: "Pie", desc: "Compare ratios of one variable" },
205
- { id: "donut", name: "Donut", desc: "Pie chart with center removed" },
206
- { id: "line", name: "Line", desc: "Show how data changes smoothly over time" },
207
- { id: "spline", name: "Smoothed Line", desc: "For noisy data over time" },
208
- { id: "scatter", name: "Scatter", desc: "Show correlation between two number variables" },
209
- { id: "area", name: "Area", desc: "For cumulative data over time" }
203
+ { id: "bar", name: T`Bar`, desc: T`Best for most charts` },
204
+ { id: "pie", name: T`Pie`, desc: T`Compare ratios of one variable` },
205
+ { id: "donut", name: T`Donut`, desc: T`Pie chart with center removed` },
206
+ { id: "line", name: T`Line`, desc: T`Show how data changes smoothly over time` },
207
+ { id: "spline", name: T`Smoothed Line`, desc: T`For noisy data over time` },
208
+ { id: "scatter", name: T`Scatter`, desc: T`Show correlation between two number variables` },
209
+ { id: "area", name: T`Area`, desc: T`For cumulative data over time` }
210
210
  ]
211
211
 
212
212
  const current = _.findWhere(chartTypes, { id: this.props.design.type })
213
213
 
214
214
  return R(
215
215
  uiComponents.SectionComponent,
216
- { icon: "glyphicon-th", label: "Chart Type" },
216
+ { icon: "glyphicon-th", label: T`Chart Type` },
217
217
  R(uiComponents.ToggleEditComponent, {
218
218
  forceOpen: !this.props.design.type,
219
219
  label: current ? current.name : "",
220
220
  editor: (onClose: any) => {
221
221
  return R(uiComponents.OptionListComponent, {
222
- hint: "Select a Chart Type",
222
+ hint: T`Select a Chart Type`,
223
223
  items: _.map(chartTypes, ct => ({
224
224
  name: ct.name,
225
225
  desc: ct.desc,
@@ -270,7 +270,7 @@ export default class LayeredChartDesignerComponent extends React.Component<Layer
270
270
  "button",
271
271
  { className: "btn btn-link", type: "button", onClick: this.handleAddLayer },
272
272
  R("span", { className: "fas fa-plus" }),
273
- " Add Another Series"
273
+ T` Add Another Series`
274
274
  )
275
275
  : undefined
276
276
  )
@@ -296,21 +296,21 @@ export default class LayeredChartDesignerComponent extends React.Component<Layer
296
296
  { className: "text-muted" },
297
297
  canTranspose ? (
298
298
  <Checkbox inline key="transpose" value={design.transpose} onChange={this.handleTransposeChange}>
299
- Horizontal
299
+ {T`Horizontal`}
300
300
  </Checkbox>
301
301
  ) : undefined,
302
302
  canStack ? (
303
303
  <Checkbox inline key="stacked" value={design.stacked} onChange={this.handleStackedChange}>
304
- Stacked
304
+ {T`Stacked`}
305
305
  </Checkbox>
306
306
  ) : undefined,
307
307
  canStack ? (
308
308
  <Checkbox inline key="proportional" value={design.proportional} onChange={this.handleProportionalChange}>
309
- Proportional
309
+ {T`Proportional`}
310
310
  </Checkbox>
311
311
  ) : undefined,
312
312
  <Checkbox inline key="labels" value={design.labels || false} onChange={this.handleLabelsChange}>
313
- Show Values
313
+ {T`Show Values`}
314
314
  </Checkbox>,
315
315
  ["pie", "donut"].includes(design.type)
316
316
  ? [
@@ -319,16 +319,16 @@ export default class LayeredChartDesignerComponent extends React.Component<Layer
319
319
  inline
320
320
  value={design.hidePercentage}
321
321
  onChange={this.handlePercentageVisibilityChange}>
322
- Hide Percentage
322
+ {T`Hide Percentage`}
323
323
  </Checkbox>,
324
324
  <Select
325
325
  size="sm"
326
326
  value={design.polarOrder ?? "desc"}
327
327
  onChange={this.handlePolarOrderChange}
328
328
  options={[
329
- { value: "desc", label: "Descending Order" },
330
- { value: "asc", label: "Ascending Order" },
331
- { value: "natural", label: "Natural Order" }
329
+ { value: "desc", label: T`Descending Order` },
330
+ { value: "asc", label: T`Ascending Order` },
331
+ { value: "natural", label: T`Natural Order` }
332
332
  ]}
333
333
  inline
334
334
  />
@@ -343,7 +343,7 @@ export default class LayeredChartDesignerComponent extends React.Component<Layer
343
343
  key="labels"
344
344
  value={design.popoutSmallValues || false}
345
345
  onChange={this.handleLabelsPopoutChange}>
346
- Show Popout labels for small values
346
+ {T`Show Popout labels for small values`}
347
347
  </Checkbox>
348
348
  )
349
349
  : undefined
@@ -355,7 +355,7 @@ export default class LayeredChartDesignerComponent extends React.Component<Layer
355
355
  if (this.props.design.type && !["pie", "donut"].includes(this.props.design.type)) {
356
356
  return R(
357
357
  uiComponents.SectionComponent,
358
- { label: "Y Threshold Lines" },
358
+ { label: T`Y Threshold Lines` },
359
359
  R(ThresholdsComponent, {
360
360
  thresholds: this.props.design.yThresholds,
361
361
  onThresholdsChange: this.handleYThresholdsChange,
@@ -371,30 +371,30 @@ export default class LayeredChartDesignerComponent extends React.Component<Layer
371
371
  if (this.props.design.type && !["pie", "donut"].includes(this.props.design.type)) {
372
372
  return R(
373
373
  uiComponents.SectionComponent,
374
- { label: "Y Axis Range" },
374
+ { label: T`Y Axis Range` },
375
375
  R(
376
376
  LabeledInlineComponent,
377
- { key: "min", label: "Min:" },
377
+ { key: "min", label: T`Min:` },
378
378
  R(ui.NumberInput, {
379
379
  decimal: true,
380
380
  style: { display: "inline-block" },
381
381
  size: "sm",
382
382
  value: this.props.design.yMin,
383
383
  onChange: this.handleYMinChange,
384
- placeholder: "Auto"
384
+ placeholder: T`Auto`
385
385
  })
386
386
  ),
387
387
  " ",
388
388
  R(
389
389
  LabeledInlineComponent,
390
- { key: "label", label: "Max:" },
390
+ { key: "label", label: T`Max:` },
391
391
  R(ui.NumberInput, {
392
392
  decimal: true,
393
393
  style: { display: "inline-block" },
394
394
  size: "sm",
395
395
  value: this.props.design.yMax,
396
396
  onChange: this.handleYMaxChange,
397
- placeholder: "Auto"
397
+ placeholder: T`Auto`
398
398
  })
399
399
  )
400
400
  )
@@ -407,7 +407,7 @@ export default class LayeredChartDesignerComponent extends React.Component<Layer
407
407
 
408
408
  tabs.push({
409
409
  id: "design",
410
- label: "Design",
410
+ label: T`Design`,
411
411
  elem: R(
412
412
  "div",
413
413
  { style: { paddingBottom: 200 } },
@@ -422,14 +422,14 @@ export default class LayeredChartDesignerComponent extends React.Component<Layer
422
422
  if (this.props.design.type) {
423
423
  tabs.push({
424
424
  id: "labels",
425
- label: "Labels",
425
+ label: T`Labels`,
426
426
  elem: R("div", null, R("br"), this.renderLabels())
427
427
  })
428
428
  }
429
429
 
430
430
  tabs.push({
431
431
  id: "options",
432
- label: "Options",
432
+ label: T`Options`,
433
433
  elem: R("div", null, R("br"), this.renderChartOptions())
434
434
  })
435
435
 
@@ -481,7 +481,7 @@ class ThresholdsComponent extends React.Component<{
481
481
  "button",
482
482
  { type: "button", className: "btn btn-sm btn-link", onClick: this.handleAdd },
483
483
  R("i", { className: "fa fa-plus" }),
484
- " Add Y Threshold"
484
+ T` Add Y Threshold`
485
485
  )
486
486
  )
487
487
  }
@@ -499,7 +499,7 @@ class ThresholdComponent extends React.Component<{
499
499
  null,
500
500
  R(
501
501
  LabeledInlineComponent,
502
- { key: "value", label: "Value:" },
502
+ { key: "value", label: T`Value:` },
503
503
  R(ui.NumberInput, {
504
504
  decimal: true,
505
505
  style: { display: "inline-block" },
@@ -511,7 +511,7 @@ class ThresholdComponent extends React.Component<{
511
511
  " ",
512
512
  R(
513
513
  LabeledInlineComponent,
514
- { key: "label", label: "Label:" },
514
+ { key: "label", label: T`Label:` },
515
515
  R(ui.TextInput, {
516
516
  style: { display: "inline-block", width: "8em" },
517
517
  size: "sm",
@@ -523,7 +523,7 @@ class ThresholdComponent extends React.Component<{
523
523
  this.props.showHighlightColor
524
524
  ? R(
525
525
  LabeledInlineComponent,
526
- { key: "color", label: "Highlight color:" },
526
+ { key: "color", label: T`Highlight color:` },
527
527
  R(
528
528
  "div",
529
529
  { style: { verticalAlign: "middle", display: "inline-block" } },
@@ -51,29 +51,29 @@ export default class LayeredChartLayerDesignerComponent extends React.Component<
51
51
  // Determine icon/label for color axis
52
52
  getXAxisLabel(layer: any) {
53
53
  if (this.props.design.transpose) {
54
- return this.getAxisLabel("resize-vertical", "Vertical Axis")
54
+ return this.getAxisLabel("resize-vertical", T`Vertical Axis`)
55
55
  } else {
56
- return this.getAxisLabel("resize-horizontal", "Horizontal Axis")
56
+ return this.getAxisLabel("resize-horizontal", T`Horizontal Axis`)
57
57
  }
58
58
  }
59
59
 
60
60
  // Determine icon/label for color axis
61
61
  getYAxisLabel(layer: any) {
62
62
  if (this.isLayerPolar(layer)) {
63
- return this.getAxisLabel("repeat", "Angle Axis")
63
+ return this.getAxisLabel("repeat", T`Angle Axis`)
64
64
  } else if (this.props.design.transpose) {
65
- return this.getAxisLabel("resize-horizontal", "Horizontal Axis")
65
+ return this.getAxisLabel("resize-horizontal", T`Horizontal Axis`)
66
66
  } else {
67
- return this.getAxisLabel("resize-vertical", "Vertical Axis")
67
+ return this.getAxisLabel("resize-vertical", T`Vertical Axis`)
68
68
  }
69
69
  }
70
70
 
71
71
  // Determine icon/label for color axis
72
72
  getColorAxisLabel(layer: any) {
73
73
  if (this.isLayerPolar(layer)) {
74
- return this.getAxisLabel("text-color", "Label Axis")
74
+ return this.getAxisLabel("text-color", T`Label Axis`)
75
75
  } else {
76
- return this.getAxisLabel("equalizer", "Split Axis")
76
+ return this.getAxisLabel("equalizer", T`Split Axis`)
77
77
  }
78
78
  }
79
79
 
@@ -149,7 +149,7 @@ export default class LayeredChartLayerDesignerComponent extends React.Component<
149
149
 
150
150
  // R 'div', className: "form-group",
151
151
  // R 'label', className: "text-muted", "Series Name"
152
- const placeholder = this.props.design.layers.length === 1 ? "Value" : `Series ${this.props.index + 1}`
152
+ const placeholder = this.props.design.layers.length === 1 ? T`Value` : T`Series ${this.props.index + 1}`
153
153
  return R("input", {
154
154
  type: "text",
155
155
  className: "form-control form-control-sm",
@@ -175,7 +175,7 @@ export default class LayeredChartLayerDesignerComponent extends React.Component<
175
175
 
176
176
  return R(
177
177
  uiComponents.SectionComponent,
178
- { icon: "fa-database", label: "Data Source" },
178
+ { icon: "fa-database", label: T`Data Source` },
179
179
  R(TableSelectComponent, {
180
180
  schema: this.props.schema,
181
181
  value: layer.table,
@@ -239,8 +239,8 @@ export default class LayeredChartLayerDesignerComponent extends React.Component<
239
239
  value: layer.xAxisOnlyValuesPresent,
240
240
  onChange: this.handlexAxisOnlyValuesPresentChange
241
241
  },
242
- "Only show values actually present ",
243
- R(PopoverHelpComponent, { placement: 'bottom' }, "Limits values to those that are present in the data, as opposed to all choices or all dates within range")
242
+ T`Only show values actually present `,
243
+ R(PopoverHelpComponent, { placement: 'bottom' }, T`Limits values to those that are present in the data, as opposed to all choices or all dates within range`)
244
244
  ) : null,
245
245
  <br/>
246
246
  ]
@@ -325,7 +325,7 @@ export default class LayeredChartLayerDesignerComponent extends React.Component<
325
325
  "div",
326
326
  { key: "cumulative" },
327
327
  <Checkbox inline value={layer.cumulative} onChange={this.handleCumulativeChange}>
328
- Cumulative
328
+ {T`Cumulative`}
329
329
  </Checkbox>
330
330
  )
331
331
  }
@@ -343,7 +343,7 @@ export default class LayeredChartLayerDesignerComponent extends React.Component<
343
343
  "div",
344
344
  { key: "trendline" },
345
345
  <Checkbox value={layer.trendline === "linear"} onChange={this.handleTrendlineChange}>
346
- Show linear trendline
346
+ {T`Show linear trendline`}
347
347
  </Checkbox>
348
348
  )
349
349
  }
@@ -359,7 +359,7 @@ export default class LayeredChartLayerDesignerComponent extends React.Component<
359
359
  "div",
360
360
  { key: "stacked" },
361
361
  <Checkbox value={stacked} onChange={this.handleStackedChange}>
362
- Stacked
362
+ {T`Stacked`}
363
363
  </Checkbox>
364
364
  )
365
365
  }
@@ -380,14 +380,14 @@ export default class LayeredChartLayerDesignerComponent extends React.Component<
380
380
  return R(
381
381
  "div",
382
382
  { className: "mb-3" },
383
- R("label", { className: "text-muted" }, layer.axes.color ? "Default Color" : "Color"),
383
+ R("label", { className: "text-muted" }, layer.axes.color ? T`Default Color` : T`Color`),
384
384
  R(
385
385
  "div",
386
386
  { style: { marginLeft: 8 } },
387
387
  R(ColorComponent, { color: layer.color, onChange: this.handleColorChange }),
388
388
  // Allow toggling of colors
389
389
  layer.axes.x && categoricalX && !layer.axes.color
390
- ? R(ui.Checkbox, { value: layer.xColorMap, onChange: this.handleXColorMapChange }, "Set Individual Colors")
390
+ ? R(ui.Checkbox, { value: layer.xColorMap, onChange: this.handleXColorMapChange }, T`Set Individual Colors`)
391
391
  : undefined
392
392
  )
393
393
  )
@@ -397,14 +397,13 @@ export default class LayeredChartLayerDesignerComponent extends React.Component<
397
397
  const layer = this.props.design.layers[this.props.index]
398
398
 
399
399
  // If no table, hide
400
- if (!layer.table) {
401
- return null
400
+ if (!layer.table) { return null
402
401
  }
403
402
 
404
403
  return R(
405
404
  "div",
406
405
  { className: "mb-3" },
407
- R("label", { className: "text-muted" }, R("span", { className: "fas fa-filter" }), " ", "Filters"),
406
+ R("label", { className: "text-muted" }, R("span", { className: "fas fa-filter" }), " ", T`Filters`),
408
407
  R(
409
408
  "div",
410
409
  { style: { marginLeft: 8 } },
@@ -9,7 +9,7 @@ import * as d3 from "d3"
9
9
  import { LayeredChartDesign } from "./LayeredChartDesign"
10
10
  import c3 from "billboard.js"
11
11
  import { WidgetScope } from "../../../WidgetScope"
12
- import { LocaleContext } from "@mwater/expressions-ui/lib/contexts"
12
+ import { LocaleContext } from "@mwater/expressions-ui"
13
13
  import { isEmptyTextWidgetDesign } from "../../text/TextWidgetDesign"
14
14
 
15
15
  export interface LayeredChartViewComponentProps {
@@ -62,8 +62,8 @@ export default function IntersectionDesignerComponent(props: IntersectionDesigne
62
62
  return (
63
63
  <ui.FormGroup
64
64
  labelMuted={true}
65
- label="Calculation"
66
- help="This is the calculated value that is displayed. Leave as blank to make an empty section"
65
+ label={T`Calculation`}
66
+ help={T`This is the calculated value that is displayed. Leave as blank to make an empty section`}
67
67
  >
68
68
  <AxisComponent
69
69
  schema={props.schema}
@@ -85,13 +85,13 @@ export default function IntersectionDesignerComponent(props: IntersectionDesigne
85
85
  return (
86
86
  <ui.FormGroup
87
87
  labelMuted={true}
88
- label="Show Empty Cells as"
88
+ label={T`Show Empty Cells as`}
89
89
  >
90
90
  <ui.TextInput
91
91
  value={props.intersection.valueAxis.nullLabel ?? null}
92
92
  emptyNull={true}
93
93
  onChange={nullLabel => props.onChange({ ...props.intersection, valueAxis: { ...props.intersection.valueAxis!, nullLabel: nullLabel ?? undefined } })}
94
- placeholder="Blank"
94
+ placeholder={T`Blank`}
95
95
  />
96
96
  </ui.FormGroup>
97
97
  )
@@ -103,7 +103,7 @@ export default function IntersectionDesignerComponent(props: IntersectionDesigne
103
103
  return (
104
104
  <ui.FormGroup
105
105
  labelMuted={true}
106
- label={<><ui.Icon id="glyphicon-filter" /> Filters</>}
106
+ label={<><ui.Icon id="glyphicon-filter" /> {T`Filters`}</>}
107
107
  >
108
108
  <FilterExprComponent
109
109
  schema={props.schema}
@@ -121,7 +121,7 @@ export default function IntersectionDesignerComponent(props: IntersectionDesigne
121
121
  <ui.FormGroup
122
122
  labelMuted={true}
123
123
  key="styling"
124
- label="Styling"
124
+ label={T`Styling`}
125
125
  >
126
126
  <ui.Checkbox
127
127
  key="bold"
@@ -129,7 +129,7 @@ export default function IntersectionDesignerComponent(props: IntersectionDesigne
129
129
  value={props.intersection.bold}
130
130
  onChange={bold => props.onChange({ ...props.intersection, bold })}
131
131
  >
132
- Bold
132
+ {T`Bold`}
133
133
  </ui.Checkbox>
134
134
  <ui.Checkbox
135
135
  key="italic"
@@ -137,7 +137,7 @@ export default function IntersectionDesignerComponent(props: IntersectionDesigne
137
137
  value={props.intersection.italic}
138
138
  onChange={italic => props.onChange({ ...props.intersection, italic })}
139
139
  >
140
- Italic
140
+ {T`Italic`}
141
141
  </ui.Checkbox>
142
142
  </ui.FormGroup>
143
143
  )
@@ -159,8 +159,8 @@ export default function IntersectionDesignerComponent(props: IntersectionDesigne
159
159
  return (
160
160
  <ui.FormGroup
161
161
  labelMuted={true}
162
- label="Background Color From Values"
163
- help="This is an optional background color to set on cells that is controlled by the data"
162
+ label={T`Background Color From Values`}
163
+ help={T`This is an optional background color to set on cells that is controlled by the data`}
164
164
  >
165
165
  <AxisComponent
166
166
  schema={props.schema}
@@ -185,8 +185,8 @@ export default function IntersectionDesignerComponent(props: IntersectionDesigne
185
185
  return (
186
186
  <ui.FormGroup
187
187
  labelMuted={true}
188
- label="Background Color"
189
- help="This is an optional background color to set on all cells"
188
+ label={T`Background Color`}
189
+ help={T`This is an optional background color to set on all cells`}
190
190
  >
191
191
  <ColorComponent
192
192
  color={props.intersection.backgroundColor}
@@ -208,7 +208,7 @@ export default function IntersectionDesignerComponent(props: IntersectionDesigne
208
208
  return (
209
209
  <ui.FormGroup
210
210
  labelMuted={true}
211
- label={`Background Opacity: ${Math.round((props.intersection.backgroundColorOpacity ?? 1) * 100)}%`}
211
+ label={T`Background Opacity: ${Math.round((props.intersection.backgroundColorOpacity ?? 1) * 100)}%`}
212
212
  >
213
213
  <Rcslider
214
214
  min={0}
@@ -271,7 +271,7 @@ export default function IntersectionDesignerComponent(props: IntersectionDesigne
271
271
  return (
272
272
  <ui.FormGroup
273
273
  labelMuted={true}
274
- label="Fields to disaggregate data by (required)"
274
+ label={T`Fields to disaggregate data by (required)`}
275
275
  >
276
276
  {intersectingSegments.map(segment => renderSegmentValueAxisOverride(segment))}
277
277
  </ui.FormGroup>
@@ -281,8 +281,8 @@ export default function IntersectionDesignerComponent(props: IntersectionDesigne
281
281
  const renderOverrideTable = () => {
282
282
  return (
283
283
  <ui.CollapsibleSection
284
- label="Advanced: Override Data Source"
285
- hint="Use a different data source for this cell"
284
+ label={T`Advanced: Override Data Source`}
285
+ hint={T`Use a different data source for this cell`}
286
286
  labelMuted={true}
287
287
  initiallyOpen={props.intersection.tableOverride != null}
288
288
  >
@@ -332,9 +332,9 @@ class BackgroundColorConditionsComponent extends React.Component<BackgroundColor
332
332
  // List conditions
333
333
  return (
334
334
  <ui.FormGroup
335
- label="Color Conditions"
335
+ label={T`Color Conditions`}
336
336
  labelMuted={true}
337
- help="Add conditions that, if met, set the color of the cell. Useful for flagging certain values"
337
+ help={T`Add conditions that, if met, set the color of the cell. Useful for flagging certain values`}
338
338
  >
339
339
  <ListEditorComponent<{ condition?: Expr, color?: string }>
340
340
  items={this.props.colorConditions || []}
@@ -358,7 +358,7 @@ class BackgroundColorConditionsComponent extends React.Component<BackgroundColor
358
358
  onClick={this.handleAdd}
359
359
  >
360
360
  <ui.Icon id="fa-plus" />
361
- Add Condition
361
+ {T`Add Condition`}
362
362
  </ui.Button>
363
363
  </ui.FormGroup>
364
364
  )
@@ -392,7 +392,7 @@ class BackgroundColorConditionComponent extends React.Component<BackgroundColorC
392
392
  <div>
393
393
  <ui.FormGroup
394
394
  labelMuted={true}
395
- label="Condition"
395
+ label={T`Condition`}
396
396
  >
397
397
  <ExprComponent
398
398
  schema={this.props.schema}
@@ -407,8 +407,8 @@ class BackgroundColorConditionComponent extends React.Component<BackgroundColorC
407
407
 
408
408
  <ui.FormGroup
409
409
  labelMuted={true}
410
- label="Color"
411
- hint="Color to display when condition is met"
410
+ label={T`Color`}
411
+ hint={T`Color to display when condition is met`}
412
412
  >
413
413
  <ColorComponent
414
414
  color={this.props.colorCondition.color}
@@ -419,4 +419,3 @@ class BackgroundColorConditionComponent extends React.Component<BackgroundColorC
419
419
  )
420
420
  }
421
421
  }
422
-
@@ -205,17 +205,17 @@ export default class PivotChart extends Chart {
205
205
 
206
206
  // Check that has table
207
207
  if (!design.table || !schema.getTable(design.table)) {
208
- return "Missing data source"
208
+ return T`Missing data source`
209
209
  }
210
210
 
211
211
  // Check that has rows
212
212
  if (design.rows.length === 0) {
213
- return "Missing rows"
213
+ return T`Missing rows`
214
214
  }
215
215
 
216
216
  // Check that has columns
217
217
  if (design.columns.length === 0) {
218
- return "Missing columns"
218
+ return T`Missing columns`
219
219
  }
220
220
 
221
221
  let error = null
@@ -265,7 +265,7 @@ export default class PivotChart extends Chart {
265
265
 
266
266
  // Label for the edit gear dropdown
267
267
  getEditLabel() {
268
- return "Configure Table"
268
+ return T`Configure Table`
269
269
  }
270
270
 
271
271
  // Creates a design element with specified options
@@ -397,14 +397,24 @@ export default class PivotChart extends Chart {
397
397
  }
398
398
 
399
399
  // Get a list of table ids that can be filtered on
400
- getFilterableTables(design: any, schema: Schema) {
400
+ getFilterableTables(design: PivotChartDesign, schema: Schema) {
401
401
  let filterableTables = design.table ? [design.table] : []
402
402
 
403
+ // Add any table overrides from intersections
404
+ for (const intersection of Object.values(design.intersections)) {
405
+ if (intersection.tableOverride) {
406
+ filterableTables.push(intersection.tableOverride)
407
+ }
408
+ }
409
+
403
410
  // Get filterable tables from header and footer
404
411
  const textWidget = new TextWidget()
405
412
  filterableTables = _.union(filterableTables, textWidget.getFilterableTables(design.header, schema))
406
413
  filterableTables = _.union(filterableTables, textWidget.getFilterableTables(design.footer, schema))
407
414
 
415
+ // Remove duplicates
416
+ filterableTables = _.uniq(filterableTables)
417
+
408
418
  return filterableTables
409
419
  }
410
420