@mwater/visualization 5.3.2 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ColorComponent.d.ts +1 -1
- package/lib/ColorComponent.js +2 -2
- package/lib/CustomColorsContext.d.ts +0 -1
- package/lib/DateRangeComponent.js +10 -10
- package/lib/LocaleContextInjector.js +2 -2
- package/lib/MWaterAddRelatedFormComponent.js +8 -8
- package/lib/MWaterAddRelatedIndicatorComponent.d.ts +0 -1
- package/lib/MWaterAddRelatedIndicatorComponent.js +6 -6
- package/lib/MWaterAssetSystemsListComponent.d.ts +3 -3
- package/lib/MWaterAssetSystemsListComponent.js +4 -3
- package/lib/MWaterCompleteTableSelectComponent.d.ts +33 -34
- package/lib/MWaterCompleteTableSelectComponent.js +39 -38
- package/lib/MWaterCustomTablesetListComponent.d.ts +3 -3
- package/lib/MWaterCustomTablesetListComponent.js +5 -4
- package/lib/MWaterGlobalFiltersComponent.js +4 -4
- package/lib/MWaterLoaderComponent.d.ts +5 -5
- package/lib/MWaterLoaderComponent.js +1 -1
- package/lib/MWaterMetricsTableListComponent.d.ts +3 -3
- package/lib/MWaterMetricsTableListComponent.js +4 -3
- package/lib/MWaterResponsesFilterComponent.js +4 -4
- package/lib/MWaterTableSelectComponent.d.ts +1 -1
- package/lib/MWaterTableSelectComponent.js +5 -5
- package/lib/PopoverComponent.d.ts +4 -4
- package/lib/UIComponents.d.ts +5 -2
- package/lib/axes/AxisBuilder.js +42 -43
- package/lib/axes/AxisColorEditorComponent.d.ts +4 -4
- package/lib/axes/AxisColorEditorComponent.js +25 -60
- package/lib/axes/AxisComponent.d.ts +2 -3
- package/lib/axes/AxisComponent.js +20 -20
- package/lib/axes/BinsComponent.js +6 -6
- package/lib/axes/CategoryMapComponent.d.ts +2 -1
- package/lib/axes/CategoryMapComponent.js +7 -5
- package/lib/axes/ColorPaletteCollectionComponent.js +3 -3
- package/lib/axes/RangesComponent.js +12 -12
- package/lib/compressJson.js +1 -1
- package/lib/dashboards/DashboardComponent.d.ts +2 -0
- package/lib/dashboards/DashboardComponent.js +15 -8
- package/lib/dashboards/DashboardUtils.js +2 -3
- package/lib/dashboards/DashboardViewComponent.js +4 -4
- package/lib/dashboards/FontStyleEditor.js +8 -8
- package/lib/dashboards/LayoutOptionsComponent.js +101 -74
- package/lib/dashboards/SettingsModalComponent.d.ts +3 -4
- package/lib/dashboards/SettingsModalComponent.js +54 -40
- package/lib/dashboards/WidgetComponent.d.ts +0 -1
- package/lib/dashboards/WidgetComponent.js +1 -2
- package/lib/dashboards/layoutOptions.js +11 -7
- package/lib/datagrids/DatagridComponent.d.ts +1 -8
- package/lib/datagrids/DatagridComponent.js +14 -13
- package/lib/datagrids/DatagridDesignerComponent.js +18 -18
- package/lib/datagrids/DatagridQueryBuilder.d.ts +4 -4
- package/lib/datagrids/DatagridUtils.js +2 -2
- package/lib/datagrids/DatagridViewComponent.js +4 -4
- package/lib/datagrids/ExprCellComponent.js +1 -1
- package/lib/datagrids/FindReplaceModalComponent.js +17 -17
- package/lib/datagrids/OrderBysDesignerComponent.js +2 -2
- package/lib/languages.js +2 -2
- package/lib/layouts/DecoratedBlockComponent.js +2 -2
- package/lib/layouts/blocks/BlocksDisplayComponent.js +13 -13
- package/lib/layouts/blocks/BlocksLayoutManager.d.ts +2 -1
- package/lib/layouts/blocks/ClipboardPaletteItemComponent.js +3 -3
- package/lib/layouts/blocks/HorizontalBlockComponent.js +3 -3
- package/lib/layouts/blocks/blockUtils.js +4 -5
- package/lib/mWaterLoader.js +1 -1
- package/lib/maps/AddLayerComponent.js +13 -13
- package/lib/maps/AdminScopeAndDetailLevelComponent.js +5 -5
- package/lib/maps/BaseLayerDesignerComponent.js +2 -2
- package/lib/maps/BufferLayer.js +7 -7
- package/lib/maps/BufferLayerDesignerComponent.js +8 -8
- package/lib/maps/ChoroplethLayer.js +6 -6
- package/lib/maps/ChoroplethLayerDesigner.js +16 -16
- package/lib/maps/ClusterLayer.js +3 -3
- package/lib/maps/ClusterLayerDesignerComponent.js +5 -5
- package/lib/maps/DetailLevelSelectComponent.d.ts +11 -1
- package/lib/maps/DetailLevelSelectComponent.js +3 -3
- package/lib/maps/DirectMapDataSource.js +1 -2
- package/lib/maps/EditHoverOver.js +7 -5
- package/lib/maps/EditPopupComponent.js +2 -2
- package/lib/maps/GridLayer.js +5 -5
- package/lib/maps/GridLayerDesigner.js +15 -15
- package/lib/maps/LayerSwitcherComponent.js +1 -2
- package/lib/maps/LeafletMapComponent.d.ts +1 -1
- package/lib/maps/LeafletMapComponent.js +1 -1
- package/lib/maps/LegendComponent.js +1 -1
- package/lib/maps/MWaterServerLayer.d.ts +0 -1
- package/lib/maps/MWaterServerLayer.js +1 -1
- package/lib/maps/MapComponent.js +8 -8
- package/lib/maps/MapControlComponent.js +1 -1
- package/lib/maps/MapDesignerComponent.js +16 -16
- package/lib/maps/MapFiltersDesignerComponent.js +2 -2
- package/lib/maps/MapLayerViewDesignerComponent.js +8 -8
- package/lib/maps/MapUtils.js +6 -7
- package/lib/maps/MapViewComponent.js +1 -2
- package/lib/maps/MarkerSymbolSelectComponent.js +3 -3
- package/lib/maps/MarkersLayer.js +6 -7
- package/lib/maps/MarkersLayerDesignerComponent.js +22 -22
- package/lib/maps/PopupFilterJoinsEditComponent.js +4 -4
- package/lib/maps/PopupFilterJoinsUtils.js +2 -3
- package/lib/maps/RasterMapViewComponent.d.ts +3 -3
- package/lib/maps/RasterMapViewComponent.js +4 -4
- package/lib/maps/RegionSelectComponent.d.ts +1 -3
- package/lib/maps/RegionSelectComponent.js +1 -2
- package/lib/maps/ScopeAndDetailLevelComponent.js +3 -3
- package/lib/maps/TileUrlLayer.d.ts +1 -1
- package/lib/maps/TileUrlLayer.js +3 -3
- package/lib/maps/VectorMapViewComponent.js +6 -7
- package/lib/maps/ZoomLevelsComponent.js +5 -5
- package/lib/maps/mapSymbols.d.ts +1 -1
- package/lib/maps/mapSymbols.js +51 -50
- package/lib/maps/mapboxUtils.js +2 -3
- package/lib/maps/maps.d.ts +0 -1
- package/lib/maps/vectorMaps.js +14 -15
- package/lib/memoizedDebounce.js +1 -2
- package/lib/quickfilter/DateExprComponent.d.ts +4 -0
- package/lib/quickfilter/DateExprComponent.js +17 -16
- package/lib/quickfilter/IdArrayQuickfilterComponent.js +1 -1
- package/lib/quickfilter/QuickfilterUtils.js +1 -2
- package/lib/quickfilter/QuickfiltersComponent.d.ts +23 -2
- package/lib/quickfilter/QuickfiltersComponent.js +2 -2
- package/lib/quickfilter/QuickfiltersDesignComponent.js +8 -8
- package/lib/quickfilter/TextLiteralComponent.d.ts +35 -2
- package/lib/quickfilter/TextLiteralComponent.js +6 -6
- package/lib/richtext/DropdownPaletteItem.js +1 -1
- package/lib/richtext/ExprItemsHtmlConverter.js +8 -10
- package/lib/richtext/FontColorPaletteItem.js +7 -7
- package/lib/richtext/ItemsHtmlConverter.js +0 -1
- package/lib/richtext/RichTextComponent.d.ts +1 -0
- package/lib/richtext/RichTextComponent.js +33 -29
- package/lib/valueFormatter.js +18 -19
- package/lib/wellknown.js +2 -3
- package/lib/widgets/IFrameWidgetComponent.d.ts +9 -1
- package/lib/widgets/IFrameWidgetComponent.js +3 -3
- package/lib/widgets/ImageUploaderComponent.js +5 -5
- package/lib/widgets/ImageWidget.js +2 -2
- package/lib/widgets/ImageWidgetComponent.d.ts +9 -1
- package/lib/widgets/ImageWidgetComponent.js +20 -20
- package/lib/widgets/ImagelistCarouselComponent.js +1 -1
- package/lib/widgets/MapWidget.js +2 -2
- package/lib/widgets/MarkdownWidget.d.ts +1 -1
- package/lib/widgets/MarkdownWidget.js +1 -1
- package/lib/widgets/TOCWidget.js +11 -12
- package/lib/widgets/WidgetScopesViewComponent.js +1 -1
- package/lib/widgets/charts/Chart.js +1 -1
- package/lib/widgets/charts/ChartViewComponent.js +9 -9
- package/lib/widgets/charts/ChartWidgetComponent.js +4 -4
- package/lib/widgets/charts/calendar/CalendarChart.js +4 -4
- package/lib/widgets/charts/calendar/CalendarChartDesignerComponent.js +7 -7
- package/lib/widgets/charts/calendar/CalendarChartViewComponent.js +3 -3
- package/lib/widgets/charts/imagemosaic/ImageMosaicChart.d.ts +18 -5
- package/lib/widgets/charts/imagemosaic/ImageMosaicChart.js +3 -4
- package/lib/widgets/charts/imagemosaic/ImageMosaicChartDesignerComponent.js +5 -5
- package/lib/widgets/charts/imagemosaic/ImageMosaicChartViewComponent.d.ts +5 -19
- package/lib/widgets/charts/imagemosaic/ImageMosaicChartViewComponent.js +66 -70
- package/lib/widgets/charts/imagemosaic/ImagePopupComponent.js +1 -1
- package/lib/widgets/charts/layered/LayeredChart.d.ts +1 -1
- package/lib/widgets/charts/layered/LayeredChart.js +9 -9
- package/lib/widgets/charts/layered/LayeredChartCompiler.d.ts +8 -8
- package/lib/widgets/charts/layered/LayeredChartCompiler.js +15 -15
- package/lib/widgets/charts/layered/LayeredChartDesignerComponent.js +33 -33
- package/lib/widgets/charts/layered/LayeredChartLayerDesignerComponent.js +16 -16
- package/lib/widgets/charts/layered/LayeredChartUtils.js +1 -2
- package/lib/widgets/charts/layered/LayeredChartViewComponent.js +4 -4
- package/lib/widgets/charts/pivot/IntersectionDesignerComponent.js +18 -17
- package/lib/widgets/charts/pivot/PivotChart.d.ts +1 -1
- package/lib/widgets/charts/pivot/PivotChart.js +12 -4
- package/lib/widgets/charts/pivot/PivotChartDesignerComponent.d.ts +5 -5
- package/lib/widgets/charts/pivot/PivotChartDesignerComponent.js +10 -10
- package/lib/widgets/charts/pivot/PivotChartLayoutComponent.js +5 -5
- package/lib/widgets/charts/pivot/PivotChartQueryBuilder.d.ts +1 -1
- package/lib/widgets/charts/pivot/PivotChartQueryBuilder.js +5 -6
- package/lib/widgets/charts/pivot/PivotChartUtils.js +11 -12
- package/lib/widgets/charts/pivot/PivotChartViewComponent.js +9 -9
- package/lib/widgets/charts/pivot/SegmentDesignerComponent.d.ts +30 -30
- package/lib/widgets/charts/pivot/SegmentDesignerComponent.js +28 -26
- package/lib/widgets/charts/table/OrderingsComponent.js +2 -2
- package/lib/widgets/charts/table/TableChart.js +3 -3
- package/lib/widgets/charts/table/TableChartDesignerComponent.js +17 -17
- package/lib/widgets/charts/table/TableChartViewComponent.js +3 -3
- package/lib/widgets/text/ExprInsertModalComponent.d.ts +2 -3
- package/lib/widgets/text/ExprInsertModalComponent.js +2 -14
- package/lib/widgets/text/ExprItemEditorComponent.js +4 -4
- package/lib/widgets/text/ExprUpdateModalComponent.d.ts +2 -3
- package/lib/widgets/text/ExprUpdateModalComponent.js +3 -15
- package/lib/widgets/text/TextComponent.js +3 -3
- package/lib/widgets/text/TextWidget.d.ts +1 -1
- package/lib/widgets/text/TextWidgetComponent.js +11 -11
- package/lib/widgets/text/TextWidgetDesign.d.ts +2 -1
- package/lib/widgets/text/TextWidgetDesign.js +1 -2
- package/package.json +3 -3
- package/src/ColorComponent.tsx +2 -2
- package/src/DateRangeComponent.ts +10 -10
- package/src/LocaleContextInjector.tsx +1 -1
- package/src/MWaterAddRelatedFormComponent.ts +7 -7
- package/src/MWaterAddRelatedIndicatorComponent.ts +5 -5
- package/src/MWaterAssetSystemsListComponent.tsx +3 -3
- package/src/MWaterCompleteTableSelectComponent.tsx +36 -35
- package/src/MWaterCustomTablesetListComponent.tsx +4 -4
- package/src/MWaterGlobalFiltersComponent.ts +4 -4
- package/src/MWaterLoaderComponent.ts +1 -1
- package/src/MWaterMetricsTableListComponent.tsx +3 -3
- package/src/MWaterResponsesFilterComponent.ts +6 -6
- package/src/MWaterTableSelectComponent.tsx +6 -7
- package/src/axes/AxisBuilder.ts +42 -44
- package/src/axes/AxisColorEditorComponent.tsx +178 -0
- package/src/axes/AxisComponent.ts +20 -20
- package/src/axes/BinsComponent.tsx +6 -6
- package/src/axes/CategoryMapComponent.ts +10 -10
- package/src/axes/ColorPaletteCollectionComponent.tsx +3 -3
- package/src/axes/RangesComponent.ts +14 -14
- package/src/dashboards/DashboardComponent.tsx +21 -9
- package/src/dashboards/DashboardViewComponent.tsx +3 -3
- package/src/dashboards/FontStyleEditor.tsx +8 -8
- package/src/dashboards/LayoutOptionsComponent.tsx +74 -74
- package/src/dashboards/SettingsModalComponent.tsx +134 -107
- package/src/dashboards/layoutOptions.tsx +5 -1
- package/src/datagrids/DatagridComponent.ts +65 -62
- package/src/datagrids/DatagridDesignerComponent.tsx +17 -17
- package/src/datagrids/DatagridUtils.ts +2 -2
- package/src/datagrids/DatagridViewComponent.ts +3 -3
- package/src/datagrids/ExprCellComponent.ts +1 -1
- package/src/datagrids/FindReplaceModalComponent.ts +13 -13
- package/src/datagrids/OrderBysDesignerComponent.tsx +2 -2
- package/src/globals.d.ts +7 -1
- package/src/languages.ts +2 -2
- package/src/layouts/blocks/BlocksDisplayComponent.tsx +13 -13
- package/src/layouts/blocks/BlocksLayoutManager.ts +3 -2
- package/src/layouts/blocks/ClipboardPaletteItemComponent.ts +3 -3
- package/src/maps/AddLayerComponent.ts +13 -13
- package/src/maps/AdminScopeAndDetailLevelComponent.ts +5 -5
- package/src/maps/BaseLayerDesignerComponent.ts +8 -8
- package/src/maps/BufferLayer.ts +5 -5
- package/src/maps/BufferLayerDesignerComponent.ts +8 -8
- package/src/maps/ChoroplethLayer.ts +3 -3
- package/src/maps/ChoroplethLayerDesigner.tsx +16 -16
- package/src/maps/ClusterLayer.ts +3 -3
- package/src/maps/ClusterLayerDesignerComponent.ts +5 -5
- package/src/maps/DetailLevelSelectComponent.ts +3 -3
- package/src/maps/EditHoverOver.tsx +5 -5
- package/src/maps/EditPopupComponent.ts +2 -2
- package/src/maps/GridLayer.ts +5 -5
- package/src/maps/GridLayerDesigner.tsx +15 -16
- package/src/maps/MWaterServerLayer.ts +1 -1
- package/src/maps/MapComponent.ts +6 -6
- package/src/maps/MapControlComponent.ts +1 -1
- package/src/maps/MapDesignerComponent.tsx +20 -20
- package/src/maps/MapFiltersDesignerComponent.tsx +3 -3
- package/src/maps/MapLayerViewDesignerComponent.ts +9 -9
- package/src/maps/MarkerSymbolSelectComponent.ts +4 -5
- package/src/maps/MarkersLayerDesignerComponent.ts +22 -22
- package/src/maps/PopupFilterJoinsEditComponent.ts +4 -4
- package/src/maps/RasterMapViewComponent.ts +2 -2
- package/src/maps/RegionSelectComponent.ts +1 -2
- package/src/maps/ScopeAndDetailLevelComponent.ts +3 -3
- package/src/maps/TileUrlLayer.tsx +3 -3
- package/src/maps/VectorMapViewComponent.tsx +5 -5
- package/src/maps/ZoomLevelsComponent.ts +6 -6
- package/src/maps/mapSymbols.ts +49 -49
- package/src/maps/vectorMaps.tsx +2 -2
- package/src/quickfilter/DateExprComponent.ts +19 -18
- package/src/quickfilter/IdArrayQuickfilterComponent.ts +1 -1
- package/src/quickfilter/QuickfiltersComponent.ts +1 -1
- package/src/quickfilter/QuickfiltersDesignComponent.tsx +9 -9
- package/src/quickfilter/TextLiteralComponent.ts +4 -4
- package/src/richtext/DropdownPaletteItem.tsx +1 -1
- package/src/richtext/ExprItemsHtmlConverter.ts +8 -10
- package/src/richtext/ItemsHtmlConverter.ts +0 -1
- package/src/richtext/RichTextComponent.tsx +31 -31
- package/src/valueFormatter.ts +14 -14
- package/src/widgets/IFrameWidgetComponent.ts +3 -3
- package/src/widgets/ImageUploaderComponent.tsx +5 -5
- package/src/widgets/ImageWidget.ts +2 -2
- package/src/widgets/ImageWidgetComponent.ts +26 -26
- package/src/widgets/ImagelistCarouselComponent.ts +2 -2
- package/src/widgets/MapWidget.ts +1 -1
- package/src/widgets/MarkdownWidget.ts +1 -1
- package/src/widgets/TOCWidget.ts +13 -14
- package/src/widgets/WidgetScopesViewComponent.ts +1 -1
- package/src/widgets/charts/Chart.ts +1 -1
- package/src/widgets/charts/ChartViewComponent.ts +4 -4
- package/src/widgets/charts/ChartWidgetComponent.tsx +3 -3
- package/src/widgets/charts/calendar/CalendarChart.ts +4 -4
- package/src/widgets/charts/calendar/CalendarChartDesignerComponent.ts +7 -7
- package/src/widgets/charts/calendar/CalendarChartViewComponent.tsx +2 -2
- package/src/widgets/charts/imagemosaic/ImageMosaicChart.ts +25 -8
- package/src/widgets/charts/imagemosaic/ImageMosaicChartDesignerComponent.ts +5 -5
- package/src/widgets/charts/imagemosaic/ImageMosaicChartViewComponent.tsx +128 -0
- package/src/widgets/charts/layered/LayeredChart.ts +9 -9
- package/src/widgets/charts/layered/LayeredChartCompiler.ts +45 -45
- package/src/widgets/charts/layered/LayeredChartDesignerComponent.tsx +39 -39
- package/src/widgets/charts/layered/LayeredChartLayerDesignerComponent.tsx +18 -19
- package/src/widgets/charts/layered/LayeredChartViewComponent.ts +1 -1
- package/src/widgets/charts/pivot/IntersectionDesignerComponent.tsx +22 -23
- package/src/widgets/charts/pivot/PivotChart.ts +15 -5
- package/src/widgets/charts/pivot/PivotChartDesignerComponent.tsx +12 -12
- package/src/widgets/charts/pivot/PivotChartLayoutComponent.tsx +5 -5
- package/src/widgets/charts/pivot/PivotChartQueryBuilder.ts +7 -8
- package/src/widgets/charts/pivot/PivotChartViewComponent.tsx +6 -6
- package/src/widgets/charts/pivot/SegmentDesignerComponent.tsx +30 -30
- package/src/widgets/charts/table/OrderingsComponent.tsx +2 -2
- package/src/widgets/charts/table/TableChart.ts +3 -3
- package/src/widgets/charts/table/TableChartDesignerComponent.ts +16 -16
- package/src/widgets/charts/table/TableChartViewComponent.ts +2 -2
- package/src/widgets/text/{ExprInsertModalComponent.ts → ExprInsertModalComponent.tsx} +18 -20
- package/src/widgets/text/ExprItemEditorComponent.tsx +4 -4
- package/src/widgets/text/{ExprUpdateModalComponent.ts → ExprUpdateModalComponent.tsx} +18 -20
- package/src/widgets/text/TextComponent.tsx +2 -2
- package/src/widgets/text/TextWidgetComponent.tsx +10 -10
- package/src/widgets/text/TextWidgetDesign.ts +3 -1
- package/src/axes/AxisColorEditorComponent.ts +0 -210
- 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" },
|
|
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 ?
|
|
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 ?
|
|
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 ?
|
|
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 ?
|
|
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:
|
|
204
|
-
{ id: "pie", name:
|
|
205
|
-
{ id: "donut", name:
|
|
206
|
-
{ id: "line", name:
|
|
207
|
-
{ id: "spline", name:
|
|
208
|
-
{ id: "scatter", name:
|
|
209
|
-
{ id: "area", name:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
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:
|
|
330
|
-
{ value: "asc", label:
|
|
331
|
-
{ value: "natural", label:
|
|
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:
|
|
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:
|
|
374
|
+
{ label: T`Y Axis Range` },
|
|
375
375
|
R(
|
|
376
376
|
LabeledInlineComponent,
|
|
377
|
-
{ key: "min", label:
|
|
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:
|
|
384
|
+
placeholder: T`Auto`
|
|
385
385
|
})
|
|
386
386
|
),
|
|
387
387
|
" ",
|
|
388
388
|
R(
|
|
389
389
|
LabeledInlineComponent,
|
|
390
|
-
{ key: "label", label:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
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",
|
|
54
|
+
return this.getAxisLabel("resize-vertical", T`Vertical Axis`)
|
|
55
55
|
} else {
|
|
56
|
-
return this.getAxisLabel("resize-horizontal",
|
|
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",
|
|
63
|
+
return this.getAxisLabel("repeat", T`Angle Axis`)
|
|
64
64
|
} else if (this.props.design.transpose) {
|
|
65
|
-
return this.getAxisLabel("resize-horizontal",
|
|
65
|
+
return this.getAxisLabel("resize-horizontal", T`Horizontal Axis`)
|
|
66
66
|
} else {
|
|
67
|
-
return this.getAxisLabel("resize-vertical",
|
|
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",
|
|
74
|
+
return this.getAxisLabel("text-color", T`Label Axis`)
|
|
75
75
|
} else {
|
|
76
|
-
return this.getAxisLabel("equalizer",
|
|
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 ?
|
|
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:
|
|
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
|
-
|
|
243
|
-
R(PopoverHelpComponent, { placement: 'bottom' },
|
|
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 ?
|
|
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 },
|
|
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" }), " ",
|
|
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
|
|
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=
|
|
66
|
-
help=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
163
|
-
help=
|
|
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=
|
|
189
|
-
help=
|
|
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=
|
|
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=
|
|
285
|
-
hint=
|
|
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=
|
|
335
|
+
label={T`Color Conditions`}
|
|
336
336
|
labelMuted={true}
|
|
337
|
-
help=
|
|
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=
|
|
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=
|
|
411
|
-
hint=
|
|
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
|
|
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
|
|
213
|
+
return T`Missing rows`
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
// Check that has columns
|
|
217
217
|
if (design.columns.length === 0) {
|
|
218
|
-
return
|
|
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
|
|
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:
|
|
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
|
|