@buildcanada/charts 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +9 -24
- package/src/components/Button/Button.scss +17 -17
- package/src/components/Button/Button.tsx +4 -4
- package/src/components/MarkdownTextWrap/MarkdownTextWrap.tsx +1 -1
- package/src/components/index.ts +1 -1
- package/src/components/stubs/DataCitation.tsx +1 -1
- package/src/components/stubs/IndicatorKeyData.tsx +1 -1
- package/src/components/stubs/IndicatorProcessing.tsx +1 -1
- package/src/components/stubs/IndicatorSources.tsx +1 -1
- package/src/components/styles/colors.scss +1 -1
- package/src/components/styles/mixins.scss +5 -5
- package/src/core-table/{OwidTable.ts → ChartsTable.ts} +31 -31
- package/src/core-table/CoreTable.ts +12 -12
- package/src/core-table/CoreTableColumns.ts +24 -24
- package/src/core-table/CoreTableUtils.ts +7 -7
- package/src/core-table/{OwidTableSynthesizers.ts → TableSynthesizers.ts} +24 -24
- package/src/core-table/{OwidTableUtil.ts → TableUtil.ts} +5 -5
- package/src/core-table/index.ts +3 -3
- package/src/explorer/ColumnGrammar.ts +1 -1
- package/src/explorer/Explorer.sample.ts +7 -7
- package/src/explorer/Explorer.scss +1 -1
- package/src/explorer/Explorer.tsx +23 -23
- package/src/explorer/ExplorerConstants.ts +2 -2
- package/src/explorer/ExplorerGrammar.ts +3 -3
- package/src/explorer/ExplorerProgram.ts +21 -18
- package/src/explorer/ExplorerUtils.ts +1 -1
- package/src/explorer/gridLang/readme.md +1 -1
- package/src/grapher/axis/Axis.ts +3 -3
- package/src/grapher/barCharts/DiscreteBarChart.tsx +2 -2
- package/src/grapher/barCharts/DiscreteBarChartState.ts +8 -8
- package/src/grapher/captionedChart/Logos.tsx +11 -13
- package/src/grapher/captionedChart/LogosSVG.tsx +2 -2
- package/src/grapher/chart/ChartAreaContent.tsx +1 -1
- package/src/grapher/chart/ChartDimension.ts +15 -15
- package/src/grapher/chart/ChartInterface.ts +6 -6
- package/src/grapher/chart/ChartManager.ts +3 -3
- package/src/grapher/chart/ChartUtils.tsx +3 -3
- package/src/grapher/color/ColorConstants.ts +2 -2
- package/src/grapher/color/ColorScale.ts +4 -4
- package/src/grapher/color/ColorSchemes.ts +26 -26
- package/src/grapher/color/CustomSchemes.ts +227 -227
- package/src/grapher/controls/ContentSwitchers.tsx +1 -1
- package/src/grapher/controls/DataTableFilterDropdown.tsx +2 -2
- package/src/grapher/controls/MapZoomDropdown.tsx +3 -3
- package/src/grapher/controls/ShareMenu.tsx +1 -1
- package/src/grapher/controls/entityPicker/EntityPicker.tsx +8 -8
- package/src/grapher/controls/entityPicker/EntityPickerConstants.ts +3 -3
- package/src/grapher/controls/globalEntitySelector/GlobalEntitySelector.tsx +1 -1
- package/src/grapher/core/EntitiesByRegionType.ts +4 -4
- package/src/grapher/core/EntityUrlBuilder.ts +2 -2
- package/src/grapher/core/FetchingGrapher.tsx +4 -4
- package/src/grapher/core/Grapher.tsx +10 -10
- package/src/grapher/core/GrapherState.tsx +47 -50
- package/src/grapher/core/GrapherUseHelpers.tsx +4 -4
- package/src/grapher/core/{LegacyToOwidTable.ts → LegacyToChartsTable.ts} +100 -100
- package/src/grapher/core/loadGrapherTableHelpers.ts +13 -13
- package/src/grapher/core/loadVariable.ts +5 -5
- package/src/grapher/dataTable/DataTable.sample.ts +12 -12
- package/src/grapher/dataTable/DataTable.tsx +22 -22
- package/src/grapher/dataTable/DataTableConstants.ts +9 -9
- package/src/grapher/entitySelector/EntitySelector.tsx +13 -13
- package/src/grapher/facet/FacetChart.tsx +4 -4
- package/src/grapher/facet/FacetMap.tsx +6 -6
- package/src/grapher/footer/Footer.tsx +4 -4
- package/src/grapher/footer/FooterManager.ts +2 -2
- package/src/grapher/header/Header.tsx +5 -5
- package/src/grapher/header/HeaderManager.ts +1 -1
- package/src/grapher/index.ts +8 -8
- package/src/grapher/lineCharts/LineChartHelpers.ts +4 -4
- package/src/grapher/lineCharts/LineChartState.ts +9 -9
- package/src/grapher/mapCharts/ChoroplethGlobe.tsx +1 -1
- package/src/grapher/mapCharts/GlobeController.ts +9 -9
- package/src/grapher/mapCharts/MapChartState.ts +16 -16
- package/src/grapher/mapCharts/MapSparkline.tsx +5 -5
- package/src/grapher/mapCharts/MapTooltip.tsx +13 -13
- package/src/grapher/modal/DownloadModal.scss +3 -3
- package/src/grapher/modal/DownloadModal.tsx +24 -29
- package/src/grapher/modal/SourcesDescriptions.scss +1 -1
- package/src/grapher/modal/SourcesKeyDataTable.tsx +2 -2
- package/src/grapher/modal/SourcesModal.tsx +15 -15
- package/src/grapher/scatterCharts/ScatterPlotChart.tsx +2 -2
- package/src/grapher/scatterCharts/ScatterPlotChartConstants.ts +2 -2
- package/src/grapher/scatterCharts/ScatterPlotChartState.ts +8 -8
- package/src/grapher/scatterCharts/ScatterSizeLegend.tsx +2 -2
- package/src/grapher/scatterCharts/ScatterUtils.ts +2 -2
- package/src/grapher/schema/grapher-schema.009.yaml +18 -18
- package/src/grapher/schema/migrations/migrations.ts +4 -4
- package/src/grapher/selection/MapSelectionArray.ts +1 -1
- package/src/grapher/selection/readme.md +1 -1
- package/src/grapher/slopeCharts/SlopeChartConstants.ts +3 -3
- package/src/grapher/slopeCharts/SlopeChartHelpers.ts +1 -1
- package/src/grapher/slopeCharts/SlopeChartState.ts +10 -10
- package/src/grapher/stackedCharts/AbstractStackedChartState.ts +8 -8
- package/src/grapher/stackedCharts/MarimekkoChart.tsx +5 -5
- package/src/grapher/stackedCharts/MarimekkoChartConstants.ts +2 -2
- package/src/grapher/stackedCharts/MarimekkoChartState.ts +12 -12
- package/src/grapher/stackedCharts/StackedBarChartState.ts +1 -1
- package/src/grapher/stackedCharts/StackedConstants.ts +2 -2
- package/src/grapher/stackedCharts/StackedDiscreteBarChartState.ts +12 -12
- package/src/grapher/stackedCharts/StackedDiscreteBars.tsx +2 -2
- package/src/grapher/tabs/Tabs.tsx +1 -1
- package/src/grapher/testData/{OwidTestData.sample.ts → TestData.sample.ts} +7 -7
- package/src/grapher/testData/{OwidTestData.ts → TestData.ts} +5 -5
- package/src/index.ts +7 -7
- package/src/types/{OwidOrigin.ts → Origin.ts} +3 -3
- package/src/types/{OwidSource.ts → Source.ts} +1 -1
- package/src/types/Variable.ts +133 -0
- package/src/types/{OwidVariableDisplayConfigInterface.ts → VariableDisplayConfigInterface.ts} +11 -11
- package/src/types/domainTypes/ContentGraph.ts +3 -3
- package/src/types/domainTypes/CoreTableTypes.ts +29 -29
- package/src/types/domainTypes/Posts.ts +2 -2
- package/src/types/domainTypes/Search.ts +6 -6
- package/src/types/domainTypes/Various.ts +1 -1
- package/src/types/gdocTypes/Gdoc.ts +42 -42
- package/src/types/grapherTypes/GrapherTypes.ts +21 -21
- package/src/types/index.ts +51 -51
- package/src/utils/MultiDimDataPageConfig.ts +1 -1
- package/src/utils/Util.ts +61 -55
- package/src/utils/{OwidVariable.ts → Variable.ts} +15 -15
- package/src/utils/formatValue.ts +12 -12
- package/src/utils/image.ts +12 -12
- package/src/utils/index.ts +5 -5
- package/src/utils/metadataHelpers.ts +19 -19
- package/src/utils/regions.ts +9 -9
- package/LICENSE.md +0 -8
- package/README.md +0 -113
- package/src/types/OwidVariable.ts +0 -133
|
@@ -26,7 +26,7 @@ function getPreferredSchemesByType(
|
|
|
26
26
|
ColorSchemeName.SingleColorDarkCopper,
|
|
27
27
|
])
|
|
28
28
|
.with(GRAPHER_CHART_TYPES.LineChart, () => [
|
|
29
|
-
ColorSchemeName.
|
|
29
|
+
ColorSchemeName.DistinctLines,
|
|
30
30
|
])
|
|
31
31
|
.with(GRAPHER_CHART_TYPES.Marimekko, () => [
|
|
32
32
|
ColorSchemeName.continents,
|
|
@@ -35,27 +35,27 @@ function getPreferredSchemesByType(
|
|
|
35
35
|
ColorSchemeName.SingleColorPurple,
|
|
36
36
|
ColorSchemeName.SingleColorTeal,
|
|
37
37
|
ColorSchemeName.SingleColorDarkCopper,
|
|
38
|
-
ColorSchemeName.
|
|
39
|
-
ColorSchemeName.
|
|
40
|
-
ColorSchemeName.
|
|
41
|
-
ColorSchemeName.
|
|
42
|
-
ColorSchemeName.
|
|
38
|
+
ColorSchemeName.CategoricalA,
|
|
39
|
+
ColorSchemeName.CategoricalB,
|
|
40
|
+
ColorSchemeName.CategoricalC,
|
|
41
|
+
ColorSchemeName.CategoricalD,
|
|
42
|
+
ColorSchemeName.CategoricalE,
|
|
43
43
|
])
|
|
44
44
|
.with(GRAPHER_CHART_TYPES.ScatterPlot, () => [
|
|
45
45
|
ColorSchemeName.continents,
|
|
46
|
-
ColorSchemeName.
|
|
46
|
+
ColorSchemeName.DistinctLines,
|
|
47
47
|
])
|
|
48
48
|
.with(GRAPHER_CHART_TYPES.SlopeChart, () => [
|
|
49
49
|
ColorSchemeName.continents,
|
|
50
|
-
ColorSchemeName.
|
|
50
|
+
ColorSchemeName.DistinctLines,
|
|
51
51
|
])
|
|
52
52
|
.with(GRAPHER_CHART_TYPES.StackedArea, () => [
|
|
53
|
-
ColorSchemeName["
|
|
54
|
-
ColorSchemeName.
|
|
55
|
-
ColorSchemeName.
|
|
56
|
-
ColorSchemeName.
|
|
57
|
-
ColorSchemeName.
|
|
58
|
-
ColorSchemeName.
|
|
53
|
+
ColorSchemeName["distinct"],
|
|
54
|
+
ColorSchemeName.CategoricalA,
|
|
55
|
+
ColorSchemeName.CategoricalB,
|
|
56
|
+
ColorSchemeName.CategoricalC,
|
|
57
|
+
ColorSchemeName.CategoricalD,
|
|
58
|
+
ColorSchemeName.CategoricalE,
|
|
59
59
|
ColorSchemeName.SingleColorGradientDenim,
|
|
60
60
|
ColorSchemeName.SingleColorGradientTeal,
|
|
61
61
|
ColorSchemeName.SingleColorGradientPurple,
|
|
@@ -63,12 +63,12 @@ function getPreferredSchemesByType(
|
|
|
63
63
|
ColorSchemeName.SingleColorGradientDarkCopper,
|
|
64
64
|
])
|
|
65
65
|
.with(GRAPHER_CHART_TYPES.StackedBar, () => [
|
|
66
|
-
ColorSchemeName["
|
|
67
|
-
ColorSchemeName.
|
|
68
|
-
ColorSchemeName.
|
|
69
|
-
ColorSchemeName.
|
|
70
|
-
ColorSchemeName.
|
|
71
|
-
ColorSchemeName.
|
|
66
|
+
ColorSchemeName["distinct"],
|
|
67
|
+
ColorSchemeName.CategoricalA,
|
|
68
|
+
ColorSchemeName.CategoricalB,
|
|
69
|
+
ColorSchemeName.CategoricalC,
|
|
70
|
+
ColorSchemeName.CategoricalD,
|
|
71
|
+
ColorSchemeName.CategoricalE,
|
|
72
72
|
ColorSchemeName.SingleColorGradientDenim,
|
|
73
73
|
ColorSchemeName.SingleColorGradientTeal,
|
|
74
74
|
ColorSchemeName.SingleColorGradientPurple,
|
|
@@ -76,12 +76,12 @@ function getPreferredSchemesByType(
|
|
|
76
76
|
ColorSchemeName.SingleColorGradientDarkCopper,
|
|
77
77
|
])
|
|
78
78
|
.with(GRAPHER_CHART_TYPES.StackedDiscreteBar, () => [
|
|
79
|
-
ColorSchemeName["
|
|
80
|
-
ColorSchemeName.
|
|
81
|
-
ColorSchemeName.
|
|
82
|
-
ColorSchemeName.
|
|
83
|
-
ColorSchemeName.
|
|
84
|
-
ColorSchemeName.
|
|
79
|
+
ColorSchemeName["distinct"],
|
|
80
|
+
ColorSchemeName.CategoricalA,
|
|
81
|
+
ColorSchemeName.CategoricalB,
|
|
82
|
+
ColorSchemeName.CategoricalC,
|
|
83
|
+
ColorSchemeName.CategoricalD,
|
|
84
|
+
ColorSchemeName.CategoricalE,
|
|
85
85
|
ColorSchemeName.SingleColorGradientDenim,
|
|
86
86
|
ColorSchemeName.SingleColorGradientTeal,
|
|
87
87
|
ColorSchemeName.SingleColorGradientPurple,
|