@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
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
PointVector,
|
|
6
6
|
makeIdForHumanConsumption,
|
|
7
7
|
pointsToPath,
|
|
8
|
-
} from "../../utils/index"
|
|
8
|
+
} from "../../utils/index.js"
|
|
9
9
|
import { computed, makeObservable } from "mobx"
|
|
10
10
|
import { observer } from "mobx-react"
|
|
11
|
-
import { GRAPHER_OPACITY_MUTE } from "../core/GrapherConstants"
|
|
11
|
+
import { GRAPHER_OPACITY_MUTE } from "../core/GrapherConstants.js"
|
|
12
12
|
import {
|
|
13
13
|
DEFAULT_LINE_COLOR,
|
|
14
14
|
DEFAULT_LINE_OUTLINE_WIDTH,
|
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
LinesProps,
|
|
18
18
|
PlacedLineChartSeries,
|
|
19
19
|
RenderLineChartSeries,
|
|
20
|
-
} from "./LineChartConstants"
|
|
21
|
-
import { getSeriesKey } from "../chart/ChartUtils"
|
|
22
|
-
import { GRAPHER_BACKGROUND_DEFAULT } from "../color/ColorConstants"
|
|
23
|
-
import { MultiColorPolyline } from "../scatterCharts/MultiColorPolyline"
|
|
20
|
+
} from "./LineChartConstants.js"
|
|
21
|
+
import { getSeriesKey } from "../chart/ChartUtils.js"
|
|
22
|
+
import { GRAPHER_BACKGROUND_DEFAULT } from "../color/ColorConstants.js"
|
|
23
|
+
import { MultiColorPolyline } from "../scatterCharts/MultiColorPolyline.js"
|
|
24
24
|
|
|
25
25
|
@observer
|
|
26
26
|
export class Lines extends React.Component<LinesProps> {
|
|
@@ -5,39 +5,39 @@ import {
|
|
|
5
5
|
Bounds,
|
|
6
6
|
makeIdForHumanConsumption,
|
|
7
7
|
excludeUndefined,
|
|
8
|
-
} from "../../utils/index"
|
|
9
|
-
import { TextWrap, Halo, MarkdownTextWrap } from "../../components/index"
|
|
8
|
+
} from "../../utils/index.js"
|
|
9
|
+
import { TextWrap, Halo, MarkdownTextWrap } from "../../components/index.js"
|
|
10
10
|
import { computed, makeObservable } from "mobx"
|
|
11
11
|
import { observer } from "mobx-react"
|
|
12
|
-
import { VerticalAxis } from "../axis/Axis"
|
|
12
|
+
import { VerticalAxis } from "../axis/Axis.js"
|
|
13
13
|
import {
|
|
14
14
|
Color,
|
|
15
15
|
EntityName,
|
|
16
16
|
SeriesName,
|
|
17
17
|
VerticalAlign,
|
|
18
|
-
} from "../../types/index"
|
|
18
|
+
} from "../../types/index.js"
|
|
19
19
|
import {
|
|
20
20
|
BASE_FONT_SIZE,
|
|
21
21
|
GRAPHER_FONT_SCALE_12,
|
|
22
22
|
GRAPHER_OPACITY_MUTE,
|
|
23
23
|
GRAPHER_TEXT_OUTLINE_FACTOR,
|
|
24
|
-
} from "../core/GrapherConstants"
|
|
25
|
-
import { darkenColorForText } from "../color/ColorUtils"
|
|
26
|
-
import { AxisConfig } from "../axis/AxisConfig"
|
|
27
|
-
import { GRAPHER_BACKGROUND_DEFAULT } from "../color/ColorConstants"
|
|
24
|
+
} from "../core/GrapherConstants.js"
|
|
25
|
+
import { darkenColorForText } from "../color/ColorUtils.js"
|
|
26
|
+
import { AxisConfig } from "../axis/AxisConfig.js"
|
|
27
|
+
import { GRAPHER_BACKGROUND_DEFAULT } from "../color/ColorConstants.js"
|
|
28
28
|
import {
|
|
29
29
|
findImportantSeriesThatFitIntoTheAvailableSpace,
|
|
30
30
|
findSeriesThatFitIntoTheAvailableSpace,
|
|
31
|
-
} from "./LineLegendFilterAlgorithms"
|
|
31
|
+
} from "./LineLegendFilterAlgorithms.js"
|
|
32
32
|
import {
|
|
33
33
|
ANNOTATION_PADDING,
|
|
34
34
|
DEFAULT_CONNECTOR_LINE_WIDTH,
|
|
35
35
|
DEFAULT_FONT_WEIGHT,
|
|
36
36
|
LEGEND_ITEM_MIN_SPACING,
|
|
37
37
|
MARKER_MARGIN,
|
|
38
|
-
} from "./LineLegendConstants"
|
|
39
|
-
import { getSeriesKey } from "./LineLegendHelpers"
|
|
40
|
-
import { LineLabelSeries, PlacedSeries, SizedSeries } from "./LineLegendTypes"
|
|
38
|
+
} from "./LineLegendConstants.js"
|
|
39
|
+
import { getSeriesKey } from "./LineLegendHelpers.js"
|
|
40
|
+
import { LineLabelSeries, PlacedSeries, SizedSeries } from "./LineLegendTypes.js"
|
|
41
41
|
|
|
42
42
|
function groupBounds(group: PlacedSeries[]): Bounds {
|
|
43
43
|
const first = group[0]
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
pickCandidate,
|
|
7
7
|
pickCandidateWithMaxDistanceToReferenceCandidate,
|
|
8
8
|
pickCandidateWithRetry,
|
|
9
|
-
} from "./LineLegendHelpers"
|
|
10
|
-
import { PlacedSeries } from "./LineLegendTypes"
|
|
9
|
+
} from "./LineLegendHelpers.js"
|
|
10
|
+
import { PlacedSeries } from "./LineLegendTypes.js"
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Keep a subset of series that fit within the available height, prioritizing by
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _ from "lodash-es"
|
|
2
|
-
import { SeriesName } from "../../utils/index"
|
|
3
|
-
import { PlacedSeries } from "./LineLegendTypes"
|
|
4
|
-
import { LEGEND_ITEM_MIN_SPACING } from "./LineLegendConstants"
|
|
2
|
+
import { SeriesName } from "../../utils/index.js"
|
|
3
|
+
import { PlacedSeries } from "./LineLegendTypes.js"
|
|
4
|
+
import { LEGEND_ITEM_MIN_SPACING } from "./LineLegendConstants.js"
|
|
5
5
|
import * as R from "remeda"
|
|
6
6
|
|
|
7
7
|
type Bracket = [number, number]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MarkdownTextWrap, TextWrap } from "../../components/index"
|
|
2
|
-
import { Bounds } from "../../utils/index"
|
|
3
|
-
import { ChartSeries } from "../chart/ChartInterface"
|
|
4
|
-
import { InteractionState } from "../interaction/InteractionState"
|
|
1
|
+
import { MarkdownTextWrap, TextWrap } from "../../components/index.js"
|
|
2
|
+
import { Bounds } from "../../utils/index.js"
|
|
3
|
+
import { ChartSeries } from "../chart/ChartInterface.js"
|
|
4
|
+
import { InteractionState } from "../interaction/InteractionState.js"
|
|
5
5
|
|
|
6
6
|
export interface LineLabelSeries extends ChartSeries {
|
|
7
7
|
label: string
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
MapRegionName,
|
|
25
25
|
excludeUndefined,
|
|
26
26
|
EntityName,
|
|
27
|
-
} from "../../utils/index"
|
|
27
|
+
} from "../../utils/index.js"
|
|
28
28
|
import {
|
|
29
29
|
Annotation,
|
|
30
30
|
ANNOTATION_COLOR_DARK,
|
|
@@ -45,9 +45,9 @@ import {
|
|
|
45
45
|
PROJECTED_DATA_LEGEND_COLOR,
|
|
46
46
|
RenderFeature,
|
|
47
47
|
SVGMouseEvent,
|
|
48
|
-
} from "./MapChartConstants"
|
|
49
|
-
import { MapConfig } from "./MapConfig"
|
|
50
|
-
import { getGeoFeaturesForGlobe } from "./GeoFeatures"
|
|
48
|
+
} from "./MapChartConstants.js"
|
|
49
|
+
import { MapConfig } from "./MapConfig.js"
|
|
50
|
+
import { getGeoFeaturesForGlobe } from "./GeoFeatures.js"
|
|
51
51
|
import {
|
|
52
52
|
BackgroundCountry,
|
|
53
53
|
CountryWithData,
|
|
@@ -56,8 +56,8 @@ import {
|
|
|
56
56
|
InternalValueAnnotation,
|
|
57
57
|
NoDataPattern,
|
|
58
58
|
ProjectedDataPattern,
|
|
59
|
-
} from "./MapComponents"
|
|
60
|
-
import { Patterns } from "../core/GrapherConstants"
|
|
59
|
+
} from "./MapComponents.js"
|
|
60
|
+
import { Patterns } from "../core/GrapherConstants.js"
|
|
61
61
|
import {
|
|
62
62
|
calculateDistance,
|
|
63
63
|
detectNearbyFeature,
|
|
@@ -65,16 +65,16 @@ import {
|
|
|
65
65
|
sortFeaturesByInteractionStateAndSize,
|
|
66
66
|
getForegroundFeatures,
|
|
67
67
|
isValidGlobeRegionName,
|
|
68
|
-
} from "./MapHelpers"
|
|
68
|
+
} from "./MapHelpers.js"
|
|
69
69
|
import {
|
|
70
70
|
makeInternalAnnotationForFeature,
|
|
71
71
|
makeExternalAnnotationForFeature,
|
|
72
72
|
repositionAndFilterExternalAnnotations,
|
|
73
|
-
} from "./MapAnnotations"
|
|
73
|
+
} from "./MapAnnotations.js"
|
|
74
74
|
import * as R from "remeda"
|
|
75
|
-
import { GlobeController } from "./GlobeController"
|
|
76
|
-
import { isDarkColor } from "../color/ColorUtils"
|
|
77
|
-
import { MapSelectionArray } from "../selection/MapSelectionArray"
|
|
75
|
+
import { GlobeController } from "./GlobeController.js"
|
|
76
|
+
import { isDarkColor } from "../color/ColorUtils.js"
|
|
77
|
+
import { MapSelectionArray } from "../selection/MapSelectionArray.js"
|
|
78
78
|
|
|
79
79
|
const DEFAULT_SCALE = geoOrthographic().scale()
|
|
80
80
|
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
excludeUndefined,
|
|
8
8
|
EntityName,
|
|
9
9
|
MapRegionName,
|
|
10
|
-
} from "../../utils/index"
|
|
10
|
+
} from "../../utils/index.js"
|
|
11
11
|
import { computed, action, observable, makeObservable } from "mobx"
|
|
12
12
|
import { observer } from "mobx-react"
|
|
13
13
|
import { Quadtree, quadtree } from "d3-quadtree"
|
|
@@ -28,8 +28,8 @@ import {
|
|
|
28
28
|
MapViewport,
|
|
29
29
|
MAP_VIEWPORTS,
|
|
30
30
|
MAP_REGION_LABELS,
|
|
31
|
-
} from "./MapChartConstants"
|
|
32
|
-
import { getGeoFeaturesForMap } from "./GeoFeatures"
|
|
31
|
+
} from "./MapChartConstants.js"
|
|
32
|
+
import { getGeoFeaturesForMap } from "./GeoFeatures.js"
|
|
33
33
|
import {
|
|
34
34
|
BackgroundCountry,
|
|
35
35
|
CountryWithData,
|
|
@@ -38,23 +38,23 @@ import {
|
|
|
38
38
|
InternalValueAnnotation,
|
|
39
39
|
NoDataPattern,
|
|
40
40
|
ProjectedDataPattern,
|
|
41
|
-
} from "./MapComponents"
|
|
42
|
-
import { Patterns } from "../core/GrapherConstants"
|
|
41
|
+
} from "./MapComponents.js"
|
|
42
|
+
import { Patterns } from "../core/GrapherConstants.js"
|
|
43
43
|
import {
|
|
44
44
|
detectNearbyFeature,
|
|
45
45
|
getCountriesByRegion,
|
|
46
46
|
getForegroundFeatures,
|
|
47
47
|
sortFeaturesByInteractionStateAndSize,
|
|
48
|
-
} from "./MapHelpers"
|
|
48
|
+
} from "./MapHelpers.js"
|
|
49
49
|
import {
|
|
50
50
|
makeInternalAnnotationForFeature,
|
|
51
51
|
makeExternalAnnotationForFeature,
|
|
52
52
|
repositionAndFilterExternalAnnotations,
|
|
53
|
-
} from "./MapAnnotations"
|
|
54
|
-
import { isDarkColor } from "../color/ColorUtils"
|
|
55
|
-
import { MapConfig } from "./MapConfig"
|
|
56
|
-
import { MapSelectionArray } from "../selection/MapSelectionArray"
|
|
57
|
-
import { MAP_PROJECTIONS } from "./MapProjections"
|
|
53
|
+
} from "./MapAnnotations.js"
|
|
54
|
+
import { isDarkColor } from "../color/ColorUtils.js"
|
|
55
|
+
import { MapConfig } from "./MapConfig.js"
|
|
56
|
+
import { MapSelectionArray } from "../selection/MapSelectionArray.js"
|
|
57
|
+
import { MAP_PROJECTIONS } from "./MapProjections.js"
|
|
58
58
|
|
|
59
59
|
@observer
|
|
60
60
|
export class ChoroplethMap extends React.Component<{
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
GlobeRenderFeature,
|
|
5
5
|
MapRenderFeature,
|
|
6
6
|
RenderFeatureType,
|
|
7
|
-
} from "./MapChartConstants"
|
|
8
|
-
import { Bounds, lazy, MapRegionName, PointVector } from "../../utils/index"
|
|
9
|
-
import { CanadaTopology } from "./CanadaTopology"
|
|
10
|
-
import { MapTopology } from "./MapTopology"
|
|
7
|
+
} from "./MapChartConstants.js"
|
|
8
|
+
import { Bounds, lazy, MapRegionName, PointVector } from "../../utils/index.js"
|
|
9
|
+
import { CanadaTopology } from "./CanadaTopology.js"
|
|
10
|
+
import { MapTopology } from "./MapTopology.js"
|
|
11
11
|
import { geoBounds, geoCentroid, geoPath } from "d3-geo"
|
|
12
|
-
import { MAP_PROJECTIONS } from "./MapProjections"
|
|
12
|
+
import { MAP_PROJECTIONS } from "./MapProjections.js"
|
|
13
13
|
|
|
14
14
|
// Get the underlying geographical topology elements we're going to display
|
|
15
15
|
export const GeoFeatures: GeoFeature[] = (
|
|
@@ -3,7 +3,7 @@ import { geoInterpolate, geoOrthographic, geoPath } from "d3-geo"
|
|
|
3
3
|
import { interpolateNumber } from "d3-interpolate"
|
|
4
4
|
import { easeCubicOut } from "d3-ease"
|
|
5
5
|
import * as R from "remeda"
|
|
6
|
-
import { EntityName, GlobeConfig, GlobeRegionName } from "../../types/index"
|
|
6
|
+
import { EntityName, GlobeConfig, GlobeRegionName } from "../../types/index.js"
|
|
7
7
|
import {
|
|
8
8
|
Bounds,
|
|
9
9
|
excludeUndefined,
|
|
@@ -13,9 +13,9 @@ import {
|
|
|
13
13
|
getCountryNamesForRegion,
|
|
14
14
|
getRegionByName,
|
|
15
15
|
checkHasMembers,
|
|
16
|
-
} from "../../utils/index"
|
|
17
|
-
import { MapConfig } from "./MapConfig"
|
|
18
|
-
import { getGeoFeaturesForGlobe } from "./GeoFeatures"
|
|
16
|
+
} from "../../utils/index.js"
|
|
17
|
+
import { MapConfig } from "./MapConfig.js"
|
|
18
|
+
import { getGeoFeaturesForGlobe } from "./GeoFeatures.js"
|
|
19
19
|
import {
|
|
20
20
|
DEFAULT_GLOBE_ROTATION,
|
|
21
21
|
DEFAULT_GLOBE_ROTATIONS_FOR_TIME,
|
|
@@ -29,10 +29,10 @@ import {
|
|
|
29
29
|
GLOBE_VIEWPORTS,
|
|
30
30
|
GlobeRenderFeature,
|
|
31
31
|
MAP_REGION_NAMES,
|
|
32
|
-
} from "./MapChartConstants"
|
|
33
|
-
import { isPointPlacedOnVisibleHemisphere } from "./MapHelpers"
|
|
32
|
+
} from "./MapChartConstants.js"
|
|
33
|
+
import { isPointPlacedOnVisibleHemisphere } from "./MapHelpers.js"
|
|
34
34
|
import { ckmeans } from "simple-statistics"
|
|
35
|
-
import { MapSelectionArray } from "../selection/MapSelectionArray"
|
|
35
|
+
import { MapSelectionArray } from "../selection/MapSelectionArray.js"
|
|
36
36
|
import { center } from "@turf/center"
|
|
37
37
|
import { action } from "mobx"
|
|
38
38
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { GeoFeaturesById } from "./GeoFeatures"
|
|
1
|
+
import { GeoFeaturesById } from "./GeoFeatures.js"
|
|
2
2
|
import annotations from "./MapAnnotationPlacements.json"
|
|
3
|
-
import { Direction, EllipseCoords, GeoFeature } from "./MapChartConstants"
|
|
3
|
+
import { Direction, EllipseCoords, GeoFeature } from "./MapChartConstants.js"
|
|
4
4
|
|
|
5
5
|
interface RawAnnotationPlacement {
|
|
6
6
|
id: string
|
|
@@ -2,9 +2,9 @@ import { Feature, GeoJsonProperties, Polygon } from "geojson"
|
|
|
2
2
|
import { GeoProjection } from "d3-geo"
|
|
3
3
|
import { forceSimulation, forceX, forceY, SimulationNodeDatum } from "d3-force"
|
|
4
4
|
// no types available
|
|
5
|
-
import bboxCollide from "./d3-bboxCollide"
|
|
5
|
+
import bboxCollide from "./d3-bboxCollide.js"
|
|
6
6
|
import { booleanIntersects } from "@turf/boolean-intersects"
|
|
7
|
-
import { Bounds, excludeUndefined } from "../../utils/index"
|
|
7
|
+
import { Bounds, excludeUndefined } from "../../utils/index.js"
|
|
8
8
|
import {
|
|
9
9
|
Direction,
|
|
10
10
|
Ellipse,
|
|
@@ -20,11 +20,11 @@ import {
|
|
|
20
20
|
ANNOTATION_FONT_SIZE_EXTERNAL_MAX,
|
|
21
21
|
ANNOTATION_MARKER_LINE_LENGTH_DEFAULT,
|
|
22
22
|
ANNOTATION_MARKER_LINE_LENGTH_MAX,
|
|
23
|
-
} from "./MapChartConstants"
|
|
23
|
+
} from "./MapChartConstants.js"
|
|
24
24
|
import * as R from "remeda"
|
|
25
|
-
import { annotationPlacementsById } from "./MapAnnotationPlacements"
|
|
26
|
-
import { GRAPHER_DARK_TEXT } from "../color/ColorConstants"
|
|
27
|
-
import { getGeoFeaturesForGlobe } from "./GeoFeatures"
|
|
25
|
+
import { annotationPlacementsById } from "./MapAnnotationPlacements.js"
|
|
26
|
+
import { GRAPHER_DARK_TEXT } from "../color/ColorConstants.js"
|
|
27
|
+
import { getGeoFeaturesForGlobe } from "./GeoFeatures.js"
|
|
28
28
|
|
|
29
29
|
const MARKER_TEXT_GAP = 2
|
|
30
30
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DimensionProperty } from "../../utils/index"
|
|
2
|
-
import { GrapherProgrammaticInterface } from "../core/Grapher"
|
|
3
|
-
import { GRAPHER_TAB_CONFIG_OPTIONS } from "../../types/index"
|
|
1
|
+
import { DimensionProperty } from "../../utils/index.js"
|
|
2
|
+
import { GrapherProgrammaticInterface } from "../core/Grapher.js"
|
|
3
|
+
import { GRAPHER_TAB_CONFIG_OPTIONS } from "../../types/index.js"
|
|
4
4
|
|
|
5
5
|
export const legacyMapGrapher: GrapherProgrammaticInterface = {
|
|
6
6
|
hasMapTab: true,
|
|
@@ -5,19 +5,19 @@ import {
|
|
|
5
5
|
exposeInstanceOnWindow,
|
|
6
6
|
Color,
|
|
7
7
|
HorizontalAlign,
|
|
8
|
-
} from "../../utils/index"
|
|
8
|
+
} from "../../utils/index.js"
|
|
9
9
|
import { observable, computed, action, makeObservable } from "mobx"
|
|
10
10
|
import { observer } from "mobx-react"
|
|
11
11
|
import {
|
|
12
12
|
HorizontalCategoricalColorLegend,
|
|
13
13
|
HorizontalColorLegendManager,
|
|
14
14
|
HorizontalNumericColorLegend,
|
|
15
|
-
} from "../legend/HorizontalColorLegends"
|
|
15
|
+
} from "../legend/HorizontalColorLegends.js"
|
|
16
16
|
import { select } from "d3-selection"
|
|
17
17
|
import { easeCubic } from "d3-ease"
|
|
18
|
-
import { MapTooltip } from "./MapTooltip"
|
|
19
|
-
import { TooltipState } from "../tooltip/Tooltip"
|
|
20
|
-
import { CoreColumn } from "../../core-table/index"
|
|
18
|
+
import { MapTooltip } from "./MapTooltip.js"
|
|
19
|
+
import { TooltipState } from "../tooltip/Tooltip.js"
|
|
20
|
+
import { CoreColumn } from "../../core-table/index.js"
|
|
21
21
|
import {
|
|
22
22
|
GeoFeature,
|
|
23
23
|
MapBracket,
|
|
@@ -31,16 +31,16 @@ import {
|
|
|
31
31
|
MapColumnInfo,
|
|
32
32
|
PROJECTED_DATA_LEGEND_COLOR,
|
|
33
33
|
MapViewport,
|
|
34
|
-
} from "./MapChartConstants"
|
|
35
|
-
import { MapConfig } from "./MapConfig"
|
|
36
|
-
import { ColorScale } from "../color/ColorScale"
|
|
34
|
+
} from "./MapChartConstants.js"
|
|
35
|
+
import { MapConfig } from "./MapConfig.js"
|
|
36
|
+
import { ColorScale } from "../color/ColorScale.js"
|
|
37
37
|
import {
|
|
38
38
|
BASE_FONT_SIZE,
|
|
39
39
|
DEFAULT_GRAPHER_BOUNDS,
|
|
40
40
|
GRAPHER_MAX_TOOLTIP_WIDTH,
|
|
41
41
|
Patterns,
|
|
42
|
-
} from "../core/GrapherConstants"
|
|
43
|
-
import { ChartInterface } from "../chart/ChartInterface"
|
|
42
|
+
} from "../core/GrapherConstants.js"
|
|
43
|
+
import { ChartInterface } from "../chart/ChartInterface.js"
|
|
44
44
|
import {
|
|
45
45
|
CategoricalBin,
|
|
46
46
|
ColorScaleBin,
|
|
@@ -49,28 +49,28 @@ import {
|
|
|
49
49
|
isNumericBin,
|
|
50
50
|
isProjectedDataBin,
|
|
51
51
|
NumericBin,
|
|
52
|
-
} from "../color/ColorScaleBin"
|
|
52
|
+
} from "../color/ColorScaleBin.js"
|
|
53
53
|
import {
|
|
54
54
|
LegendInteractionState,
|
|
55
55
|
LegendStyleConfig,
|
|
56
|
-
} from "../legend/LegendInteractionState"
|
|
56
|
+
} from "../legend/LegendInteractionState.js"
|
|
57
57
|
import {
|
|
58
58
|
ColumnSlug,
|
|
59
59
|
GrapherVariant,
|
|
60
60
|
MapRegionName,
|
|
61
|
-
} from "../../types/index"
|
|
62
|
-
import { ClipPath, makeClipPath } from "../chart/ChartUtils"
|
|
63
|
-
import { NoDataModal } from "../noDataModal/NoDataModal"
|
|
61
|
+
} from "../../types/index.js"
|
|
62
|
+
import { ClipPath, makeClipPath } from "../chart/ChartUtils.js"
|
|
63
|
+
import { NoDataModal } from "../noDataModal/NoDataModal.js"
|
|
64
64
|
import { Component, createRef } from "react"
|
|
65
|
-
import { ChoroplethMap } from "./ChoroplethMap"
|
|
66
|
-
import { ChoroplethGlobe } from "./ChoroplethGlobe"
|
|
67
|
-
import { GlobeController } from "./GlobeController"
|
|
68
|
-
import { MapSelectionArray } from "../selection/MapSelectionArray"
|
|
65
|
+
import { ChoroplethMap } from "./ChoroplethMap.js"
|
|
66
|
+
import { ChoroplethGlobe } from "./ChoroplethGlobe.js"
|
|
67
|
+
import { GlobeController } from "./GlobeController.js"
|
|
68
|
+
import { MapSelectionArray } from "../selection/MapSelectionArray.js"
|
|
69
69
|
import { match } from "ts-pattern"
|
|
70
|
-
import { makeProjectedDataPatternId } from "./MapComponents"
|
|
71
|
-
import { MapChartState } from "./MapChartState"
|
|
72
|
-
import { ChartComponentProps } from "../chart/ChartTypeMap"
|
|
73
|
-
import { InteractionState } from "../interaction/InteractionState"
|
|
70
|
+
import { makeProjectedDataPatternId } from "./MapComponents.js"
|
|
71
|
+
import { MapChartState } from "./MapChartState.js"
|
|
72
|
+
import { ChartComponentProps } from "../chart/ChartTypeMap.js"
|
|
73
|
+
import { InteractionState } from "../interaction/InteractionState.js"
|
|
74
74
|
|
|
75
75
|
export type MapChartProps = ChartComponentProps<MapChartState>
|
|
76
76
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ColorScaleBin } from "../color/ColorScaleBin"
|
|
2
|
-
import { Bounds, ColumnSlug } from "../../utils/index"
|
|
1
|
+
import { ColorScaleBin } from "../color/ColorScaleBin.js"
|
|
2
|
+
import { Bounds, ColumnSlug } from "../../utils/index.js"
|
|
3
3
|
import {
|
|
4
4
|
MapRegionName,
|
|
5
5
|
SeriesName,
|
|
@@ -7,15 +7,15 @@ import {
|
|
|
7
7
|
ProjectionColumnInfo,
|
|
8
8
|
type GrapherInteractionEvent,
|
|
9
9
|
Time,
|
|
10
|
-
} from "../../types/index"
|
|
11
|
-
import { ChartManager } from "../chart/ChartManager"
|
|
12
|
-
import { MapConfig } from "./MapConfig"
|
|
13
|
-
import { ChartSeries } from "../chart/ChartInterface"
|
|
14
|
-
import { GlobeController } from "./GlobeController"
|
|
15
|
-
import { MapSelectionArray } from "../selection/MapSelectionArray"
|
|
16
|
-
import { CoreColumn } from "../../core-table/index"
|
|
10
|
+
} from "../../types/index.js"
|
|
11
|
+
import { ChartManager } from "../chart/ChartManager.js"
|
|
12
|
+
import { MapConfig } from "./MapConfig.js"
|
|
13
|
+
import { ChartSeries } from "../chart/ChartInterface.js"
|
|
14
|
+
import { GlobeController } from "./GlobeController.js"
|
|
15
|
+
import { MapSelectionArray } from "../selection/MapSelectionArray.js"
|
|
16
|
+
import { CoreColumn } from "../../core-table/index.js"
|
|
17
17
|
import * as R from "remeda"
|
|
18
|
-
import { InteractionState } from "../interaction/InteractionState"
|
|
18
|
+
import { InteractionState } from "../interaction/InteractionState.js"
|
|
19
19
|
|
|
20
20
|
export declare type SVGMouseEvent = React.MouseEvent<SVGElement>
|
|
21
21
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as R from "remeda"
|
|
2
2
|
import { computed, makeObservable } from "mobx"
|
|
3
|
-
import { ChartState } from "../chart/ChartInterface"
|
|
3
|
+
import { ChartState } from "../chart/ChartInterface.js"
|
|
4
4
|
import {
|
|
5
5
|
ChoroplethSeries,
|
|
6
6
|
ChoroplethSeriesByName,
|
|
7
7
|
MAP_REGION_LABELS,
|
|
8
8
|
MapChartManager,
|
|
9
9
|
MapColumnInfo,
|
|
10
|
-
} from "./MapChartConstants"
|
|
10
|
+
} from "./MapChartConstants.js"
|
|
11
11
|
import {
|
|
12
12
|
CoreColumn,
|
|
13
13
|
ErrorValueTypes,
|
|
14
14
|
ChartsTable,
|
|
15
|
-
} from "../../core-table/index"
|
|
15
|
+
} from "../../core-table/index.js"
|
|
16
16
|
import { match, P } from "ts-pattern"
|
|
17
17
|
import {
|
|
18
18
|
ChartErrorInfo,
|
|
@@ -24,24 +24,24 @@ import {
|
|
|
24
24
|
PrimitiveType,
|
|
25
25
|
TickFormattingOptions,
|
|
26
26
|
Time,
|
|
27
|
-
} from "../../types/index"
|
|
27
|
+
} from "../../types/index.js"
|
|
28
28
|
import {
|
|
29
29
|
anyToString,
|
|
30
30
|
checkHasMembers,
|
|
31
31
|
isPresent,
|
|
32
32
|
mappableCountries,
|
|
33
33
|
regions,
|
|
34
|
-
} from "../../utils/index"
|
|
35
|
-
import { MapConfig } from "./MapConfig"
|
|
36
|
-
import { combineHistoricalAndProjectionColumns } from "../chart/ChartUtils"
|
|
34
|
+
} from "../../utils/index.js"
|
|
35
|
+
import { MapConfig } from "./MapConfig.js"
|
|
36
|
+
import { combineHistoricalAndProjectionColumns } from "../chart/ChartUtils.js"
|
|
37
37
|
import {
|
|
38
38
|
getCountriesByRegion,
|
|
39
39
|
isOnTheCanadaMap,
|
|
40
40
|
isOnTheMap,
|
|
41
|
-
} from "./MapHelpers"
|
|
42
|
-
import { MapSelectionArray } from "../selection/MapSelectionArray"
|
|
43
|
-
import { ColorScale, ColorScaleManager } from "../color/ColorScale"
|
|
44
|
-
import { ColorScaleConfig } from "../color/ColorScaleConfig"
|
|
41
|
+
} from "./MapHelpers.js"
|
|
42
|
+
import { MapSelectionArray } from "../selection/MapSelectionArray.js"
|
|
43
|
+
import { ColorScale, ColorScaleManager } from "../color/ColorScale.js"
|
|
44
|
+
import { ColorScaleConfig } from "../color/ColorScaleConfig.js"
|
|
45
45
|
|
|
46
46
|
export type MapFormatValueForTooltip = (
|
|
47
47
|
d: PrimitiveType,
|
|
@@ -1,9 +1,9 @@
|
|
|
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 { MapChartState } from "./MapChartState"
|
|
6
|
-
import { MapChart, MapChartProps } from "./MapChart"
|
|
4
|
+
import { ChartInterface } from "../chart/ChartInterface.js"
|
|
5
|
+
import { MapChartState } from "./MapChartState.js"
|
|
6
|
+
import { MapChart, MapChartProps } from "./MapChart.js"
|
|
7
7
|
|
|
8
8
|
@observer
|
|
9
9
|
export class MapChartThumbnail
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import { makeIdForHumanConsumption } from "../../utils/index"
|
|
2
|
+
import { makeIdForHumanConsumption } from "../../utils/index.js"
|
|
3
3
|
import {
|
|
4
4
|
BLUR_FILL_OPACITY,
|
|
5
5
|
BLUR_STROKE_OPACITY,
|
|
@@ -14,13 +14,13 @@ import {
|
|
|
14
14
|
RenderFeature,
|
|
15
15
|
InternalAnnotation,
|
|
16
16
|
ExternalAnnotation,
|
|
17
|
-
} from "./MapChartConstants"
|
|
18
|
-
import { isMapRenderFeature } from "./MapHelpers"
|
|
19
|
-
import { getExternalMarkerEndPosition } from "./MapAnnotations"
|
|
20
|
-
import { Patterns } from "../core/GrapherConstants"
|
|
21
|
-
import { calculateLightnessScore, isDarkColor } from "../color/ColorUtils"
|
|
22
|
-
import { Halo } from "../../components/index"
|
|
23
|
-
import { InteractionState } from "../interaction/InteractionState"
|
|
17
|
+
} from "./MapChartConstants.js"
|
|
18
|
+
import { isMapRenderFeature } from "./MapHelpers.js"
|
|
19
|
+
import { getExternalMarkerEndPosition } from "./MapAnnotations.js"
|
|
20
|
+
import { Patterns } from "../core/GrapherConstants.js"
|
|
21
|
+
import { calculateLightnessScore, isDarkColor } from "../color/ColorUtils.js"
|
|
22
|
+
import { Halo } from "../../components/index.js"
|
|
23
|
+
import { InteractionState } from "../interaction/InteractionState.js"
|
|
24
24
|
|
|
25
25
|
export function BackgroundCountry<Feature extends RenderFeature>({
|
|
26
26
|
feature,
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
MapConfigInterface,
|
|
6
6
|
TimeBound,
|
|
7
7
|
EntityName,
|
|
8
|
-
} from "../../types/index"
|
|
9
|
-
import { ColorScaleConfig } from "../color/ColorScaleConfig"
|
|
8
|
+
} from "../../types/index.js"
|
|
9
|
+
import { ColorScaleConfig } from "../color/ColorScaleConfig.js"
|
|
10
10
|
import {
|
|
11
11
|
ColumnSlug,
|
|
12
12
|
Persistable,
|
|
@@ -20,9 +20,9 @@ import {
|
|
|
20
20
|
NoUndefinedValues,
|
|
21
21
|
ToleranceStrategy,
|
|
22
22
|
minTimeBoundFromJSONOrNegativeInfinity,
|
|
23
|
-
} from "../../utils/index"
|
|
24
|
-
import { MapSelectionArray } from "../selection/MapSelectionArray"
|
|
25
|
-
import { DEFAULT_GLOBE_ROTATION, DEFAULT_GLOBE_ZOOM } from "./MapChartConstants"
|
|
23
|
+
} from "../../utils/index.js"
|
|
24
|
+
import { MapSelectionArray } from "../selection/MapSelectionArray.js"
|
|
25
|
+
import { DEFAULT_GLOBE_ROTATION, DEFAULT_GLOBE_ZOOM } from "./MapChartConstants.js"
|
|
26
26
|
import * as R from "remeda"
|
|
27
27
|
|
|
28
28
|
// MapConfig holds the data and underlying logic needed by MapTab.
|
|
@@ -7,18 +7,18 @@ import {
|
|
|
7
7
|
getCountryNamesForRegion,
|
|
8
8
|
getRelativeMouse,
|
|
9
9
|
lazy,
|
|
10
|
-
} from "../../utils/index"
|
|
11
|
-
import { GlobeRegionName, MapRegionName } from "../../types/index"
|
|
10
|
+
} from "../../utils/index.js"
|
|
11
|
+
import { GlobeRegionName, MapRegionName } from "../../types/index.js"
|
|
12
12
|
import {
|
|
13
13
|
GEO_FEATURES_CLASSNAME,
|
|
14
14
|
MAP_HOVER_TARGET_RANGE,
|
|
15
15
|
RenderFeature,
|
|
16
16
|
MapRenderFeature,
|
|
17
17
|
RenderFeatureType,
|
|
18
|
-
} from "./MapChartConstants"
|
|
19
|
-
import { CanadaTopology } from "./CanadaTopology"
|
|
20
|
-
import { MapTopology } from "./MapTopology"
|
|
21
|
-
import { MapSelectionArray } from "../selection/MapSelectionArray"
|
|
18
|
+
} from "./MapChartConstants.js"
|
|
19
|
+
import { CanadaTopology } from "./CanadaTopology.js"
|
|
20
|
+
import { MapTopology } from "./MapTopology.js"
|
|
21
|
+
import { MapSelectionArray } from "../selection/MapSelectionArray.js"
|
|
22
22
|
import * as R from "remeda"
|
|
23
23
|
|
|
24
24
|
export function detectNearbyFeature<Feature extends RenderFeature>({
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
geoAzimuthalEqualArea,
|
|
5
5
|
GeoProjection,
|
|
6
6
|
} from "d3-geo"
|
|
7
|
-
import { geoRobinson, geoPatterson } from "./d3-geo-projection"
|
|
8
|
-
import { MapRegionName } from "../../types/index"
|
|
7
|
+
import { geoRobinson, geoPatterson } from "./d3-geo-projection.js"
|
|
8
|
+
import { MapRegionName } from "../../types/index.js"
|
|
9
9
|
|
|
10
10
|
export const MAP_PROJECTIONS: Record<MapRegionName, GeoProjection> = {
|
|
11
11
|
World: geoRobinson(),
|
|
@@ -8,16 +8,16 @@ import {
|
|
|
8
8
|
EntityName,
|
|
9
9
|
VariableRoundingMode,
|
|
10
10
|
Time,
|
|
11
|
-
} from "../../types/index"
|
|
12
|
-
import { ChartsTable } from "../../core-table/index"
|
|
13
|
-
import { LineChart } from "../lineCharts/LineChart"
|
|
14
|
-
import { LineChartState } from "../lineCharts/LineChartState"
|
|
15
|
-
import { Bounds, checkIsVeryShortUnit } from "../../utils/index"
|
|
16
|
-
import { LineChartManager } from "../lineCharts/LineChartConstants"
|
|
17
|
-
import { ColorScale } from "../color/ColorScale"
|
|
11
|
+
} from "../../types/index.js"
|
|
12
|
+
import { ChartsTable } from "../../core-table/index.js"
|
|
13
|
+
import { LineChart } from "../lineCharts/LineChart.js"
|
|
14
|
+
import { LineChartState } from "../lineCharts/LineChartState.js"
|
|
15
|
+
import { Bounds, checkIsVeryShortUnit } from "../../utils/index.js"
|
|
16
|
+
import { LineChartManager } from "../lineCharts/LineChartConstants.js"
|
|
17
|
+
import { ColorScale } from "../color/ColorScale.js"
|
|
18
18
|
import * as R from "remeda"
|
|
19
|
-
import { MapColumnInfo } from "./MapChartConstants"
|
|
20
|
-
import type { MapFormatValueForTooltip } from "./MapChartState"
|
|
19
|
+
import { MapColumnInfo } from "./MapChartConstants.js"
|
|
20
|
+
import type { MapFormatValueForTooltip } from "./MapChartState.js"
|
|
21
21
|
|
|
22
22
|
const DEFAULT_SPARKLINE_WIDTH = 250
|
|
23
23
|
const DEFAULT_SPARKLINE_HEIGHT = 87
|