altair.Config#
- class altair.Config(arc=Undefined, area=Undefined, aria=Undefined, autosize=Undefined, axis=Undefined, axisBand=Undefined, axisBottom=Undefined, axisDiscrete=Undefined, axisLeft=Undefined, axisPoint=Undefined, axisQuantitative=Undefined, axisRight=Undefined, axisTemporal=Undefined, axisTop=Undefined, axisX=Undefined, axisXBand=Undefined, axisXDiscrete=Undefined, axisXPoint=Undefined, axisXQuantitative=Undefined, axisXTemporal=Undefined, axisY=Undefined, axisYBand=Undefined, axisYDiscrete=Undefined, axisYPoint=Undefined, axisYQuantitative=Undefined, axisYTemporal=Undefined, background=Undefined, bar=Undefined, boxplot=Undefined, circle=Undefined, concat=Undefined, countTitle=Undefined, customFormatTypes=Undefined, errorband=Undefined, errorbar=Undefined, facet=Undefined, fieldTitle=Undefined, font=Undefined, geoshape=Undefined, header=Undefined, headerColumn=Undefined, headerFacet=Undefined, headerRow=Undefined, image=Undefined, legend=Undefined, line=Undefined, lineBreak=Undefined, locale=Undefined, mark=Undefined, normalizedNumberFormat=Undefined, normalizedNumberFormatType=Undefined, numberFormat=Undefined, numberFormatType=Undefined, padding=Undefined, params=Undefined, point=Undefined, projection=Undefined, range=Undefined, rect=Undefined, rule=Undefined, scale=Undefined, selection=Undefined, square=Undefined, style=Undefined, text=Undefined, tick=Undefined, timeFormat=Undefined, timeFormatType=Undefined, title=Undefined, tooltipFormat=Undefined, trail=Undefined, view=Undefined, **kwds)#
Config schema wrapper.
- Parameters:
- arcdict,
RectConfig Arc-specific Config
- areadict,
AreaConfig Area-Specific Config
- ariabool
A boolean flag indicating if ARIA default attributes should be included for marks and guides (SVG output only). If false, the
"aria-hidden"attribute will be set for all guides, removing them from the ARIA accessibility tree and Vega-Lite will not generate default descriptions for marks.Default value:
true.- autosizedict,
AutosizeType,AutoSizeParams, Literal[‘pad’, ‘none’, ‘fit’, ‘fit-x’, ‘fit-y’] How the visualization size should be determined. If a string, should be one of
"pad","fit"or"none". Object values can additionally specify parameters for content sizing and automatic resizing.Default value:
pad- axisdict,
AxisConfig Axis configuration, which determines default properties for all
xandyaxes. For a full list of axis configuration options, please see the corresponding section of the axis documentation.- axisBanddict,
AxisConfig Config for axes with “band” scales.
- axisBottomdict,
AxisConfig Config for x-axis along the bottom edge of the chart.
- axisDiscretedict,
AxisConfig Config for axes with “point” or “band” scales.
- axisLeftdict,
AxisConfig Config for y-axis along the left edge of the chart.
- axisPointdict,
AxisConfig Config for axes with “point” scales.
- axisQuantitativedict,
AxisConfig Config for quantitative axes.
- axisRightdict,
AxisConfig Config for y-axis along the right edge of the chart.
- axisTemporaldict,
AxisConfig Config for temporal axes.
- axisTopdict,
AxisConfig Config for x-axis along the top edge of the chart.
- axisXdict,
AxisConfig X-axis specific config.
- axisXBanddict,
AxisConfig Config for x-axes with “band” scales.
- axisXDiscretedict,
AxisConfig Config for x-axes with “point” or “band” scales.
- axisXPointdict,
AxisConfig Config for x-axes with “point” scales.
- axisXQuantitativedict,
AxisConfig Config for x-quantitative axes.
- axisXTemporaldict,
AxisConfig Config for x-temporal axes.
- axisYdict,
AxisConfig Y-axis specific config.
- axisYBanddict,
AxisConfig Config for y-axes with “band” scales.
- axisYDiscretedict,
AxisConfig Config for y-axes with “point” or “band” scales.
- axisYPointdict,
AxisConfig Config for y-axes with “point” scales.
- axisYQuantitativedict,
AxisConfig Config for y-quantitative axes.
- axisYTemporaldict,
AxisConfig Config for y-temporal axes.
- backgroundstr, dict,
Color,ExprRef,HexColor,ColorName, Literal[‘black’, ‘silver’, ‘gray’, ‘white’, ‘maroon’, ‘red’, ‘purple’, ‘fuchsia’, ‘green’, ‘lime’, ‘olive’, ‘yellow’, ‘navy’, ‘blue’, ‘teal’, ‘aqua’, ‘orange’, ‘aliceblue’, ‘antiquewhite’, ‘aquamarine’, ‘azure’, ‘beige’, ‘bisque’, ‘blanchedalmond’, ‘blueviolet’, ‘brown’, ‘burlywood’, ‘cadetblue’, ‘chartreuse’, ‘chocolate’, ‘coral’, ‘cornflowerblue’, ‘cornsilk’, ‘crimson’, ‘cyan’, ‘darkblue’, ‘darkcyan’, ‘darkgoldenrod’, ‘darkgray’, ‘darkgreen’, ‘darkgrey’, ‘darkkhaki’, ‘darkmagenta’, ‘darkolivegreen’, ‘darkorange’, ‘darkorchid’, ‘darkred’, ‘darksalmon’, ‘darkseagreen’, ‘darkslateblue’, ‘darkslategray’, ‘darkslategrey’, ‘darkturquoise’, ‘darkviolet’, ‘deeppink’, ‘deepskyblue’, ‘dimgray’, ‘dimgrey’, ‘dodgerblue’, ‘firebrick’, ‘floralwhite’, ‘forestgreen’, ‘gainsboro’, ‘ghostwhite’, ‘gold’, ‘goldenrod’, ‘greenyellow’, ‘grey’, ‘honeydew’, ‘hotpink’, ‘indianred’, ‘indigo’, ‘ivory’, ‘khaki’, ‘lavender’, ‘lavenderblush’, ‘lawngreen’, ‘lemonchiffon’, ‘lightblue’, ‘lightcoral’, ‘lightcyan’, ‘lightgoldenrodyellow’, ‘lightgray’, ‘lightgreen’, ‘lightgrey’, ‘lightpink’, ‘lightsalmon’, ‘lightseagreen’, ‘lightskyblue’, ‘lightslategray’, ‘lightslategrey’, ‘lightsteelblue’, ‘lightyellow’, ‘limegreen’, ‘linen’, ‘magenta’, ‘mediumaquamarine’, ‘mediumblue’, ‘mediumorchid’, ‘mediumpurple’, ‘mediumseagreen’, ‘mediumslateblue’, ‘mediumspringgreen’, ‘mediumturquoise’, ‘mediumvioletred’, ‘midnightblue’, ‘mintcream’, ‘mistyrose’, ‘moccasin’, ‘navajowhite’, ‘oldlace’, ‘olivedrab’, ‘orangered’, ‘orchid’, ‘palegoldenrod’, ‘palegreen’, ‘paleturquoise’, ‘palevioletred’, ‘papayawhip’, ‘peachpuff’, ‘peru’, ‘pink’, ‘plum’, ‘powderblue’, ‘rosybrown’, ‘royalblue’, ‘saddlebrown’, ‘salmon’, ‘sandybrown’, ‘seagreen’, ‘seashell’, ‘sienna’, ‘skyblue’, ‘slateblue’, ‘slategray’, ‘slategrey’, ‘snow’, ‘springgreen’, ‘steelblue’, ‘tan’, ‘thistle’, ‘tomato’, ‘turquoise’, ‘violet’, ‘wheat’, ‘whitesmoke’, ‘yellowgreen’, ‘rebeccapurple’] CSS color property to use as the background of the entire view.
Default value:
"white"- bardict,
BarConfig Bar-Specific Config
- boxplotdict,
BoxPlotConfig Box Config
- circledict,
MarkConfig Circle-Specific Config
- concatdict,
CompositionConfig Default configuration for all concatenation and repeat view composition operators (
concat,hconcat,vconcat, andrepeat)- countTitlestr
Default axis and legend title for count fields.
Default value:
'Count of Records.- customFormatTypesbool
Allow the
formatTypeproperty for text marks and guides to accept a custom formatter function registered as a Vega expression.- errorbanddict,
ErrorBandConfig ErrorBand Config
- errorbardict,
ErrorBarConfig ErrorBar Config
- facetdict,
CompositionConfig Default configuration for the
facetview composition operator- fieldTitleLiteral[‘verbal’, ‘functional’, ‘plain’]
Defines how Vega-Lite generates title for fields. There are three possible styles:
"verbal"(Default) - displays function in a verbal style (e.g., “Sum of field”, “Year-month of date”, “field (binned)”)."function"- displays function using parentheses and capitalized texts (e.g., “SUM(field)”, “YEARMONTH(date)”, “BIN(field)”)."plain"- displays only the field name without functions (e.g., “field”, “date”, “field”).
- fontstr
Default font for all text marks, titles, and labels.
- geoshapedict,
MarkConfig Geoshape-Specific Config
- headerdict,
HeaderConfig Header configuration, which determines default properties for all headers.
For a full list of header configuration options, please see the corresponding section of in the header documentation.
- headerColumndict,
HeaderConfig Header configuration, which determines default properties for column headers.
For a full list of header configuration options, please see the corresponding section of in the header documentation.
- headerFacetdict,
HeaderConfig Header configuration, which determines default properties for non-row/column facet headers.
For a full list of header configuration options, please see the corresponding section of in the header documentation.
- headerRowdict,
HeaderConfig Header configuration, which determines default properties for row headers.
For a full list of header configuration options, please see the corresponding section of in the header documentation.
- imagedict,
RectConfig Image-specific Config
- legenddict,
LegendConfig Legend configuration, which determines default properties for all legends. For a full list of legend configuration options, please see the corresponding section of in the legend documentation.
- linedict,
LineConfig Line-Specific Config
- lineBreakstr, dict,
ExprRef A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property provides a global default for text marks, which is overridden by mark or style config settings, and by the lineBreak mark encoding channel. If signal-valued, either string or regular expression (regexp) values are valid.
- localedict,
Locale Locale definitions for string parsing and formatting of number and date values. The locale object should contain
numberand/ortimeproperties with locale definitions. Locale definitions provided in the config block may be overridden by the View constructor locale option.- markdict,
MarkConfig Mark Config
- normalizedNumberFormatstr
If normalizedNumberFormatType is not specified, D3 number format for axis labels, text marks, and tooltips of normalized stacked fields (fields with
stack: "normalize"). For example"s"for SI units. Use D3’s number format pattern.If
config.normalizedNumberFormatTypeis specified andconfig.customFormatTypesistrue, this value will be passed asformatalongsidedatum.valueto theconfig.numberFormatTypefunction. Default value:%- normalizedNumberFormatTypestr
Custom format type for
config.normalizedNumberFormat.Default value:
undefined– This is equilvalent to call D3-format, which is exposed as format in Vega-Expression. Note: You must also setcustomFormatTypestotrueto use this feature.- numberFormatstr
If numberFormatType is not specified, D3 number format for guide labels, text marks, and tooltips of non-normalized fields (fields without
stack: "normalize"). For example"s"for SI units. Use D3’s number format pattern.If
config.numberFormatTypeis specified andconfig.customFormatTypesistrue, this value will be passed asformatalongsidedatum.valueto theconfig.numberFormatTypefunction.- numberFormatTypestr
Custom format type for
config.numberFormat.Default value:
undefined– This is equilvalent to call D3-format, which is exposed as format in Vega-Expression. Note: You must also setcustomFormatTypestotrueto use this feature.- paddingdict, float,
ExprRef,Padding The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format
{"left": 5, "top": 5, "right": 5, "bottom": 5}to specify padding for each side of the visualization.Default value:
5- paramsSequence[dict,
TopLevelParameter,VariableParameter,TopLevelSelectionParameter] Dynamic variables or selections that parameterize a visualization.
- pointdict,
MarkConfig Point-Specific Config
- projectiondict,
ProjectionConfig Projection configuration, which determines default properties for all projections. For a full list of projection configuration options, please see the corresponding section of the projection documentation.
- rangedict,
RangeConfig An object hash that defines default range arrays or schemes for using with scales. For a full list of scale range configuration options, please see the corresponding section of the scale documentation.
- rectdict,
RectConfig Rect-Specific Config
- ruledict,
MarkConfig Rule-Specific Config
- scaledict,
ScaleConfig Scale configuration determines default properties for all scales. For a full list of scale configuration options, please see the corresponding section of the scale documentation.
- selectiondict,
SelectionConfig An object hash for defining default properties for each type of selections.
- squaredict,
MarkConfig Square-Specific Config
- styledict,
StyleConfigIndex An object hash that defines key-value mappings to determine default properties for marks with a given style. The keys represent styles names; the values have to be valid mark configuration objects.
- textdict,
MarkConfig Text-Specific Config
- tickdict,
TickConfig Tick-Specific Config
- timeFormatstr
Default time format for raw time values (without time units) in text marks, legend labels and header labels.
Default value:
"%b %d, %Y"Note: Axes automatically determine the format for each label automatically so this config does not affect axes.- timeFormatTypestr
Custom format type for
config.timeFormat.Default value:
undefined– This is equilvalent to call D3-time-format, which is exposed as timeFormat in Vega-Expression. Note: You must also setcustomFormatTypestotrueand there must not be atimeUnitdefined to use this feature.- titledict,
TitleConfig Title configuration, which determines default properties for all titles. For a full list of title configuration options, please see the corresponding section of the title documentation.
- tooltipFormatdict,
FormatConfig Define custom format configuration for tooltips. If unspecified, default format config will be applied.
- traildict,
LineConfig Trail-Specific Config
- viewdict,
ViewConfig Default properties for single view plots.
- arcdict,
- __init__(arc=Undefined, area=Undefined, aria=Undefined, autosize=Undefined, axis=Undefined, axisBand=Undefined, axisBottom=Undefined, axisDiscrete=Undefined, axisLeft=Undefined, axisPoint=Undefined, axisQuantitative=Undefined, axisRight=Undefined, axisTemporal=Undefined, axisTop=Undefined, axisX=Undefined, axisXBand=Undefined, axisXDiscrete=Undefined, axisXPoint=Undefined, axisXQuantitative=Undefined, axisXTemporal=Undefined, axisY=Undefined, axisYBand=Undefined, axisYDiscrete=Undefined, axisYPoint=Undefined, axisYQuantitative=Undefined, axisYTemporal=Undefined, background=Undefined, bar=Undefined, boxplot=Undefined, circle=Undefined, concat=Undefined, countTitle=Undefined, customFormatTypes=Undefined, errorband=Undefined, errorbar=Undefined, facet=Undefined, fieldTitle=Undefined, font=Undefined, geoshape=Undefined, header=Undefined, headerColumn=Undefined, headerFacet=Undefined, headerRow=Undefined, image=Undefined, legend=Undefined, line=Undefined, lineBreak=Undefined, locale=Undefined, mark=Undefined, normalizedNumberFormat=Undefined, normalizedNumberFormatType=Undefined, numberFormat=Undefined, numberFormatType=Undefined, padding=Undefined, params=Undefined, point=Undefined, projection=Undefined, range=Undefined, rect=Undefined, rule=Undefined, scale=Undefined, selection=Undefined, square=Undefined, style=Undefined, text=Undefined, tick=Undefined, timeFormat=Undefined, timeFormatType=Undefined, title=Undefined, tooltipFormat=Undefined, trail=Undefined, view=Undefined, **kwds)#
Methods
__init__([arc, area, aria, autosize, axis, ...])copy([deep, ignore])Return a copy of the object.
from_dict(dct[, validate])Construct class from a dictionary representation.
from_json(json_string[, validate])Instantiate the object from a valid JSON string.
resolve_references([schema])Resolve references in the context of this object's schema or root schema.
to_dict([validate, ignore, context])Return a dictionary representation of the object.
to_json([validate, indent, sort_keys, ...])Emit the JSON representation for this object as a string.
validate(instance[, schema])Validate the instance against the class schema in the context of the rootschema.
validate_property(name, value[, schema])Validate a property against property schema in the context of the rootschema.