diff --git a/packages/@ourworldindata/grapher/src/schema/grapher-schema.004.yaml b/packages/@ourworldindata/grapher/src/schema/grapher-schema.004.yaml index cc0355fcbcd..8fbcc44ae7d 100644 --- a/packages/@ourworldindata/grapher/src/schema/grapher-schema.004.yaml +++ b/packages/@ourworldindata/grapher/src/schema/grapher-schema.004.yaml @@ -1,198 +1,14 @@ $schema: "http://json-schema.org/draft-07/schema#" $id: "https://files.ourworldindata.org/schemas/grapher-schema.004.json" -$defs: - axis: - type: object - properties: - removePointsOutsideDomain: - type: boolean - default: false - label: - type: string - description: Axis label - min: - type: number - description: Minimum domain value of the axis - scaleType: - type: string - description: Toggle linear/logarithmic - default: linear - enum: - - linear - - log - max: - type: number - description: Maximum domain value of the axis - canChangeScaleType: - type: boolean - description: Allow user to change lin/log - default: false - facetDomain: - type: string - description: Whether the axis domain should be the same across faceted charts (if possible) - default: shared - enum: - - independent - - shared - additionalProperties: false - colorScale: - type: object - description: Color scale definition - properties: - customNumericLabels: - type: array - description: | - Custom labels for each numeric bin. Only applied when strategy is `manual`. - `null` falls back to default label. - items: - type: - - string - - "null" - customCategoryColors: - type: object - description: Map of categorical values to colors. Colors are CSS colors, usually in the form `#aa9944` - patternProperties: - ".*": - type: string - baseColorScheme: - type: string - description: One of the predefined base color schemes - default: default - enum: - - YlGn - - YlGnBu - - GnBu - - BuGn - - PuBuGn - - BuPu - - RdPu - - PuRd - - OrRd - - YlOrRd - - YlOrBr - - Purples - - Blues - - Greens - - Oranges - - Reds - - Greys - - PuOr - - BrBG - - PRGn - - PiYG - - RdBu - - RdGy - - RdYlBu - - Spectral - - RdYlGn - - Accent - - Dark2 - - Paired - - Pastel1 - - Pastel2 - - Set1 - - Set2 - - Set3 - - PuBu - - Magma - - Inferno - - Plasma - - Viridis - - continents - - stackedAreaDefault - - owid-distinct - - default - - SingleColorDenim - - SingleColorTeal - - SingleColorPurple - - SingleColorDustyCoral - - SingleColorDarkCopper - - OwidCategoricalA - - OwidCategoricalB - - OwidCategoricalC - - OwidCategoricalD - - OwidCategoricalE - - OwidEnergy - - OwidEnergyLines - - OwidDistinctLines - - BinaryMapPaletteA - - BinaryMapPaletteB - - BinaryMapPaletteC - - BinaryMapPaletteD - - BinaryMapPaletteE - - SingleColorGradientDenim - - SingleColorGradientTeal - - SingleColorGradientPurple - - SingleColorGradientDustyCoral - - SingleColorGradientDarkCopper - equalSizeBins: - type: boolean - default: true - description: Whether the visual scaling for the color legend is disabled. - customHiddenCategories: - type: object - description: Allow hiding categories from the legend - patternProperties: - ".*": - type: boolean - binningStrategy: - type: string - description: The strategy for generating the bin boundaries - default: ckmeans - enum: - - equalInterval - - quantiles - - ckmeans - - manual - legendDescription: - type: string - description: A custom legend description. Only used in ScatterPlot legend titles for now. - customNumericColors: - type: array - description: | - Override some or all colors for the numerical color legend. - Colors are CSS colors, usually in the form `#aa9944` - `null` falls back the color scheme color. - items: - type: - - string - - "null" - customNumericValues: - type: array - description: Custom maximum brackets for each numeric bin. Only applied when strategy is `manual` - items: - type: number - customNumericColorsActive: - type: boolean - default: false - description: Whether `customNumericColors` are used to override the color scheme - colorSchemeInvert: - type: boolean - default: false - description: Reverse the order of colors in the color scheme - customCategoryLabels: - type: object - description: Map of category values to color legend labels. - patternProperties: - ".*": - type: string - binningStrategyBinCount: - type: integer - default: 5 - description: The *suggested* number of bins for the automatic binning algorithm - minimum: 0 - customNumericMinValue: - type: number - description: The minimum bracket of the first bin - additionalProperties: false -required: - - title - - version - - dimensions + type: object description: | Our World In Data grapher configuration. Most of the fields can be left empty and will be filled with reasonable default values. +required: + - title + - version + - dimensions properties: $schema: type: string @@ -203,184 +19,59 @@ properties: type: integer description: Internal DB id. Useful internally for OWID but not required if just using grapher directly. minimum: 0 - map: - type: object - description: Configuration of the world map chart - properties: - projection: - type: string - description: Slightly misnamed - this does not change the map projection but instead specifies which world area to focus on. - enum: - - World - - Europe - - Africa - - Asia - - NortAmerica - - SouthAmerica - - Oceania - default: World - hideTimeline: - type: boolean - default: false - description: Whether the timeline should be hidden in the map view and thus the user not be able to change the year - colorScale: - $ref: "#/$defs/colorScale" - timeTolerance: - type: integer - default: 0 - description: | - Tolerance to use. If data points are missing for a time point, a match is accepted if it lies - within the specified time period. The unit is the dominating time unit, usually years but can be days for - daily time series. - minimum: 0 - toleranceStrategy: - type: string - description: | - Tolerance strategy to use. Options include accepting matches that are "closest" to the time point in question - (going forwards and backwards in time), and accepting matches that lie in the past ("backwards") or - the future ("forwards"). - enum: - - closest - - forwards - - backwards - default: closest - tooltipUseCustomLabels: - type: boolean - default: false - description: Show the label from colorSchemeLabels in the tooltip instead of the numeric value - time: - description: Select a specific time to be displayed. - default: "latest" - oneOf: - - type: number - - type: string - enum: - - latest - - earliest - columnSlug: - # TODO: remove this once we have a convention of using the first y dimension instead - description: | - Column to show in the map tab. Can be a column slug (e.g. in explorers) or a variable ID (as string). - If not provided, the first y dimension is used. - type: string - additionalProperties: false - maxTime: - description: End point of the initially selected time span. - default: latest - oneOf: - - type: number - - type: string - enum: - - latest - - earliest - subtitle: - type: string - description: The longer subtitle text to show beneath the title - selectedEntityNames: - type: array - description: The initial selection of entities - items: - type: - - string - baseColorScheme: - type: string - default: default - description: The default color scheme if no color overrides are specified - yAxis: - $ref: "#/$defs/axis" - tab: - type: string - description: The tab that is shown initially - default: chart - enum: - - chart - - map - - table - matchingEntitiesOnly: - type: boolean - default: false - description: Exclude entities that do not belong in any color group - hasChartTab: - type: boolean - default: true - description: Whether to show the (non-map) chart tab - hideLegend: - type: boolean - default: false - hideLogo: - type: boolean - default: false - timelineMinTime: + version: type: integer - description: | - The lowest year to show in the timeline. If this is set then the user is not able to see - any data before this year - variantName: - type: string - description: "Optional internal variant name for distinguishing charts with the same title" - hideTimeline: + default: 1 + minimum: 0 + isPublished: type: boolean default: false - description: "Whether to hide the timeline from the user. If it is hidden then the user can't change the time" - originUrl: + description: Indicates if the chart is published on Our World In Data or still in draft + slug: type: string - description: The page containing this chart where more context can be found - colorScale: - $ref: "#/$defs/colorScale" - scatterPointLabelStrategy: + description: Slug of the chart on Our World In Data + + type: type: string - default: year - description: | - When a user hovers over a connected series line in a ScatterPlot we show - a label for each point. By default that value will be from the "year" column - but by changing this option the column used for the x or y axis could be used instead. + description: Which type of chart should be shown (hasMapChart can be used to always also show a map chart) + default: LineChart enum: - - x - - "y" - - year - selectedFacetStrategy: + - LineChart + - ScatterPlot + - StackedArea + - DiscreteBar + - StackedDiscreteBar + - SlopeChart + - StackedBar + - Marimekko + + # text in header and footer + title: type: string - default: none - description: The desired facetting strategy (none for no facetting) - enum: - - none - - entity - - metric + description: Big title text of the chart + subtitle: + type: string + description: The longer subtitle text to show beneath the title sourceDesc: type: string description: Short comma-separated list of source names - isPublished: - type: boolean - default: false - description: Indicates if the chart is published on Our World In Data or still in draft - invertColorScheme: - type: boolean - default: false - description: Reverse the order of colors in the color scheme - hideRelativeToggle: - type: boolean - default: true - description: Whether to hide the relative mode UI toggle - comparisonLines: - description: List of vertical comparison lines to draw + note: + type: string + description: Note displayed in the footer of the chart. To be used for clarifications etc about the data. + originUrl: + type: string + description: The page containing this chart where more context can be found + relatedQuestions: type: array + description: Links to related questions items: type: object properties: - label: + url: type: string - yEquals: + text: type: string additionalProperties: false - slug: - type: string - description: Slug of the chart on Our World In Data - internalNotes: - type: string - version: - type: integer - default: 1 - minimum: 0 logo: type: string description: Which logo to show on the upper right side @@ -389,17 +80,14 @@ properties: - owid - core+owid - gv+owid - entityType: - type: string - default: country or region - description: Display string for naming the primary entities of the data. Default is 'country or region', but you can specify a different one such as 'state' or 'region' - facettingLabelByYVariables: + + # internal use only + variantName: type: string - default: metric - description: Display string that replaces 'metric' in the 'Split by metric' label in facet controls (e.g. 'product' displays 'Split by product') - note: + description: "Optional internal variant name for distinguishing charts with the same title" + internalNotes: type: string - description: Note displayed in the footer of the chart. To be used for clarifications etc about the data. + dimensions: type: array description: List of dimensions and their mapping to variables @@ -409,12 +97,10 @@ properties: - property - variableId properties: - targetYear: + variableId: type: integer - description: | - Charts that can display more than one primary dimensions (i.e. scatter and marimekko) - sometimes need to "hardcode" one dimension to a specific year. This happens e.g. when - mixing a daily X variable in a scatter plot with a yearly one, e.g. population. + description: The variable id to get the values for this time series + minimum: 0 property: type: string description: Which dimension this property maps to @@ -424,15 +110,15 @@ properties: - "size" - "color" - "table" + targetYear: + type: integer + description: | + Charts that can display more than one primary dimensions (i.e. scatter and marimekko) + sometimes need to "hardcode" one dimension to a specific year. This happens e.g. when + mixing a daily X variable in a scatter plot with a yearly one, e.g. population. display: type: object properties: - isProjection: - type: boolean - default: false - description: | - Indicates if this time series is a forward projection (if yes then this is rendered - differently in e.g. line charts) name: type: string description: The display string for this variable @@ -440,17 +126,20 @@ properties: type: string description: Variable description $comment: This is a new field that did not exist prior to November 2021 in the DB. It overrides the description on the variable DB table. - tableDisplay: - type: object - description: Configuration for the table sheet for this variable - properties: - hideAbsoluteChange: - type: boolean - default: false - hideRelativeChange: - type: boolean - default: false - additionalProperties: false + + unit: + type: string + description: Long unit text - This is shown in the UI when there is more space (e.g. tooltips) after values + shortUnit: + type: string + description: Short unit symbol - This is used in tight UI spaces when the value is shown + color: + type: string + description: Default color for this time series + + conversionFactor: + type: number + description: Conversion factor to apply before showing values tolerance: type: integer default: 0 @@ -458,29 +147,22 @@ properties: Tolerance to use. If data points are missing for a time point, a match is accepted if it lies within the specified time period. The unit is the dominating time unit, either years or days. minimum: 0 - entityAnnotationsMap: - type: string - description: Entity annotations + isProjection: + type: boolean + default: false + description: | + Indicates if this time series is a forward projection (if yes then this is rendered + differently in e.g. line charts) + yearIsDay: type: boolean default: false description: Switch to indicate if the number in the year column represents a day (since zeroDay) or not i.e. a year - color: - type: string - description: Default color for this time series - includeInTable: - type: boolean - default: true - description: Whether to render this time series in the table sheet - shortUnit: - type: string - description: Short unit symbol - This is used in tight UI spaces when the value is shown - conversionFactor: - type: number - description: Conversion factor to apply before showing values - unit: + zeroDay: type: string - description: Long unit text - This is shown in the UI when there is more space (e.g. tooltips) after values + description: Iso date day string for the starting date if yearIsDay is used + default: "2020-01-21" + roundingMode: type: string description: | @@ -500,65 +182,163 @@ properties: description: Number of significant figures to show minimum: 1 default: 3 - zeroDay: + + includeInTable: + type: boolean + default: true + description: Whether to render this time series in the table sheet + tableDisplay: + type: object + description: Configuration for the table sheet for this variable + properties: + hideAbsoluteChange: + type: boolean + default: false + hideRelativeChange: + type: boolean + default: false + additionalProperties: false + + entityAnnotationsMap: type: string - description: Iso date day string for the starting date if yearIsDay is used - default: "2020-01-21" + description: Entity annotations additionalProperties: false - variableId: - type: integer - description: The variable id to get the values for this time series - minimum: 0 additionalProperties: false - addCountryMode: + + # tabs + tab: type: string - description: Whether the user can change countries, add additional ones or neither - default: add-country + description: The tab that is shown initially + default: chart enum: - - add-country - - change-country - - disabled - compareEndPointsOnly: + - chart + - map + - table + hasChartTab: + type: boolean + default: true + description: Whether to show the (non-map) chart tab + hasMapTab: type: boolean default: false - description: Drops in between points in scatter plots + description: Indicates if the map tab should be shown + + # time + timelineMinTime: + type: integer + description: | + The lowest year to show in the timeline. If this is set then the user is not able to see + any data before this year + timelineMaxTime: + type: integer + description: | + The highest year to show in the timeline. If this is set then the user is not able to see + any data after this year + minTime: + description: Start point of the initially selected time span. + default: earliest + oneOf: + - type: number + - type: string + enum: + - latest + - earliest + maxTime: + description: End point of the initially selected time span. + default: latest + oneOf: + - type: number + - type: string + enum: + - latest + - earliest + + # axis + xAxis: + $ref: "#/$defs/axis" + yAxis: + $ref: "#/$defs/axis" + + # color scheme + baseColorScheme: + type: string + default: default + description: The default color scheme if no color overrides are specified + invertColorScheme: + type: boolean + default: false + description: Reverse the order of colors in the color scheme + colorScale: + $ref: "#/$defs/colorScale" + + # entities + addCountryMode: + type: string + description: Whether the user can change countries, add additional ones or neither + default: add-country + enum: + - add-country + - change-country + - disabled + entityType: + type: string + default: country or region + description: Display string for naming the primary entities of the data. Default is 'country or region', but you can specify a different one such as 'state' or 'region' + entityTypePlural: + description: Plural of the entity type (i.e. when entityType is 'country' this would be 'countries') + default: countries + type: string + selectedEntityNames: + type: array + description: The initial selection of entities + items: + type: + - string selectedEntityColors: type: object description: Colors for selected entities patternProperties: ".*": type: string - relatedQuestions: + includedEntities: type: array - description: Links to related questions + description: Entities to include. Opposite of excludedEntities. If this is set then all entities not specified here are excluded. items: - type: object - properties: - url: - type: string - text: - type: string - additionalProperties: false - title: + type: number + excludedEntities: + type: array + description: Entities that should be excluded from the chart + items: + type: integer + minimum: 0 + matchingEntitiesOnly: + type: boolean + default: false + description: Exclude entities that do not belong in any color group + missingDataStrategy: type: string - description: Big title text of the chart - type: + default: auto + description: The desired strategy for handling entities with missing data + enum: + - auto + - hide + - show + + # facetting + selectedFacetStrategy: type: string - description: Which type of chart should be shown (hasMapChart can be used to always also show a map chart) - default: LineChart + default: none + description: The desired facetting strategy (none for no facetting) enum: - - LineChart - - ScatterPlot - - StackedArea - - DiscreteBar - - StackedDiscreteBar - - SlopeChart - - StackedBar - - Marimekko - hasMapTab: - type: boolean - default: false - description: Indicates if the map tab should be shown + - none + - entity + - metric + facettingLabelByYVariables: + type: string + default: metric + description: Display string that replaces 'metric' in the 'Split by metric' label in facet controls (e.g. 'product' displays 'Split by product') + + # stacking stackMode: type: - string @@ -571,60 +351,90 @@ properties: - grouped - stacked - null - minTime: - description: Start point of the initially selected time span. - default: earliest - oneOf: - - type: number - - type: string - enum: - - latest - - earliest - hideAnnotationFieldsInTitle: - type: object - description: Whether to hide any automatically added title annotations like the selected year - properties: - entity: - type: boolean - description: Whether to hide the entity annotation - default: false - time: - type: boolean - description: Whether to hide the time annotation - default: false - changeInPrefix: - type: boolean - description: Whether to hide "Change in" in relative line charts - default: false - excludedEntities: + + # bar order + sortBy: + type: string + description: Sort criterium (used by stacked bar charts and marimekko) + default: total + enum: + - column + - total + - entityName + - custom + sortColumnSlug: + description: Sort column if sortBy is column (used by stacked bar charts and marimekko) + type: string + sortOrder: + type: string + description: Sort order (used by stacked bar charts and marimekko) + default: desc + enum: + - desc + - asc + + comparisonLines: + description: List of vertical comparison lines to draw type: array - description: Entities that should be excluded from the chart items: - type: integer - minimum: 0 - xAxis: - $ref: "#/$defs/axis" - timelineMaxTime: - type: integer + type: object + properties: + label: + type: string + yEquals: + type: string + additionalProperties: false + + # scatter plot specific settings + scatterPointLabelStrategy: + type: string + default: year description: | - The highest year to show in the timeline. If this is set then the user is not able to see - any data after this year - hideConnectedScatterLines: + When a user hovers over a connected series line in a ScatterPlot we show + a label for each point. By default that value will be from the "year" column + but by changing this option the column used for the x or y axis could be used instead. + enum: + - x + - "y" + - year + compareEndPointsOnly: type: boolean default: false - description: Whether to hide connecting lines on scatter plots when a time range is selected - showNoDataArea: - type: boolean - default: true - description: Whether to show an area for entities that have no data (currently only used in marimekko charts) + description: Drops in between points in scatter plots zoomToSelection: type: boolean default: false description: Whether to zoom to the selected data points + + # show directives showYearLabels: type: boolean default: false description: Whether to show year labels in bar charts + showNoDataArea: + type: boolean + default: true + description: Whether to show an area for entities that have no data (currently only used in marimekko charts) + + # hide directives + hideLegend: + type: boolean + default: false + hideLogo: + type: boolean + default: false + hideTimeline: + type: boolean + default: false + description: "Whether to hide the timeline from the user. If it is hidden then the user can't change the time" + hideRelativeToggle: + type: boolean + default: true + description: Whether to hide the relative mode UI toggle + hideConnectedScatterLines: + type: boolean + default: false + description: Whether to hide connecting lines on scatter plots when a time range is selected hideLinesOutsideTolerance: type: boolean default: false @@ -637,44 +447,284 @@ properties: type: boolean default: false description: Hide entity names in Scatter plots - sortBy: - type: string - description: Sort criterium (used by stacked bar charts and marimekko) - default: total - enum: - - column - - total - - entityName - - custom - sortOrder: - type: string - description: Sort order (used by stacked bar charts and marimekko) - default: desc - enum: - - desc - - asc - sortColumnSlug: - description: Sort column if sortBy is column (used by stacked bar charts and marimekko) - type: string hideFacetControl: type: boolean default: true description: Whether to hide the faceting control - includedEntities: - type: array - description: Entities to include. Opposite of excludedEntities. If this is set then all entities not specified here are excluded. - items: - type: number - entityTypePlural: - description: Plural of the entity type (i.e. when entityType is 'country' this would be 'countries') - default: countries - type: string - missingDataStrategy: - type: string - default: auto - description: The desired strategy for handling entities with missing data - enum: - - auto - - hide - - show + hideAnnotationFieldsInTitle: + type: object + description: Whether to hide any automatically added title annotations like the selected year + properties: + entity: + type: boolean + description: Whether to hide the entity annotation + default: false + time: + type: boolean + description: Whether to hide the time annotation + default: false + changeInPrefix: + type: boolean + description: Whether to hide "Change in" in relative line charts + default: false + + map: + type: object + description: Configuration of the world map chart + properties: + projection: + type: string + description: Slightly misnamed - this does not change the map projection but instead specifies which world area to focus on. + enum: + - World + - Europe + - Africa + - Asia + - NortAmerica + - SouthAmerica + - Oceania + default: World + + time: + description: Select a specific time to be displayed. + default: "latest" + oneOf: + - type: number + - type: string + enum: + - latest + - earliest + timeTolerance: + type: integer + default: 0 + description: | + Tolerance to use. If data points are missing for a time point, a match is accepted if it lies + within the specified time period. The unit is the dominating time unit, usually years but can be days for + daily time series. + minimum: 0 + toleranceStrategy: + type: string + description: | + Tolerance strategy to use. Options include accepting matches that are "closest" to the time point in question + (going forwards and backwards in time), and accepting matches that lie in the past ("backwards") or + the future ("forwards"). + enum: + - closest + - forwards + - backwards + default: closest + + colorScale: + $ref: "#/$defs/colorScale" + + columnSlug: + # TODO: remove this once we have a convention of using the first y dimension instead + description: | + Column to show in the map tab. Can be a column slug (e.g. in explorers) or a variable ID (as string). + If not provided, the first y dimension is used. + type: string + tooltipUseCustomLabels: + type: boolean + default: false + description: Show the label from colorSchemeLabels in the tooltip instead of the numeric value + hideTimeline: + type: boolean + default: false + description: Whether the timeline should be hidden in the map view and thus the user not be able to change the year + additionalProperties: false additionalProperties: false + +# Reusable parts of the schema +$defs: + axis: + type: object + properties: + label: + type: string + description: Axis label + min: + type: number + description: Minimum domain value of the axis + max: + type: number + description: Maximum domain value of the axis + scaleType: + type: string + description: Toggle linear/logarithmic + default: linear + enum: + - linear + - log + canChangeScaleType: + type: boolean + description: Allow user to change lin/log + default: false + facetDomain: + type: string + description: Whether the axis domain should be the same across faceted charts (if possible) + default: shared + enum: + - independent + - shared + removePointsOutsideDomain: + type: boolean + default: false + additionalProperties: false + colorScale: + type: object + description: Color scale definition + properties: + # color scheme settings + baseColorScheme: + type: string + description: One of the predefined base color schemes + default: default + enum: + - YlGn + - YlGnBu + - GnBu + - BuGn + - PuBuGn + - BuPu + - RdPu + - PuRd + - OrRd + - YlOrRd + - YlOrBr + - Purples + - Blues + - Greens + - Oranges + - Reds + - Greys + - PuOr + - BrBG + - PRGn + - PiYG + - RdBu + - RdGy + - RdYlBu + - Spectral + - RdYlGn + - Accent + - Dark2 + - Paired + - Pastel1 + - Pastel2 + - Set1 + - Set2 + - Set3 + - PuBu + - Magma + - Inferno + - Plasma + - Viridis + - continents + - stackedAreaDefault + - owid-distinct + - default + - SingleColorDenim + - SingleColorTeal + - SingleColorPurple + - SingleColorDustyCoral + - SingleColorDarkCopper + - OwidCategoricalA + - OwidCategoricalB + - OwidCategoricalC + - OwidCategoricalD + - OwidCategoricalE + - OwidEnergy + - OwidEnergyLines + - OwidDistinctLines + - BinaryMapPaletteA + - BinaryMapPaletteB + - BinaryMapPaletteC + - BinaryMapPaletteD + - BinaryMapPaletteE + - SingleColorGradientDenim + - SingleColorGradientTeal + - SingleColorGradientPurple + - SingleColorGradientDustyCoral + - SingleColorGradientDarkCopper + colorSchemeInvert: + type: boolean + default: false + description: Reverse the order of colors in the color scheme + + # binning options + binningStrategy: + type: string + description: The strategy for generating the bin boundaries + default: ckmeans + enum: + - equalInterval + - quantiles + - ckmeans + - manual + customNumericMinValue: + type: number + description: The minimum bracket of the first bin + binningStrategyBinCount: + type: integer + default: 5 + description: The *suggested* number of bins for the automatic binning algorithm + minimum: 0 + equalSizeBins: + type: boolean + default: true + description: Whether the visual scaling for the color legend is disabled. + + # custom categorical bins + customCategoryColors: + type: object + description: Map of categorical values to colors. Colors are CSS colors, usually in the form `#aa9944` + patternProperties: + ".*": + type: string + customCategoryLabels: + type: object + description: Map of category values to color legend labels. + patternProperties: + ".*": + type: string + customHiddenCategories: + type: object + description: Allow hiding categories from the legend + patternProperties: + ".*": + type: boolean + + # custom numeric bins + customNumericColors: + type: array + description: | + Override some or all colors for the numerical color legend. + Colors are CSS colors, usually in the form `#aa9944` + `null` falls back the color scheme color. + items: + type: + - string + - "null" + customNumericColorsActive: + type: boolean + default: false + description: Whether `customNumericColors` are used to override the color scheme + customNumericLabels: + type: array + description: | + Custom labels for each numeric bin. Only applied when strategy is `manual`. + `null` falls back to default label. + items: + type: + - string + - "null" + customNumericValues: + type: array + description: Custom maximum brackets for each numeric bin. Only applied when strategy is `manual` + items: + type: number + + legendDescription: + type: string + description: A custom legend description. Only used in ScatterPlot legend titles for now. + additionalProperties: false