@buildcanada/charts 0.3.6 → 0.3.7
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/package.json +1 -1
- package/src/components/GrapherTabIcon.tsx +1 -1
- package/src/components/GrapherTrendArrow.tsx +1 -1
- package/src/components/Halo/Halo.tsx +1 -1
- package/src/components/LabeledSwitch/LabeledSwitch.tsx +1 -1
- package/src/components/MarkdownTextWrap/MarkdownTextWrap.tsx +4 -4
- package/src/components/OverlayHeader.tsx +1 -1
- package/src/components/SimpleMarkdownText.tsx +1 -1
- package/src/components/TextWrap/TextWrap.tsx +2 -2
- package/src/components/index.ts +23 -23
- package/src/components/loadingIndicator/LoadingIndicator.tsx +1 -1
- package/src/config/ChartsProvider.tsx +1 -1
- package/src/config/index.ts +2 -2
- package/src/core-table/ChartsTable.ts +7 -7
- package/src/core-table/CoreTable.ts +6 -6
- package/src/core-table/CoreTableColumns.ts +5 -5
- package/src/core-table/CoreTableUtils.ts +3 -3
- package/src/core-table/ErrorValues.ts +1 -1
- package/src/core-table/TableSynthesizers.ts +3 -3
- package/src/core-table/TableUtil.ts +2 -2
- package/src/core-table/Transforms.ts +3 -3
- package/src/core-table/index.ts +8 -8
- package/src/explorer/ColumnGrammar.ts +4 -4
- package/src/explorer/Explorer.sample.ts +4 -4
- package/src/explorer/Explorer.tsx +10 -10
- package/src/explorer/ExplorerConstants.ts +2 -2
- package/src/explorer/ExplorerControls.tsx +4 -4
- package/src/explorer/ExplorerDecisionMatrix.ts +7 -7
- package/src/explorer/ExplorerGrammar.ts +4 -4
- package/src/explorer/ExplorerProgram.ts +11 -11
- package/src/explorer/ExplorerUtils.ts +4 -4
- package/src/explorer/GrapherGrammar.ts +3 -3
- package/src/explorer/gridLang/GridCell.ts +4 -4
- package/src/explorer/gridLang/GridLangConstants.ts +1 -1
- package/src/explorer/gridLang/GridProgram.ts +5 -5
- package/src/explorer/index.ts +15 -15
- package/src/explorer/urlMigrations/CO2UrlMigration.ts +3 -3
- package/src/explorer/urlMigrations/CovidUrlMigration.ts +2 -2
- package/src/explorer/urlMigrations/EnergyUrlMigration.ts +3 -3
- package/src/explorer/urlMigrations/ExplorerPageUrlMigrationSpec.ts +1 -1
- package/src/explorer/urlMigrations/ExplorerUrlMigrationUtils.ts +2 -2
- package/src/explorer/urlMigrations/ExplorerUrlMigrations.ts +5 -5
- package/src/explorer/urlMigrations/LegacyCovidUrlMigration.ts +4 -4
- package/src/grapher/axis/Axis.ts +8 -8
- package/src/grapher/axis/AxisConfig.ts +4 -4
- package/src/grapher/axis/AxisViews.tsx +6 -6
- package/src/grapher/barCharts/DiscreteBarChart.tsx +17 -17
- package/src/grapher/barCharts/DiscreteBarChartConstants.ts +6 -6
- package/src/grapher/barCharts/DiscreteBarChartHelpers.ts +3 -3
- package/src/grapher/barCharts/DiscreteBarChartState.ts +13 -13
- package/src/grapher/barCharts/DiscreteBarChartThumbnail.tsx +4 -4
- package/src/grapher/captionedChart/CaptionedChart.tsx +19 -19
- package/src/grapher/captionedChart/Logos.tsx +3 -3
- package/src/grapher/captionedChart/StaticChartRasterizer.tsx +1 -1
- package/src/grapher/chart/Chart.tsx +5 -5
- package/src/grapher/chart/ChartAreaContent.tsx +10 -10
- package/src/grapher/chart/ChartDimension.ts +2 -2
- package/src/grapher/chart/ChartInterface.ts +7 -7
- package/src/grapher/chart/ChartManager.ts +9 -9
- package/src/grapher/chart/ChartTabs.ts +1 -1
- package/src/grapher/chart/ChartTypeMap.tsx +31 -31
- package/src/grapher/chart/ChartTypeSwitcher.tsx +1 -1
- package/src/grapher/chart/ChartUtils.tsx +10 -10
- package/src/grapher/chart/DimensionSlot.ts +3 -3
- package/src/grapher/chart/StaticChartWrapper.tsx +5 -5
- package/src/grapher/chart/guidedChartUtils.ts +4 -4
- package/src/grapher/color/BinningStrategies.ts +4 -4
- package/src/grapher/color/BinningStrategyEqualSizeBins.ts +3 -3
- package/src/grapher/color/BinningStrategyLogarithmic.ts +3 -3
- package/src/grapher/color/CategoricalColorAssigner.ts +3 -3
- package/src/grapher/color/ColorBrewerSchemes.ts +1 -1
- package/src/grapher/color/ColorScale.ts +9 -9
- package/src/grapher/color/ColorScaleBin.ts +2 -2
- package/src/grapher/color/ColorScaleConfig.ts +3 -3
- package/src/grapher/color/ColorScheme.ts +3 -3
- package/src/grapher/color/ColorSchemes.ts +4 -4
- package/src/grapher/color/ColorUtils.ts +1 -1
- package/src/grapher/color/CustomSchemes.ts +2 -2
- package/src/grapher/comparisonLine/ComparisonLine.tsx +5 -5
- package/src/grapher/comparisonLine/ComparisonLineGenerator.ts +1 -1
- package/src/grapher/comparisonLine/ComparisonLineHelpers.ts +1 -1
- package/src/grapher/comparisonLine/CustomComparisonLine.tsx +8 -8
- package/src/grapher/comparisonLine/VerticalComparisonLine.tsx +5 -5
- package/src/grapher/controls/ActionButtons.tsx +4 -4
- package/src/grapher/controls/CommandPalette.tsx +1 -1
- package/src/grapher/controls/ContentSwitchers.tsx +4 -4
- package/src/grapher/controls/DataTableFilterDropdown.tsx +7 -7
- package/src/grapher/controls/DataTableSearchField.tsx +4 -4
- package/src/grapher/controls/Dropdown.tsx +1 -1
- package/src/grapher/controls/EntitySelectionToggle.tsx +1 -1
- package/src/grapher/controls/MapRegionDropdown.tsx +5 -5
- package/src/grapher/controls/MapResetButton.tsx +3 -3
- package/src/grapher/controls/MapZoomDropdown.tsx +5 -5
- package/src/grapher/controls/MapZoomToSelectionButton.tsx +3 -3
- package/src/grapher/controls/SearchField.tsx +1 -1
- package/src/grapher/controls/SettingsMenu.tsx +14 -14
- package/src/grapher/controls/ShareMenu.tsx +4 -4
- package/src/grapher/controls/SortIcon.tsx +1 -1
- package/src/grapher/controls/controlsRow/ControlsRow.tsx +11 -11
- package/src/grapher/controls/entityPicker/EntityPicker.tsx +7 -7
- package/src/grapher/controls/entityPicker/EntityPickerConstants.ts +5 -5
- package/src/grapher/controls/globalEntitySelector/GlobalEntitySelector.tsx +7 -7
- package/src/grapher/controls/settings/AbsRelToggle.tsx +2 -2
- package/src/grapher/controls/settings/AxisScaleToggle.tsx +2 -2
- package/src/grapher/controls/settings/FacetStrategySelector.tsx +2 -2
- package/src/grapher/controls/settings/FacetYDomainToggle.tsx +3 -3
- package/src/grapher/controls/settings/NoDataAreaToggle.tsx +1 -1
- package/src/grapher/controls/settings/ZoomToggle.tsx +1 -1
- package/src/grapher/core/EntitiesByRegionType.ts +3 -3
- package/src/grapher/core/EntityCodes.ts +2 -2
- package/src/grapher/core/EntityUrlBuilder.ts +3 -3
- package/src/grapher/core/FetchingGrapher.tsx +8 -8
- package/src/grapher/core/Grapher.tsx +20 -20
- package/src/grapher/core/GrapherAnalytics.ts +1 -1
- package/src/grapher/core/GrapherConstants.ts +3 -3
- package/src/grapher/core/GrapherState.tsx +38 -38
- package/src/grapher/core/GrapherUrl.ts +4 -4
- package/src/grapher/core/GrapherUrlMigrations.ts +2 -2
- package/src/grapher/core/GrapherUseHelpers.tsx +5 -5
- package/src/grapher/core/LegacyToChartsTable.ts +5 -5
- package/src/grapher/core/grapher.entry.ts +1 -1
- package/src/grapher/core/loadGrapherTableHelpers.ts +4 -4
- package/src/grapher/core/loadVariable.ts +2 -2
- package/src/grapher/core/relatedQuestion.ts +1 -1
- package/src/grapher/dataTable/DataTable.sample.ts +5 -5
- package/src/grapher/dataTable/DataTable.tsx +10 -10
- package/src/grapher/dataTable/DataTableConstants.ts +5 -5
- package/src/grapher/entitySelector/EntitySelector.tsx +15 -15
- package/src/grapher/facet/FacetChart.tsx +19 -19
- package/src/grapher/facet/FacetChartConstants.ts +4 -4
- package/src/grapher/facet/FacetChartUtils.ts +1 -1
- package/src/grapher/facet/FacetMap.tsx +15 -15
- package/src/grapher/facet/FacetMapConstants.ts +4 -4
- package/src/grapher/focus/FocusArray.ts +2 -2
- package/src/grapher/footer/Footer.tsx +7 -7
- package/src/grapher/footer/FooterManager.ts +4 -4
- package/src/grapher/fullScreen/FullScreen.tsx +2 -2
- package/src/grapher/header/Header.tsx +6 -6
- package/src/grapher/header/HeaderManager.ts +2 -2
- package/src/grapher/index.ts +57 -57
- package/src/grapher/legend/HorizontalColorLegends.tsx +7 -7
- package/src/grapher/legend/LegendInteractionState.ts +1 -1
- package/src/grapher/legend/VerticalColorLegend.tsx +6 -6
- package/src/grapher/lineCharts/LineChart.tsx +26 -26
- package/src/grapher/lineCharts/LineChartConstants.ts +8 -8
- package/src/grapher/lineCharts/LineChartHelpers.ts +7 -7
- package/src/grapher/lineCharts/LineChartState.ts +17 -17
- package/src/grapher/lineCharts/LineChartThumbnail.tsx +15 -15
- package/src/grapher/lineCharts/Lines.tsx +6 -6
- package/src/grapher/lineLegend/LineLegend.tsx +12 -12
- package/src/grapher/lineLegend/LineLegendFilterAlgorithms.ts +2 -2
- package/src/grapher/lineLegend/LineLegendHelpers.ts +3 -3
- package/src/grapher/lineLegend/LineLegendTypes.ts +4 -4
- package/src/grapher/mapCharts/ChoroplethGlobe.tsx +11 -11
- package/src/grapher/mapCharts/ChoroplethMap.tsx +11 -11
- package/src/grapher/mapCharts/GeoFeatures.ts +5 -5
- package/src/grapher/mapCharts/GlobeController.ts +7 -7
- package/src/grapher/mapCharts/MapAnnotationPlacements.ts +2 -2
- package/src/grapher/mapCharts/MapAnnotations.ts +6 -6
- package/src/grapher/mapCharts/MapChart.sample.ts +3 -3
- package/src/grapher/mapCharts/MapChart.tsx +23 -23
- package/src/grapher/mapCharts/MapChartConstants.ts +10 -10
- package/src/grapher/mapCharts/MapChartState.ts +11 -11
- package/src/grapher/mapCharts/MapChartThumbnail.tsx +3 -3
- package/src/grapher/mapCharts/MapComponents.tsx +8 -8
- package/src/grapher/mapCharts/MapConfig.ts +5 -5
- package/src/grapher/mapCharts/MapHelpers.ts +6 -6
- package/src/grapher/mapCharts/MapProjections.ts +2 -2
- package/src/grapher/mapCharts/MapSparkline.tsx +9 -9
- package/src/grapher/mapCharts/MapTooltip.tsx +10 -10
- package/src/grapher/modal/DownloadModal.tsx +9 -9
- package/src/grapher/modal/EmbedModal.tsx +4 -4
- package/src/grapher/modal/EntitySelectorModal.tsx +4 -4
- package/src/grapher/modal/Modal.tsx +2 -2
- package/src/grapher/modal/ModalHeader.tsx +1 -1
- package/src/grapher/modal/SourcesDescriptions.tsx +1 -1
- package/src/grapher/modal/SourcesKeyDataTable.tsx +2 -2
- package/src/grapher/modal/SourcesModal.tsx +10 -10
- package/src/grapher/noDataModal/NoDataModal.tsx +4 -4
- package/src/grapher/scatterCharts/ConnectedScatterLegend.tsx +4 -4
- package/src/grapher/scatterCharts/NoDataSection.tsx +3 -3
- package/src/grapher/scatterCharts/ScatterPlotChart.tsx +27 -27
- package/src/grapher/scatterCharts/ScatterPlotChartConstants.ts +10 -10
- package/src/grapher/scatterCharts/ScatterPlotChartState.ts +15 -15
- package/src/grapher/scatterCharts/ScatterPlotChartThumbnail.tsx +12 -12
- package/src/grapher/scatterCharts/ScatterPlotTooltip.tsx +6 -6
- package/src/grapher/scatterCharts/ScatterPoints.tsx +4 -4
- package/src/grapher/scatterCharts/ScatterPointsWithLabels.tsx +11 -11
- package/src/grapher/scatterCharts/ScatterSizeLegend.tsx +7 -7
- package/src/grapher/scatterCharts/ScatterUtils.ts +5 -5
- package/src/grapher/schema/defaultGrapherConfig.ts +1 -1
- package/src/grapher/schema/migrations/helpers.ts +1 -1
- package/src/grapher/schema/migrations/migrate.ts +4 -4
- package/src/grapher/schema/migrations/migrations.ts +2 -2
- package/src/grapher/selection/MapSelectionArray.ts +2 -2
- package/src/grapher/selection/SelectionArray.ts +1 -1
- package/src/grapher/sidePanel/SidePanel.tsx +2 -2
- package/src/grapher/slideInDrawer/SlideInDrawer.tsx +1 -1
- package/src/grapher/slopeCharts/MarkX.tsx +2 -2
- package/src/grapher/slopeCharts/Slope.tsx +3 -3
- package/src/grapher/slopeCharts/SlopeChart.tsx +29 -29
- package/src/grapher/slopeCharts/SlopeChartConstants.ts +6 -6
- package/src/grapher/slopeCharts/SlopeChartHelpers.ts +4 -4
- package/src/grapher/slopeCharts/SlopeChartState.ts +14 -14
- package/src/grapher/slopeCharts/SlopeChartThumbnail.tsx +14 -14
- package/src/grapher/stackedCharts/AbstractStackedChartState.ts +13 -13
- package/src/grapher/stackedCharts/MarimekkoBars.tsx +8 -8
- package/src/grapher/stackedCharts/MarimekkoBarsForOneEntity.tsx +5 -5
- package/src/grapher/stackedCharts/MarimekkoChart.tsx +23 -23
- package/src/grapher/stackedCharts/MarimekkoChartConstants.ts +6 -6
- package/src/grapher/stackedCharts/MarimekkoChartHelpers.ts +3 -3
- package/src/grapher/stackedCharts/MarimekkoChartState.ts +16 -16
- package/src/grapher/stackedCharts/MarimekkoChartThumbnail.tsx +13 -13
- package/src/grapher/stackedCharts/MarimekkoInternalLabels.tsx +4 -4
- package/src/grapher/stackedCharts/StackedAreaChart.tsx +22 -22
- package/src/grapher/stackedCharts/StackedAreaChartState.ts +5 -5
- package/src/grapher/stackedCharts/StackedAreaChartThumbnail.tsx +14 -14
- package/src/grapher/stackedCharts/StackedAreas.tsx +4 -4
- package/src/grapher/stackedCharts/StackedBarChart.tsx +21 -21
- package/src/grapher/stackedCharts/StackedBarChartState.ts +8 -8
- package/src/grapher/stackedCharts/StackedBarChartThumbnail.tsx +14 -14
- package/src/grapher/stackedCharts/StackedBarSegment.tsx +3 -3
- package/src/grapher/stackedCharts/StackedBars.tsx +6 -6
- package/src/grapher/stackedCharts/StackedConstants.ts +6 -6
- package/src/grapher/stackedCharts/StackedDiscreteBarChart.tsx +14 -14
- package/src/grapher/stackedCharts/StackedDiscreteBarChartState.ts +13 -13
- package/src/grapher/stackedCharts/StackedDiscreteBarChartThumbnail.tsx +4 -4
- package/src/grapher/stackedCharts/StackedDiscreteBars.tsx +15 -15
- package/src/grapher/stackedCharts/StackedUtils.ts +3 -3
- package/src/grapher/tabs/TabsWithDropdown.tsx +1 -1
- package/src/grapher/testData/TestData.sample.ts +5 -5
- package/src/grapher/testData/TestData.ts +2 -2
- package/src/grapher/timeline/TimelineComponent.tsx +4 -4
- package/src/grapher/timeline/TimelineController.ts +2 -2
- package/src/grapher/tooltip/Tooltip.tsx +5 -5
- package/src/grapher/tooltip/TooltipContents.tsx +6 -6
- package/src/grapher/tooltip/TooltipProps.ts +1 -1
- package/src/grapher/tooltip/TooltipState.ts +2 -2
- package/src/grapher/verticalLabels/VerticalLabels.tsx +3 -3
- package/src/grapher/verticalLabels/VerticalLabelsState.ts +2 -2
- package/src/index.ts +55 -55
- package/src/types/Origin.ts +1 -1
- package/src/types/Variable.ts +3 -3
- package/src/types/VariableDisplayConfigInterface.ts +2 -2
- package/src/types/domainTypes/ContentGraph.ts +2 -2
- package/src/types/domainTypes/CoreTableTypes.ts +5 -5
- package/src/types/domainTypes/Posts.ts +4 -4
- package/src/types/domainTypes/Search.ts +2 -2
- package/src/types/domainTypes/Various.ts +1 -1
- package/src/types/gdocTypes/Gdoc.ts +2 -2
- package/src/types/grapherTypes/GrapherTypes.ts +9 -9
- package/src/types/index.ts +15 -15
- package/src/utils/Bounds.ts +2 -2
- package/src/utils/FuzzySearch.ts +1 -1
- package/src/utils/TimeBounds.ts +2 -2
- package/src/utils/Util.ts +3 -3
- package/src/utils/Variable.ts +2 -2
- package/src/utils/archival/archivalDate.ts +2 -2
- package/src/utils/formatValue.ts +2 -2
- package/src/utils/grapherConfigUtils.ts +2 -2
- package/src/utils/image.ts +2 -2
- package/src/utils/index.ts +27 -27
- package/src/utils/metadataHelpers.ts +4 -4
- package/src/utils/regions.ts +2 -2
- package/src/utils/urls/Url.ts +3 -3
- package/src/utils/urls/UrlMigration.ts +1 -1
- package/src/utils/urls/UrlUtils.ts +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DualAxis } from "../axis/Axis"
|
|
2
|
-
import { PlacedItem } from "./MarimekkoChartConstants"
|
|
3
|
-
import { MarimekkoChartState } from "./MarimekkoChartState"
|
|
1
|
+
import { DualAxis } from "../axis/Axis.js"
|
|
2
|
+
import { PlacedItem } from "./MarimekkoChartConstants.js"
|
|
3
|
+
import { MarimekkoChartState } from "./MarimekkoChartState.js"
|
|
4
4
|
|
|
5
5
|
export function toPlacedMarimekkoItems(
|
|
6
6
|
chartState: MarimekkoChartState,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _ from "lodash-es"
|
|
2
2
|
import * as R from "remeda"
|
|
3
3
|
import { computed, makeObservable } from "mobx"
|
|
4
|
-
import { ChartState } from "../chart/ChartInterface"
|
|
5
|
-
import { ColorScale, ColorScaleManager } from "../color/ColorScale"
|
|
4
|
+
import { ChartState } from "../chart/ChartInterface.js"
|
|
5
|
+
import { ColorScale, ColorScaleManager } from "../color/ColorScale.js"
|
|
6
6
|
import {
|
|
7
7
|
Bar,
|
|
8
8
|
BarShape,
|
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
MarimekkoChartManager,
|
|
12
12
|
SimpleChartSeries,
|
|
13
13
|
SimplePoint,
|
|
14
|
-
} from "./MarimekkoChartConstants"
|
|
15
|
-
import { CoreColumn, ChartsTable } from "../../core-table/index"
|
|
14
|
+
} from "./MarimekkoChartConstants.js"
|
|
15
|
+
import { CoreColumn, ChartsTable } from "../../core-table/index.js"
|
|
16
16
|
import {
|
|
17
17
|
autoDetectYColumnSlugs,
|
|
18
18
|
getShortNameForEntity,
|
|
19
19
|
makeSelectionArray,
|
|
20
|
-
} from "../chart/ChartUtils"
|
|
21
|
-
import { ColorScaleConfig } from "../color/ColorScaleConfig"
|
|
20
|
+
} from "../chart/ChartUtils.js"
|
|
21
|
+
import { ColorScaleConfig } from "../color/ColorScaleConfig.js"
|
|
22
22
|
import {
|
|
23
23
|
ChartErrorInfo,
|
|
24
24
|
ColorSchemeName,
|
|
@@ -29,16 +29,16 @@ import {
|
|
|
29
29
|
SortBy,
|
|
30
30
|
SortOrder,
|
|
31
31
|
ScaleType,
|
|
32
|
-
} from "../../types/index"
|
|
33
|
-
import { NO_DATA_GRAY } from "../color/ColorConstants"
|
|
34
|
-
import { StackedPoint, StackedSeries } from "./StackedConstants"
|
|
35
|
-
import { ColorScheme } from "../color/ColorScheme"
|
|
36
|
-
import { ColorSchemes } from "../color/ColorSchemes"
|
|
37
|
-
import { excludeUndefined } from "../../utils/index"
|
|
38
|
-
import { SelectionArray } from "../selection/SelectionArray"
|
|
39
|
-
import { FocusArray } from "../focus/FocusArray"
|
|
40
|
-
import { AxisConfig } from "../axis/AxisConfig"
|
|
41
|
-
import { HorizontalAxis, VerticalAxis } from "../axis/Axis"
|
|
32
|
+
} from "../../types/index.js"
|
|
33
|
+
import { NO_DATA_GRAY } from "../color/ColorConstants.js"
|
|
34
|
+
import { StackedPoint, StackedSeries } from "./StackedConstants.js"
|
|
35
|
+
import { ColorScheme } from "../color/ColorScheme.js"
|
|
36
|
+
import { ColorSchemes } from "../color/ColorSchemes.js"
|
|
37
|
+
import { excludeUndefined } from "../../utils/index.js"
|
|
38
|
+
import { SelectionArray } from "../selection/SelectionArray.js"
|
|
39
|
+
import { FocusArray } from "../focus/FocusArray.js"
|
|
40
|
+
import { AxisConfig } from "../axis/AxisConfig.js"
|
|
41
|
+
import { HorizontalAxis, VerticalAxis } from "../axis/Axis.js"
|
|
42
42
|
|
|
43
43
|
export class MarimekkoChartState implements ChartState, ColorScaleManager {
|
|
44
44
|
manager: MarimekkoChartManager
|
|
@@ -2,23 +2,23 @@ import React from "react"
|
|
|
2
2
|
import * as _ from "lodash-es"
|
|
3
3
|
import { computed, makeObservable } from "mobx"
|
|
4
4
|
import { observer } from "mobx-react"
|
|
5
|
-
import { ChartInterface } from "../chart/ChartInterface"
|
|
6
|
-
import { MarimekkoChartState } from "./MarimekkoChartState"
|
|
7
|
-
import { type MarimekkoChartProps } from "./MarimekkoChart"
|
|
8
|
-
import { MarimekkoChartManager, PlacedItem } from "./MarimekkoChartConstants"
|
|
9
|
-
import { Bounds } from "../../utils/index"
|
|
10
|
-
import { DualAxis, HorizontalAxis, VerticalAxis } from "../axis/Axis"
|
|
11
|
-
import { AxisConfig } from "../axis/AxisConfig"
|
|
5
|
+
import { ChartInterface } from "../chart/ChartInterface.js"
|
|
6
|
+
import { MarimekkoChartState } from "./MarimekkoChartState.js"
|
|
7
|
+
import { type MarimekkoChartProps } from "./MarimekkoChart.js"
|
|
8
|
+
import { MarimekkoChartManager, PlacedItem } from "./MarimekkoChartConstants.js"
|
|
9
|
+
import { Bounds } from "../../utils/index.js"
|
|
10
|
+
import { DualAxis, HorizontalAxis, VerticalAxis } from "../axis/Axis.js"
|
|
11
|
+
import { AxisConfig } from "../axis/AxisConfig.js"
|
|
12
12
|
import {
|
|
13
13
|
BASE_FONT_SIZE,
|
|
14
14
|
DEFAULT_GRAPHER_BOUNDS,
|
|
15
15
|
GRAPHER_FONT_SCALE_12,
|
|
16
|
-
} from "../core/GrapherConstants"
|
|
17
|
-
import { MarimekkoBars } from "./MarimekkoBars"
|
|
18
|
-
import { DualAxisComponent } from "../axis/AxisViews"
|
|
19
|
-
import { toPlacedMarimekkoItems } from "./MarimekkoChartHelpers"
|
|
20
|
-
import { MarimekkoInternalLabels } from "./MarimekkoInternalLabels"
|
|
21
|
-
import { NoDataModal } from "../noDataModal/NoDataModal"
|
|
16
|
+
} from "../core/GrapherConstants.js"
|
|
17
|
+
import { MarimekkoBars } from "./MarimekkoBars.js"
|
|
18
|
+
import { DualAxisComponent } from "../axis/AxisViews.js"
|
|
19
|
+
import { toPlacedMarimekkoItems } from "./MarimekkoChartHelpers.js"
|
|
20
|
+
import { MarimekkoInternalLabels } from "./MarimekkoInternalLabels.js"
|
|
21
|
+
import { NoDataModal } from "../noDataModal/NoDataModal.js"
|
|
22
22
|
|
|
23
23
|
const LABEL_PADDING = 4
|
|
24
24
|
|
|
@@ -3,10 +3,10 @@ import { observer } from "mobx-react"
|
|
|
3
3
|
import * as _ from "lodash-es"
|
|
4
4
|
import * as R from "remeda"
|
|
5
5
|
import { computed, makeObservable } from "mobx"
|
|
6
|
-
import { Bar, BarShape, PlacedItem } from "./MarimekkoChartConstants"
|
|
7
|
-
import { DualAxis } from "../axis/Axis"
|
|
8
|
-
import { Bounds } from "../../utils/index"
|
|
9
|
-
import { Halo } from "../../components/index"
|
|
6
|
+
import { Bar, BarShape, PlacedItem } from "./MarimekkoChartConstants.js"
|
|
7
|
+
import { DualAxis } from "../axis/Axis.js"
|
|
8
|
+
import { Bounds } from "../../utils/index.js"
|
|
9
|
+
import { Halo } from "../../components/index.js"
|
|
10
10
|
|
|
11
11
|
interface MarimekkoInternalLabelsProps {
|
|
12
12
|
items: PlacedItem[]
|
|
@@ -8,45 +8,45 @@ import {
|
|
|
8
8
|
Bounds,
|
|
9
9
|
guid,
|
|
10
10
|
exposeInstanceOnWindow,
|
|
11
|
-
} from "../../utils/index"
|
|
11
|
+
} from "../../utils/index.js"
|
|
12
12
|
import { computed, action, observable, makeObservable } from "mobx"
|
|
13
|
-
import { SeriesName, SeriesStrategy } from "../../types/index"
|
|
13
|
+
import { SeriesName, SeriesStrategy } from "../../types/index.js"
|
|
14
14
|
import {
|
|
15
15
|
BASE_FONT_SIZE,
|
|
16
16
|
DEFAULT_GRAPHER_BOUNDS,
|
|
17
|
-
} from "../core/GrapherConstants"
|
|
17
|
+
} from "../core/GrapherConstants.js"
|
|
18
18
|
import { observer } from "mobx-react"
|
|
19
|
-
import { DualAxisComponent } from "../axis/AxisViews"
|
|
20
|
-
import { DualAxis, HorizontalAxis, VerticalAxis } from "../axis/Axis"
|
|
21
|
-
import { LineLegend } from "../lineLegend/LineLegend"
|
|
22
|
-
import { NoDataModal } from "../noDataModal/NoDataModal"
|
|
23
|
-
import { TooltipFooterIcon } from "../tooltip/TooltipProps"
|
|
19
|
+
import { DualAxisComponent } from "../axis/AxisViews.js"
|
|
20
|
+
import { DualAxis, HorizontalAxis, VerticalAxis } from "../axis/Axis.js"
|
|
21
|
+
import { LineLegend } from "../lineLegend/LineLegend.js"
|
|
22
|
+
import { NoDataModal } from "../noDataModal/NoDataModal.js"
|
|
23
|
+
import { TooltipFooterIcon } from "../tooltip/TooltipProps.js"
|
|
24
24
|
import {
|
|
25
25
|
Tooltip,
|
|
26
26
|
TooltipState,
|
|
27
27
|
TooltipTable,
|
|
28
28
|
makeTooltipRoundingNotice,
|
|
29
29
|
toTooltipTableColumns,
|
|
30
|
-
} from "../tooltip/Tooltip"
|
|
31
|
-
import { StackedAreaChartState } from "./StackedAreaChartState"
|
|
32
|
-
import { AREA_OPACITY, StackedSeries } from "./StackedConstants"
|
|
30
|
+
} from "../tooltip/Tooltip.js"
|
|
31
|
+
import { StackedAreaChartState } from "./StackedAreaChartState.js"
|
|
32
|
+
import { AREA_OPACITY, StackedSeries } from "./StackedConstants.js"
|
|
33
33
|
import {
|
|
34
34
|
makeClipPath,
|
|
35
35
|
isTargetOutsideElement,
|
|
36
36
|
getHoverStateForSeries,
|
|
37
|
-
} from "../chart/ChartUtils"
|
|
38
|
-
import { AxisConfig, AxisManager } from "../axis/AxisConfig"
|
|
39
|
-
import { LineLabelSeries } from "../lineLegend/LineLegendTypes"
|
|
37
|
+
} from "../chart/ChartUtils.js"
|
|
38
|
+
import { AxisConfig, AxisManager } from "../axis/AxisConfig.js"
|
|
39
|
+
import { LineLabelSeries } from "../lineLegend/LineLegendTypes.js"
|
|
40
40
|
import { easeLinear } from "d3-ease"
|
|
41
41
|
import { select, type BaseType, type Selection } from "d3-selection"
|
|
42
|
-
import { ChartInterface } from "../chart/ChartInterface"
|
|
43
|
-
import { ChartManager } from "../chart/ChartManager"
|
|
44
|
-
import { StackedAreas } from "./StackedAreas"
|
|
45
|
-
import { HorizontalColorLegendManager } from "../legend/HorizontalColorLegends"
|
|
46
|
-
import { CategoricalBin } from "../color/ColorScaleBin"
|
|
47
|
-
import { ChartComponentProps } from "../chart/ChartTypeMap"
|
|
48
|
-
import { InteractionState } from "../interaction/InteractionState"
|
|
49
|
-
import { resolveCollision } from "./StackedUtils"
|
|
42
|
+
import { ChartInterface } from "../chart/ChartInterface.js"
|
|
43
|
+
import { ChartManager } from "../chart/ChartManager.js"
|
|
44
|
+
import { StackedAreas } from "./StackedAreas.js"
|
|
45
|
+
import { HorizontalColorLegendManager } from "../legend/HorizontalColorLegends.js"
|
|
46
|
+
import { CategoricalBin } from "../color/ColorScaleBin.js"
|
|
47
|
+
import { ChartComponentProps } from "../chart/ChartTypeMap.js"
|
|
48
|
+
import { InteractionState } from "../interaction/InteractionState.js"
|
|
49
|
+
import { resolveCollision } from "./StackedUtils.js"
|
|
50
50
|
|
|
51
51
|
const STACKED_AREA_CHART_CLASS_NAME = "StackedArea"
|
|
52
52
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as _ from "lodash-es"
|
|
2
2
|
import { computed, makeObservable } from "mobx"
|
|
3
|
-
import { AbstractStackedChartState } from "./AbstractStackedChartState"
|
|
4
|
-
import { ChartState } from "../chart/ChartInterface"
|
|
5
|
-
import { StackedSeries } from "./StackedConstants"
|
|
6
|
-
import { stackSeries, withMissingValuesAsZeroes } from "./StackedUtils"
|
|
7
|
-
import { ChartManager } from "../chart/ChartManager"
|
|
3
|
+
import { AbstractStackedChartState } from "./AbstractStackedChartState.js"
|
|
4
|
+
import { ChartState } from "../chart/ChartInterface.js"
|
|
5
|
+
import { StackedSeries } from "./StackedConstants.js"
|
|
6
|
+
import { stackSeries, withMissingValuesAsZeroes } from "./StackedUtils.js"
|
|
7
|
+
import { ChartManager } from "../chart/ChartManager.js"
|
|
8
8
|
|
|
9
9
|
export class StackedAreaChartState
|
|
10
10
|
extends AbstractStackedChartState
|
|
@@ -2,30 +2,30 @@ import * as _ from "lodash-es"
|
|
|
2
2
|
import React from "react"
|
|
3
3
|
import { computed, makeObservable } from "mobx"
|
|
4
4
|
import { observer } from "mobx-react"
|
|
5
|
-
import { ChartInterface } from "../chart/ChartInterface"
|
|
6
|
-
import { StackedAreaChartState } from "./StackedAreaChartState"
|
|
7
|
-
import { type StackedAreaChartProps } from "./StackedAreaChart"
|
|
8
|
-
import { Bounds, excludeUndefined } from "../../utils/index"
|
|
5
|
+
import { ChartInterface } from "../chart/ChartInterface.js"
|
|
6
|
+
import { StackedAreaChartState } from "./StackedAreaChartState.js"
|
|
7
|
+
import { type StackedAreaChartProps } from "./StackedAreaChart.js"
|
|
8
|
+
import { Bounds, excludeUndefined } from "../../utils/index.js"
|
|
9
9
|
import {
|
|
10
10
|
BASE_FONT_SIZE,
|
|
11
11
|
DEFAULT_GRAPHER_BOUNDS,
|
|
12
12
|
GRAPHER_FONT_SCALE_12,
|
|
13
|
-
} from "../core/GrapherConstants"
|
|
14
|
-
import { DualAxis, HorizontalAxis, VerticalAxis } from "../axis/Axis"
|
|
15
|
-
import { ChartManager } from "../chart/ChartManager"
|
|
16
|
-
import { AxisConfig, AxisManager } from "../axis/AxisConfig"
|
|
13
|
+
} from "../core/GrapherConstants.js"
|
|
14
|
+
import { DualAxis, HorizontalAxis, VerticalAxis } from "../axis/Axis.js"
|
|
15
|
+
import { ChartManager } from "../chart/ChartManager.js"
|
|
16
|
+
import { AxisConfig, AxisManager } from "../axis/AxisConfig.js"
|
|
17
17
|
import {
|
|
18
18
|
HorizontalAxisComponent,
|
|
19
19
|
VerticalAxisZeroLine,
|
|
20
|
-
} from "../axis/AxisViews"
|
|
21
|
-
import { StackedAreas } from "./StackedAreas"
|
|
20
|
+
} from "../axis/AxisViews.js"
|
|
21
|
+
import { StackedAreas } from "./StackedAreas.js"
|
|
22
22
|
import {
|
|
23
23
|
InitialVerticalLabelsSeries,
|
|
24
24
|
VerticalLabelsState,
|
|
25
|
-
} from "../verticalLabels/VerticalLabelsState"
|
|
26
|
-
import { VerticalLabels } from "../verticalLabels/VerticalLabels"
|
|
27
|
-
import { resolveCollision } from "./StackedUtils"
|
|
28
|
-
import { NoDataModal } from "../noDataModal/NoDataModal"
|
|
25
|
+
} from "../verticalLabels/VerticalLabelsState.js"
|
|
26
|
+
import { VerticalLabels } from "../verticalLabels/VerticalLabels.js"
|
|
27
|
+
import { resolveCollision } from "./StackedUtils.js"
|
|
28
|
+
import { NoDataModal } from "../noDataModal/NoDataModal.js"
|
|
29
29
|
|
|
30
30
|
const LEGEND_PADDING = 4
|
|
31
31
|
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
lastOfNonEmptyArray,
|
|
8
8
|
makeIdForHumanConsumption,
|
|
9
9
|
bind,
|
|
10
|
-
} from "../../utils/index"
|
|
10
|
+
} from "../../utils/index.js"
|
|
11
11
|
import { computed, makeObservable } from "mobx"
|
|
12
|
-
import { SeriesName } from "../../types/index"
|
|
12
|
+
import { SeriesName } from "../../types/index.js"
|
|
13
13
|
import { observer } from "mobx-react"
|
|
14
|
-
import { DualAxis } from "../axis/Axis"
|
|
14
|
+
import { DualAxis } from "../axis/Axis.js"
|
|
15
15
|
import { rgb } from "d3-color"
|
|
16
16
|
import {
|
|
17
17
|
AREA_OPACITY,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
StackedPlacedSeries,
|
|
22
22
|
StackedPoint,
|
|
23
23
|
StackedSeries,
|
|
24
|
-
} from "./StackedConstants"
|
|
24
|
+
} from "./StackedConstants.js"
|
|
25
25
|
|
|
26
26
|
interface AreasProps extends React.SVGAttributes<SVGGElement> {
|
|
27
27
|
dualAxis: DualAxis
|
|
@@ -10,49 +10,49 @@ import {
|
|
|
10
10
|
makeIdForHumanConsumption,
|
|
11
11
|
guid,
|
|
12
12
|
exposeInstanceOnWindow,
|
|
13
|
-
} from "../../utils/index"
|
|
14
|
-
import { DualAxisComponent } from "../axis/AxisViews"
|
|
15
|
-
import { NoDataModal } from "../noDataModal/NoDataModal"
|
|
13
|
+
} from "../../utils/index.js"
|
|
14
|
+
import { DualAxisComponent } from "../axis/AxisViews.js"
|
|
15
|
+
import { NoDataModal } from "../noDataModal/NoDataModal.js"
|
|
16
16
|
import {
|
|
17
17
|
VerticalColorLegend,
|
|
18
18
|
VerticalColorLegendManager,
|
|
19
|
-
} from "../legend/VerticalColorLegend"
|
|
20
|
-
import { TooltipFooterIcon } from "../tooltip/TooltipProps"
|
|
19
|
+
} from "../legend/VerticalColorLegend.js"
|
|
20
|
+
import { TooltipFooterIcon } from "../tooltip/TooltipProps.js"
|
|
21
21
|
import {
|
|
22
22
|
Tooltip,
|
|
23
23
|
TooltipState,
|
|
24
24
|
TooltipTable,
|
|
25
25
|
makeTooltipRoundingNotice,
|
|
26
26
|
toTooltipTableColumns,
|
|
27
|
-
} from "../tooltip/Tooltip"
|
|
27
|
+
} from "../tooltip/Tooltip.js"
|
|
28
28
|
import {
|
|
29
29
|
BASE_FONT_SIZE,
|
|
30
30
|
DEFAULT_GRAPHER_BOUNDS,
|
|
31
|
-
} from "../core/GrapherConstants"
|
|
32
|
-
import { StackedBarChartState } from "./StackedBarChartState"
|
|
31
|
+
} from "../core/GrapherConstants.js"
|
|
32
|
+
import { StackedBarChartState } from "./StackedBarChartState.js"
|
|
33
33
|
import {
|
|
34
34
|
BAR_OPACITY,
|
|
35
35
|
LEGEND_STYLE_FOR_STACKED_CHARTS,
|
|
36
36
|
StackedPoint,
|
|
37
37
|
StackedSeries,
|
|
38
|
-
} from "./StackedConstants"
|
|
39
|
-
import { LegendInteractionState } from "../legend/LegendInteractionState"
|
|
40
|
-
import { DualAxis, HorizontalAxis, VerticalAxis } from "../axis/Axis"
|
|
41
|
-
import { HorizontalAlign, SeriesName } from "../../types/index"
|
|
42
|
-
import { makeClipPath } from "../chart/ChartUtils"
|
|
38
|
+
} from "./StackedConstants.js"
|
|
39
|
+
import { LegendInteractionState } from "../legend/LegendInteractionState.js"
|
|
40
|
+
import { DualAxis, HorizontalAxis, VerticalAxis } from "../axis/Axis.js"
|
|
41
|
+
import { HorizontalAlign, SeriesName } from "../../types/index.js"
|
|
42
|
+
import { makeClipPath } from "../chart/ChartUtils.js"
|
|
43
43
|
import {
|
|
44
44
|
HorizontalCategoricalColorLegend,
|
|
45
45
|
HorizontalColorLegendManager,
|
|
46
|
-
} from "../legend/HorizontalColorLegends"
|
|
47
|
-
import { CategoricalBin, ColorScaleBin } from "../color/ColorScaleBin"
|
|
48
|
-
import { AxisConfig, AxisManager } from "../axis/AxisConfig"
|
|
46
|
+
} from "../legend/HorizontalColorLegends.js"
|
|
47
|
+
import { CategoricalBin, ColorScaleBin } from "../color/ColorScaleBin.js"
|
|
48
|
+
import { AxisConfig, AxisManager } from "../axis/AxisConfig.js"
|
|
49
49
|
import { easeLinear } from "d3-ease"
|
|
50
50
|
import { select, type BaseType, type Selection } from "d3-selection"
|
|
51
|
-
import { ChartInterface } from "../chart/ChartInterface"
|
|
52
|
-
import { ChartManager } from "../chart/ChartManager"
|
|
53
|
-
import { ChartComponentProps } from "../chart/ChartTypeMap"
|
|
54
|
-
import { StackedBars } from "./StackedBars"
|
|
55
|
-
import { getXAxisConfigDefaultsForStackedBar } from "./StackedUtils"
|
|
51
|
+
import { ChartInterface } from "../chart/ChartInterface.js"
|
|
52
|
+
import { ChartManager } from "../chart/ChartManager.js"
|
|
53
|
+
import { ChartComponentProps } from "../chart/ChartTypeMap.js"
|
|
54
|
+
import { StackedBars } from "./StackedBars.js"
|
|
55
|
+
import { getXAxisConfigDefaultsForStackedBar } from "./StackedUtils.js"
|
|
56
56
|
|
|
57
57
|
interface TickmarkPlacement {
|
|
58
58
|
time: number
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import * as _ from "lodash-es"
|
|
2
2
|
import { computed, makeObservable } from "mobx"
|
|
3
|
-
import { AbstractStackedChartState } from "./AbstractStackedChartState"
|
|
4
|
-
import { ChartState } from "../chart/ChartInterface"
|
|
5
|
-
import { StackedSeries } from "./StackedConstants"
|
|
6
|
-
import { ColumnTypeMap } from "../../core-table/index"
|
|
3
|
+
import { AbstractStackedChartState } from "./AbstractStackedChartState.js"
|
|
4
|
+
import { ChartState } from "../chart/ChartInterface.js"
|
|
5
|
+
import { StackedSeries } from "./StackedConstants.js"
|
|
6
|
+
import { ColumnTypeMap } from "../../core-table/index.js"
|
|
7
7
|
import {
|
|
8
8
|
stackSeriesInBothDirections,
|
|
9
9
|
withMissingValuesAsZeroes,
|
|
10
|
-
} from "./StackedUtils"
|
|
11
|
-
import { ColorScaleManager } from "../color/ColorScale"
|
|
10
|
+
} from "./StackedUtils.js"
|
|
11
|
+
import { ColorScaleManager } from "../color/ColorScale.js"
|
|
12
12
|
import {
|
|
13
13
|
ColorScaleConfigInterface,
|
|
14
14
|
ColorSchemeName,
|
|
15
|
-
} from "../../types/index"
|
|
16
|
-
import { ChartManager } from "../chart/ChartManager"
|
|
15
|
+
} from "../../types/index.js"
|
|
16
|
+
import { ChartManager } from "../chart/ChartManager.js"
|
|
17
17
|
|
|
18
18
|
export class StackedBarChartState
|
|
19
19
|
extends AbstractStackedChartState
|
|
@@ -2,33 +2,33 @@ import * as _ from "lodash-es"
|
|
|
2
2
|
import React from "react"
|
|
3
3
|
import { computed, makeObservable } from "mobx"
|
|
4
4
|
import { observer } from "mobx-react"
|
|
5
|
-
import { ChartInterface } from "../chart/ChartInterface"
|
|
6
|
-
import { StackedBarChartState } from "./StackedBarChartState"
|
|
7
|
-
import { type StackedBarChartProps } from "./StackedBarChart"
|
|
8
|
-
import { ChartManager } from "../chart/ChartManager"
|
|
5
|
+
import { ChartInterface } from "../chart/ChartInterface.js"
|
|
6
|
+
import { StackedBarChartState } from "./StackedBarChartState.js"
|
|
7
|
+
import { type StackedBarChartProps } from "./StackedBarChart.js"
|
|
8
|
+
import { ChartManager } from "../chart/ChartManager.js"
|
|
9
9
|
import {
|
|
10
10
|
BASE_FONT_SIZE,
|
|
11
11
|
DEFAULT_GRAPHER_BOUNDS,
|
|
12
12
|
GRAPHER_FONT_SCALE_12,
|
|
13
|
-
} from "../core/GrapherConstants"
|
|
14
|
-
import { Bounds, excludeUndefined } from "../../utils/index"
|
|
15
|
-
import { AxisConfig, AxisManager } from "../axis/AxisConfig"
|
|
16
|
-
import { DualAxis, HorizontalAxis, VerticalAxis } from "../axis/Axis"
|
|
13
|
+
} from "../core/GrapherConstants.js"
|
|
14
|
+
import { Bounds, excludeUndefined } from "../../utils/index.js"
|
|
15
|
+
import { AxisConfig, AxisManager } from "../axis/AxisConfig.js"
|
|
16
|
+
import { DualAxis, HorizontalAxis, VerticalAxis } from "../axis/Axis.js"
|
|
17
17
|
import {
|
|
18
18
|
getXAxisConfigDefaultsForStackedBar,
|
|
19
19
|
resolveCollision,
|
|
20
|
-
} from "./StackedUtils"
|
|
20
|
+
} from "./StackedUtils.js"
|
|
21
21
|
import {
|
|
22
22
|
HorizontalAxisComponent,
|
|
23
23
|
VerticalAxisZeroLine,
|
|
24
|
-
} from "../axis/AxisViews"
|
|
25
|
-
import { StackedBars } from "./StackedBars"
|
|
24
|
+
} from "../axis/AxisViews.js"
|
|
25
|
+
import { StackedBars } from "./StackedBars.js"
|
|
26
26
|
import {
|
|
27
27
|
InitialVerticalLabelsSeries,
|
|
28
28
|
VerticalLabelsState,
|
|
29
|
-
} from "../verticalLabels/VerticalLabelsState"
|
|
30
|
-
import { VerticalLabels } from "../verticalLabels/VerticalLabels"
|
|
31
|
-
import { NoDataModal } from "../noDataModal/NoDataModal"
|
|
29
|
+
} from "../verticalLabels/VerticalLabelsState.js"
|
|
30
|
+
import { VerticalLabels } from "../verticalLabels/VerticalLabels.js"
|
|
31
|
+
import { NoDataModal } from "../noDataModal/NoDataModal.js"
|
|
32
32
|
|
|
33
33
|
const LEGEND_PADDING = 4
|
|
34
34
|
|
|
@@ -2,9 +2,9 @@ import * as _ from "lodash-es"
|
|
|
2
2
|
import * as React from "react"
|
|
3
3
|
import { computed, action, observable, makeObservable } from "mobx"
|
|
4
4
|
import { observer } from "mobx-react"
|
|
5
|
-
import { Time } from "../../utils/index"
|
|
6
|
-
import { BAR_OPACITY, StackedPoint, StackedSeries } from "./StackedConstants"
|
|
7
|
-
import { VerticalAxis } from "../axis/Axis"
|
|
5
|
+
import { Time } from "../../utils/index.js"
|
|
6
|
+
import { BAR_OPACITY, StackedPoint, StackedSeries } from "./StackedConstants.js"
|
|
7
|
+
import { VerticalAxis } from "../axis/Axis.js"
|
|
8
8
|
|
|
9
9
|
interface StackedBarSegmentProps extends React.SVGAttributes<SVGGElement> {
|
|
10
10
|
id: string
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
import { makeObservable } from "mobx"
|
|
3
3
|
import { observer } from "mobx-react"
|
|
4
|
-
import { SeriesName, Time } from "../../types/index"
|
|
5
|
-
import { DualAxis } from "../axis/Axis"
|
|
6
|
-
import { BAR_OPACITY, StackedPoint, StackedSeries } from "./StackedConstants"
|
|
4
|
+
import { SeriesName, Time } from "../../types/index.js"
|
|
5
|
+
import { DualAxis } from "../axis/Axis.js"
|
|
6
|
+
import { BAR_OPACITY, StackedPoint, StackedSeries } from "./StackedConstants.js"
|
|
7
7
|
import {
|
|
8
8
|
makeIdForHumanConsumption,
|
|
9
9
|
makeSafeForCSS,
|
|
10
|
-
} from "../../utils/index"
|
|
11
|
-
import { StackedBarSegment } from "./StackedBarSegment"
|
|
12
|
-
import { CoreColumn } from "../../core-table/index"
|
|
10
|
+
} from "../../utils/index.js"
|
|
11
|
+
import { StackedBarSegment } from "./StackedBarSegment.js"
|
|
12
|
+
import { CoreColumn } from "../../core-table/index.js"
|
|
13
13
|
|
|
14
14
|
interface StackedBarsProps {
|
|
15
15
|
dualAxis: DualAxis
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
EntityName,
|
|
4
4
|
VariableRow,
|
|
5
5
|
SeriesName,
|
|
6
|
-
} from "../../types/index"
|
|
7
|
-
import { ChartSeries } from "../chart/ChartInterface"
|
|
6
|
+
} from "../../types/index.js"
|
|
7
|
+
import { ChartSeries } from "../chart/ChartInterface.js"
|
|
8
8
|
import {
|
|
9
9
|
GRAPHER_AREA_OPACITY_DEFAULT,
|
|
10
10
|
GRAPHER_AREA_OPACITY_FOCUS,
|
|
11
11
|
GRAPHER_AREA_OPACITY_MUTE,
|
|
12
|
-
} from "../core/GrapherConstants"
|
|
13
|
-
import { TextWrap } from "../../components/index"
|
|
14
|
-
import { InteractionState } from "../interaction/InteractionState"
|
|
15
|
-
import { LegendStyleConfig } from "../legend/LegendInteractionState"
|
|
12
|
+
} from "../core/GrapherConstants.js"
|
|
13
|
+
import { TextWrap } from "../../components/index.js"
|
|
14
|
+
import { InteractionState } from "../interaction/InteractionState.js"
|
|
15
|
+
import { LegendStyleConfig } from "../legend/LegendInteractionState.js"
|
|
16
16
|
|
|
17
17
|
export const AREA_OPACITY = {
|
|
18
18
|
DEFAULT: GRAPHER_AREA_OPACITY_DEFAULT,
|
|
@@ -8,31 +8,31 @@ import {
|
|
|
8
8
|
EntityName,
|
|
9
9
|
getRelativeMouse,
|
|
10
10
|
exposeInstanceOnWindow,
|
|
11
|
-
} from "../../utils/index"
|
|
11
|
+
} from "../../utils/index.js"
|
|
12
12
|
import { action, computed, makeObservable, observable } from "mobx"
|
|
13
13
|
import { observer } from "mobx-react"
|
|
14
|
-
import { SeriesName } from "../../types/index"
|
|
14
|
+
import { SeriesName } from "../../types/index.js"
|
|
15
15
|
import {
|
|
16
16
|
BASE_FONT_SIZE,
|
|
17
17
|
DEFAULT_GRAPHER_BOUNDS,
|
|
18
|
-
} from "../core/GrapherConstants"
|
|
19
|
-
import { NoDataModal } from "../noDataModal/NoDataModal"
|
|
20
|
-
import { ChartInterface } from "../chart/ChartInterface"
|
|
21
|
-
import { ChartManager } from "../chart/ChartManager"
|
|
22
|
-
import { TooltipState } from "../tooltip/Tooltip"
|
|
18
|
+
} from "../core/GrapherConstants.js"
|
|
19
|
+
import { NoDataModal } from "../noDataModal/NoDataModal.js"
|
|
20
|
+
import { ChartInterface } from "../chart/ChartInterface.js"
|
|
21
|
+
import { ChartManager } from "../chart/ChartManager.js"
|
|
22
|
+
import { TooltipState } from "../tooltip/Tooltip.js"
|
|
23
23
|
import {
|
|
24
24
|
LEGEND_STYLE_FOR_STACKED_CHARTS,
|
|
25
25
|
StackedSeries,
|
|
26
|
-
} from "./StackedConstants"
|
|
26
|
+
} from "./StackedConstants.js"
|
|
27
27
|
import {
|
|
28
28
|
HorizontalCategoricalColorLegend,
|
|
29
29
|
HorizontalColorLegendManager,
|
|
30
|
-
} from "../legend/HorizontalColorLegends"
|
|
31
|
-
import { CategoricalBin, ColorScaleBin } from "../color/ColorScaleBin"
|
|
32
|
-
import { LegendInteractionState } from "../legend/LegendInteractionState"
|
|
33
|
-
import { StackedDiscreteBarChartState } from "./StackedDiscreteBarChartState"
|
|
34
|
-
import { ChartComponentProps } from "../chart/ChartTypeMap"
|
|
35
|
-
import { StackedDiscreteBars } from "./StackedDiscreteBars"
|
|
30
|
+
} from "../legend/HorizontalColorLegends.js"
|
|
31
|
+
import { CategoricalBin, ColorScaleBin } from "../color/ColorScaleBin.js"
|
|
32
|
+
import { LegendInteractionState } from "../legend/LegendInteractionState.js"
|
|
33
|
+
import { StackedDiscreteBarChartState } from "./StackedDiscreteBarChartState.js"
|
|
34
|
+
import { ChartComponentProps } from "../chart/ChartTypeMap.js"
|
|
35
|
+
import { StackedDiscreteBars } from "./StackedDiscreteBars.js"
|
|
36
36
|
|
|
37
37
|
export interface StackedDiscreteBarChartManager extends ChartManager {
|
|
38
38
|
endTime?: Time
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _ from "lodash-es"
|
|
2
2
|
import { computed, makeObservable } from "mobx"
|
|
3
|
-
import { ChartState } from "../chart/ChartInterface"
|
|
4
|
-
import { StackedDiscreteBarChartManager } from "./StackedDiscreteBarChart"
|
|
5
|
-
import { CoreColumn, ChartsTable } from "../../core-table/index"
|
|
3
|
+
import { ChartState } from "../chart/ChartInterface.js"
|
|
4
|
+
import { StackedDiscreteBarChartManager } from "./StackedDiscreteBarChart.js"
|
|
5
|
+
import { CoreColumn, ChartsTable } from "../../core-table/index.js"
|
|
6
6
|
import {
|
|
7
7
|
ChartErrorInfo,
|
|
8
8
|
ColorSchemeName,
|
|
@@ -12,24 +12,24 @@ import {
|
|
|
12
12
|
SortBy,
|
|
13
13
|
SortConfig,
|
|
14
14
|
SortOrder,
|
|
15
|
-
} from "../../types/index"
|
|
15
|
+
} from "../../types/index.js"
|
|
16
16
|
import {
|
|
17
17
|
autoDetectYColumnSlugs,
|
|
18
18
|
getDefaultFailMessage,
|
|
19
19
|
getShortNameForEntity,
|
|
20
20
|
makeSelectionArray,
|
|
21
|
-
} from "../chart/ChartUtils"
|
|
22
|
-
import { SelectionArray } from "../selection/SelectionArray"
|
|
23
|
-
import { Item, StackedSeries } from "./StackedConstants"
|
|
21
|
+
} from "../chart/ChartUtils.js"
|
|
22
|
+
import { SelectionArray } from "../selection/SelectionArray.js"
|
|
23
|
+
import { Item, StackedSeries } from "./StackedConstants.js"
|
|
24
24
|
import {
|
|
25
25
|
stackSeriesInBothDirections,
|
|
26
26
|
withMissingValuesAsZeroes,
|
|
27
|
-
} from "./StackedUtils"
|
|
28
|
-
import { CategoricalColorAssigner } from "../color/CategoricalColorAssigner"
|
|
29
|
-
import { ColorScheme } from "../color/ColorScheme"
|
|
30
|
-
import { ColorSchemes } from "../color/ColorSchemes"
|
|
31
|
-
import { excludeUndefined } from "../../utils/index"
|
|
32
|
-
import { FocusArray } from "../focus/FocusArray"
|
|
27
|
+
} from "./StackedUtils.js"
|
|
28
|
+
import { CategoricalColorAssigner } from "../color/CategoricalColorAssigner.js"
|
|
29
|
+
import { ColorScheme } from "../color/ColorScheme.js"
|
|
30
|
+
import { ColorSchemes } from "../color/ColorSchemes.js"
|
|
31
|
+
import { excludeUndefined } from "../../utils/index.js"
|
|
32
|
+
import { FocusArray } from "../focus/FocusArray.js"
|
|
33
33
|
|
|
34
34
|
export class StackedDiscreteBarChartState implements ChartState {
|
|
35
35
|
manager: StackedDiscreteBarChartManager
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { computed, makeObservable } from "mobx"
|
|
3
3
|
import { observer } from "mobx-react"
|
|
4
|
-
import { ChartInterface } from "../chart/ChartInterface"
|
|
5
|
-
import { StackedDiscreteBarChartState } from "./StackedDiscreteBarChartState"
|
|
6
|
-
import { ChartComponentProps } from "../chart/ChartTypeMap"
|
|
7
|
-
import { StackedDiscreteBars } from "./StackedDiscreteBars"
|
|
4
|
+
import { ChartInterface } from "../chart/ChartInterface.js"
|
|
5
|
+
import { StackedDiscreteBarChartState } from "./StackedDiscreteBarChartState.js"
|
|
6
|
+
import { ChartComponentProps } from "../chart/ChartTypeMap.js"
|
|
7
|
+
import { StackedDiscreteBars } from "./StackedDiscreteBars.js"
|
|
8
8
|
|
|
9
9
|
@observer
|
|
10
10
|
export class StackedDiscreteBarChartThumbnail
|