@buildcanada/charts 0.3.5 → 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,4 +1,4 @@
|
|
|
1
|
-
import { SubNavId } from "../types/index.
|
|
1
|
+
import { SubNavId } from "../types/index.js"
|
|
2
2
|
import {
|
|
3
3
|
CellDef,
|
|
4
4
|
BooleanCellDef,
|
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
Grammar,
|
|
12
12
|
EnumCellDef,
|
|
13
13
|
StringDeclarationDef,
|
|
14
|
-
} from "./gridLang/GridLangConstants.
|
|
15
|
-
import { GrapherGrammar } from "./GrapherGrammar.
|
|
16
|
-
import { ColumnGrammar } from "./ColumnGrammar.
|
|
14
|
+
} from "./gridLang/GridLangConstants.js"
|
|
15
|
+
import { GrapherGrammar } from "./GrapherGrammar.js"
|
|
16
|
+
import { ColumnGrammar } from "./ColumnGrammar.js"
|
|
17
17
|
|
|
18
18
|
const ExplorerFormControlCellDeff: CellDef = {
|
|
19
19
|
...StringDeclarationDef,
|
|
@@ -11,19 +11,19 @@ import {
|
|
|
11
11
|
GrapherInterface,
|
|
12
12
|
AxisMinMaxValueStr,
|
|
13
13
|
GrapherChartType,
|
|
14
|
-
} from "../types/index.
|
|
14
|
+
} from "../types/index.js"
|
|
15
15
|
import {
|
|
16
16
|
CoreTable,
|
|
17
17
|
ChartsTable,
|
|
18
18
|
isNotErrorValue,
|
|
19
|
-
} from "../core-table/index.
|
|
19
|
+
} from "../core-table/index.js"
|
|
20
20
|
import {
|
|
21
21
|
GitCommit,
|
|
22
22
|
PromiseCache,
|
|
23
23
|
SerializedGridProgram,
|
|
24
24
|
trimObject,
|
|
25
25
|
fetchWithRetry,
|
|
26
|
-
} from "../utils/index.
|
|
26
|
+
} from "../utils/index.js"
|
|
27
27
|
import {
|
|
28
28
|
CellDef,
|
|
29
29
|
Grammar,
|
|
@@ -31,19 +31,19 @@ import {
|
|
|
31
31
|
GRID_CELL_DELIMITER,
|
|
32
32
|
GRID_NODE_DELIMITER,
|
|
33
33
|
RootKeywordCellDef,
|
|
34
|
-
} from "./gridLang/GridLangConstants.
|
|
35
|
-
import { GridProgram } from "./gridLang/GridProgram.
|
|
36
|
-
import { ColumnGrammar } from "./ColumnGrammar.
|
|
34
|
+
} from "./gridLang/GridLangConstants.js"
|
|
35
|
+
import { GridProgram } from "./gridLang/GridProgram.js"
|
|
36
|
+
import { ColumnGrammar } from "./ColumnGrammar.js"
|
|
37
37
|
import {
|
|
38
38
|
DefaultNewExplorerSlug,
|
|
39
39
|
ExplorerChartCreationMode,
|
|
40
40
|
ExplorerChoiceParams,
|
|
41
41
|
EXPLORERS_ROUTE_FOLDER,
|
|
42
|
-
} from "./ExplorerConstants.
|
|
43
|
-
import { DecisionMatrix } from "./ExplorerDecisionMatrix.
|
|
44
|
-
import { ExplorerGrammar } from "./ExplorerGrammar.
|
|
45
|
-
import { GrapherGrammar } from "./GrapherGrammar.
|
|
46
|
-
import { latestGrapherConfigSchema } from "../grapher/index.
|
|
42
|
+
} from "./ExplorerConstants.js"
|
|
43
|
+
import { DecisionMatrix } from "./ExplorerDecisionMatrix.js"
|
|
44
|
+
import { ExplorerGrammar } from "./ExplorerGrammar.js"
|
|
45
|
+
import { GrapherGrammar } from "./GrapherGrammar.js"
|
|
46
|
+
import { latestGrapherConfigSchema } from "../grapher/index.js"
|
|
47
47
|
|
|
48
48
|
export const EXPLORER_FILE_SUFFIX = ".explorer.tsv"
|
|
49
49
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as _ from "lodash-es"
|
|
2
|
-
import { SelectionArray } from "../grapher/index.
|
|
3
|
-
import { Bounds, deserializeJSONFromHTML } from "../utils/index.
|
|
2
|
+
import { SelectionArray } from "../grapher/index.js"
|
|
3
|
+
import { Bounds, deserializeJSONFromHTML } from "../utils/index.js"
|
|
4
4
|
import {
|
|
5
5
|
EMBEDDED_EXPLORER_DELIMITER,
|
|
6
6
|
EMBEDDED_EXPLORER_GRAPHER_CONFIGS,
|
|
7
7
|
EMBEDDED_EXPLORER_PARTIAL_GRAPHER_CONFIGS,
|
|
8
8
|
EXPLORER_CONSTANTS_DELIMITER,
|
|
9
|
-
} from "./ExplorerConstants.
|
|
10
|
-
import { ExplorerProps } from "./Explorer.
|
|
9
|
+
} from "./ExplorerConstants.js"
|
|
10
|
+
import { ExplorerProps } from "./Explorer.js"
|
|
11
11
|
|
|
12
12
|
export async function buildExplorerProps(
|
|
13
13
|
html: string,
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
GrapherChartType,
|
|
9
9
|
MissingDataStrategy,
|
|
10
10
|
StackMode,
|
|
11
|
-
} from "../types/index.
|
|
12
|
-
import { SortBy, SortOrder } from "../utils/index.
|
|
11
|
+
} from "../types/index.js"
|
|
12
|
+
import { SortBy, SortOrder } from "../utils/index.js"
|
|
13
13
|
import {
|
|
14
14
|
GridBoolean,
|
|
15
15
|
BooleanCellDef,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
IndicatorIdOrEtlPathCellDef,
|
|
27
27
|
SlugOrIndicatorIdOrEtlPathCellDef,
|
|
28
28
|
GrapherCellDef,
|
|
29
|
-
} from "./gridLang/GridLangConstants.
|
|
29
|
+
} from "./gridLang/GridLangConstants.js"
|
|
30
30
|
import * as R from "remeda"
|
|
31
31
|
const toTerminalOptions = (keywords: string[]): CellDef[] => {
|
|
32
32
|
return keywords.map((keyword) => ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { trimArray } from "../../core-table/index.
|
|
2
|
-
import { imemo, isPresent } from "../../utils/index.
|
|
1
|
+
import { trimArray } from "../../core-table/index.js"
|
|
2
|
+
import { imemo, isPresent } from "../../utils/index.js"
|
|
3
3
|
|
|
4
|
-
import { didYouMean, isBlankLine, isEmpty } from "./GrammarUtils.
|
|
4
|
+
import { didYouMean, isBlankLine, isEmpty } from "./GrammarUtils.js"
|
|
5
5
|
import {
|
|
6
6
|
CellPosition,
|
|
7
7
|
CellDef,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
SubTableValueCellDef,
|
|
16
16
|
WorkInProgressCellDef,
|
|
17
17
|
NothingGoesThereCellDef,
|
|
18
|
-
} from "./GridLangConstants.
|
|
18
|
+
} from "./GridLangConstants.js"
|
|
19
19
|
|
|
20
20
|
export class GridCell implements ParsedCell {
|
|
21
21
|
private position: CellPosition
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { trimMatrix } from "../../core-table/index.
|
|
1
|
+
import { trimMatrix } from "../../core-table/index.js"
|
|
2
2
|
import {
|
|
3
3
|
isPresent,
|
|
4
4
|
GitCommit,
|
|
5
5
|
SerializedGridProgram,
|
|
6
|
-
} from "../../utils/index.
|
|
6
|
+
} from "../../utils/index.js"
|
|
7
7
|
|
|
8
|
-
import { GridCell } from "./GridCell.
|
|
8
|
+
import { GridCell } from "./GridCell.js"
|
|
9
9
|
import {
|
|
10
10
|
CellDef,
|
|
11
11
|
CellPosition,
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
GRID_NODE_DELIMITER,
|
|
15
15
|
Origin,
|
|
16
16
|
ParsedCell,
|
|
17
|
-
} from "./GridLangConstants.
|
|
18
|
-
import { tsvToMatrix } from "./GrammarUtils.
|
|
17
|
+
} from "./GridLangConstants.js"
|
|
18
|
+
import { tsvToMatrix } from "./GrammarUtils.js"
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Block location for the below would be like (numRows = 2)
|
package/src/explorer/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { Explorer, type ExplorerProps } from "./Explorer.
|
|
1
|
+
export { Explorer, type ExplorerProps } from "./Explorer.js"
|
|
2
2
|
|
|
3
|
-
export { buildExplorerProps } from "./ExplorerUtils.
|
|
3
|
+
export { buildExplorerProps } from "./ExplorerUtils.js"
|
|
4
4
|
|
|
5
5
|
export {
|
|
6
6
|
DefaultNewExplorerSlug,
|
|
@@ -29,7 +29,7 @@ export {
|
|
|
29
29
|
type ExplorerStandardQueryParams,
|
|
30
30
|
UNSAVED_EXPLORER_DRAFT,
|
|
31
31
|
UNSAVED_EXPLORER_PREVIEW_QUERYPARAMS,
|
|
32
|
-
} from "./ExplorerConstants.
|
|
32
|
+
} from "./ExplorerConstants.js"
|
|
33
33
|
|
|
34
34
|
export {
|
|
35
35
|
type TableDef,
|
|
@@ -37,33 +37,33 @@ export {
|
|
|
37
37
|
EXPLORER_FILE_SUFFIX,
|
|
38
38
|
makeFullPath,
|
|
39
39
|
type ExplorerGrapherInterface,
|
|
40
|
-
} from "./ExplorerProgram.
|
|
40
|
+
} from "./ExplorerProgram.js"
|
|
41
41
|
|
|
42
|
-
export { type ExplorerPageUrlMigrationSpec } from "./urlMigrations/ExplorerPageUrlMigrationSpec.
|
|
42
|
+
export { type ExplorerPageUrlMigrationSpec } from "./urlMigrations/ExplorerPageUrlMigrationSpec.js"
|
|
43
43
|
|
|
44
44
|
export {
|
|
45
45
|
explorerUrlMigrationsById,
|
|
46
46
|
migrateExplorerUrl,
|
|
47
|
-
} from "./urlMigrations/ExplorerUrlMigrations.
|
|
47
|
+
} from "./urlMigrations/ExplorerUrlMigrations.js"
|
|
48
48
|
|
|
49
|
-
export { isEmpty } from "./gridLang/GrammarUtils.
|
|
49
|
+
export { isEmpty } from "./gridLang/GrammarUtils.js"
|
|
50
50
|
|
|
51
|
-
export { ColumnGrammar } from "./ColumnGrammar.
|
|
51
|
+
export { ColumnGrammar } from "./ColumnGrammar.js"
|
|
52
52
|
|
|
53
|
-
export { GridCell } from "./gridLang/GridCell.
|
|
53
|
+
export { GridCell } from "./gridLang/GridCell.js"
|
|
54
54
|
|
|
55
|
-
export { GridProgram } from "./gridLang/GridProgram.
|
|
55
|
+
export { GridProgram } from "./gridLang/GridProgram.js"
|
|
56
56
|
|
|
57
|
-
export { ExplorerGrammar } from "./ExplorerGrammar.
|
|
57
|
+
export { ExplorerGrammar } from "./ExplorerGrammar.js"
|
|
58
58
|
|
|
59
|
-
export { ExplorerUrlMigrationId } from "./urlMigrations/ExplorerUrlMigrations.
|
|
59
|
+
export { ExplorerUrlMigrationId } from "./urlMigrations/ExplorerUrlMigrations.js"
|
|
60
60
|
|
|
61
|
-
export { DecisionMatrix } from "./ExplorerDecisionMatrix.
|
|
61
|
+
export { DecisionMatrix } from "./ExplorerDecisionMatrix.js"
|
|
62
62
|
|
|
63
63
|
export {
|
|
64
64
|
GridBoolean,
|
|
65
65
|
type CellPosition,
|
|
66
66
|
type ParsedCell,
|
|
67
|
-
} from "./gridLang/GridLangConstants.
|
|
67
|
+
} from "./gridLang/GridLangConstants.js"
|
|
68
68
|
|
|
69
|
-
export { GrapherGrammar } from "./GrapherGrammar.
|
|
69
|
+
export { GrapherGrammar } from "./GrapherGrammar.js"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { legacyToCurrentGrapherUrl } from "../../grapher/index.
|
|
2
|
-
import { Url, UrlMigration } from "../../utils/index.
|
|
1
|
+
import { legacyToCurrentGrapherUrl } from "../../grapher/index.js"
|
|
2
|
+
import { Url, UrlMigration } from "../../utils/index.js"
|
|
3
3
|
import {
|
|
4
4
|
decodeURIComponentOrUndefined,
|
|
5
5
|
getExplorerSlugFromUrl,
|
|
6
6
|
QueryParamTransformMap,
|
|
7
7
|
transformQueryParams,
|
|
8
|
-
} from "./ExplorerUrlMigrationUtils.
|
|
8
|
+
} from "./ExplorerUrlMigrationUtils.js"
|
|
9
9
|
|
|
10
10
|
const EXPLORER_SLUG = "co2"
|
|
11
11
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Url, UrlMigration } from "../../utils/index.
|
|
1
|
+
import { Url, UrlMigration } from "../../utils/index.js"
|
|
2
2
|
import {
|
|
3
3
|
getExplorerSlugFromUrl,
|
|
4
4
|
QueryParamTransformMap,
|
|
5
5
|
transformQueryParams,
|
|
6
|
-
} from "./ExplorerUrlMigrationUtils.
|
|
6
|
+
} from "./ExplorerUrlMigrationUtils.js"
|
|
7
7
|
|
|
8
8
|
const EXPLORER_SLUG = "coronavirus-data-explorer"
|
|
9
9
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { legacyToCurrentGrapherUrl } from "../../grapher/index.
|
|
2
|
-
import { Url, UrlMigration } from "../../utils/index.
|
|
1
|
+
import { legacyToCurrentGrapherUrl } from "../../grapher/index.js"
|
|
2
|
+
import { Url, UrlMigration } from "../../utils/index.js"
|
|
3
3
|
import {
|
|
4
4
|
decodeURIComponentOrUndefined,
|
|
5
5
|
getExplorerSlugFromUrl,
|
|
6
6
|
QueryParamTransformMap,
|
|
7
7
|
transformQueryParams,
|
|
8
|
-
} from "./ExplorerUrlMigrationUtils.
|
|
8
|
+
} from "./ExplorerUrlMigrationUtils.js"
|
|
9
9
|
|
|
10
10
|
const EXPLORER_SLUG = "energy"
|
|
11
11
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _ from "lodash-es"
|
|
2
|
-
import { Url, QueryParams } from "../../utils/index.
|
|
2
|
+
import { Url, QueryParams } from "../../utils/index.js"
|
|
3
3
|
|
|
4
|
-
import { EXPLORERS_ROUTE_FOLDER } from "../ExplorerConstants.
|
|
4
|
+
import { EXPLORERS_ROUTE_FOLDER } from "../ExplorerConstants.js"
|
|
5
5
|
|
|
6
6
|
export const decodeURIComponentOrUndefined = (value: string | undefined) =>
|
|
7
7
|
value !== undefined
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Url, UrlMigration, performUrlMigrations } from "../../utils/index.
|
|
1
|
+
import { Url, UrlMigration, performUrlMigrations } from "../../utils/index.js"
|
|
2
2
|
|
|
3
|
-
import { legacyCovidMigrationSpec } from "./LegacyCovidUrlMigration.
|
|
4
|
-
import { co2UrlMigration } from "./CO2UrlMigration.
|
|
5
|
-
import { energyUrlMigration } from "./EnergyUrlMigration.
|
|
6
|
-
import { covidUrlMigration } from "./CovidUrlMigration.
|
|
3
|
+
import { legacyCovidMigrationSpec } from "./LegacyCovidUrlMigration.js"
|
|
4
|
+
import { co2UrlMigration } from "./CO2UrlMigration.js"
|
|
5
|
+
import { energyUrlMigration } from "./EnergyUrlMigration.js"
|
|
6
|
+
import { covidUrlMigration } from "./CovidUrlMigration.js"
|
|
7
7
|
|
|
8
8
|
export enum ExplorerUrlMigrationId {
|
|
9
9
|
legacyToGridCovidExplorer = "legacyToGridCovidExplorer",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _ from "lodash-es"
|
|
2
|
-
import { legacyToCurrentGrapherUrl } from "../../grapher/index.
|
|
3
|
-
import { QueryParams, Url } from "../../utils/index.
|
|
4
|
-
import { EXPLORERS_ROUTE_FOLDER } from "../ExplorerConstants.
|
|
5
|
-
import { ExplorerUrlMigrationSpec } from "./ExplorerUrlMigrations.
|
|
2
|
+
import { legacyToCurrentGrapherUrl } from "../../grapher/index.js"
|
|
3
|
+
import { QueryParams, Url } from "../../utils/index.js"
|
|
4
|
+
import { EXPLORERS_ROUTE_FOLDER } from "../ExplorerConstants.js"
|
|
5
|
+
import { ExplorerUrlMigrationSpec } from "./ExplorerUrlMigrations.js"
|
|
6
6
|
|
|
7
7
|
const covidMetricFromLegacyQueryParams = (queryParams: QueryParams) => {
|
|
8
8
|
if (queryParams.casesMetric) {
|
package/src/grapher/axis/Axis.ts
CHANGED
|
@@ -14,20 +14,20 @@ import {
|
|
|
14
14
|
Tickmark,
|
|
15
15
|
ValueRange,
|
|
16
16
|
VariableRoundingMode,
|
|
17
|
-
} from "../../utils/index.
|
|
18
|
-
import { ComparisonLineConfig } from "../../types/index.
|
|
19
|
-
import { AxisConfig, AxisManager } from "./AxisConfig"
|
|
20
|
-
import { MarkdownTextWrap } from "../../components/index.
|
|
21
|
-
import { CoreColumn } from "../../core-table/index.
|
|
17
|
+
} from "../../utils/index.js"
|
|
18
|
+
import { ComparisonLineConfig } from "../../types/index.js"
|
|
19
|
+
import { AxisConfig, AxisManager } from "./AxisConfig.js"
|
|
20
|
+
import { MarkdownTextWrap } from "../../components/index.js"
|
|
21
|
+
import { CoreColumn } from "../../core-table/index.js"
|
|
22
22
|
import {
|
|
23
23
|
DEFAULT_GRAPHER_BOUNDS,
|
|
24
24
|
GRAPHER_FONT_SCALE_10_5,
|
|
25
25
|
GRAPHER_FONT_SCALE_11,
|
|
26
26
|
GRAPHER_FONT_SCALE_12,
|
|
27
|
-
} from "../core/GrapherConstants.
|
|
28
|
-
import { makeAxisLabel } from "../chart/ChartUtils"
|
|
27
|
+
} from "../core/GrapherConstants.js"
|
|
28
|
+
import { makeAxisLabel } from "../chart/ChartUtils.js"
|
|
29
29
|
import * as R from "remeda"
|
|
30
|
-
import { isValidVerticalComparisonLineConfig } from "../comparisonLine/ComparisonLineHelpers"
|
|
30
|
+
import { isValidVerticalComparisonLineConfig } from "../comparisonLine/ComparisonLineHelpers.js"
|
|
31
31
|
|
|
32
32
|
interface TickLabelPlacement {
|
|
33
33
|
value: number
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _ from "lodash-es"
|
|
2
|
-
import { BASE_FONT_SIZE } from "../core/GrapherConstants"
|
|
2
|
+
import { BASE_FONT_SIZE } from "../core/GrapherConstants.js"
|
|
3
3
|
import {
|
|
4
4
|
trimObject,
|
|
5
5
|
deleteRuntimeAndUnchangedProps,
|
|
@@ -8,16 +8,16 @@ import {
|
|
|
8
8
|
Position,
|
|
9
9
|
TickFormattingOptions,
|
|
10
10
|
Bounds,
|
|
11
|
-
} from "../../utils/index.
|
|
11
|
+
} from "../../utils/index.js"
|
|
12
12
|
import { observable, computed, makeObservable } from "mobx"
|
|
13
|
-
import { HorizontalAxis, VerticalAxis } from "./Axis"
|
|
13
|
+
import { HorizontalAxis, VerticalAxis } from "./Axis.js"
|
|
14
14
|
import {
|
|
15
15
|
AxisMinMaxValueStr,
|
|
16
16
|
AxisConfigInterface,
|
|
17
17
|
FacetAxisDomain,
|
|
18
18
|
ScaleType,
|
|
19
19
|
Tickmark,
|
|
20
|
-
} from "../../types/index.
|
|
20
|
+
} from "../../types/index.js"
|
|
21
21
|
|
|
22
22
|
export interface AxisManager {
|
|
23
23
|
fontSize: number
|
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
dyFromAlign,
|
|
11
11
|
textAnchorFromAlign,
|
|
12
12
|
makeIdForHumanConsumption,
|
|
13
|
-
} from "../../utils/index.
|
|
14
|
-
import { VerticalAxis, HorizontalAxis, DualAxis } from "./Axis"
|
|
13
|
+
} from "../../utils/index.js"
|
|
14
|
+
import { VerticalAxis, HorizontalAxis, DualAxis } from "./Axis.js"
|
|
15
15
|
import classNames from "classnames"
|
|
16
|
-
import { GRAPHER_DARK_TEXT } from "../color/ColorConstants"
|
|
17
|
-
import { ScaleType, DetailsMarker } from "../../types/index.
|
|
18
|
-
import { ComparisonLine } from "../comparisonLine/ComparisonLine"
|
|
19
|
-
import { DEFAULT_GRAPHER_BOUNDS } from "../core/GrapherConstants"
|
|
16
|
+
import { GRAPHER_DARK_TEXT } from "../color/ColorConstants.js"
|
|
17
|
+
import { ScaleType, DetailsMarker } from "../../types/index.js"
|
|
18
|
+
import { ComparisonLine } from "../comparisonLine/ComparisonLine.js"
|
|
19
|
+
import { DEFAULT_GRAPHER_BOUNDS } from "../core/GrapherConstants.js"
|
|
20
20
|
|
|
21
21
|
const TICK_COLOR = "#ddd"
|
|
22
22
|
const FAINT_TICK_COLOR = "#eee"
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
AxisAlign,
|
|
10
10
|
makeIdForHumanConsumption,
|
|
11
11
|
dyFromAlign,
|
|
12
|
-
} from "../../utils/index.
|
|
12
|
+
} from "../../utils/index.js"
|
|
13
13
|
import { computed, makeObservable } from "mobx"
|
|
14
14
|
import { observer } from "mobx-react"
|
|
15
|
-
import { ScaleType, VerticalAlign } from "../../types/index.
|
|
15
|
+
import { ScaleType, VerticalAlign } from "../../types/index.js"
|
|
16
16
|
import {
|
|
17
17
|
BASE_FONT_SIZE,
|
|
18
18
|
DEFAULT_GRAPHER_BOUNDS,
|
|
@@ -20,11 +20,11 @@ import {
|
|
|
20
20
|
GRAPHER_AREA_OPACITY_DEFAULT,
|
|
21
21
|
GRAPHER_OPACITY_MUTE,
|
|
22
22
|
GRAPHER_AREA_OPACITY_MUTE,
|
|
23
|
-
} from "../core/GrapherConstants"
|
|
24
|
-
import { NoDataModal } from "../noDataModal/NoDataModal"
|
|
25
|
-
import { HorizontalAxisZeroLine } from "../axis/AxisViews"
|
|
26
|
-
import { AxisConfig, AxisManager } from "../axis/AxisConfig"
|
|
27
|
-
import { ChartInterface } from "../chart/ChartInterface"
|
|
23
|
+
} from "../core/GrapherConstants.js"
|
|
24
|
+
import { NoDataModal } from "../noDataModal/NoDataModal.js"
|
|
25
|
+
import { HorizontalAxisZeroLine } from "../axis/AxisViews.js"
|
|
26
|
+
import { AxisConfig, AxisManager } from "../axis/AxisConfig.js"
|
|
27
|
+
import { ChartInterface } from "../chart/ChartInterface.js"
|
|
28
28
|
import {
|
|
29
29
|
BAR_SPACING_FACTOR,
|
|
30
30
|
DiscreteBarChartManager,
|
|
@@ -32,23 +32,23 @@ import {
|
|
|
32
32
|
FontSettings,
|
|
33
33
|
PlacedDiscreteBarSeries,
|
|
34
34
|
SizedDiscreteBarSeries,
|
|
35
|
-
} from "./DiscreteBarChartConstants"
|
|
36
|
-
import { CategoricalBin, ColorScaleBin } from "../color/ColorScaleBin"
|
|
35
|
+
} from "./DiscreteBarChartConstants.js"
|
|
36
|
+
import { CategoricalBin, ColorScaleBin } from "../color/ColorScaleBin.js"
|
|
37
37
|
import {
|
|
38
38
|
HorizontalColorLegendManager,
|
|
39
39
|
HorizontalNumericColorLegend,
|
|
40
|
-
} from "../legend/HorizontalColorLegends"
|
|
41
|
-
import { DiscreteBarChartState } from "./DiscreteBarChartState"
|
|
42
|
-
import { ChartComponentProps } from "../chart/ChartTypeMap.
|
|
40
|
+
} from "../legend/HorizontalColorLegends.js"
|
|
41
|
+
import { DiscreteBarChartState } from "./DiscreteBarChartState.js"
|
|
42
|
+
import { ChartComponentProps } from "../chart/ChartTypeMap.js"
|
|
43
43
|
import {
|
|
44
44
|
makeProjectedDataPatternId,
|
|
45
45
|
enrichSeriesWithLabels,
|
|
46
|
-
} from "./DiscreteBarChartHelpers"
|
|
47
|
-
import { ChartsTable } from "../../core-table/index.
|
|
48
|
-
import { HorizontalAxis } from "../axis/Axis"
|
|
49
|
-
import { GRAPHER_DARK_TEXT } from "../color/ColorConstants"
|
|
46
|
+
} from "./DiscreteBarChartHelpers.js"
|
|
47
|
+
import { ChartsTable } from "../../core-table/index.js"
|
|
48
|
+
import { HorizontalAxis } from "../axis/Axis.js"
|
|
49
|
+
import { GRAPHER_DARK_TEXT } from "../color/ColorConstants.js"
|
|
50
50
|
import type { BaseType, Selection } from "d3-selection"
|
|
51
|
-
import { NUMERIC_LEGEND_STYLE } from "../lineCharts/LineChartConstants"
|
|
51
|
+
import { NUMERIC_LEGEND_STYLE } from "../lineCharts/LineChartConstants.js"
|
|
52
52
|
|
|
53
53
|
const DEFAULT_PROJECTED_DATA_COLOR_IN_LEGEND = "#787878"
|
|
54
54
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ChartManager } from "../chart/ChartManager"
|
|
2
|
-
import { CoreColumn } from "../../core-table/index.
|
|
3
|
-
import { ChartSeries } from "../chart/ChartInterface"
|
|
4
|
-
import { Color, CoreValueType, Time } from "../../types/index.
|
|
5
|
-
import { TextWrap } from "../../components/index.
|
|
6
|
-
import { InteractionState } from "../interaction/InteractionState.
|
|
1
|
+
import { ChartManager } from "../chart/ChartManager.js"
|
|
2
|
+
import { CoreColumn } from "../../core-table/index.js"
|
|
3
|
+
import { ChartSeries } from "../chart/ChartInterface.js"
|
|
4
|
+
import { Color, CoreValueType, Time } from "../../types/index.js"
|
|
5
|
+
import { TextWrap } from "../../components/index.js"
|
|
6
|
+
import { InteractionState } from "../interaction/InteractionState.js"
|
|
7
7
|
|
|
8
8
|
export interface DiscreteBarSeries extends ChartSeries {
|
|
9
9
|
entityName: string
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _ from "lodash-es"
|
|
2
|
-
import { TextWrap, shortenWithEllipsis } from "../../components/index.
|
|
3
|
-
import { EntityName } from "../../types/index.
|
|
4
|
-
import { FontSettings } from "./DiscreteBarChartConstants.
|
|
2
|
+
import { TextWrap, shortenWithEllipsis } from "../../components/index.js"
|
|
3
|
+
import { EntityName } from "../../types/index.js"
|
|
4
|
+
import { FontSettings } from "./DiscreteBarChartConstants.js"
|
|
5
5
|
|
|
6
6
|
const ANNOTATION_PADDING = 2
|
|
7
7
|
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import * as _ from "lodash-es"
|
|
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
|
DiscreteBarChartManager,
|
|
6
6
|
DiscreteBarItem,
|
|
7
7
|
DiscreteBarSeries,
|
|
8
|
-
} from "./DiscreteBarChartConstants"
|
|
8
|
+
} from "./DiscreteBarChartConstants.js"
|
|
9
9
|
import {
|
|
10
10
|
CoreColumn,
|
|
11
11
|
isNotErrorValue,
|
|
12
12
|
ChartsTable,
|
|
13
|
-
} from "../../core-table/index.
|
|
14
|
-
import { ColorScale, ColorScaleManager } from "../color/ColorScale"
|
|
15
|
-
import { SelectionArray } from "../selection/SelectionArray"
|
|
13
|
+
} from "../../core-table/index.js"
|
|
14
|
+
import { ColorScale, ColorScaleManager } from "../color/ColorScale.js"
|
|
15
|
+
import { SelectionArray } from "../selection/SelectionArray.js"
|
|
16
16
|
import {
|
|
17
17
|
autoDetectSeriesStrategy,
|
|
18
18
|
autoDetectYColumnSlugs,
|
|
19
19
|
getDefaultFailMessage,
|
|
20
20
|
getShortNameForEntity,
|
|
21
21
|
makeSelectionArray,
|
|
22
|
-
} from "../chart/ChartUtils"
|
|
22
|
+
} from "../chart/ChartUtils.js"
|
|
23
23
|
import {
|
|
24
24
|
AnnotationsMap,
|
|
25
25
|
getAnnotationsForSeries,
|
|
26
26
|
getAnnotationsMap,
|
|
27
|
-
} from "../lineCharts/LineChartHelpers"
|
|
27
|
+
} from "../lineCharts/LineChartHelpers.js"
|
|
28
28
|
import {
|
|
29
29
|
ChartErrorInfo,
|
|
30
30
|
ColorScaleConfigInterface,
|
|
@@ -34,12 +34,12 @@ import {
|
|
|
34
34
|
SortBy,
|
|
35
35
|
SortConfig,
|
|
36
36
|
SortOrder,
|
|
37
|
-
} from "../../types/index.
|
|
38
|
-
import { ERROR_COLOR, NO_DATA_GRAY } from "../color/ColorConstants"
|
|
39
|
-
import { ColorScheme } from "../color/ColorScheme"
|
|
40
|
-
import { ColorSchemes } from "../color/ColorSchemes"
|
|
41
|
-
import { ColorScaleConfig } from "../color/ColorScaleConfig"
|
|
42
|
-
import { FocusArray } from "../focus/FocusArray"
|
|
37
|
+
} from "../../types/index.js"
|
|
38
|
+
import { ERROR_COLOR, NO_DATA_GRAY } from "../color/ColorConstants.js"
|
|
39
|
+
import { ColorScheme } from "../color/ColorScheme.js"
|
|
40
|
+
import { ColorSchemes } from "../color/ColorSchemes.js"
|
|
41
|
+
import { ColorScaleConfig } from "../color/ColorScaleConfig.js"
|
|
42
|
+
import { FocusArray } from "../focus/FocusArray.js"
|
|
43
43
|
|
|
44
44
|
export class DiscreteBarChartState implements ChartState, ColorScaleManager {
|
|
45
45
|
manager: DiscreteBarChartManager
|
|
@@ -1,14 +1,14 @@
|
|
|
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 { DiscreteBarChartState } from "./DiscreteBarChartState"
|
|
4
|
+
import { ChartInterface } from "../chart/ChartInterface.js"
|
|
5
|
+
import { DiscreteBarChartState } from "./DiscreteBarChartState.js"
|
|
6
6
|
import {
|
|
7
7
|
DiscreteBarChart,
|
|
8
8
|
type DiscreteBarChartProps,
|
|
9
|
-
} from "./DiscreteBarChart.
|
|
9
|
+
} from "./DiscreteBarChart.js"
|
|
10
10
|
|
|
11
|
-
import { DiscreteBarChartManager } from "./DiscreteBarChartConstants.
|
|
11
|
+
import { DiscreteBarChartManager } from "./DiscreteBarChartConstants.js"
|
|
12
12
|
|
|
13
13
|
@observer
|
|
14
14
|
export class DiscreteBarChartThumbnail
|
|
@@ -6,44 +6,44 @@ import {
|
|
|
6
6
|
Bounds,
|
|
7
7
|
exposeInstanceOnWindow,
|
|
8
8
|
makeIdForHumanConsumption,
|
|
9
|
-
} from "../../utils/index.
|
|
10
|
-
import { MarkdownTextWrap, LoadingIndicator } from "../../components/index.
|
|
11
|
-
import { Header, StaticHeader } from "../header/Header"
|
|
12
|
-
import { Footer, StaticFooter } from "../footer/Footer"
|
|
9
|
+
} from "../../utils/index.js"
|
|
10
|
+
import { MarkdownTextWrap, LoadingIndicator } from "../../components/index.js"
|
|
11
|
+
import { Header, StaticHeader } from "../header/Header.js"
|
|
12
|
+
import { Footer, StaticFooter } from "../footer/Footer.js"
|
|
13
13
|
import {
|
|
14
14
|
STATIC_EXPORT_DETAIL_SPACING,
|
|
15
15
|
GRAPHER_FRAME_PADDING_VERTICAL,
|
|
16
16
|
GRAPHER_FRAME_PADDING_HORIZONTAL,
|
|
17
17
|
DEFAULT_GRAPHER_BOUNDS,
|
|
18
|
-
} from "../core/GrapherConstants"
|
|
19
|
-
import { MapChartManager } from "../mapCharts/MapChartConstants"
|
|
20
|
-
import { ChartManager } from "../chart/ChartManager"
|
|
18
|
+
} from "../core/GrapherConstants.js"
|
|
19
|
+
import { MapChartManager } from "../mapCharts/MapChartConstants.js"
|
|
20
|
+
import { ChartManager } from "../chart/ChartManager.js"
|
|
21
21
|
import { faExternalLinkAlt } from "@fortawesome/free-solid-svg-icons"
|
|
22
22
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
|
|
23
|
-
import { FooterManager } from "../footer/FooterManager"
|
|
24
|
-
import { HeaderManager } from "../header/HeaderManager"
|
|
25
|
-
import { SelectionArray } from "../selection/SelectionArray"
|
|
23
|
+
import { FooterManager } from "../footer/FooterManager.js"
|
|
24
|
+
import { HeaderManager } from "../header/HeaderManager.js"
|
|
25
|
+
import { SelectionArray } from "../selection/SelectionArray.js"
|
|
26
26
|
import {
|
|
27
27
|
EntityName,
|
|
28
28
|
RelatedQuestionsConfig,
|
|
29
29
|
Color,
|
|
30
30
|
GrapherTabName,
|
|
31
31
|
GrapherChartType,
|
|
32
|
-
} from "../../types/index.
|
|
33
|
-
import { DataTableManager } from "../dataTable/DataTableConstants"
|
|
32
|
+
} from "../../types/index.js"
|
|
33
|
+
import { DataTableManager } from "../dataTable/DataTableConstants.js"
|
|
34
34
|
import {
|
|
35
35
|
TimelineComponent,
|
|
36
36
|
TIMELINE_HEIGHT,
|
|
37
|
-
} from "../timeline/TimelineComponent"
|
|
38
|
-
import { TimelineController } from "../timeline/TimelineController"
|
|
37
|
+
} from "../timeline/TimelineComponent.js"
|
|
38
|
+
import { TimelineController } from "../timeline/TimelineController.js"
|
|
39
39
|
import {
|
|
40
40
|
ControlsRow,
|
|
41
41
|
ControlsRowManager,
|
|
42
|
-
} from "../controls/controlsRow/ControlsRow"
|
|
43
|
-
import { GRAPHER_BACKGROUND_DEFAULT } from "../color/ColorConstants.
|
|
44
|
-
import { ChartAreaContent } from "../chart/ChartAreaContent"
|
|
45
|
-
import { getChartSvgProps } from "../chart/ChartUtils"
|
|
46
|
-
import { StaticChartWrapper } from "../chart/StaticChartWrapper"
|
|
42
|
+
} from "../controls/controlsRow/ControlsRow.js"
|
|
43
|
+
import { GRAPHER_BACKGROUND_DEFAULT } from "../color/ColorConstants.js"
|
|
44
|
+
import { ChartAreaContent } from "../chart/ChartAreaContent.js"
|
|
45
|
+
import { getChartSvgProps } from "../chart/ChartUtils.js"
|
|
46
|
+
import { StaticChartWrapper } from "../chart/StaticChartWrapper.js"
|
|
47
47
|
|
|
48
48
|
export interface CaptionedChartManager
|
|
49
49
|
extends ChartManager,
|