altair.HConcatChart¶
-
class
altair.
HConcatChart
(data=Undefined, hconcat=(), **kwargs)¶ A chart with horizontally-concatenated facets Mapping(required=[hconcat])
- Attributes
- hconcatList(
NormalizedSpec
) A list of views to be concatenated and put into a row.
- autosizeanyOf(
AutosizeType
,AutoSizeParams
) 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
- background
Color
CSS color property to use as the background of the entire view.
Default value:
"white"
- boundsenum(‘full’, ‘flush’)
The bounds calculation method to use for determining the extent of a sub-plot. One of
full
(the default) orflush
.If set to
full
, the entire calculated bounds (including axes, title, and legend) will be used.If set to
flush
, only the specified width and height values for the sub-view will be used. Theflush
setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.
Default value:
"full"
- centerboolean
Boolean flag indicating if subviews should be centered relative to their respective rows or columns.
Default value:
false
- config
Config
Vega-Lite configuration object. This property can only be defined at the top-level of a specification.
- dataanyOf(
Data
, None) An object describing the data source. Set to
null
to ignore the parent’s data source. If no data is set, it is derived from the parent.- datasets
Datasets
A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a
data
property.- descriptionstring
Description of this mark for commenting purpose.
- namestring
Name of the visualization for later reference.
- padding
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
- resolve
Resolve
Scale, axis, and legend resolutions for view composition specifications.
- spacingfloat
The spacing in pixels between sub-views of the concat operator.
Default value :
10
- titleanyOf(
Text
,TitleParams
) Title for the plot.
- transformList(
Transform
) An array of data transformations such as filter and new field calculation.
- usermetaMapping(required=[])
Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.
- $schemastring
URL to JSON schema for a Vega-Lite specification. Unless you have a reason to change this, use
https://vega.github.io/schema/vega-lite/v4.json
. Setting the$schema
property allows automatic validation and autocomplete in editors that support JSON schema.
- hconcatList(
-
__init__
(self, data=Undefined, hconcat=(), **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(self[, data, hconcat])Initialize self.
add_selection
(self, \*selections)Add one or more selections to all subcharts.
configure
(self[, area, autosize, axis, …])Config schema wrapper
configure_area
(self[, align, angle, aspect, …])AreaConfig schema wrapper
configure_axis
(self[, bandPosition, …])AxisConfig schema wrapper
configure_axisBand
(self[, bandPosition, …])AxisConfig schema wrapper
configure_axisBottom
(self[, bandPosition, …])AxisConfig schema wrapper
configure_axisDiscrete
(self[, bandPosition, …])AxisConfig schema wrapper
configure_axisLeft
(self[, bandPosition, …])AxisConfig schema wrapper
configure_axisPoint
(self[, bandPosition, …])AxisConfig schema wrapper
configure_axisQuantitative
(self[, …])AxisConfig schema wrapper
configure_axisRight
(self[, bandPosition, …])AxisConfig schema wrapper
configure_axisTemporal
(self[, bandPosition, …])AxisConfig schema wrapper
configure_axisTop
(self[, bandPosition, …])AxisConfig schema wrapper
configure_axisX
(self[, bandPosition, …])AxisConfig schema wrapper
configure_axisXBand
(self[, bandPosition, …])AxisConfig schema wrapper
configure_axisXDiscrete
(self[, …])AxisConfig schema wrapper
configure_axisXPoint
(self[, bandPosition, …])AxisConfig schema wrapper
configure_axisXQuantitative
(self[, …])AxisConfig schema wrapper
configure_axisXTemporal
(self[, …])AxisConfig schema wrapper
configure_axisY
(self[, bandPosition, …])AxisConfig schema wrapper
configure_axisYBand
(self[, bandPosition, …])AxisConfig schema wrapper
configure_axisYDiscrete
(self[, …])AxisConfig schema wrapper
configure_axisYPoint
(self[, bandPosition, …])AxisConfig schema wrapper
configure_axisYQuantitative
(self[, …])AxisConfig schema wrapper
configure_axisYTemporal
(self[, …])AxisConfig schema wrapper
configure_bar
(self[, align, angle, aspect, …])BarConfig schema wrapper
configure_boxplot
(self[, box, extent, …])BoxPlotConfig schema wrapper
configure_circle
(self[, align, angle, …])MarkConfig schema wrapper
configure_concat
(self[, columns, spacing])CompositionConfig schema wrapper
configure_errorband
(self[, band, borders, …])ErrorBandConfig schema wrapper
configure_errorbar
(self[, extent, rule, ticks])ErrorBarConfig schema wrapper
configure_facet
(self[, columns, spacing])CompositionConfig schema wrapper
configure_geoshape
(self[, align, angle, …])MarkConfig schema wrapper
configure_header
(self[, format, formatType, …])HeaderConfig schema wrapper
configure_headerColumn
(self[, format, …])HeaderConfig schema wrapper
configure_headerFacet
(self[, format, …])HeaderConfig schema wrapper
configure_headerRow
(self[, format, …])HeaderConfig schema wrapper
configure_image
(self[, align, angle, …])RectConfig schema wrapper
configure_legend
(self[, clipHeight, …])LegendConfig schema wrapper
configure_line
(self[, align, angle, aspect, …])LineConfig schema wrapper
configure_mark
(self[, align, angle, aspect, …])MarkConfig schema wrapper
configure_point
(self[, align, angle, …])MarkConfig schema wrapper
configure_projection
(self[, center, …])ProjectionConfig schema wrapper
configure_range
(self[, category, diverging, …])RangeConfig schema wrapper
configure_rect
(self[, align, angle, aspect, …])RectConfig schema wrapper
configure_rule
(self[, align, angle, aspect, …])MarkConfig schema wrapper
configure_scale
(self[, bandPaddingInner, …])ScaleConfig schema wrapper
configure_selection
(self[, interval, multi, …])SelectionConfig schema wrapper
configure_square
(self[, align, angle, …])MarkConfig schema wrapper
configure_text
(self[, align, angle, aspect, …])MarkConfig schema wrapper
configure_tick
(self[, align, angle, aspect, …])TickConfig schema wrapper
configure_title
(self[, align, anchor, …])TitleConfig schema wrapper
configure_trail
(self[, align, angle, …])LineConfig schema wrapper
configure_view
(self[, clip, …])ViewConfig schema wrapper
copy
(self[, deep, ignore])Return a copy of the object
display
(self[, renderer, theme, actions])Display chart in Jupyter notebook or JupyterLab
from_dict
(dct[, validate, _wrapper_classes])Construct class from a dictionary representation
from_json
(json_string[, validate])Instantiate the object from a valid JSON string
project
(self[, type, center, clipAngle, …])Add a geographic projection to the chart.
properties
(self, \*\*kwargs)Set top-level properties of the Chart.
repeat
(self[, repeat, row, column, columns])Return a RepeatChart built from the chart
resolve_axis
(self[, x, y])AxisResolveMap schema wrapper
resolve_legend
(self[, color, fill, …])LegendResolveMap schema wrapper
resolve_references
([schema])Resolve references in the context of this object’s schema or root schema.
resolve_scale
(self[, color, fill, …])ScaleResolveMap schema wrapper
save
(self, fp[, format, …])Save a chart to file in a variety of formats
serve
(self[, ip, port, n_retries, files, …])Open a browser window and display a rendering of the chart
show
(self[, embed_opt, open_browser])Show the chart in an external browser window.
to_dict
(self, \*args, \*\*kwargs)Convert the chart to a dictionary suitable for JSON export
to_html
(self[, base_url, output_div, …])to_json
(self[, validate, ignore, context, …])Emit the JSON representation for this object as a string.
transform_aggregate
(self[, aggregate, groupby])Add an AggregateTransform to the schema.
transform_bin
(self[, as_, field, bin])Add a BinTransform to the schema.
transform_calculate
(self[, as_, calculate])Add a CalculateTransform to the schema.
transform_density
(self, density[, as_, …])Add a DensityTransform to the spec.
transform_filter
(self, filter, \*\*kwargs)Add a FilterTransform to the schema.
transform_flatten
(self, flatten[, as_])Add a FlattenTransform to the schema.
transform_fold
(self, fold[, as_])Add a FoldTransform to the spec.
transform_impute
(self, impute, key[, frame, …])Add an ImputeTransform to the schema.
transform_joinaggregate
(self[, …])Add a JoinAggregateTransform to the schema.
transform_loess
(self, on, loess[, as_, …])Add a LoessTransform to the spec.
transform_lookup
(self[, lookup, from_, as_, …])Add a DataLookupTransform or SelectionLookupTransform to the chart
transform_pivot
(self, pivot, value[, …])Add a pivot transform to the chart.
transform_quantile
(self, quantile[, as_, …])Add a quantile transform to the chart
transform_regression
(self, on, regression[, …])Add a RegressionTransform to the chart.
transform_sample
(self[, sample])Add a SampleTransform to the schema.
transform_stack
(self, as_, stack, groupby[, …])Add a StackTransform to the schema.
transform_timeunit
(self[, as_, field, timeUnit])Add a TimeUnitTransform to the schema.
transform_window
(self[, window, frame, …])Add a WindowTransform to the schema
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
-
add_selection
(self, *selections)¶ Add one or more selections to all subcharts.
-
configure
(self, area=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, 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, mark=Undefined, numberFormat=Undefined, padding=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, title=Undefined, trail=Undefined, view=Undefined, **kwds)¶ Config schema wrapper
Mapping(required=[])
- Attributes
- area
AreaConfig
Area-Specific Config
- autosizeanyOf(
AutosizeType
,AutoSizeParams
) 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
- axis
AxisConfig
Axis configuration, which determines default properties for all
x
andy
axes. For a full list of axis configuration options, please see the corresponding section of the axis documentation.- axisBand
AxisConfig
Config for axes with “band” scales.
- axisBottom
AxisConfig
Config for x-axis along the bottom edge of the chart.
- axisDiscrete
AxisConfig
Config for axes with “point” or “band” scales.
- axisLeft
AxisConfig
Config for y-axis along the left edge of the chart.
- axisPoint
AxisConfig
Config for axes with “point” scales.
- axisQuantitative
AxisConfig
Config for quantitative axes.
- axisRight
AxisConfig
Config for y-axis along the right edge of the chart.
- axisTemporal
AxisConfig
Config for temporal axes.
- axisTop
AxisConfig
Config for x-axis along the top edge of the chart.
- axisX
AxisConfig
X-axis specific config.
- axisXBand
AxisConfig
Config for x-axes with “band” scales.
- axisXDiscrete
AxisConfig
Config for x-axes with “point” or “band” scales.
- axisXPoint
AxisConfig
Config for x-axes with “point” scales.
- axisXQuantitative
AxisConfig
Config for x-quantitative axes.
- axisXTemporal
AxisConfig
Config for x-temporal axes.
- axisY
AxisConfig
Y-axis specific config.
- axisYBand
AxisConfig
Config for y-axes with “band” scales.
- axisYDiscrete
AxisConfig
Config for y-axes with “point” or “band” scales.
- axisYPoint
AxisConfig
Config for y-axes with “point” scales.
- axisYQuantitative
AxisConfig
Config for y-quantitative axes.
- axisYTemporal
AxisConfig
Config for y-temporal axes.
- background
Color
CSS color property to use as the background of the entire view.
Default value:
"white"
- bar
BarConfig
Bar-Specific Config
- boxplot
BoxPlotConfig
Box Config
- circle
MarkConfig
Circle-Specific Config
- concat
CompositionConfig
Default configuration for all concatenation and repeat view composition operators (
concat
,hconcat
,vconcat
, andrepeat
)- countTitlestring
Default axis and legend title for count fields.
Default value:
'Count of Records
.- errorband
ErrorBandConfig
ErrorBand Config
- errorbar
ErrorBarConfig
ErrorBar Config
- facet
CompositionConfig
Default configuration for the
facet
view composition operator- fieldTitleenum(‘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”).
- fontstring
Default font for all text marks, titles, and labels.
- geoshape
MarkConfig
Geoshape-Specific Config
- header
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.
- headerColumn
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.
- headerFacet
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.
- headerRow
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.
- image
RectConfig
Image-specific Config
- legend
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.
- line
LineConfig
Line-Specific Config
- lineBreakstring
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.
- mark
MarkConfig
Mark Config
- numberFormatstring
D3 Number format for guide labels and text marks. For example
"s"
for SI units. Use D3’s number format pattern.- padding
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
- point
MarkConfig
Point-Specific Config
- projection
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.
- range
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.
- rect
RectConfig
Rect-Specific Config
- rule
MarkConfig
Rule-Specific Config
- scale
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.
- selection
SelectionConfig
An object hash for defining default properties for each type of selections.
- square
MarkConfig
Square-Specific Config
- style
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.
- text
MarkConfig
Text-Specific Config
- tick
TickConfig
Tick-Specific Config
- timeFormatstring
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.- title
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.
- trail
LineConfig
Trail-Specific Config
- view
ViewConfig
Default properties for single view plots.
- area
-
configure_area
(self, align=Undefined, angle=Undefined, aspect=Undefined, baseline=Undefined, blend=Undefined, color=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined, line=Undefined, lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds)¶ AreaConfig schema wrapper
Mapping(required=[])
- Attributes
- align
Align
The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of
"left"
,"right"
,"center"
.- anglefloat
The rotation angle of the text, in degrees.
- aspectboolean
Whether to keep aspect ratio of image marks.
- baseline
TextBaseline
The vertical text baseline. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thelineHeight
rather thanfontSize
alone.- blend
Blend
The color blend mode for drawing an item on its current background. Any valid CSS mix-blend-mode value can be used.
__Default value:
"source-over"
- coloranyOf(
Color
,Gradient
) Default color.
Default value: ■
"#4682b4"
Note:
This property cannot be used in a style config.
The
fill
andstroke
properties have higher precedence thancolor
and will overridecolor
.
- cornerRadiusfloat
The radius in pixels of rounded rectangle corners.
Default value:
0
- cornerRadiusBottomLeftfloat
The radius in pixels of rounded rectangle bottom left corner.
Default value:
0
- cornerRadiusBottomRightfloat
The radius in pixels of rounded rectangle bottom right corner.
Default value:
0
- cornerRadiusTopLeftfloat
The radius in pixels of rounded rectangle top right corner.
Default value:
0
- cornerRadiusTopRightfloat
The radius in pixels of rounded rectangle top left corner.
Default value:
0
- cursor
Cursor
The mouse cursor used over the mark. Any valid CSS cursor type can be used.
- dir
TextDirection
The direction of the text. One of
"ltr"
(left-to-right) or"rtl"
(right-to-left). This property determines on which side is truncated in response to the limit parameter.Default value:
"ltr"
- dxfloat
The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- dyfloat
The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- ellipsisstring
The ellipsis string for text truncated in response to the limit parameter.
Default value:
"…"
- fillanyOf(
Color
,Gradient
, None) Default Fill Color. This property has higher precedence than
config.color
.Default value: (None)
- fillOpacityfloat
The fill opacity (value between [0,1]).
Default value:
1
- filledboolean
Whether the mark’s color should be used as fill color instead of stroke color.
Default value:
false
for allpoint
,line
, andrule
marks as well asgeoshape
marks for graticule data sources; otherwise,true
.Note: This property cannot be used in a style config.
- fontstring
The typeface to set the text in (e.g.,
"Helvetica Neue"
).- fontSizefloat
The font size, in pixels.
Default value:
11
- fontStyle
FontStyle
The font style (e.g.,
"italic"
).- fontWeight
FontWeight
The font weight. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- heightfloat
Height of the marks.
- hrefstring
A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
- interpolate
Interpolate
The line interpolation method to use for line and area marks. One of the following:
"linear"
: piecewise linear segments, as in a polyline."linear-closed"
: close the linear segments to form a polygon."step"
: alternate between horizontal and vertical segments, as in a step function."step-before"
: alternate between vertical and horizontal segments, as in a step function."step-after"
: alternate between horizontal and vertical segments, as in a step function."basis"
: a B-spline, with control point duplication on the ends."basis-open"
: an open B-spline; may not intersect the start or end."basis-closed"
: a closed B-spline, as in a loop."cardinal"
: a Cardinal spline, with control point duplication on the ends."cardinal-open"
: an open Cardinal spline; may not intersect the start or end, but will intersect other control points."cardinal-closed"
: a closed Cardinal spline, as in a loop."bundle"
: equivalent to basis, except the tension parameter is used to straighten the spline."monotone"
: cubic interpolation that preserves monotonicity in y.
- invalidenum(‘filter’, None)
Defines how Vega-Lite should handle marks for invalid values (
null
andNaN
).If set to
"filter"
(default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks).If
null
, all data items are included. In this case, invalid values will be interpreted as zeroes.
- limitfloat
The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
– indicating no limit- lineanyOf(boolean,
OverlayMarkDef
) A flag for overlaying line on top of area marks, or an object defining the properties of the overlayed lines.
If this value is an empty object (
{}
) ortrue
, lines with default properties will be used.If this value is
false
, no lines would be automatically added to area marks.Default value:
false
.- lineBreakstring
A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.
- lineHeightfloat
The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.
- opacityfloat
The overall opacity (value between [0,1]).
Default value:
0.7
for non-aggregate plots withpoint
,tick
,circle
, orsquare
marks or layeredbar
charts and1
otherwise.- orderanyOf(None, boolean)
For line and trail marks, this
order
property can be set tonull
orfalse
to make the lines use the original order in the data sources.- orient
Orientation
The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.
For bar, rule and tick, this determines whether the size of the bar and tick
should be applied to x or y dimension. * For area, this property determines the orient property of the Vega output. * For line and trail marks, this property determines the sort order of the points in
the line
if
config.sortLineBy
is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored.- pointanyOf(boolean,
OverlayMarkDef
, enum(‘transparent’)) A flag for overlaying points on top of line or area marks, or an object defining the properties of the overlayed points.
If this property is
"transparent"
, transparent points will be used (for enhancing tooltips and selections).If this property is an empty object (
{}
) ortrue
, filled points with default properties will be used.If this property is
false
, no points would be automatically added to line or area marks.Default value:
false
.- radiusfloat
Polar coordinate radial offset, in pixels, of the text label from the origin determined by the
x
andy
properties.- shapeanyOf(
SymbolShape
, string) Shape of the point marks. Supported values include:
plotting shapes:
"circle"
,"square"
,"cross"
,"diamond"
,"triangle-up"
,"triangle-down"
,"triangle-right"
, or"triangle-left"
.the line symbol
"stroke"
centered directional shapes
"arrow"
,"wedge"
, or"triangle"
a custom SVG path string (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)
Default value:
"circle"
- sizefloat
Default size for marks.
For
point
/circle
/square
, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.For
bar
, this represents the band size of the bar, in pixels.For
text
, this represents the font size, in pixels.
Default value:
30
for point, circle, square marks; width/height’sstep
2
for bar marks with discrete dimensions;5
for bar marks with continuous dimensions;11
for text marks.
- strokeanyOf(
Color
,Gradient
, None) Default Stroke Color. This property has higher precedence than
config.color
.Default value: (None)
- strokeCapstring
The stroke cap for line ending style. One of
"butt"
,"round"
, or"square"
.Default value:
"butt"
- strokeDashList(float)
An array of alternating stroke, space lengths for creating dashed or dotted lines.
- strokeDashOffsetfloat
The offset (in pixels) into which to begin drawing with the stroke dash array.
- strokeJoinstring
The stroke line join method. One of
"miter"
,"round"
or"bevel"
.Default value:
"miter"
- strokeMiterLimitfloat
The miter limit at which to bevel a line join.
- strokeOffsetfloat
The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.
- strokeOpacityfloat
The stroke opacity (value between [0,1]).
Default value:
1
- strokeWidthfloat
The stroke width, in pixels.
- tensionfloat
Depending on the interpolation type, sets the tension parameter (for line and area marks).
- text
Text
Placeholder text if the
text
channel is not specified- thetafloat
Polar coordinate angle, in radians, of the text label from the origin determined by the
x
andy
properties. Values fortheta
follow the same convention ofarc
markstartAngle
andendAngle
properties: angles are measured in radians, with0
indicating “north”.- timeUnitBandfloat
Default relative band size for a time unit. If set to
1
, the bandwidth of the marks will be equal to the time unit band step. If set to0.5
, bandwidth of the marks will be half of the time unit band step.- timeUnitBandPositionfloat
Default relative band position for a time unit. If set to
0
, the marks will be positioned at the beginning of the time unit band step. If set to0.5
, the marks will be positioned in the middle of the time unit band step.- tooltipanyOf(float, string, boolean,
TooltipContent
, None) The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.
If
tooltip
istrue
or{"content": "encoding"}
, then all fields fromencoding
will be used.If
tooltip
is{"content": "data"}
, then all fields that appear in the highlighted data point will be used.If set to
null
orfalse
, then no tooltip will be used.
See the tooltip documentation for a detailed discussion about tooltip in Vega-Lite.
Default value:
null
- widthfloat
Width of the marks.
- xanyOf(float, enum(‘width’))
X coordinates of the marks, or width of horizontal
"bar"
and"area"
without specifiedx2
orwidth
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- x2anyOf(float, enum(‘width’))
X2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- yanyOf(float, enum(‘height’))
Y coordinates of the marks, or height of vertical
"bar"
and"area"
without specifiedy2
orheight
.The
value
of this channel can be a number or a string"height"
for the height of the plot.- y2anyOf(float, enum(‘height’))
Y2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"height"
for the height of the plot.
- align
-
configure_axis
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisBand
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisBottom
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisDiscrete
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisLeft
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisPoint
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisQuantitative
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisRight
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisTemporal
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisTop
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisX
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisXBand
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisXDiscrete
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisXPoint
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisXQuantitative
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisXTemporal
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisY
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisYBand
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisYDiscrete
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisYPoint
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisYQuantitative
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_axisYTemporal
(self, bandPosition=Undefined, disable=Undefined, domain=Undefined, domainColor=Undefined, domainDash=Undefined, domainDashOffset=Undefined, domainOpacity=Undefined, domainWidth=Undefined, grid=Undefined, gridColor=Undefined, gridDash=Undefined, gridDashOffset=Undefined, gridOpacity=Undefined, gridWidth=Undefined, labelAlign=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelBound=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFlush=Undefined, labelFlushOffset=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, labels=Undefined, maxExtent=Undefined, minExtent=Undefined, offset=Undefined, orient=Undefined, style=Undefined, tickBand=Undefined, tickColor=Undefined, tickCount=Undefined, tickDash=Undefined, tickDashOffset=Undefined, tickExtra=Undefined, tickOffset=Undefined, tickOpacity=Undefined, tickRound=Undefined, tickSize=Undefined, tickWidth=Undefined, ticks=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titlePadding=Undefined, titleX=Undefined, titleY=Undefined, translate=Undefined, **kwds)¶ AxisConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPositionfloat
An interpolation fraction indicating where, for
band
scales, axis ticks should be positioned. A value of0
places ticks at the left edge of their bands. A value of0.5
places ticks in the middle of their bands.Default value:
0.5
- disableboolean
Disable axis by default.
- domainboolean
A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.
Default value:
true
- domainColoranyOf(None,
Color
) Color of axis domain line.
Default value:
"gray"
.- domainDashList(float)
An array of alternating [stroke, space] lengths for dashed domain lines.
- domainDashOffsetfloat
The pixel offset at which to start drawing with the domain dash array.
- domainOpacityfloat
Opacity of the axis domain line.
- domainWidthfloat
Stroke width of axis domain line
Default value:
1
- gridboolean
A boolean flag indicating if grid lines should be included as part of the axis
Default value:
true
for continuous scales that are not binned; otherwise,false
.- gridColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - gridDashanyOf(List(float),
ConditionalAxisNumberArray
) - gridDashOffsetanyOf(float,
ConditionalAxisNumber
) - gridOpacityanyOf(float,
ConditionalAxisNumber
) - gridWidthanyOf(float,
ConditionalAxisNumber
) - labelAlignanyOf(
Align
,ConditionalAxisLabelAlign
) - labelAnglefloat
The rotation angle of the axis labels.
Default value:
-90
for nominal and ordinal fields;0
otherwise.- labelBaselineanyOf(
TextBaseline
,ConditionalAxisLabelBaseline
) - labelBoundanyOf(float, boolean)
Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.Default value:
false
.- labelColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the axis’s backingdatum
object.- labelFlushanyOf(boolean, float)
Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.
Default value:
true
for axis of a continuous x-scale. Otherwise,false
.- labelFlushOffsetfloat
Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of
2
will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.Default value:
0
.- labelFontanyOf(string,
ConditionalAxisString
) - labelFontSizeanyOf(float,
ConditionalAxisNumber
) - labelFontStyleanyOf(
FontStyle
,ConditionalAxisLabelFontStyle
) - labelFontWeightanyOf(
FontWeight
,ConditionalAxisLabelFontWeight
) - labelLimitfloat
Maximum allowed pixel width of axis tick labels.
Default value:
180
- labelLineHeightfloat
Line height in pixels for multi-line label text.
- labelOffsetanyOf(float,
ConditionalAxisNumber
) - labelOpacityanyOf(float,
ConditionalAxisNumber
) - labelOverlap
LabelOverlap
The strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
true
for non-nominal fields with non-log scales;"greedy"
for log scales; otherwisefalse
.- labelPaddinganyOf(float,
ConditionalAxisNumber
) - labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- labelsboolean
A boolean flag indicating if labels should be included as part of the axis.
Default value:
true
.- maxExtentfloat
The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.
Default value:
undefined
.- minExtentfloat
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.
Default value:
30
for y-axis;undefined
for x-axis.- offsetfloat
The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.
Default value: derived from the axis config ‘s
offset
(0
by default)- orient
AxisOrient
The orientation of the axis. One of
"top"
,"bottom"
,"left"
or"right"
. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).Default value:
"bottom"
for x-axes and"left"
for y-axes.- styleanyOf(string, List(string))
A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.
Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with
"style": "foo"
will useconfig.axisX
andconfig.style.foo
(the specified style"foo"
has higher precedence).- tickBandenum(‘center’, ‘extent’)
For band scales, indicates if ticks and grid lines should be placed at the center of a band (default) or at the band extents to indicate intervals.
- tickColoranyOf(anyOf(None,
Color
),ConditionalAxisColor
) - tickCountfloat
A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are “nice” (multiples of 2, 5, 10) and lie within the underlying scale’s range.
Default value : Determine using a formula
ceil(width/40)
for x andceil(height/40)
for y.- tickDashanyOf(List(float),
ConditionalAxisNumberArray
) - tickDashOffsetanyOf(float,
ConditionalAxisNumber
) - tickExtraboolean
Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for
band
scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with"bandPosition": 1
and an axis"padding"
value of0
.- tickOffsetfloat
Position offset in pixels to apply to ticks, labels, and gridlines.
- tickOpacityanyOf(float,
ConditionalAxisNumber
) - tickRoundboolean
Boolean flag indicating if pixel position values should be rounded to the nearest integer.
Default value:
true
- tickSizeanyOf(float,
ConditionalAxisNumber
) - tickWidthanyOf(float,
ConditionalAxisNumber
) - ticksboolean
Boolean value that determines whether the axis should include ticks.
Default value:
true
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment of axis titles.
- titleAnchor
TitleAnchor
Text anchor position for placing axis titles.
- titleAnglefloat
Angle in degrees of axis titles.
- titleBaseline
TextBaseline
Vertical text baseline for axis titles.
- titleColoranyOf(None,
Color
) Color of the title, can be in hex color code or regular color name.
- titleFontstring
Font of the title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the title.
- titleFontStyle
FontStyle
Font style of the title.
- titleFontWeight
FontWeight
Font weight of the title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of axis titles.
- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the axis title.
- titlePaddingfloat
The padding, in pixels, between title and axis.
- titleXfloat
X-coordinate of the axis title relative to the axis group.
- titleYfloat
Y-coordinate of the axis title relative to the axis group.
- translatefloat
Translation offset in pixels applied to the axis group mark x and y. If specified, overrides the default behavior of a 0.5 offset to pixel-align stroked lines.
-
configure_bar
(self, align=Undefined, angle=Undefined, aspect=Undefined, baseline=Undefined, binSpacing=Undefined, blend=Undefined, color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined, cornerRadiusEnd=Undefined, cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined, dir=Undefined, discreteBandSize=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined, lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds)¶ BarConfig schema wrapper
Mapping(required=[])
- Attributes
- align
Align
The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of
"left"
,"right"
,"center"
.- anglefloat
The rotation angle of the text, in degrees.
- aspectboolean
Whether to keep aspect ratio of image marks.
- baseline
TextBaseline
The vertical text baseline. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thelineHeight
rather thanfontSize
alone.- binSpacingfloat
Offset between bars for binned field. The ideal value for this is either 0 (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).
Default value:
1
- blend
Blend
The color blend mode for drawing an item on its current background. Any valid CSS mix-blend-mode value can be used.
__Default value:
"source-over"
- coloranyOf(
Color
,Gradient
) Default color.
Default value: ■
"#4682b4"
Note:
This property cannot be used in a style config.
The
fill
andstroke
properties have higher precedence thancolor
and will overridecolor
.
- continuousBandSizefloat
The default size of the bars on continuous scales.
Default value:
5
- cornerRadiusfloat
The radius in pixels of rounded rectangle corners.
Default value:
0
- cornerRadiusBottomLeftfloat
The radius in pixels of rounded rectangle bottom left corner.
Default value:
0
- cornerRadiusBottomRightfloat
The radius in pixels of rounded rectangle bottom right corner.
Default value:
0
- cornerRadiusEndfloat
For vertical bars, top-left and top-right corner radius.
For horizontal bars, top-right and bottom-right corner radius.
- cornerRadiusTopLeftfloat
The radius in pixels of rounded rectangle top right corner.
Default value:
0
- cornerRadiusTopRightfloat
The radius in pixels of rounded rectangle top left corner.
Default value:
0
- cursor
Cursor
The mouse cursor used over the mark. Any valid CSS cursor type can be used.
- dir
TextDirection
The direction of the text. One of
"ltr"
(left-to-right) or"rtl"
(right-to-left). This property determines on which side is truncated in response to the limit parameter.Default value:
"ltr"
- discreteBandSizefloat
The default size of the bars with discrete dimensions. If unspecified, the default size is
step-2
, which provides 2 pixel offset between bars.- dxfloat
The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- dyfloat
The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- ellipsisstring
The ellipsis string for text truncated in response to the limit parameter.
Default value:
"…"
- fillanyOf(
Color
,Gradient
, None) Default Fill Color. This property has higher precedence than
config.color
.Default value: (None)
- fillOpacityfloat
The fill opacity (value between [0,1]).
Default value:
1
- filledboolean
Whether the mark’s color should be used as fill color instead of stroke color.
Default value:
false
for allpoint
,line
, andrule
marks as well asgeoshape
marks for graticule data sources; otherwise,true
.Note: This property cannot be used in a style config.
- fontstring
The typeface to set the text in (e.g.,
"Helvetica Neue"
).- fontSizefloat
The font size, in pixels.
Default value:
11
- fontStyle
FontStyle
The font style (e.g.,
"italic"
).- fontWeight
FontWeight
The font weight. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- heightfloat
Height of the marks.
- hrefstring
A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
- interpolate
Interpolate
The line interpolation method to use for line and area marks. One of the following:
"linear"
: piecewise linear segments, as in a polyline."linear-closed"
: close the linear segments to form a polygon."step"
: alternate between horizontal and vertical segments, as in a step function."step-before"
: alternate between vertical and horizontal segments, as in a step function."step-after"
: alternate between horizontal and vertical segments, as in a step function."basis"
: a B-spline, with control point duplication on the ends."basis-open"
: an open B-spline; may not intersect the start or end."basis-closed"
: a closed B-spline, as in a loop."cardinal"
: a Cardinal spline, with control point duplication on the ends."cardinal-open"
: an open Cardinal spline; may not intersect the start or end, but will intersect other control points."cardinal-closed"
: a closed Cardinal spline, as in a loop."bundle"
: equivalent to basis, except the tension parameter is used to straighten the spline."monotone"
: cubic interpolation that preserves monotonicity in y.
- invalidenum(‘filter’, None)
Defines how Vega-Lite should handle marks for invalid values (
null
andNaN
).If set to
"filter"
(default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks).If
null
, all data items are included. In this case, invalid values will be interpreted as zeroes.
- limitfloat
The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
– indicating no limit- lineBreakstring
A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.
- lineHeightfloat
The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.
- opacityfloat
The overall opacity (value between [0,1]).
Default value:
0.7
for non-aggregate plots withpoint
,tick
,circle
, orsquare
marks or layeredbar
charts and1
otherwise.- orderanyOf(None, boolean)
For line and trail marks, this
order
property can be set tonull
orfalse
to make the lines use the original order in the data sources.- orient
Orientation
The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.
For bar, rule and tick, this determines whether the size of the bar and tick
should be applied to x or y dimension. * For area, this property determines the orient property of the Vega output. * For line and trail marks, this property determines the sort order of the points in
the line
if
config.sortLineBy
is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored.- radiusfloat
Polar coordinate radial offset, in pixels, of the text label from the origin determined by the
x
andy
properties.- shapeanyOf(
SymbolShape
, string) Shape of the point marks. Supported values include:
plotting shapes:
"circle"
,"square"
,"cross"
,"diamond"
,"triangle-up"
,"triangle-down"
,"triangle-right"
, or"triangle-left"
.the line symbol
"stroke"
centered directional shapes
"arrow"
,"wedge"
, or"triangle"
a custom SVG path string (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)
Default value:
"circle"
- sizefloat
Default size for marks.
For
point
/circle
/square
, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.For
bar
, this represents the band size of the bar, in pixels.For
text
, this represents the font size, in pixels.
Default value:
30
for point, circle, square marks; width/height’sstep
2
for bar marks with discrete dimensions;5
for bar marks with continuous dimensions;11
for text marks.
- strokeanyOf(
Color
,Gradient
, None) Default Stroke Color. This property has higher precedence than
config.color
.Default value: (None)
- strokeCapstring
The stroke cap for line ending style. One of
"butt"
,"round"
, or"square"
.Default value:
"butt"
- strokeDashList(float)
An array of alternating stroke, space lengths for creating dashed or dotted lines.
- strokeDashOffsetfloat
The offset (in pixels) into which to begin drawing with the stroke dash array.
- strokeJoinstring
The stroke line join method. One of
"miter"
,"round"
or"bevel"
.Default value:
"miter"
- strokeMiterLimitfloat
The miter limit at which to bevel a line join.
- strokeOffsetfloat
The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.
- strokeOpacityfloat
The stroke opacity (value between [0,1]).
Default value:
1
- strokeWidthfloat
The stroke width, in pixels.
- tensionfloat
Depending on the interpolation type, sets the tension parameter (for line and area marks).
- text
Text
Placeholder text if the
text
channel is not specified- thetafloat
Polar coordinate angle, in radians, of the text label from the origin determined by the
x
andy
properties. Values fortheta
follow the same convention ofarc
markstartAngle
andendAngle
properties: angles are measured in radians, with0
indicating “north”.- timeUnitBandfloat
Default relative band size for a time unit. If set to
1
, the bandwidth of the marks will be equal to the time unit band step. If set to0.5
, bandwidth of the marks will be half of the time unit band step.- timeUnitBandPositionfloat
Default relative band position for a time unit. If set to
0
, the marks will be positioned at the beginning of the time unit band step. If set to0.5
, the marks will be positioned in the middle of the time unit band step.- tooltipanyOf(float, string, boolean,
TooltipContent
, None) The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.
If
tooltip
istrue
or{"content": "encoding"}
, then all fields fromencoding
will be used.If
tooltip
is{"content": "data"}
, then all fields that appear in the highlighted data point will be used.If set to
null
orfalse
, then no tooltip will be used.
See the tooltip documentation for a detailed discussion about tooltip in Vega-Lite.
Default value:
null
- widthfloat
Width of the marks.
- xanyOf(float, enum(‘width’))
X coordinates of the marks, or width of horizontal
"bar"
and"area"
without specifiedx2
orwidth
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- x2anyOf(float, enum(‘width’))
X2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- yanyOf(float, enum(‘height’))
Y coordinates of the marks, or height of vertical
"bar"
and"area"
without specifiedy2
orheight
.The
value
of this channel can be a number or a string"height"
for the height of the plot.- y2anyOf(float, enum(‘height’))
Y2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"height"
for the height of the plot.
- align
-
configure_boxplot
(self, box=Undefined, extent=Undefined, median=Undefined, outliers=Undefined, rule=Undefined, size=Undefined, ticks=Undefined, **kwds)¶ BoxPlotConfig schema wrapper
Mapping(required=[])
- Attributes
- boxanyOf(boolean,
MarkConfig
) - extentanyOf(enum(‘min-max’), float)
The extent of the whiskers. Available options include:
"min-max"
: min and max are the lower and upper whiskers respectively.A number representing multiple of the interquartile range. This number will be multiplied by the IQR to determine whisker boundary, which spans from the smallest data to the largest data within the range [Q1 - k * IQR, Q3 + k * IQR] where Q1 and Q3 are the first and third quartiles while IQR is the interquartile range ( Q3-Q1 ).
Default value:
1.5
.- mediananyOf(boolean,
MarkConfig
) - outliersanyOf(boolean,
MarkConfig
) - ruleanyOf(boolean,
MarkConfig
) - sizefloat
Size of the box and median tick of a box plot
- ticksanyOf(boolean,
MarkConfig
)
- boxanyOf(boolean,
-
configure_circle
(self, align=Undefined, angle=Undefined, aspect=Undefined, baseline=Undefined, blend=Undefined, color=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined, lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds)¶ MarkConfig schema wrapper
Mapping(required=[])
- Attributes
- align
Align
The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of
"left"
,"right"
,"center"
.- anglefloat
The rotation angle of the text, in degrees.
- aspectboolean
Whether to keep aspect ratio of image marks.
- baseline
TextBaseline
The vertical text baseline. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thelineHeight
rather thanfontSize
alone.- blend
Blend
The color blend mode for drawing an item on its current background. Any valid CSS mix-blend-mode value can be used.
__Default value:
"source-over"
- coloranyOf(
Color
,Gradient
) Default color.
Default value: ■
"#4682b4"
Note:
This property cannot be used in a style config.
The
fill
andstroke
properties have higher precedence thancolor
and will overridecolor
.
- cornerRadiusfloat
The radius in pixels of rounded rectangle corners.
Default value:
0
- cornerRadiusBottomLeftfloat
The radius in pixels of rounded rectangle bottom left corner.
Default value:
0
- cornerRadiusBottomRightfloat
The radius in pixels of rounded rectangle bottom right corner.
Default value:
0
- cornerRadiusTopLeftfloat
The radius in pixels of rounded rectangle top right corner.
Default value:
0
- cornerRadiusTopRightfloat
The radius in pixels of rounded rectangle top left corner.
Default value:
0
- cursor
Cursor
The mouse cursor used over the mark. Any valid CSS cursor type can be used.
- dir
TextDirection
The direction of the text. One of
"ltr"
(left-to-right) or"rtl"
(right-to-left). This property determines on which side is truncated in response to the limit parameter.Default value:
"ltr"
- dxfloat
The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- dyfloat
The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- ellipsisstring
The ellipsis string for text truncated in response to the limit parameter.
Default value:
"…"
- fillanyOf(
Color
,Gradient
, None) Default Fill Color. This property has higher precedence than
config.color
.Default value: (None)
- fillOpacityfloat
The fill opacity (value between [0,1]).
Default value:
1
- filledboolean
Whether the mark’s color should be used as fill color instead of stroke color.
Default value:
false
for allpoint
,line
, andrule
marks as well asgeoshape
marks for graticule data sources; otherwise,true
.Note: This property cannot be used in a style config.
- fontstring
The typeface to set the text in (e.g.,
"Helvetica Neue"
).- fontSizefloat
The font size, in pixels.
Default value:
11
- fontStyle
FontStyle
The font style (e.g.,
"italic"
).- fontWeight
FontWeight
The font weight. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- heightfloat
Height of the marks.
- hrefstring
A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
- interpolate
Interpolate
The line interpolation method to use for line and area marks. One of the following:
"linear"
: piecewise linear segments, as in a polyline."linear-closed"
: close the linear segments to form a polygon."step"
: alternate between horizontal and vertical segments, as in a step function."step-before"
: alternate between vertical and horizontal segments, as in a step function."step-after"
: alternate between horizontal and vertical segments, as in a step function."basis"
: a B-spline, with control point duplication on the ends."basis-open"
: an open B-spline; may not intersect the start or end."basis-closed"
: a closed B-spline, as in a loop."cardinal"
: a Cardinal spline, with control point duplication on the ends."cardinal-open"
: an open Cardinal spline; may not intersect the start or end, but will intersect other control points."cardinal-closed"
: a closed Cardinal spline, as in a loop."bundle"
: equivalent to basis, except the tension parameter is used to straighten the spline."monotone"
: cubic interpolation that preserves monotonicity in y.
- invalidenum(‘filter’, None)
Defines how Vega-Lite should handle marks for invalid values (
null
andNaN
).If set to
"filter"
(default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks).If
null
, all data items are included. In this case, invalid values will be interpreted as zeroes.
- limitfloat
The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
– indicating no limit- lineBreakstring
A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.
- lineHeightfloat
The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.
- opacityfloat
The overall opacity (value between [0,1]).
Default value:
0.7
for non-aggregate plots withpoint
,tick
,circle
, orsquare
marks or layeredbar
charts and1
otherwise.- orderanyOf(None, boolean)
For line and trail marks, this
order
property can be set tonull
orfalse
to make the lines use the original order in the data sources.- orient
Orientation
The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.
For bar, rule and tick, this determines whether the size of the bar and tick
should be applied to x or y dimension. * For area, this property determines the orient property of the Vega output. * For line and trail marks, this property determines the sort order of the points in
the line
if
config.sortLineBy
is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored.- radiusfloat
Polar coordinate radial offset, in pixels, of the text label from the origin determined by the
x
andy
properties.- shapeanyOf(
SymbolShape
, string) Shape of the point marks. Supported values include:
plotting shapes:
"circle"
,"square"
,"cross"
,"diamond"
,"triangle-up"
,"triangle-down"
,"triangle-right"
, or"triangle-left"
.the line symbol
"stroke"
centered directional shapes
"arrow"
,"wedge"
, or"triangle"
a custom SVG path string (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)
Default value:
"circle"
- sizefloat
Default size for marks.
For
point
/circle
/square
, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.For
bar
, this represents the band size of the bar, in pixels.For
text
, this represents the font size, in pixels.
Default value:
30
for point, circle, square marks; width/height’sstep
2
for bar marks with discrete dimensions;5
for bar marks with continuous dimensions;11
for text marks.
- strokeanyOf(
Color
,Gradient
, None) Default Stroke Color. This property has higher precedence than
config.color
.Default value: (None)
- strokeCapstring
The stroke cap for line ending style. One of
"butt"
,"round"
, or"square"
.Default value:
"butt"
- strokeDashList(float)
An array of alternating stroke, space lengths for creating dashed or dotted lines.
- strokeDashOffsetfloat
The offset (in pixels) into which to begin drawing with the stroke dash array.
- strokeJoinstring
The stroke line join method. One of
"miter"
,"round"
or"bevel"
.Default value:
"miter"
- strokeMiterLimitfloat
The miter limit at which to bevel a line join.
- strokeOffsetfloat
The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.
- strokeOpacityfloat
The stroke opacity (value between [0,1]).
Default value:
1
- strokeWidthfloat
The stroke width, in pixels.
- tensionfloat
Depending on the interpolation type, sets the tension parameter (for line and area marks).
- text
Text
Placeholder text if the
text
channel is not specified- thetafloat
Polar coordinate angle, in radians, of the text label from the origin determined by the
x
andy
properties. Values fortheta
follow the same convention ofarc
markstartAngle
andendAngle
properties: angles are measured in radians, with0
indicating “north”.- timeUnitBandfloat
Default relative band size for a time unit. If set to
1
, the bandwidth of the marks will be equal to the time unit band step. If set to0.5
, bandwidth of the marks will be half of the time unit band step.- timeUnitBandPositionfloat
Default relative band position for a time unit. If set to
0
, the marks will be positioned at the beginning of the time unit band step. If set to0.5
, the marks will be positioned in the middle of the time unit band step.- tooltipanyOf(float, string, boolean,
TooltipContent
, None) The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.
If
tooltip
istrue
or{"content": "encoding"}
, then all fields fromencoding
will be used.If
tooltip
is{"content": "data"}
, then all fields that appear in the highlighted data point will be used.If set to
null
orfalse
, then no tooltip will be used.
See the tooltip documentation for a detailed discussion about tooltip in Vega-Lite.
Default value:
null
- widthfloat
Width of the marks.
- xanyOf(float, enum(‘width’))
X coordinates of the marks, or width of horizontal
"bar"
and"area"
without specifiedx2
orwidth
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- x2anyOf(float, enum(‘width’))
X2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- yanyOf(float, enum(‘height’))
Y coordinates of the marks, or height of vertical
"bar"
and"area"
without specifiedy2
orheight
.The
value
of this channel can be a number or a string"height"
for the height of the plot.- y2anyOf(float, enum(‘height’))
Y2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"height"
for the height of the plot.
- align
-
configure_concat
(self, columns=Undefined, spacing=Undefined, **kwds)¶ CompositionConfig schema wrapper
Mapping(required=[])
- Attributes
- columnsfloat
The number of columns to include in the view composition layout.
Default value :
undefined
– An infinite number of columns (a single row) will be assumed. This is equivalent tohconcat
(forconcat
) and to using thecolumn
channel (forfacet
andrepeat
).Note :
This property is only for:
the general (wrappable)
concat
operator (nothconcat
/vconcat
)the
facet
andrepeat
operator with one field/repetition definition (without row/column nesting)
2) Setting the
columns
to1
is equivalent tovconcat
(forconcat
) and to using therow
channel (forfacet
andrepeat
).- spacingfloat
The default spacing in pixels between composed sub-views.
Default value :
20
-
configure_errorband
(self, band=Undefined, borders=Undefined, extent=Undefined, interpolate=Undefined, tension=Undefined, **kwds)¶ ErrorBandConfig schema wrapper
Mapping(required=[])
- Attributes
- bandanyOf(boolean,
MarkConfig
) - bordersanyOf(boolean,
MarkConfig
) - extent
ErrorBarExtent
The extent of the band. Available options include:
"ci"
: Extend the band to the confidence interval of the mean."stderr"
: The size of band are set to the value of standard error, extending from the mean."stdev"
: The size of band are set to the value of standard deviation, extending from the mean."iqr"
: Extend the band to the q1 and q3.
Default value:
"stderr"
.- interpolate
Interpolate
The line interpolation method for the error band. One of the following:
"linear"
: piecewise linear segments, as in a polyline."linear-closed"
: close the linear segments to form a polygon."step"
: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes at the midpoint of each pair of adjacent x-values."step-before"
: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes before the x-value."step-after"
: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes after the x-value."basis"
: a B-spline, with control point duplication on the ends."basis-open"
: an open B-spline; may not intersect the start or end."basis-closed"
: a closed B-spline, as in a loop."cardinal"
: a Cardinal spline, with control point duplication on the ends."cardinal-open"
: an open Cardinal spline; may not intersect the start or end, but will intersect other control points."cardinal-closed"
: a closed Cardinal spline, as in a loop."bundle"
: equivalent to basis, except the tension parameter is used to straighten the spline."monotone"
: cubic interpolation that preserves monotonicity in y.
- tensionfloat
The tension parameter for the interpolation type of the error band.
- bandanyOf(boolean,
-
configure_errorbar
(self, extent=Undefined, rule=Undefined, ticks=Undefined, **kwds)¶ ErrorBarConfig schema wrapper
Mapping(required=[])
- Attributes
- extent
ErrorBarExtent
The extent of the rule. Available options include:
"ci"
: Extend the rule to the confidence interval of the mean."stderr"
: The size of rule are set to the value of standard error, extending from the mean."stdev"
: The size of rule are set to the value of standard deviation, extending from the mean."iqr"
: Extend the rule to the q1 and q3.
Default value:
"stderr"
.- ruleanyOf(boolean,
MarkConfig
) - ticksanyOf(boolean,
MarkConfig
)
- extent
-
configure_facet
(self, columns=Undefined, spacing=Undefined, **kwds)¶ CompositionConfig schema wrapper
Mapping(required=[])
- Attributes
- columnsfloat
The number of columns to include in the view composition layout.
Default value :
undefined
– An infinite number of columns (a single row) will be assumed. This is equivalent tohconcat
(forconcat
) and to using thecolumn
channel (forfacet
andrepeat
).Note :
This property is only for:
the general (wrappable)
concat
operator (nothconcat
/vconcat
)the
facet
andrepeat
operator with one field/repetition definition (without row/column nesting)
2) Setting the
columns
to1
is equivalent tovconcat
(forconcat
) and to using therow
channel (forfacet
andrepeat
).- spacingfloat
The default spacing in pixels between composed sub-views.
Default value :
20
-
configure_geoshape
(self, align=Undefined, angle=Undefined, aspect=Undefined, baseline=Undefined, blend=Undefined, color=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined, lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds)¶ MarkConfig schema wrapper
Mapping(required=[])
- Attributes
- align
Align
The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of
"left"
,"right"
,"center"
.- anglefloat
The rotation angle of the text, in degrees.
- aspectboolean
Whether to keep aspect ratio of image marks.
- baseline
TextBaseline
The vertical text baseline. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thelineHeight
rather thanfontSize
alone.- blend
Blend
The color blend mode for drawing an item on its current background. Any valid CSS mix-blend-mode value can be used.
__Default value:
"source-over"
- coloranyOf(
Color
,Gradient
) Default color.
Default value: ■
"#4682b4"
Note:
This property cannot be used in a style config.
The
fill
andstroke
properties have higher precedence thancolor
and will overridecolor
.
- cornerRadiusfloat
The radius in pixels of rounded rectangle corners.
Default value:
0
- cornerRadiusBottomLeftfloat
The radius in pixels of rounded rectangle bottom left corner.
Default value:
0
- cornerRadiusBottomRightfloat
The radius in pixels of rounded rectangle bottom right corner.
Default value:
0
- cornerRadiusTopLeftfloat
The radius in pixels of rounded rectangle top right corner.
Default value:
0
- cornerRadiusTopRightfloat
The radius in pixels of rounded rectangle top left corner.
Default value:
0
- cursor
Cursor
The mouse cursor used over the mark. Any valid CSS cursor type can be used.
- dir
TextDirection
The direction of the text. One of
"ltr"
(left-to-right) or"rtl"
(right-to-left). This property determines on which side is truncated in response to the limit parameter.Default value:
"ltr"
- dxfloat
The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- dyfloat
The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- ellipsisstring
The ellipsis string for text truncated in response to the limit parameter.
Default value:
"…"
- fillanyOf(
Color
,Gradient
, None) Default Fill Color. This property has higher precedence than
config.color
.Default value: (None)
- fillOpacityfloat
The fill opacity (value between [0,1]).
Default value:
1
- filledboolean
Whether the mark’s color should be used as fill color instead of stroke color.
Default value:
false
for allpoint
,line
, andrule
marks as well asgeoshape
marks for graticule data sources; otherwise,true
.Note: This property cannot be used in a style config.
- fontstring
The typeface to set the text in (e.g.,
"Helvetica Neue"
).- fontSizefloat
The font size, in pixels.
Default value:
11
- fontStyle
FontStyle
The font style (e.g.,
"italic"
).- fontWeight
FontWeight
The font weight. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- heightfloat
Height of the marks.
- hrefstring
A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
- interpolate
Interpolate
The line interpolation method to use for line and area marks. One of the following:
"linear"
: piecewise linear segments, as in a polyline."linear-closed"
: close the linear segments to form a polygon."step"
: alternate between horizontal and vertical segments, as in a step function."step-before"
: alternate between vertical and horizontal segments, as in a step function."step-after"
: alternate between horizontal and vertical segments, as in a step function."basis"
: a B-spline, with control point duplication on the ends."basis-open"
: an open B-spline; may not intersect the start or end."basis-closed"
: a closed B-spline, as in a loop."cardinal"
: a Cardinal spline, with control point duplication on the ends."cardinal-open"
: an open Cardinal spline; may not intersect the start or end, but will intersect other control points."cardinal-closed"
: a closed Cardinal spline, as in a loop."bundle"
: equivalent to basis, except the tension parameter is used to straighten the spline."monotone"
: cubic interpolation that preserves monotonicity in y.
- invalidenum(‘filter’, None)
Defines how Vega-Lite should handle marks for invalid values (
null
andNaN
).If set to
"filter"
(default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks).If
null
, all data items are included. In this case, invalid values will be interpreted as zeroes.
- limitfloat
The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
– indicating no limit- lineBreakstring
A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.
- lineHeightfloat
The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.
- opacityfloat
The overall opacity (value between [0,1]).
Default value:
0.7
for non-aggregate plots withpoint
,tick
,circle
, orsquare
marks or layeredbar
charts and1
otherwise.- orderanyOf(None, boolean)
For line and trail marks, this
order
property can be set tonull
orfalse
to make the lines use the original order in the data sources.- orient
Orientation
The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.
For bar, rule and tick, this determines whether the size of the bar and tick
should be applied to x or y dimension. * For area, this property determines the orient property of the Vega output. * For line and trail marks, this property determines the sort order of the points in
the line
if
config.sortLineBy
is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored.- radiusfloat
Polar coordinate radial offset, in pixels, of the text label from the origin determined by the
x
andy
properties.- shapeanyOf(
SymbolShape
, string) Shape of the point marks. Supported values include:
plotting shapes:
"circle"
,"square"
,"cross"
,"diamond"
,"triangle-up"
,"triangle-down"
,"triangle-right"
, or"triangle-left"
.the line symbol
"stroke"
centered directional shapes
"arrow"
,"wedge"
, or"triangle"
a custom SVG path string (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)
Default value:
"circle"
- sizefloat
Default size for marks.
For
point
/circle
/square
, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.For
bar
, this represents the band size of the bar, in pixels.For
text
, this represents the font size, in pixels.
Default value:
30
for point, circle, square marks; width/height’sstep
2
for bar marks with discrete dimensions;5
for bar marks with continuous dimensions;11
for text marks.
- strokeanyOf(
Color
,Gradient
, None) Default Stroke Color. This property has higher precedence than
config.color
.Default value: (None)
- strokeCapstring
The stroke cap for line ending style. One of
"butt"
,"round"
, or"square"
.Default value:
"butt"
- strokeDashList(float)
An array of alternating stroke, space lengths for creating dashed or dotted lines.
- strokeDashOffsetfloat
The offset (in pixels) into which to begin drawing with the stroke dash array.
- strokeJoinstring
The stroke line join method. One of
"miter"
,"round"
or"bevel"
.Default value:
"miter"
- strokeMiterLimitfloat
The miter limit at which to bevel a line join.
- strokeOffsetfloat
The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.
- strokeOpacityfloat
The stroke opacity (value between [0,1]).
Default value:
1
- strokeWidthfloat
The stroke width, in pixels.
- tensionfloat
Depending on the interpolation type, sets the tension parameter (for line and area marks).
- text
Text
Placeholder text if the
text
channel is not specified- thetafloat
Polar coordinate angle, in radians, of the text label from the origin determined by the
x
andy
properties. Values fortheta
follow the same convention ofarc
markstartAngle
andendAngle
properties: angles are measured in radians, with0
indicating “north”.- timeUnitBandfloat
Default relative band size for a time unit. If set to
1
, the bandwidth of the marks will be equal to the time unit band step. If set to0.5
, bandwidth of the marks will be half of the time unit band step.- timeUnitBandPositionfloat
Default relative band position for a time unit. If set to
0
, the marks will be positioned at the beginning of the time unit band step. If set to0.5
, the marks will be positioned in the middle of the time unit band step.- tooltipanyOf(float, string, boolean,
TooltipContent
, None) The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.
If
tooltip
istrue
or{"content": "encoding"}
, then all fields fromencoding
will be used.If
tooltip
is{"content": "data"}
, then all fields that appear in the highlighted data point will be used.If set to
null
orfalse
, then no tooltip will be used.
See the tooltip documentation for a detailed discussion about tooltip in Vega-Lite.
Default value:
null
- widthfloat
Width of the marks.
- xanyOf(float, enum(‘width’))
X coordinates of the marks, or width of horizontal
"bar"
and"area"
without specifiedx2
orwidth
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- x2anyOf(float, enum(‘width’))
X2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- yanyOf(float, enum(‘height’))
Y coordinates of the marks, or height of vertical
"bar"
and"area"
without specifiedy2
orheight
.The
value
of this channel can be a number or a string"height"
for the height of the plot.- y2anyOf(float, enum(‘height’))
Y2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"height"
for the height of the plot.
- align
-
configure_header
(self, format=Undefined, formatType=Undefined, labelAlign=Undefined, labelAnchor=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOrient=Undefined, labelPadding=Undefined, labels=Undefined, orient=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOrient=Undefined, titlePadding=Undefined, **kwds)¶ HeaderConfig schema wrapper
Mapping(required=[])
- Attributes
- formatanyOf(string, Mapping(required=[]))
When used with the default
"number"
and"time"
format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.If the format type is
"number"
(e.g., for quantitative fields), this is D3’s number format pattern.If the format type is
"time"
(e.g., for temporal fields), this is D3’s time format pattern.
See the format documentation for more examples.
When used with a custom “formatType” that takes
datum.value
and format parameter as input), this property represents the format parameter.Default value: Derived from numberFormat config for number format and from timeFormat config for time format.
- formatTypestring
The format type for labels (
"number"
or"time"
or a registered custom format type ).Default value:
"time"
for temporal fields and ordinal and nomimal fields withtimeUnit
."number"
for quantitative fields as well as ordinal and nomimal fields withouttimeUnit
.
- labelAlign
Align
Horizontal text alignment of header labels. One of
"left"
,"center"
, or"right"
.- labelAnchor
TitleAnchor
The anchor position for placing the labels. One of
"start"
,"middle"
, or"end"
. For example, with a label orientation of top these anchor positions map to a left-, center-, or right-aligned label.- labelAnglefloat
The rotation angle of the header labels.
Default value:
0
for column header,-90
for row header.- labelBaseline
TextBaseline
The vertical text baseline for the header labels. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thetitleLineHeight
rather thantitleFontSize
alone.- labelColor
Color
The color of the header label, can be in hex color code or regular color name.
- labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the header’s backingdatum
object.- labelFontstring
The font of the header label.
- labelFontSizefloat
The font size of the header label, in pixels.
- labelFontStyle
FontStyle
The font style of the header label.
- labelFontWeight
FontWeight
The font weight of the header label.
- labelLimitfloat
The maximum length of the header label in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
, indicating no limit- labelLineHeightfloat
Line height in pixels for multi-line header labels or title text with
"line-top"
or"line-bottom"
baseline.- labelOrient
Orient
The orientation of the header label. One of
"top"
,"bottom"
,"left"
or"right"
.- labelPaddingfloat
The padding, in pixel, between facet header’s label and the plot.
Default value:
10
- labelsboolean
A boolean flag indicating if labels should be included as part of the header.
Default value:
true
.- orient
Orient
Shortcut for setting both labelOrient and titleOrient.
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment (to the anchor) of header titles.
- titleAnchor
TitleAnchor
The anchor position for placing the title. One of
"start"
,"middle"
, or"end"
. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.- titleAnglefloat
The rotation angle of the header title.
Default value:
0
.- titleBaseline
TextBaseline
The vertical text baseline for the header title. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thetitleLineHeight
rather thantitleFontSize
alone.Default value:
"middle"
- titleColor
Color
Color of the header title, can be in hex color code or regular color name.
- titleFontstring
Font of the header title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the header title.
- titleFontStyle
FontStyle
The font style of the header title.
- titleFontWeight
FontWeight
Font weight of the header title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
The maximum length of the header title in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
, indicating no limit- titleLineHeightfloat
Line height in pixels for multi-line header title text or title text with
"line-top"
or"line-bottom"
baseline.- titleOrient
Orient
The orientation of the header title. One of
"top"
,"bottom"
,"left"
or"right"
.- titlePaddingfloat
The padding, in pixel, between facet header’s title and the label.
Default value:
10
-
configure_headerColumn
(self, format=Undefined, formatType=Undefined, labelAlign=Undefined, labelAnchor=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOrient=Undefined, labelPadding=Undefined, labels=Undefined, orient=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOrient=Undefined, titlePadding=Undefined, **kwds)¶ HeaderConfig schema wrapper
Mapping(required=[])
- Attributes
- formatanyOf(string, Mapping(required=[]))
When used with the default
"number"
and"time"
format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.If the format type is
"number"
(e.g., for quantitative fields), this is D3’s number format pattern.If the format type is
"time"
(e.g., for temporal fields), this is D3’s time format pattern.
See the format documentation for more examples.
When used with a custom “formatType” that takes
datum.value
and format parameter as input), this property represents the format parameter.Default value: Derived from numberFormat config for number format and from timeFormat config for time format.
- formatTypestring
The format type for labels (
"number"
or"time"
or a registered custom format type ).Default value:
"time"
for temporal fields and ordinal and nomimal fields withtimeUnit
."number"
for quantitative fields as well as ordinal and nomimal fields withouttimeUnit
.
- labelAlign
Align
Horizontal text alignment of header labels. One of
"left"
,"center"
, or"right"
.- labelAnchor
TitleAnchor
The anchor position for placing the labels. One of
"start"
,"middle"
, or"end"
. For example, with a label orientation of top these anchor positions map to a left-, center-, or right-aligned label.- labelAnglefloat
The rotation angle of the header labels.
Default value:
0
for column header,-90
for row header.- labelBaseline
TextBaseline
The vertical text baseline for the header labels. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thetitleLineHeight
rather thantitleFontSize
alone.- labelColor
Color
The color of the header label, can be in hex color code or regular color name.
- labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the header’s backingdatum
object.- labelFontstring
The font of the header label.
- labelFontSizefloat
The font size of the header label, in pixels.
- labelFontStyle
FontStyle
The font style of the header label.
- labelFontWeight
FontWeight
The font weight of the header label.
- labelLimitfloat
The maximum length of the header label in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
, indicating no limit- labelLineHeightfloat
Line height in pixels for multi-line header labels or title text with
"line-top"
or"line-bottom"
baseline.- labelOrient
Orient
The orientation of the header label. One of
"top"
,"bottom"
,"left"
or"right"
.- labelPaddingfloat
The padding, in pixel, between facet header’s label and the plot.
Default value:
10
- labelsboolean
A boolean flag indicating if labels should be included as part of the header.
Default value:
true
.- orient
Orient
Shortcut for setting both labelOrient and titleOrient.
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment (to the anchor) of header titles.
- titleAnchor
TitleAnchor
The anchor position for placing the title. One of
"start"
,"middle"
, or"end"
. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.- titleAnglefloat
The rotation angle of the header title.
Default value:
0
.- titleBaseline
TextBaseline
The vertical text baseline for the header title. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thetitleLineHeight
rather thantitleFontSize
alone.Default value:
"middle"
- titleColor
Color
Color of the header title, can be in hex color code or regular color name.
- titleFontstring
Font of the header title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the header title.
- titleFontStyle
FontStyle
The font style of the header title.
- titleFontWeight
FontWeight
Font weight of the header title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
The maximum length of the header title in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
, indicating no limit- titleLineHeightfloat
Line height in pixels for multi-line header title text or title text with
"line-top"
or"line-bottom"
baseline.- titleOrient
Orient
The orientation of the header title. One of
"top"
,"bottom"
,"left"
or"right"
.- titlePaddingfloat
The padding, in pixel, between facet header’s title and the label.
Default value:
10
-
configure_headerFacet
(self, format=Undefined, formatType=Undefined, labelAlign=Undefined, labelAnchor=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOrient=Undefined, labelPadding=Undefined, labels=Undefined, orient=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOrient=Undefined, titlePadding=Undefined, **kwds)¶ HeaderConfig schema wrapper
Mapping(required=[])
- Attributes
- formatanyOf(string, Mapping(required=[]))
When used with the default
"number"
and"time"
format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.If the format type is
"number"
(e.g., for quantitative fields), this is D3’s number format pattern.If the format type is
"time"
(e.g., for temporal fields), this is D3’s time format pattern.
See the format documentation for more examples.
When used with a custom “formatType” that takes
datum.value
and format parameter as input), this property represents the format parameter.Default value: Derived from numberFormat config for number format and from timeFormat config for time format.
- formatTypestring
The format type for labels (
"number"
or"time"
or a registered custom format type ).Default value:
"time"
for temporal fields and ordinal and nomimal fields withtimeUnit
."number"
for quantitative fields as well as ordinal and nomimal fields withouttimeUnit
.
- labelAlign
Align
Horizontal text alignment of header labels. One of
"left"
,"center"
, or"right"
.- labelAnchor
TitleAnchor
The anchor position for placing the labels. One of
"start"
,"middle"
, or"end"
. For example, with a label orientation of top these anchor positions map to a left-, center-, or right-aligned label.- labelAnglefloat
The rotation angle of the header labels.
Default value:
0
for column header,-90
for row header.- labelBaseline
TextBaseline
The vertical text baseline for the header labels. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thetitleLineHeight
rather thantitleFontSize
alone.- labelColor
Color
The color of the header label, can be in hex color code or regular color name.
- labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the header’s backingdatum
object.- labelFontstring
The font of the header label.
- labelFontSizefloat
The font size of the header label, in pixels.
- labelFontStyle
FontStyle
The font style of the header label.
- labelFontWeight
FontWeight
The font weight of the header label.
- labelLimitfloat
The maximum length of the header label in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
, indicating no limit- labelLineHeightfloat
Line height in pixels for multi-line header labels or title text with
"line-top"
or"line-bottom"
baseline.- labelOrient
Orient
The orientation of the header label. One of
"top"
,"bottom"
,"left"
or"right"
.- labelPaddingfloat
The padding, in pixel, between facet header’s label and the plot.
Default value:
10
- labelsboolean
A boolean flag indicating if labels should be included as part of the header.
Default value:
true
.- orient
Orient
Shortcut for setting both labelOrient and titleOrient.
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment (to the anchor) of header titles.
- titleAnchor
TitleAnchor
The anchor position for placing the title. One of
"start"
,"middle"
, or"end"
. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.- titleAnglefloat
The rotation angle of the header title.
Default value:
0
.- titleBaseline
TextBaseline
The vertical text baseline for the header title. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thetitleLineHeight
rather thantitleFontSize
alone.Default value:
"middle"
- titleColor
Color
Color of the header title, can be in hex color code or regular color name.
- titleFontstring
Font of the header title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the header title.
- titleFontStyle
FontStyle
The font style of the header title.
- titleFontWeight
FontWeight
Font weight of the header title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
The maximum length of the header title in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
, indicating no limit- titleLineHeightfloat
Line height in pixels for multi-line header title text or title text with
"line-top"
or"line-bottom"
baseline.- titleOrient
Orient
The orientation of the header title. One of
"top"
,"bottom"
,"left"
or"right"
.- titlePaddingfloat
The padding, in pixel, between facet header’s title and the label.
Default value:
10
-
configure_headerRow
(self, format=Undefined, formatType=Undefined, labelAlign=Undefined, labelAnchor=Undefined, labelAngle=Undefined, labelBaseline=Undefined, labelColor=Undefined, labelExpr=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelLineHeight=Undefined, labelOrient=Undefined, labelPadding=Undefined, labels=Undefined, orient=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleAngle=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOrient=Undefined, titlePadding=Undefined, **kwds)¶ HeaderConfig schema wrapper
Mapping(required=[])
- Attributes
- formatanyOf(string, Mapping(required=[]))
When used with the default
"number"
and"time"
format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.If the format type is
"number"
(e.g., for quantitative fields), this is D3’s number format pattern.If the format type is
"time"
(e.g., for temporal fields), this is D3’s time format pattern.
See the format documentation for more examples.
When used with a custom “formatType” that takes
datum.value
and format parameter as input), this property represents the format parameter.Default value: Derived from numberFormat config for number format and from timeFormat config for time format.
- formatTypestring
The format type for labels (
"number"
or"time"
or a registered custom format type ).Default value:
"time"
for temporal fields and ordinal and nomimal fields withtimeUnit
."number"
for quantitative fields as well as ordinal and nomimal fields withouttimeUnit
.
- labelAlign
Align
Horizontal text alignment of header labels. One of
"left"
,"center"
, or"right"
.- labelAnchor
TitleAnchor
The anchor position for placing the labels. One of
"start"
,"middle"
, or"end"
. For example, with a label orientation of top these anchor positions map to a left-, center-, or right-aligned label.- labelAnglefloat
The rotation angle of the header labels.
Default value:
0
for column header,-90
for row header.- labelBaseline
TextBaseline
The vertical text baseline for the header labels. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thetitleLineHeight
rather thantitleFontSize
alone.- labelColor
Color
The color of the header label, can be in hex color code or regular color name.
- labelExprstring
Vega expression for customizing labels.
Note: The label text and value can be assessed via the
label
andvalue
properties of the header’s backingdatum
object.- labelFontstring
The font of the header label.
- labelFontSizefloat
The font size of the header label, in pixels.
- labelFontStyle
FontStyle
The font style of the header label.
- labelFontWeight
FontWeight
The font weight of the header label.
- labelLimitfloat
The maximum length of the header label in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
, indicating no limit- labelLineHeightfloat
Line height in pixels for multi-line header labels or title text with
"line-top"
or"line-bottom"
baseline.- labelOrient
Orient
The orientation of the header label. One of
"top"
,"bottom"
,"left"
or"right"
.- labelPaddingfloat
The padding, in pixel, between facet header’s label and the plot.
Default value:
10
- labelsboolean
A boolean flag indicating if labels should be included as part of the header.
Default value:
true
.- orient
Orient
Shortcut for setting both labelOrient and titleOrient.
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment (to the anchor) of header titles.
- titleAnchor
TitleAnchor
The anchor position for placing the title. One of
"start"
,"middle"
, or"end"
. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.- titleAnglefloat
The rotation angle of the header title.
Default value:
0
.- titleBaseline
TextBaseline
The vertical text baseline for the header title. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thetitleLineHeight
rather thantitleFontSize
alone.Default value:
"middle"
- titleColor
Color
Color of the header title, can be in hex color code or regular color name.
- titleFontstring
Font of the header title. (e.g.,
"Helvetica Neue"
).- titleFontSizefloat
Font size of the header title.
- titleFontStyle
FontStyle
The font style of the header title.
- titleFontWeight
FontWeight
Font weight of the header title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
The maximum length of the header title in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
, indicating no limit- titleLineHeightfloat
Line height in pixels for multi-line header title text or title text with
"line-top"
or"line-bottom"
baseline.- titleOrient
Orient
The orientation of the header title. One of
"top"
,"bottom"
,"left"
or"right"
.- titlePaddingfloat
The padding, in pixel, between facet header’s title and the label.
Default value:
10
-
configure_image
(self, align=Undefined, angle=Undefined, aspect=Undefined, baseline=Undefined, binSpacing=Undefined, blend=Undefined, color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined, dir=Undefined, discreteBandSize=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined, lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds)¶ RectConfig schema wrapper
Mapping(required=[])
- Attributes
- align
Align
The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of
"left"
,"right"
,"center"
.- anglefloat
The rotation angle of the text, in degrees.
- aspectboolean
Whether to keep aspect ratio of image marks.
- baseline
TextBaseline
The vertical text baseline. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thelineHeight
rather thanfontSize
alone.- binSpacingfloat
Offset between bars for binned field. The ideal value for this is either 0 (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).
Default value:
1
- blend
Blend
The color blend mode for drawing an item on its current background. Any valid CSS mix-blend-mode value can be used.
__Default value:
"source-over"
- coloranyOf(
Color
,Gradient
) Default color.
Default value: ■
"#4682b4"
Note:
This property cannot be used in a style config.
The
fill
andstroke
properties have higher precedence thancolor
and will overridecolor
.
- continuousBandSizefloat
The default size of the bars on continuous scales.
Default value:
5
- cornerRadiusfloat
The radius in pixels of rounded rectangle corners.
Default value:
0
- cornerRadiusBottomLeftfloat
The radius in pixels of rounded rectangle bottom left corner.
Default value:
0
- cornerRadiusBottomRightfloat
The radius in pixels of rounded rectangle bottom right corner.
Default value:
0
- cornerRadiusTopLeftfloat
The radius in pixels of rounded rectangle top right corner.
Default value:
0
- cornerRadiusTopRightfloat
The radius in pixels of rounded rectangle top left corner.
Default value:
0
- cursor
Cursor
The mouse cursor used over the mark. Any valid CSS cursor type can be used.
- dir
TextDirection
The direction of the text. One of
"ltr"
(left-to-right) or"rtl"
(right-to-left). This property determines on which side is truncated in response to the limit parameter.Default value:
"ltr"
- discreteBandSizefloat
The default size of the bars with discrete dimensions. If unspecified, the default size is
step-2
, which provides 2 pixel offset between bars.- dxfloat
The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- dyfloat
The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- ellipsisstring
The ellipsis string for text truncated in response to the limit parameter.
Default value:
"…"
- fillanyOf(
Color
,Gradient
, None) Default Fill Color. This property has higher precedence than
config.color
.Default value: (None)
- fillOpacityfloat
The fill opacity (value between [0,1]).
Default value:
1
- filledboolean
Whether the mark’s color should be used as fill color instead of stroke color.
Default value:
false
for allpoint
,line
, andrule
marks as well asgeoshape
marks for graticule data sources; otherwise,true
.Note: This property cannot be used in a style config.
- fontstring
The typeface to set the text in (e.g.,
"Helvetica Neue"
).- fontSizefloat
The font size, in pixels.
Default value:
11
- fontStyle
FontStyle
The font style (e.g.,
"italic"
).- fontWeight
FontWeight
The font weight. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- heightfloat
Height of the marks.
- hrefstring
A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
- interpolate
Interpolate
The line interpolation method to use for line and area marks. One of the following:
"linear"
: piecewise linear segments, as in a polyline."linear-closed"
: close the linear segments to form a polygon."step"
: alternate between horizontal and vertical segments, as in a step function."step-before"
: alternate between vertical and horizontal segments, as in a step function."step-after"
: alternate between horizontal and vertical segments, as in a step function."basis"
: a B-spline, with control point duplication on the ends."basis-open"
: an open B-spline; may not intersect the start or end."basis-closed"
: a closed B-spline, as in a loop."cardinal"
: a Cardinal spline, with control point duplication on the ends."cardinal-open"
: an open Cardinal spline; may not intersect the start or end, but will intersect other control points."cardinal-closed"
: a closed Cardinal spline, as in a loop."bundle"
: equivalent to basis, except the tension parameter is used to straighten the spline."monotone"
: cubic interpolation that preserves monotonicity in y.
- invalidenum(‘filter’, None)
Defines how Vega-Lite should handle marks for invalid values (
null
andNaN
).If set to
"filter"
(default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks).If
null
, all data items are included. In this case, invalid values will be interpreted as zeroes.
- limitfloat
The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
– indicating no limit- lineBreakstring
A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.
- lineHeightfloat
The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.
- opacityfloat
The overall opacity (value between [0,1]).
Default value:
0.7
for non-aggregate plots withpoint
,tick
,circle
, orsquare
marks or layeredbar
charts and1
otherwise.- orderanyOf(None, boolean)
For line and trail marks, this
order
property can be set tonull
orfalse
to make the lines use the original order in the data sources.- orient
Orientation
The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.
For bar, rule and tick, this determines whether the size of the bar and tick
should be applied to x or y dimension. * For area, this property determines the orient property of the Vega output. * For line and trail marks, this property determines the sort order of the points in
the line
if
config.sortLineBy
is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored.- radiusfloat
Polar coordinate radial offset, in pixels, of the text label from the origin determined by the
x
andy
properties.- shapeanyOf(
SymbolShape
, string) Shape of the point marks. Supported values include:
plotting shapes:
"circle"
,"square"
,"cross"
,"diamond"
,"triangle-up"
,"triangle-down"
,"triangle-right"
, or"triangle-left"
.the line symbol
"stroke"
centered directional shapes
"arrow"
,"wedge"
, or"triangle"
a custom SVG path string (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)
Default value:
"circle"
- sizefloat
Default size for marks.
For
point
/circle
/square
, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.For
bar
, this represents the band size of the bar, in pixels.For
text
, this represents the font size, in pixels.
Default value:
30
for point, circle, square marks; width/height’sstep
2
for bar marks with discrete dimensions;5
for bar marks with continuous dimensions;11
for text marks.
- strokeanyOf(
Color
,Gradient
, None) Default Stroke Color. This property has higher precedence than
config.color
.Default value: (None)
- strokeCapstring
The stroke cap for line ending style. One of
"butt"
,"round"
, or"square"
.Default value:
"butt"
- strokeDashList(float)
An array of alternating stroke, space lengths for creating dashed or dotted lines.
- strokeDashOffsetfloat
The offset (in pixels) into which to begin drawing with the stroke dash array.
- strokeJoinstring
The stroke line join method. One of
"miter"
,"round"
or"bevel"
.Default value:
"miter"
- strokeMiterLimitfloat
The miter limit at which to bevel a line join.
- strokeOffsetfloat
The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.
- strokeOpacityfloat
The stroke opacity (value between [0,1]).
Default value:
1
- strokeWidthfloat
The stroke width, in pixels.
- tensionfloat
Depending on the interpolation type, sets the tension parameter (for line and area marks).
- text
Text
Placeholder text if the
text
channel is not specified- thetafloat
Polar coordinate angle, in radians, of the text label from the origin determined by the
x
andy
properties. Values fortheta
follow the same convention ofarc
markstartAngle
andendAngle
properties: angles are measured in radians, with0
indicating “north”.- timeUnitBandfloat
Default relative band size for a time unit. If set to
1
, the bandwidth of the marks will be equal to the time unit band step. If set to0.5
, bandwidth of the marks will be half of the time unit band step.- timeUnitBandPositionfloat
Default relative band position for a time unit. If set to
0
, the marks will be positioned at the beginning of the time unit band step. If set to0.5
, the marks will be positioned in the middle of the time unit band step.- tooltipanyOf(float, string, boolean,
TooltipContent
, None) The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.
If
tooltip
istrue
or{"content": "encoding"}
, then all fields fromencoding
will be used.If
tooltip
is{"content": "data"}
, then all fields that appear in the highlighted data point will be used.If set to
null
orfalse
, then no tooltip will be used.
See the tooltip documentation for a detailed discussion about tooltip in Vega-Lite.
Default value:
null
- widthfloat
Width of the marks.
- xanyOf(float, enum(‘width’))
X coordinates of the marks, or width of horizontal
"bar"
and"area"
without specifiedx2
orwidth
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- x2anyOf(float, enum(‘width’))
X2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- yanyOf(float, enum(‘height’))
Y coordinates of the marks, or height of vertical
"bar"
and"area"
without specifiedy2
orheight
.The
value
of this channel can be a number or a string"height"
for the height of the plot.- y2anyOf(float, enum(‘height’))
Y2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"height"
for the height of the plot.
- align
-
configure_legend
(self, clipHeight=Undefined, columnPadding=Undefined, columns=Undefined, cornerRadius=Undefined, direction=Undefined, disable=Undefined, fillColor=Undefined, gradientDirection=Undefined, gradientHorizontalMaxLength=Undefined, gradientHorizontalMinLength=Undefined, gradientLabelLimit=Undefined, gradientLabelOffset=Undefined, gradientLength=Undefined, gradientOpacity=Undefined, gradientStrokeColor=Undefined, gradientStrokeWidth=Undefined, gradientThickness=Undefined, gradientVerticalMaxLength=Undefined, gradientVerticalMinLength=Undefined, gridAlign=Undefined, labelAlign=Undefined, labelBaseline=Undefined, labelColor=Undefined, labelFont=Undefined, labelFontSize=Undefined, labelFontStyle=Undefined, labelFontWeight=Undefined, labelLimit=Undefined, labelOffset=Undefined, labelOpacity=Undefined, labelOverlap=Undefined, labelPadding=Undefined, labelSeparation=Undefined, layout=Undefined, legendX=Undefined, legendY=Undefined, offset=Undefined, orient=Undefined, padding=Undefined, rowPadding=Undefined, strokeColor=Undefined, strokeDash=Undefined, strokeWidth=Undefined, symbolBaseFillColor=Undefined, symbolBaseStrokeColor=Undefined, symbolDash=Undefined, symbolDashOffset=Undefined, symbolDirection=Undefined, symbolFillColor=Undefined, symbolLimit=Undefined, symbolOffset=Undefined, symbolOpacity=Undefined, symbolSize=Undefined, symbolStrokeColor=Undefined, symbolStrokeWidth=Undefined, symbolType=Undefined, tickCount=Undefined, title=Undefined, titleAlign=Undefined, titleAnchor=Undefined, titleBaseline=Undefined, titleColor=Undefined, titleFont=Undefined, titleFontSize=Undefined, titleFontStyle=Undefined, titleFontWeight=Undefined, titleLimit=Undefined, titleLineHeight=Undefined, titleOpacity=Undefined, titleOrient=Undefined, titlePadding=Undefined, unselectedOpacity=Undefined, **kwds)¶ LegendConfig schema wrapper
Mapping(required=[])
- Attributes
- clipHeightfloat
The height in pixels to clip symbol legend entries and limit their size.
- columnPaddingfloat
The horizontal padding in pixels between symbol legend entries.
Default value:
10
.- columnsfloat
The number of columns in which to arrange symbol legend entries. A value of
0
or lower indicates a single row with one column per entry.- cornerRadiusfloat
Corner radius for the full legend.
- direction
Orientation
The direction of the legend, one of
"vertical"
or"horizontal"
.Default value:
For top-/bottom-
orient
ed legends,"horizontal"
For left-/right-
orient
ed legends,"vertical"
For top/bottom-left/right-
orient
ed legends,"horizontal"
for gradient legends and"vertical"
for symbol legends.
- disableboolean
Disable legend by default
- fillColoranyOf(None,
Color
) Background fill color for the full legend.
- gradientDirection
Orientation
The default direction (
"horizontal"
or"vertical"
) for gradient legends.Default value:
"vertical"
.- gradientHorizontalMaxLengthfloat
Max legend length for a horizontal gradient when
config.legend.gradientLength
is undefined.Default value:
200
- gradientHorizontalMinLengthfloat
Min legend length for a horizontal gradient when
config.legend.gradientLength
is undefined.Default value:
100
- gradientLabelLimitfloat
The maximum allowed length in pixels of color ramp gradient labels.
- gradientLabelOffsetfloat
Vertical offset in pixels for color ramp gradient labels.
Default value:
2
.- gradientLengthfloat
The length in pixels of the primary axis of a color gradient. This value corresponds to the height of a vertical gradient or the width of a horizontal gradient.
Default value:
200
.- gradientOpacityfloat
Opacity of the color gradient.
- gradientStrokeColoranyOf(None,
Color
) The color of the gradient stroke, can be in hex color code or regular color name.
Default value:
"lightGray"
.- gradientStrokeWidthfloat
The width of the gradient stroke, in pixels.
Default value:
0
.- gradientThicknessfloat
The thickness in pixels of the color gradient. This value corresponds to the width of a vertical gradient or the height of a horizontal gradient.
Default value:
16
.- gradientVerticalMaxLengthfloat
Max legend length for a vertical gradient when
config.legend.gradientLength
is undefined.Default value:
200
- gradientVerticalMinLengthfloat
Min legend length for a vertical gradient when
config.legend.gradientLength
is undefined.Default value:
100
- gridAlign
LayoutAlign
The alignment to apply to symbol legends rows and columns. The supported string values are
"all"
,"each"
(the default), andnone
. For more information, see the grid layout documentation.Default value:
"each"
.- labelAlign
Align
The alignment of the legend label, can be left, center, or right.
- labelBaseline
TextBaseline
The position of the baseline of legend label, can be
"top"
,"middle"
,"bottom"
, or"alphabetic"
.Default value:
"middle"
.- labelColoranyOf(None,
Color
) The color of the legend label, can be in hex color code or regular color name.
- labelFontstring
The font of the legend label.
- labelFontSizefloat
The font size of legend label.
Default value:
10
.- labelFontStyle
FontStyle
The font style of legend label.
- labelFontWeight
FontWeight
The font weight of legend label.
- labelLimitfloat
Maximum allowed pixel width of legend tick labels.
Default value:
160
.- labelOffsetfloat
The offset of the legend label.
- labelOpacityfloat
Opacity of labels.
- labelOverlap
LabelOverlap
The strategy to use for resolving overlap of labels in gradient legends. If
false
, no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used. If set to"greedy"
, a linear scan of the labels is performed, removing any label that overlaps with the last visible label (this often works better for log-scaled axes).Default value:
"greedy"
forlog scales otherwise
true`.- labelPaddingfloat
Padding in pixels between the legend and legend labels.
- labelSeparationfloat
The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default
0
). This property is ignored if labelOverlap resolution is not enabled.- layoutnot Any
Legend orient group layout parameters.
- legendXfloat
Custom x-position for legend with orient “none”.
- legendYfloat
Custom y-position for legend with orient “none”.
- offsetfloat
The offset in pixels by which to displace the legend from the data rectangle and axes.
Default value:
18
.- orient
LegendOrient
The orientation of the legend, which determines how the legend is positioned within the scene. One of
"left"
,"right"
,"top"
,"bottom"
,"top-left"
,"top-right"
,"bottom-left"
,"bottom-right"
,"none"
.Default value:
"right"
- paddingfloat
The padding between the border and content of the legend group.
Default value:
0
.- rowPaddingfloat
The vertical padding in pixels between symbol legend entries.
Default value:
2
.- strokeColoranyOf(None,
Color
) Border stroke color for the full legend.
- strokeDashList(float)
Border stroke dash pattern for the full legend.
- strokeWidthfloat
Border stroke width for the full legend.
- symbolBaseFillColoranyOf(None,
Color
) Default fill color for legend symbols. Only applied if there is no
"fill"
scale color encoding for the legend.Default value:
"transparent"
.- symbolBaseStrokeColoranyOf(None,
Color
) Default stroke color for legend symbols. Only applied if there is no
"fill"
scale color encoding for the legend.Default value:
"gray"
.- symbolDashList(float)
An array of alternating [stroke, space] lengths for dashed symbol strokes.
- symbolDashOffsetfloat
The pixel offset at which to start drawing with the symbol stroke dash array.
- symbolDirection
Orientation
The default direction (
"horizontal"
or"vertical"
) for symbol legends.Default value:
"vertical"
.- symbolFillColoranyOf(None,
Color
) The color of the legend symbol,
- symbolLimitfloat
The maximum number of allowed entries for a symbol legend. Additional entries will be dropped.
- symbolOffsetfloat
Horizontal pixel offset for legend symbols.
Default value:
0
.- symbolOpacityfloat
Opacity of the legend symbols.
- symbolSizefloat
The size of the legend symbol, in pixels.
Default value:
100
.- symbolStrokeColoranyOf(None,
Color
) Stroke color for legend symbols.
- symbolStrokeWidthfloat
The width of the symbol’s stroke.
Default value:
1.5
.- symbolType
SymbolShape
The symbol shape. One of the plotting shapes
circle
(default),square
,cross
,diamond
,triangle-up
,triangle-down
,triangle-right
, ortriangle-left
, the line symbolstroke
, or one of the centered directional shapesarrow
,wedge
, ortriangle
. Alternatively, a custom SVG path string can be provided. For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.Default value:
"circle"
.- tickCount
TickCount
The desired number of tick values for quantitative legends.
- titleNone
Set to null to disable title for the axis, legend, or header.
- titleAlign
Align
Horizontal text alignment for legend titles.
Default value:
"left"
.- titleAnchor
TitleAnchor
Text anchor position for placing legend titles.
- titleBaseline
TextBaseline
Vertical text baseline for legend titles.
Default value:
"top"
.- titleColoranyOf(None,
Color
) The color of the legend title, can be in hex color code or regular color name.
- titleFontstring
The font of the legend title.
- titleFontSizefloat
The font size of the legend title.
- titleFontStyle
FontStyle
The font style of the legend title.
- titleFontWeight
FontWeight
The font weight of the legend title. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- titleLimitfloat
Maximum allowed pixel width of legend titles.
Default value:
180
.- titleLineHeightfloat
Line height in pixels for multi-line title text.
- titleOpacityfloat
Opacity of the legend title.
- titleOrient
Orient
Orientation of the legend title.
- titlePaddingfloat
The padding, in pixels, between title and legend.
Default value:
5
.- unselectedOpacityfloat
The opacity of unselected legend entries.
Default value: 0.35.
-
configure_line
(self, align=Undefined, angle=Undefined, aspect=Undefined, baseline=Undefined, blend=Undefined, color=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined, lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds)¶ LineConfig schema wrapper
Mapping(required=[])
- Attributes
- align
Align
The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of
"left"
,"right"
,"center"
.- anglefloat
The rotation angle of the text, in degrees.
- aspectboolean
Whether to keep aspect ratio of image marks.
- baseline
TextBaseline
The vertical text baseline. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thelineHeight
rather thanfontSize
alone.- blend
Blend
The color blend mode for drawing an item on its current background. Any valid CSS mix-blend-mode value can be used.
__Default value:
"source-over"
- coloranyOf(
Color
,Gradient
) Default color.
Default value: ■
"#4682b4"
Note:
This property cannot be used in a style config.
The
fill
andstroke
properties have higher precedence thancolor
and will overridecolor
.
- cornerRadiusfloat
The radius in pixels of rounded rectangle corners.
Default value:
0
- cornerRadiusBottomLeftfloat
The radius in pixels of rounded rectangle bottom left corner.
Default value:
0
- cornerRadiusBottomRightfloat
The radius in pixels of rounded rectangle bottom right corner.
Default value:
0
- cornerRadiusTopLeftfloat
The radius in pixels of rounded rectangle top right corner.
Default value:
0
- cornerRadiusTopRightfloat
The radius in pixels of rounded rectangle top left corner.
Default value:
0
- cursor
Cursor
The mouse cursor used over the mark. Any valid CSS cursor type can be used.
- dir
TextDirection
The direction of the text. One of
"ltr"
(left-to-right) or"rtl"
(right-to-left). This property determines on which side is truncated in response to the limit parameter.Default value:
"ltr"
- dxfloat
The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- dyfloat
The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- ellipsisstring
The ellipsis string for text truncated in response to the limit parameter.
Default value:
"…"
- fillanyOf(
Color
,Gradient
, None) Default Fill Color. This property has higher precedence than
config.color
.Default value: (None)
- fillOpacityfloat
The fill opacity (value between [0,1]).
Default value:
1
- filledboolean
Whether the mark’s color should be used as fill color instead of stroke color.
Default value:
false
for allpoint
,line
, andrule
marks as well asgeoshape
marks for graticule data sources; otherwise,true
.Note: This property cannot be used in a style config.
- fontstring
The typeface to set the text in (e.g.,
"Helvetica Neue"
).- fontSizefloat
The font size, in pixels.
Default value:
11
- fontStyle
FontStyle
The font style (e.g.,
"italic"
).- fontWeight
FontWeight
The font weight. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- heightfloat
Height of the marks.
- hrefstring
A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
- interpolate
Interpolate
The line interpolation method to use for line and area marks. One of the following:
"linear"
: piecewise linear segments, as in a polyline."linear-closed"
: close the linear segments to form a polygon."step"
: alternate between horizontal and vertical segments, as in a step function."step-before"
: alternate between vertical and horizontal segments, as in a step function."step-after"
: alternate between horizontal and vertical segments, as in a step function."basis"
: a B-spline, with control point duplication on the ends."basis-open"
: an open B-spline; may not intersect the start or end."basis-closed"
: a closed B-spline, as in a loop."cardinal"
: a Cardinal spline, with control point duplication on the ends."cardinal-open"
: an open Cardinal spline; may not intersect the start or end, but will intersect other control points."cardinal-closed"
: a closed Cardinal spline, as in a loop."bundle"
: equivalent to basis, except the tension parameter is used to straighten the spline."monotone"
: cubic interpolation that preserves monotonicity in y.
- invalidenum(‘filter’, None)
Defines how Vega-Lite should handle marks for invalid values (
null
andNaN
).If set to
"filter"
(default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks).If
null
, all data items are included. In this case, invalid values will be interpreted as zeroes.
- limitfloat
The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
– indicating no limit- lineBreakstring
A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.
- lineHeightfloat
The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.
- opacityfloat
The overall opacity (value between [0,1]).
Default value:
0.7
for non-aggregate plots withpoint
,tick
,circle
, orsquare
marks or layeredbar
charts and1
otherwise.- orderanyOf(None, boolean)
For line and trail marks, this
order
property can be set tonull
orfalse
to make the lines use the original order in the data sources.- orient
Orientation
The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.
For bar, rule and tick, this determines whether the size of the bar and tick
should be applied to x or y dimension. * For area, this property determines the orient property of the Vega output. * For line and trail marks, this property determines the sort order of the points in
the line
if
config.sortLineBy
is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored.- pointanyOf(boolean,
OverlayMarkDef
, enum(‘transparent’)) A flag for overlaying points on top of line or area marks, or an object defining the properties of the overlayed points.
If this property is
"transparent"
, transparent points will be used (for enhancing tooltips and selections).If this property is an empty object (
{}
) ortrue
, filled points with default properties will be used.If this property is
false
, no points would be automatically added to line or area marks.Default value:
false
.- radiusfloat
Polar coordinate radial offset, in pixels, of the text label from the origin determined by the
x
andy
properties.- shapeanyOf(
SymbolShape
, string) Shape of the point marks. Supported values include:
plotting shapes:
"circle"
,"square"
,"cross"
,"diamond"
,"triangle-up"
,"triangle-down"
,"triangle-right"
, or"triangle-left"
.the line symbol
"stroke"
centered directional shapes
"arrow"
,"wedge"
, or"triangle"
a custom SVG path string (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)
Default value:
"circle"
- sizefloat
Default size for marks.
For
point
/circle
/square
, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.For
bar
, this represents the band size of the bar, in pixels.For
text
, this represents the font size, in pixels.
Default value:
30
for point, circle, square marks; width/height’sstep
2
for bar marks with discrete dimensions;5
for bar marks with continuous dimensions;11
for text marks.
- strokeanyOf(
Color
,Gradient
, None) Default Stroke Color. This property has higher precedence than
config.color
.Default value: (None)
- strokeCapstring
The stroke cap for line ending style. One of
"butt"
,"round"
, or"square"
.Default value:
"butt"
- strokeDashList(float)
An array of alternating stroke, space lengths for creating dashed or dotted lines.
- strokeDashOffsetfloat
The offset (in pixels) into which to begin drawing with the stroke dash array.
- strokeJoinstring
The stroke line join method. One of
"miter"
,"round"
or"bevel"
.Default value:
"miter"
- strokeMiterLimitfloat
The miter limit at which to bevel a line join.
- strokeOffsetfloat
The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.
- strokeOpacityfloat
The stroke opacity (value between [0,1]).
Default value:
1
- strokeWidthfloat
The stroke width, in pixels.
- tensionfloat
Depending on the interpolation type, sets the tension parameter (for line and area marks).
- text
Text
Placeholder text if the
text
channel is not specified- thetafloat
Polar coordinate angle, in radians, of the text label from the origin determined by the
x
andy
properties. Values fortheta
follow the same convention ofarc
markstartAngle
andendAngle
properties: angles are measured in radians, with0
indicating “north”.- timeUnitBandfloat
Default relative band size for a time unit. If set to
1
, the bandwidth of the marks will be equal to the time unit band step. If set to0.5
, bandwidth of the marks will be half of the time unit band step.- timeUnitBandPositionfloat
Default relative band position for a time unit. If set to
0
, the marks will be positioned at the beginning of the time unit band step. If set to0.5
, the marks will be positioned in the middle of the time unit band step.- tooltipanyOf(float, string, boolean,
TooltipContent
, None) The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.
If
tooltip
istrue
or{"content": "encoding"}
, then all fields fromencoding
will be used.If
tooltip
is{"content": "data"}
, then all fields that appear in the highlighted data point will be used.If set to
null
orfalse
, then no tooltip will be used.
See the tooltip documentation for a detailed discussion about tooltip in Vega-Lite.
Default value:
null
- widthfloat
Width of the marks.
- xanyOf(float, enum(‘width’))
X coordinates of the marks, or width of horizontal
"bar"
and"area"
without specifiedx2
orwidth
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- x2anyOf(float, enum(‘width’))
X2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- yanyOf(float, enum(‘height’))
Y coordinates of the marks, or height of vertical
"bar"
and"area"
without specifiedy2
orheight
.The
value
of this channel can be a number or a string"height"
for the height of the plot.- y2anyOf(float, enum(‘height’))
Y2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"height"
for the height of the plot.
- align
-
configure_mark
(self, align=Undefined, angle=Undefined, aspect=Undefined, baseline=Undefined, blend=Undefined, color=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined, lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds)¶ MarkConfig schema wrapper
Mapping(required=[])
- Attributes
- align
Align
The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of
"left"
,"right"
,"center"
.- anglefloat
The rotation angle of the text, in degrees.
- aspectboolean
Whether to keep aspect ratio of image marks.
- baseline
TextBaseline
The vertical text baseline. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thelineHeight
rather thanfontSize
alone.- blend
Blend
The color blend mode for drawing an item on its current background. Any valid CSS mix-blend-mode value can be used.
__Default value:
"source-over"
- coloranyOf(
Color
,Gradient
) Default color.
Default value: ■
"#4682b4"
Note:
This property cannot be used in a style config.
The
fill
andstroke
properties have higher precedence thancolor
and will overridecolor
.
- cornerRadiusfloat
The radius in pixels of rounded rectangle corners.
Default value:
0
- cornerRadiusBottomLeftfloat
The radius in pixels of rounded rectangle bottom left corner.
Default value:
0
- cornerRadiusBottomRightfloat
The radius in pixels of rounded rectangle bottom right corner.
Default value:
0
- cornerRadiusTopLeftfloat
The radius in pixels of rounded rectangle top right corner.
Default value:
0
- cornerRadiusTopRightfloat
The radius in pixels of rounded rectangle top left corner.
Default value:
0
- cursor
Cursor
The mouse cursor used over the mark. Any valid CSS cursor type can be used.
- dir
TextDirection
The direction of the text. One of
"ltr"
(left-to-right) or"rtl"
(right-to-left). This property determines on which side is truncated in response to the limit parameter.Default value:
"ltr"
- dxfloat
The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- dyfloat
The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- ellipsisstring
The ellipsis string for text truncated in response to the limit parameter.
Default value:
"…"
- fillanyOf(
Color
,Gradient
, None) Default Fill Color. This property has higher precedence than
config.color
.Default value: (None)
- fillOpacityfloat
The fill opacity (value between [0,1]).
Default value:
1
- filledboolean
Whether the mark’s color should be used as fill color instead of stroke color.
Default value:
false
for allpoint
,line
, andrule
marks as well asgeoshape
marks for graticule data sources; otherwise,true
.Note: This property cannot be used in a style config.
- fontstring
The typeface to set the text in (e.g.,
"Helvetica Neue"
).- fontSizefloat
The font size, in pixels.
Default value:
11
- fontStyle
FontStyle
The font style (e.g.,
"italic"
).- fontWeight
FontWeight
The font weight. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- heightfloat
Height of the marks.
- hrefstring
A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
- interpolate
Interpolate
The line interpolation method to use for line and area marks. One of the following:
"linear"
: piecewise linear segments, as in a polyline."linear-closed"
: close the linear segments to form a polygon."step"
: alternate between horizontal and vertical segments, as in a step function."step-before"
: alternate between vertical and horizontal segments, as in a step function."step-after"
: alternate between horizontal and vertical segments, as in a step function."basis"
: a B-spline, with control point duplication on the ends."basis-open"
: an open B-spline; may not intersect the start or end."basis-closed"
: a closed B-spline, as in a loop."cardinal"
: a Cardinal spline, with control point duplication on the ends."cardinal-open"
: an open Cardinal spline; may not intersect the start or end, but will intersect other control points."cardinal-closed"
: a closed Cardinal spline, as in a loop."bundle"
: equivalent to basis, except the tension parameter is used to straighten the spline."monotone"
: cubic interpolation that preserves monotonicity in y.
- invalidenum(‘filter’, None)
Defines how Vega-Lite should handle marks for invalid values (
null
andNaN
).If set to
"filter"
(default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks).If
null
, all data items are included. In this case, invalid values will be interpreted as zeroes.
- limitfloat
The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
– indicating no limit- lineBreakstring
A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.
- lineHeightfloat
The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.
- opacityfloat
The overall opacity (value between [0,1]).
Default value:
0.7
for non-aggregate plots withpoint
,tick
,circle
, orsquare
marks or layeredbar
charts and1
otherwise.- orderanyOf(None, boolean)
For line and trail marks, this
order
property can be set tonull
orfalse
to make the lines use the original order in the data sources.- orient
Orientation
The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.
For bar, rule and tick, this determines whether the size of the bar and tick
should be applied to x or y dimension. * For area, this property determines the orient property of the Vega output. * For line and trail marks, this property determines the sort order of the points in
the line
if
config.sortLineBy
is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored.- radiusfloat
Polar coordinate radial offset, in pixels, of the text label from the origin determined by the
x
andy
properties.- shapeanyOf(
SymbolShape
, string) Shape of the point marks. Supported values include:
plotting shapes:
"circle"
,"square"
,"cross"
,"diamond"
,"triangle-up"
,"triangle-down"
,"triangle-right"
, or"triangle-left"
.the line symbol
"stroke"
centered directional shapes
"arrow"
,"wedge"
, or"triangle"
a custom SVG path string (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)
Default value:
"circle"
- sizefloat
Default size for marks.
For
point
/circle
/square
, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.For
bar
, this represents the band size of the bar, in pixels.For
text
, this represents the font size, in pixels.
Default value:
30
for point, circle, square marks; width/height’sstep
2
for bar marks with discrete dimensions;5
for bar marks with continuous dimensions;11
for text marks.
- strokeanyOf(
Color
,Gradient
, None) Default Stroke Color. This property has higher precedence than
config.color
.Default value: (None)
- strokeCapstring
The stroke cap for line ending style. One of
"butt"
,"round"
, or"square"
.Default value:
"butt"
- strokeDashList(float)
An array of alternating stroke, space lengths for creating dashed or dotted lines.
- strokeDashOffsetfloat
The offset (in pixels) into which to begin drawing with the stroke dash array.
- strokeJoinstring
The stroke line join method. One of
"miter"
,"round"
or"bevel"
.Default value:
"miter"
- strokeMiterLimitfloat
The miter limit at which to bevel a line join.
- strokeOffsetfloat
The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.
- strokeOpacityfloat
The stroke opacity (value between [0,1]).
Default value:
1
- strokeWidthfloat
The stroke width, in pixels.
- tensionfloat
Depending on the interpolation type, sets the tension parameter (for line and area marks).
- text
Text
Placeholder text if the
text
channel is not specified- thetafloat
Polar coordinate angle, in radians, of the text label from the origin determined by the
x
andy
properties. Values fortheta
follow the same convention ofarc
markstartAngle
andendAngle
properties: angles are measured in radians, with0
indicating “north”.- timeUnitBandfloat
Default relative band size for a time unit. If set to
1
, the bandwidth of the marks will be equal to the time unit band step. If set to0.5
, bandwidth of the marks will be half of the time unit band step.- timeUnitBandPositionfloat
Default relative band position for a time unit. If set to
0
, the marks will be positioned at the beginning of the time unit band step. If set to0.5
, the marks will be positioned in the middle of the time unit band step.- tooltipanyOf(float, string, boolean,
TooltipContent
, None) The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.
If
tooltip
istrue
or{"content": "encoding"}
, then all fields fromencoding
will be used.If
tooltip
is{"content": "data"}
, then all fields that appear in the highlighted data point will be used.If set to
null
orfalse
, then no tooltip will be used.
See the tooltip documentation for a detailed discussion about tooltip in Vega-Lite.
Default value:
null
- widthfloat
Width of the marks.
- xanyOf(float, enum(‘width’))
X coordinates of the marks, or width of horizontal
"bar"
and"area"
without specifiedx2
orwidth
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- x2anyOf(float, enum(‘width’))
X2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- yanyOf(float, enum(‘height’))
Y coordinates of the marks, or height of vertical
"bar"
and"area"
without specifiedy2
orheight
.The
value
of this channel can be a number or a string"height"
for the height of the plot.- y2anyOf(float, enum(‘height’))
Y2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"height"
for the height of the plot.
- align
-
configure_point
(self, align=Undefined, angle=Undefined, aspect=Undefined, baseline=Undefined, blend=Undefined, color=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined, lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds)¶ MarkConfig schema wrapper
Mapping(required=[])
- Attributes
- align
Align
The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of
"left"
,"right"
,"center"
.- anglefloat
The rotation angle of the text, in degrees.
- aspectboolean
Whether to keep aspect ratio of image marks.
- baseline
TextBaseline
The vertical text baseline. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thelineHeight
rather thanfontSize
alone.- blend
Blend
The color blend mode for drawing an item on its current background. Any valid CSS mix-blend-mode value can be used.
__Default value:
"source-over"
- coloranyOf(
Color
,Gradient
) Default color.
Default value: ■
"#4682b4"
Note:
This property cannot be used in a style config.
The
fill
andstroke
properties have higher precedence thancolor
and will overridecolor
.
- cornerRadiusfloat
The radius in pixels of rounded rectangle corners.
Default value:
0
- cornerRadiusBottomLeftfloat
The radius in pixels of rounded rectangle bottom left corner.
Default value:
0
- cornerRadiusBottomRightfloat
The radius in pixels of rounded rectangle bottom right corner.
Default value:
0
- cornerRadiusTopLeftfloat
The radius in pixels of rounded rectangle top right corner.
Default value:
0
- cornerRadiusTopRightfloat
The radius in pixels of rounded rectangle top left corner.
Default value:
0
- cursor
Cursor
The mouse cursor used over the mark. Any valid CSS cursor type can be used.
- dir
TextDirection
The direction of the text. One of
"ltr"
(left-to-right) or"rtl"
(right-to-left). This property determines on which side is truncated in response to the limit parameter.Default value:
"ltr"
- dxfloat
The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- dyfloat
The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- ellipsisstring
The ellipsis string for text truncated in response to the limit parameter.
Default value:
"…"
- fillanyOf(
Color
,Gradient
, None) Default Fill Color. This property has higher precedence than
config.color
.Default value: (None)
- fillOpacityfloat
The fill opacity (value between [0,1]).
Default value:
1
- filledboolean
Whether the mark’s color should be used as fill color instead of stroke color.
Default value:
false
for allpoint
,line
, andrule
marks as well asgeoshape
marks for graticule data sources; otherwise,true
.Note: This property cannot be used in a style config.
- fontstring
The typeface to set the text in (e.g.,
"Helvetica Neue"
).- fontSizefloat
The font size, in pixels.
Default value:
11
- fontStyle
FontStyle
The font style (e.g.,
"italic"
).- fontWeight
FontWeight
The font weight. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- heightfloat
Height of the marks.
- hrefstring
A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
- interpolate
Interpolate
The line interpolation method to use for line and area marks. One of the following:
"linear"
: piecewise linear segments, as in a polyline."linear-closed"
: close the linear segments to form a polygon."step"
: alternate between horizontal and vertical segments, as in a step function."step-before"
: alternate between vertical and horizontal segments, as in a step function."step-after"
: alternate between horizontal and vertical segments, as in a step function."basis"
: a B-spline, with control point duplication on the ends."basis-open"
: an open B-spline; may not intersect the start or end."basis-closed"
: a closed B-spline, as in a loop."cardinal"
: a Cardinal spline, with control point duplication on the ends."cardinal-open"
: an open Cardinal spline; may not intersect the start or end, but will intersect other control points."cardinal-closed"
: a closed Cardinal spline, as in a loop."bundle"
: equivalent to basis, except the tension parameter is used to straighten the spline."monotone"
: cubic interpolation that preserves monotonicity in y.
- invalidenum(‘filter’, None)
Defines how Vega-Lite should handle marks for invalid values (
null
andNaN
).If set to
"filter"
(default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks).If
null
, all data items are included. In this case, invalid values will be interpreted as zeroes.
- limitfloat
The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
– indicating no limit- lineBreakstring
A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.
- lineHeightfloat
The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.
- opacityfloat
The overall opacity (value between [0,1]).
Default value:
0.7
for non-aggregate plots withpoint
,tick
,circle
, orsquare
marks or layeredbar
charts and1
otherwise.- orderanyOf(None, boolean)
For line and trail marks, this
order
property can be set tonull
orfalse
to make the lines use the original order in the data sources.- orient
Orientation
The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.
For bar, rule and tick, this determines whether the size of the bar and tick
should be applied to x or y dimension. * For area, this property determines the orient property of the Vega output. * For line and trail marks, this property determines the sort order of the points in
the line
if
config.sortLineBy
is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored.- radiusfloat
Polar coordinate radial offset, in pixels, of the text label from the origin determined by the
x
andy
properties.- shapeanyOf(
SymbolShape
, string) Shape of the point marks. Supported values include:
plotting shapes:
"circle"
,"square"
,"cross"
,"diamond"
,"triangle-up"
,"triangle-down"
,"triangle-right"
, or"triangle-left"
.the line symbol
"stroke"
centered directional shapes
"arrow"
,"wedge"
, or"triangle"
a custom SVG path string (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)
Default value:
"circle"
- sizefloat
Default size for marks.
For
point
/circle
/square
, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.For
bar
, this represents the band size of the bar, in pixels.For
text
, this represents the font size, in pixels.
Default value:
30
for point, circle, square marks; width/height’sstep
2
for bar marks with discrete dimensions;5
for bar marks with continuous dimensions;11
for text marks.
- strokeanyOf(
Color
,Gradient
, None) Default Stroke Color. This property has higher precedence than
config.color
.Default value: (None)
- strokeCapstring
The stroke cap for line ending style. One of
"butt"
,"round"
, or"square"
.Default value:
"butt"
- strokeDashList(float)
An array of alternating stroke, space lengths for creating dashed or dotted lines.
- strokeDashOffsetfloat
The offset (in pixels) into which to begin drawing with the stroke dash array.
- strokeJoinstring
The stroke line join method. One of
"miter"
,"round"
or"bevel"
.Default value:
"miter"
- strokeMiterLimitfloat
The miter limit at which to bevel a line join.
- strokeOffsetfloat
The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.
- strokeOpacityfloat
The stroke opacity (value between [0,1]).
Default value:
1
- strokeWidthfloat
The stroke width, in pixels.
- tensionfloat
Depending on the interpolation type, sets the tension parameter (for line and area marks).
- text
Text
Placeholder text if the
text
channel is not specified- thetafloat
Polar coordinate angle, in radians, of the text label from the origin determined by the
x
andy
properties. Values fortheta
follow the same convention ofarc
markstartAngle
andendAngle
properties: angles are measured in radians, with0
indicating “north”.- timeUnitBandfloat
Default relative band size for a time unit. If set to
1
, the bandwidth of the marks will be equal to the time unit band step. If set to0.5
, bandwidth of the marks will be half of the time unit band step.- timeUnitBandPositionfloat
Default relative band position for a time unit. If set to
0
, the marks will be positioned at the beginning of the time unit band step. If set to0.5
, the marks will be positioned in the middle of the time unit band step.- tooltipanyOf(float, string, boolean,
TooltipContent
, None) The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.
If
tooltip
istrue
or{"content": "encoding"}
, then all fields fromencoding
will be used.If
tooltip
is{"content": "data"}
, then all fields that appear in the highlighted data point will be used.If set to
null
orfalse
, then no tooltip will be used.
See the tooltip documentation for a detailed discussion about tooltip in Vega-Lite.
Default value:
null
- widthfloat
Width of the marks.
- xanyOf(float, enum(‘width’))
X coordinates of the marks, or width of horizontal
"bar"
and"area"
without specifiedx2
orwidth
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- x2anyOf(float, enum(‘width’))
X2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- yanyOf(float, enum(‘height’))
Y coordinates of the marks, or height of vertical
"bar"
and"area"
without specifiedy2
orheight
.The
value
of this channel can be a number or a string"height"
for the height of the plot.- y2anyOf(float, enum(‘height’))
Y2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"height"
for the height of the plot.
- align
-
configure_projection
(self, center=Undefined, clipAngle=Undefined, clipExtent=Undefined, coefficient=Undefined, distance=Undefined, extent=Undefined, fit=Undefined, fraction=Undefined, lobes=Undefined, parallel=Undefined, parallels=Undefined, pointRadius=Undefined, precision=Undefined, radius=Undefined, ratio=Undefined, reflectX=Undefined, reflectY=Undefined, rotate=Undefined, scale=Undefined, size=Undefined, spacing=Undefined, tilt=Undefined, translate=Undefined, type=Undefined, **kwds)¶ ProjectionConfig schema wrapper
Mapping(required=[])
- Attributes
- center
Vector2number
The projection’s center, a two-element array of longitude and latitude in degrees.
Default value:
[0, 0]
- clipAnglefloat
The projection’s clipping circle radius to the specified angle in degrees. If
null
, switches to antimeridian cutting rather than small-circle clipping.- clipExtent
Vector2Vector2number
The projection’s viewport clip extent to the specified bounds in pixels. The extent bounds are specified as an array
[[x0, y0], [x1, y1]]
, wherex0
is the left-side of the viewport,y0
is the top,x1
is the right andy1
is the bottom. Ifnull
, no viewport clipping is performed.- coefficientfloat
- distancefloat
- extent
Vector2Vector2number
- fitanyOf(
Fit
, List(Fit
)) - fractionfloat
- lobesfloat
- parallelfloat
- parallelsList(float)
For conic projections, the two standard parallels that define the map layout. The default depends on the specific conic projection used.
- pointRadiusfloat
The default radius (in pixels) to use when drawing GeoJSON
Point
andMultiPoint
geometries. This parameter sets a constant default value. To modify the point radius in response to data, see the corresponding parameter of the GeoPath and GeoShape transforms.Default value:
4.5
- precisionfloat
The threshold for the projection’s adaptive resampling to the specified value in pixels. This value corresponds to the Douglas–Peucker distance. If precision is not specified, returns the projection’s current resampling precision which defaults to
√0.5 ≅ 0.70710…
.- radiusfloat
- ratiofloat
- reflectXboolean
- reflectYboolean
- rotateanyOf(
Vector2number
,Vector3number
) The projection’s three-axis rotation to the specified angles, which must be a two- or three-element array of numbers [
lambda
,phi
,gamma
] specifying the rotation angles in degrees about each spherical axis. (These correspond to yaw, pitch and roll.)Default value:
[0, 0, 0]
- scalefloat
The projection’s scale (zoom) factor, overriding automatic fitting. The default scale is projection-specific. The scale factor corresponds linearly to the distance between projected points; however, scale factor values are not equivalent across projections.
- size
Vector2number
- spacingfloat
- tiltfloat
- translate
Vector2number
The projection’s translation offset as a two-element array
[tx, ty]
.- type
ProjectionType
The cartographic projection to use. This value is case-insensitive, for example
"albers"
and"Albers"
indicate the same projection type. You can find all valid projection types in the documentation.Default value:
mercator
- center
-
configure_range
(self, category=Undefined, diverging=Undefined, heatmap=Undefined, ordinal=Undefined, ramp=Undefined, symbol=Undefined, **kwds)¶ RangeConfig schema wrapper
Mapping(required=[])
- Attributes
- categoryanyOf(
RangeScheme
, List(string)) Default color scheme for categorical data.
- diverginganyOf(
RangeScheme
, List(string)) Default color scheme for diverging quantitative ramps.
- heatmapanyOf(
RangeScheme
, List(string)) Default color scheme for quantitative heatmaps.
- ordinalanyOf(
RangeScheme
, List(string)) Default color scheme for rank-ordered data.
- rampanyOf(
RangeScheme
, List(string)) Default color scheme for sequential quantitative ramps.
- symbolList(
SymbolShape
) Array of symbol names or paths for the default shape palette.
- categoryanyOf(
-
configure_rect
(self, align=Undefined, angle=Undefined, aspect=Undefined, baseline=Undefined, binSpacing=Undefined, blend=Undefined, color=Undefined, continuousBandSize=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined, dir=Undefined, discreteBandSize=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined, lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds)¶ RectConfig schema wrapper
Mapping(required=[])
- Attributes
- align
Align
The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of
"left"
,"right"
,"center"
.- anglefloat
The rotation angle of the text, in degrees.
- aspectboolean
Whether to keep aspect ratio of image marks.
- baseline
TextBaseline
The vertical text baseline. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thelineHeight
rather thanfontSize
alone.- binSpacingfloat
Offset between bars for binned field. The ideal value for this is either 0 (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).
Default value:
1
- blend
Blend
The color blend mode for drawing an item on its current background. Any valid CSS mix-blend-mode value can be used.
__Default value:
"source-over"
- coloranyOf(
Color
,Gradient
) Default color.
Default value: ■
"#4682b4"
Note:
This property cannot be used in a style config.
The
fill
andstroke
properties have higher precedence thancolor
and will overridecolor
.
- continuousBandSizefloat
The default size of the bars on continuous scales.
Default value:
5
- cornerRadiusfloat
The radius in pixels of rounded rectangle corners.
Default value:
0
- cornerRadiusBottomLeftfloat
The radius in pixels of rounded rectangle bottom left corner.
Default value:
0
- cornerRadiusBottomRightfloat
The radius in pixels of rounded rectangle bottom right corner.
Default value:
0
- cornerRadiusTopLeftfloat
The radius in pixels of rounded rectangle top right corner.
Default value:
0
- cornerRadiusTopRightfloat
The radius in pixels of rounded rectangle top left corner.
Default value:
0
- cursor
Cursor
The mouse cursor used over the mark. Any valid CSS cursor type can be used.
- dir
TextDirection
The direction of the text. One of
"ltr"
(left-to-right) or"rtl"
(right-to-left). This property determines on which side is truncated in response to the limit parameter.Default value:
"ltr"
- discreteBandSizefloat
The default size of the bars with discrete dimensions. If unspecified, the default size is
step-2
, which provides 2 pixel offset between bars.- dxfloat
The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- dyfloat
The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- ellipsisstring
The ellipsis string for text truncated in response to the limit parameter.
Default value:
"…"
- fillanyOf(
Color
,Gradient
, None) Default Fill Color. This property has higher precedence than
config.color
.Default value: (None)
- fillOpacityfloat
The fill opacity (value between [0,1]).
Default value:
1
- filledboolean
Whether the mark’s color should be used as fill color instead of stroke color.
Default value:
false
for allpoint
,line
, andrule
marks as well asgeoshape
marks for graticule data sources; otherwise,true
.Note: This property cannot be used in a style config.
- fontstring
The typeface to set the text in (e.g.,
"Helvetica Neue"
).- fontSizefloat
The font size, in pixels.
Default value:
11
- fontStyle
FontStyle
The font style (e.g.,
"italic"
).- fontWeight
FontWeight
The font weight. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- heightfloat
Height of the marks.
- hrefstring
A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
- interpolate
Interpolate
The line interpolation method to use for line and area marks. One of the following:
"linear"
: piecewise linear segments, as in a polyline."linear-closed"
: close the linear segments to form a polygon."step"
: alternate between horizontal and vertical segments, as in a step function."step-before"
: alternate between vertical and horizontal segments, as in a step function."step-after"
: alternate between horizontal and vertical segments, as in a step function."basis"
: a B-spline, with control point duplication on the ends."basis-open"
: an open B-spline; may not intersect the start or end."basis-closed"
: a closed B-spline, as in a loop."cardinal"
: a Cardinal spline, with control point duplication on the ends."cardinal-open"
: an open Cardinal spline; may not intersect the start or end, but will intersect other control points."cardinal-closed"
: a closed Cardinal spline, as in a loop."bundle"
: equivalent to basis, except the tension parameter is used to straighten the spline."monotone"
: cubic interpolation that preserves monotonicity in y.
- invalidenum(‘filter’, None)
Defines how Vega-Lite should handle marks for invalid values (
null
andNaN
).If set to
"filter"
(default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks).If
null
, all data items are included. In this case, invalid values will be interpreted as zeroes.
- limitfloat
The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
– indicating no limit- lineBreakstring
A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.
- lineHeightfloat
The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.
- opacityfloat
The overall opacity (value between [0,1]).
Default value:
0.7
for non-aggregate plots withpoint
,tick
,circle
, orsquare
marks or layeredbar
charts and1
otherwise.- orderanyOf(None, boolean)
For line and trail marks, this
order
property can be set tonull
orfalse
to make the lines use the original order in the data sources.- orient
Orientation
The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.
For bar, rule and tick, this determines whether the size of the bar and tick
should be applied to x or y dimension. * For area, this property determines the orient property of the Vega output. * For line and trail marks, this property determines the sort order of the points in
the line
if
config.sortLineBy
is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored.- radiusfloat
Polar coordinate radial offset, in pixels, of the text label from the origin determined by the
x
andy
properties.- shapeanyOf(
SymbolShape
, string) Shape of the point marks. Supported values include:
plotting shapes:
"circle"
,"square"
,"cross"
,"diamond"
,"triangle-up"
,"triangle-down"
,"triangle-right"
, or"triangle-left"
.the line symbol
"stroke"
centered directional shapes
"arrow"
,"wedge"
, or"triangle"
a custom SVG path string (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)
Default value:
"circle"
- sizefloat
Default size for marks.
For
point
/circle
/square
, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.For
bar
, this represents the band size of the bar, in pixels.For
text
, this represents the font size, in pixels.
Default value:
30
for point, circle, square marks; width/height’sstep
2
for bar marks with discrete dimensions;5
for bar marks with continuous dimensions;11
for text marks.
- strokeanyOf(
Color
,Gradient
, None) Default Stroke Color. This property has higher precedence than
config.color
.Default value: (None)
- strokeCapstring
The stroke cap for line ending style. One of
"butt"
,"round"
, or"square"
.Default value:
"butt"
- strokeDashList(float)
An array of alternating stroke, space lengths for creating dashed or dotted lines.
- strokeDashOffsetfloat
The offset (in pixels) into which to begin drawing with the stroke dash array.
- strokeJoinstring
The stroke line join method. One of
"miter"
,"round"
or"bevel"
.Default value:
"miter"
- strokeMiterLimitfloat
The miter limit at which to bevel a line join.
- strokeOffsetfloat
The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.
- strokeOpacityfloat
The stroke opacity (value between [0,1]).
Default value:
1
- strokeWidthfloat
The stroke width, in pixels.
- tensionfloat
Depending on the interpolation type, sets the tension parameter (for line and area marks).
- text
Text
Placeholder text if the
text
channel is not specified- thetafloat
Polar coordinate angle, in radians, of the text label from the origin determined by the
x
andy
properties. Values fortheta
follow the same convention ofarc
markstartAngle
andendAngle
properties: angles are measured in radians, with0
indicating “north”.- timeUnitBandfloat
Default relative band size for a time unit. If set to
1
, the bandwidth of the marks will be equal to the time unit band step. If set to0.5
, bandwidth of the marks will be half of the time unit band step.- timeUnitBandPositionfloat
Default relative band position for a time unit. If set to
0
, the marks will be positioned at the beginning of the time unit band step. If set to0.5
, the marks will be positioned in the middle of the time unit band step.- tooltipanyOf(float, string, boolean,
TooltipContent
, None) The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.
If
tooltip
istrue
or{"content": "encoding"}
, then all fields fromencoding
will be used.If
tooltip
is{"content": "data"}
, then all fields that appear in the highlighted data point will be used.If set to
null
orfalse
, then no tooltip will be used.
See the tooltip documentation for a detailed discussion about tooltip in Vega-Lite.
Default value:
null
- widthfloat
Width of the marks.
- xanyOf(float, enum(‘width’))
X coordinates of the marks, or width of horizontal
"bar"
and"area"
without specifiedx2
orwidth
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- x2anyOf(float, enum(‘width’))
X2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- yanyOf(float, enum(‘height’))
Y coordinates of the marks, or height of vertical
"bar"
and"area"
without specifiedy2
orheight
.The
value
of this channel can be a number or a string"height"
for the height of the plot.- y2anyOf(float, enum(‘height’))
Y2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"height"
for the height of the plot.
- align
-
configure_rule
(self, align=Undefined, angle=Undefined, aspect=Undefined, baseline=Undefined, blend=Undefined, color=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined, lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds)¶ MarkConfig schema wrapper
Mapping(required=[])
- Attributes
- align
Align
The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of
"left"
,"right"
,"center"
.- anglefloat
The rotation angle of the text, in degrees.
- aspectboolean
Whether to keep aspect ratio of image marks.
- baseline
TextBaseline
The vertical text baseline. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thelineHeight
rather thanfontSize
alone.- blend
Blend
The color blend mode for drawing an item on its current background. Any valid CSS mix-blend-mode value can be used.
__Default value:
"source-over"
- coloranyOf(
Color
,Gradient
) Default color.
Default value: ■
"#4682b4"
Note:
This property cannot be used in a style config.
The
fill
andstroke
properties have higher precedence thancolor
and will overridecolor
.
- cornerRadiusfloat
The radius in pixels of rounded rectangle corners.
Default value:
0
- cornerRadiusBottomLeftfloat
The radius in pixels of rounded rectangle bottom left corner.
Default value:
0
- cornerRadiusBottomRightfloat
The radius in pixels of rounded rectangle bottom right corner.
Default value:
0
- cornerRadiusTopLeftfloat
The radius in pixels of rounded rectangle top right corner.
Default value:
0
- cornerRadiusTopRightfloat
The radius in pixels of rounded rectangle top left corner.
Default value:
0
- cursor
Cursor
The mouse cursor used over the mark. Any valid CSS cursor type can be used.
- dir
TextDirection
The direction of the text. One of
"ltr"
(left-to-right) or"rtl"
(right-to-left). This property determines on which side is truncated in response to the limit parameter.Default value:
"ltr"
- dxfloat
The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- dyfloat
The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- ellipsisstring
The ellipsis string for text truncated in response to the limit parameter.
Default value:
"…"
- fillanyOf(
Color
,Gradient
, None) Default Fill Color. This property has higher precedence than
config.color
.Default value: (None)
- fillOpacityfloat
The fill opacity (value between [0,1]).
Default value:
1
- filledboolean
Whether the mark’s color should be used as fill color instead of stroke color.
Default value:
false
for allpoint
,line
, andrule
marks as well asgeoshape
marks for graticule data sources; otherwise,true
.Note: This property cannot be used in a style config.
- fontstring
The typeface to set the text in (e.g.,
"Helvetica Neue"
).- fontSizefloat
The font size, in pixels.
Default value:
11
- fontStyle
FontStyle
The font style (e.g.,
"italic"
).- fontWeight
FontWeight
The font weight. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- heightfloat
Height of the marks.
- hrefstring
A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
- interpolate
Interpolate
The line interpolation method to use for line and area marks. One of the following:
"linear"
: piecewise linear segments, as in a polyline."linear-closed"
: close the linear segments to form a polygon."step"
: alternate between horizontal and vertical segments, as in a step function."step-before"
: alternate between vertical and horizontal segments, as in a step function."step-after"
: alternate between horizontal and vertical segments, as in a step function."basis"
: a B-spline, with control point duplication on the ends."basis-open"
: an open B-spline; may not intersect the start or end."basis-closed"
: a closed B-spline, as in a loop."cardinal"
: a Cardinal spline, with control point duplication on the ends."cardinal-open"
: an open Cardinal spline; may not intersect the start or end, but will intersect other control points."cardinal-closed"
: a closed Cardinal spline, as in a loop."bundle"
: equivalent to basis, except the tension parameter is used to straighten the spline."monotone"
: cubic interpolation that preserves monotonicity in y.
- invalidenum(‘filter’, None)
Defines how Vega-Lite should handle marks for invalid values (
null
andNaN
).If set to
"filter"
(default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks).If
null
, all data items are included. In this case, invalid values will be interpreted as zeroes.
- limitfloat
The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
– indicating no limit- lineBreakstring
A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.
- lineHeightfloat
The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.
- opacityfloat
The overall opacity (value between [0,1]).
Default value:
0.7
for non-aggregate plots withpoint
,tick
,circle
, orsquare
marks or layeredbar
charts and1
otherwise.- orderanyOf(None, boolean)
For line and trail marks, this
order
property can be set tonull
orfalse
to make the lines use the original order in the data sources.- orient
Orientation
The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.
For bar, rule and tick, this determines whether the size of the bar and tick
should be applied to x or y dimension. * For area, this property determines the orient property of the Vega output. * For line and trail marks, this property determines the sort order of the points in
the line
if
config.sortLineBy
is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored.- radiusfloat
Polar coordinate radial offset, in pixels, of the text label from the origin determined by the
x
andy
properties.- shapeanyOf(
SymbolShape
, string) Shape of the point marks. Supported values include:
plotting shapes:
"circle"
,"square"
,"cross"
,"diamond"
,"triangle-up"
,"triangle-down"
,"triangle-right"
, or"triangle-left"
.the line symbol
"stroke"
centered directional shapes
"arrow"
,"wedge"
, or"triangle"
a custom SVG path string (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)
Default value:
"circle"
- sizefloat
Default size for marks.
For
point
/circle
/square
, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.For
bar
, this represents the band size of the bar, in pixels.For
text
, this represents the font size, in pixels.
Default value:
30
for point, circle, square marks; width/height’sstep
2
for bar marks with discrete dimensions;5
for bar marks with continuous dimensions;11
for text marks.
- strokeanyOf(
Color
,Gradient
, None) Default Stroke Color. This property has higher precedence than
config.color
.Default value: (None)
- strokeCapstring
The stroke cap for line ending style. One of
"butt"
,"round"
, or"square"
.Default value:
"butt"
- strokeDashList(float)
An array of alternating stroke, space lengths for creating dashed or dotted lines.
- strokeDashOffsetfloat
The offset (in pixels) into which to begin drawing with the stroke dash array.
- strokeJoinstring
The stroke line join method. One of
"miter"
,"round"
or"bevel"
.Default value:
"miter"
- strokeMiterLimitfloat
The miter limit at which to bevel a line join.
- strokeOffsetfloat
The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.
- strokeOpacityfloat
The stroke opacity (value between [0,1]).
Default value:
1
- strokeWidthfloat
The stroke width, in pixels.
- tensionfloat
Depending on the interpolation type, sets the tension parameter (for line and area marks).
- text
Text
Placeholder text if the
text
channel is not specified- thetafloat
Polar coordinate angle, in radians, of the text label from the origin determined by the
x
andy
properties. Values fortheta
follow the same convention ofarc
markstartAngle
andendAngle
properties: angles are measured in radians, with0
indicating “north”.- timeUnitBandfloat
Default relative band size for a time unit. If set to
1
, the bandwidth of the marks will be equal to the time unit band step. If set to0.5
, bandwidth of the marks will be half of the time unit band step.- timeUnitBandPositionfloat
Default relative band position for a time unit. If set to
0
, the marks will be positioned at the beginning of the time unit band step. If set to0.5
, the marks will be positioned in the middle of the time unit band step.- tooltipanyOf(float, string, boolean,
TooltipContent
, None) The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.
If
tooltip
istrue
or{"content": "encoding"}
, then all fields fromencoding
will be used.If
tooltip
is{"content": "data"}
, then all fields that appear in the highlighted data point will be used.If set to
null
orfalse
, then no tooltip will be used.
See the tooltip documentation for a detailed discussion about tooltip in Vega-Lite.
Default value:
null
- widthfloat
Width of the marks.
- xanyOf(float, enum(‘width’))
X coordinates of the marks, or width of horizontal
"bar"
and"area"
without specifiedx2
orwidth
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- x2anyOf(float, enum(‘width’))
X2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- yanyOf(float, enum(‘height’))
Y coordinates of the marks, or height of vertical
"bar"
and"area"
without specifiedy2
orheight
.The
value
of this channel can be a number or a string"height"
for the height of the plot.- y2anyOf(float, enum(‘height’))
Y2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"height"
for the height of the plot.
- align
-
configure_scale
(self, bandPaddingInner=Undefined, bandPaddingOuter=Undefined, barBandPaddingInner=Undefined, clamp=Undefined, continuousPadding=Undefined, maxBandSize=Undefined, maxFontSize=Undefined, maxOpacity=Undefined, maxSize=Undefined, maxStrokeWidth=Undefined, minBandSize=Undefined, minFontSize=Undefined, minOpacity=Undefined, minSize=Undefined, minStrokeWidth=Undefined, pointPadding=Undefined, quantileCount=Undefined, quantizeCount=Undefined, rectBandPaddingInner=Undefined, round=Undefined, useUnaggregatedDomain=Undefined, xReverse=Undefined, **kwds)¶ ScaleConfig schema wrapper
Mapping(required=[])
- Attributes
- bandPaddingInnerfloat
Default inner padding for
x
andy
band-ordinal scales.Default value:
barBandPaddingInner
for bar marks (0.1
by default)rectBandPaddingInner
for rect and other marks (0
by default)
- bandPaddingOuterfloat
Default outer padding for
x
andy
band-ordinal scales.Default value:
paddingInner/2
(which makes width/height = number of unique values * step )- barBandPaddingInnerfloat
Default inner padding for
x
andy
band-ordinal scales of"bar"
marks.Default value:
0.1
- clampboolean
If true, values that exceed the data domain are clamped to either the minimum or maximum range value
- continuousPaddingfloat
Default padding for continuous scales.
Default:
5
for continuous x-scale of a vertical bar and continuous y-scale of a horizontal bar.;0
otherwise.- maxBandSizefloat
The default max value for mapping quantitative fields to bar’s size/bandSize.
If undefined (default), we will use the axis’s size (width or height) - 1.
- maxFontSizefloat
The default max value for mapping quantitative fields to text’s size/fontSize.
Default value:
40
- maxOpacityfloat
Default max opacity for mapping a field to opacity.
Default value:
0.8
- maxSizefloat
Default max value for point size scale.
- maxStrokeWidthfloat
Default max strokeWidth for the scale of strokeWidth for rule and line marks and of size for trail marks.
Default value:
4
- minBandSizefloat
The default min value for mapping quantitative fields to bar and tick’s size/bandSize scale with zero=false.
Default value:
2
- minFontSizefloat
The default min value for mapping quantitative fields to tick’s size/fontSize scale with zero=false
Default value:
8
- minOpacityfloat
Default minimum opacity for mapping a field to opacity.
Default value:
0.3
- minSizefloat
Default minimum value for point size scale with zero=false.
Default value:
9
- minStrokeWidthfloat
Default minimum strokeWidth for the scale of strokeWidth for rule and line marks and of size for trail marks with zero=false.
Default value:
1
- pointPaddingfloat
Default outer padding for
x
andy
point-ordinal scales.Default value:
0.5
(which makes width/height = number of unique values * step )- quantileCountfloat
Default range cardinality for quantile scale.
Default value:
4
- quantizeCountfloat
Default range cardinality for quantize scale.
Default value:
4
- rectBandPaddingInnerfloat
Default inner padding for
x
andy
band-ordinal scales of"rect"
marks.Default value:
0
- roundboolean
If true, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid. (Only available for
x
,y
, andsize
scales.)- useUnaggregatedDomainboolean
Use the source data range before aggregation as scale domain instead of aggregated data for aggregate axis.
This is equivalent to setting
domain
to"unaggregate"
for aggregated quantitative fields by default.This property only works with aggregate functions that produce values within the raw data domain (
"mean"
,"average"
,"median"
,"q1"
,"q3"
,"min"
,"max"
). For other aggregations that produce values outside of the raw data domain (e.g."count"
,"sum"
), this property is ignored.Default value:
false
- xReverseboolean
Reverse x-scale by default (useful for right-to-left charts).
-
configure_selection
(self, interval=Undefined, multi=Undefined, single=Undefined, **kwds)¶ SelectionConfig schema wrapper
Mapping(required=[])
- Attributes
- interval
IntervalSelectionConfig
The default definition for an interval selection. All properties and transformations for an interval selection definition (except
type
) may be specified here.For instance, setting
interval
to{"translate": false}
disables the ability to move interval selections by default.- multi
MultiSelectionConfig
The default definition for a multi selection. All properties and transformations for a multi selection definition (except
type
) may be specified here.For instance, setting
multi
to{"toggle": "event.altKey"}
adds additional values to multi selections when clicking with the alt-key pressed by default.- single
SingleSelectionConfig
The default definition for a single selection. All properties and transformations for a single selection definition (except
type
) may be specified here.For instance, setting
single
to{"on": "dblclick"}
populates single selections on double-click by default.
- interval
-
configure_square
(self, align=Undefined, angle=Undefined, aspect=Undefined, baseline=Undefined, blend=Undefined, color=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined, lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds)¶ MarkConfig schema wrapper
Mapping(required=[])
- Attributes
- align
Align
The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of
"left"
,"right"
,"center"
.- anglefloat
The rotation angle of the text, in degrees.
- aspectboolean
Whether to keep aspect ratio of image marks.
- baseline
TextBaseline
The vertical text baseline. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thelineHeight
rather thanfontSize
alone.- blend
Blend
The color blend mode for drawing an item on its current background. Any valid CSS mix-blend-mode value can be used.
__Default value:
"source-over"
- coloranyOf(
Color
,Gradient
) Default color.
Default value: ■
"#4682b4"
Note:
This property cannot be used in a style config.
The
fill
andstroke
properties have higher precedence thancolor
and will overridecolor
.
- cornerRadiusfloat
The radius in pixels of rounded rectangle corners.
Default value:
0
- cornerRadiusBottomLeftfloat
The radius in pixels of rounded rectangle bottom left corner.
Default value:
0
- cornerRadiusBottomRightfloat
The radius in pixels of rounded rectangle bottom right corner.
Default value:
0
- cornerRadiusTopLeftfloat
The radius in pixels of rounded rectangle top right corner.
Default value:
0
- cornerRadiusTopRightfloat
The radius in pixels of rounded rectangle top left corner.
Default value:
0
- cursor
Cursor
The mouse cursor used over the mark. Any valid CSS cursor type can be used.
- dir
TextDirection
The direction of the text. One of
"ltr"
(left-to-right) or"rtl"
(right-to-left). This property determines on which side is truncated in response to the limit parameter.Default value:
"ltr"
- dxfloat
The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- dyfloat
The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- ellipsisstring
The ellipsis string for text truncated in response to the limit parameter.
Default value:
"…"
- fillanyOf(
Color
,Gradient
, None) Default Fill Color. This property has higher precedence than
config.color
.Default value: (None)
- fillOpacityfloat
The fill opacity (value between [0,1]).
Default value:
1
- filledboolean
Whether the mark’s color should be used as fill color instead of stroke color.
Default value:
false
for allpoint
,line
, andrule
marks as well asgeoshape
marks for graticule data sources; otherwise,true
.Note: This property cannot be used in a style config.
- fontstring
The typeface to set the text in (e.g.,
"Helvetica Neue"
).- fontSizefloat
The font size, in pixels.
Default value:
11
- fontStyle
FontStyle
The font style (e.g.,
"italic"
).- fontWeight
FontWeight
The font weight. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- heightfloat
Height of the marks.
- hrefstring
A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
- interpolate
Interpolate
The line interpolation method to use for line and area marks. One of the following:
"linear"
: piecewise linear segments, as in a polyline."linear-closed"
: close the linear segments to form a polygon."step"
: alternate between horizontal and vertical segments, as in a step function."step-before"
: alternate between vertical and horizontal segments, as in a step function."step-after"
: alternate between horizontal and vertical segments, as in a step function."basis"
: a B-spline, with control point duplication on the ends."basis-open"
: an open B-spline; may not intersect the start or end."basis-closed"
: a closed B-spline, as in a loop."cardinal"
: a Cardinal spline, with control point duplication on the ends."cardinal-open"
: an open Cardinal spline; may not intersect the start or end, but will intersect other control points."cardinal-closed"
: a closed Cardinal spline, as in a loop."bundle"
: equivalent to basis, except the tension parameter is used to straighten the spline."monotone"
: cubic interpolation that preserves monotonicity in y.
- invalidenum(‘filter’, None)
Defines how Vega-Lite should handle marks for invalid values (
null
andNaN
).If set to
"filter"
(default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks).If
null
, all data items are included. In this case, invalid values will be interpreted as zeroes.
- limitfloat
The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
– indicating no limit- lineBreakstring
A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.
- lineHeightfloat
The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.
- opacityfloat
The overall opacity (value between [0,1]).
Default value:
0.7
for non-aggregate plots withpoint
,tick
,circle
, orsquare
marks or layeredbar
charts and1
otherwise.- orderanyOf(None, boolean)
For line and trail marks, this
order
property can be set tonull
orfalse
to make the lines use the original order in the data sources.- orient
Orientation
The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.
For bar, rule and tick, this determines whether the size of the bar and tick
should be applied to x or y dimension. * For area, this property determines the orient property of the Vega output. * For line and trail marks, this property determines the sort order of the points in
the line
if
config.sortLineBy
is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored.- radiusfloat
Polar coordinate radial offset, in pixels, of the text label from the origin determined by the
x
andy
properties.- shapeanyOf(
SymbolShape
, string) Shape of the point marks. Supported values include:
plotting shapes:
"circle"
,"square"
,"cross"
,"diamond"
,"triangle-up"
,"triangle-down"
,"triangle-right"
, or"triangle-left"
.the line symbol
"stroke"
centered directional shapes
"arrow"
,"wedge"
, or"triangle"
a custom SVG path string (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)
Default value:
"circle"
- sizefloat
Default size for marks.
For
point
/circle
/square
, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.For
bar
, this represents the band size of the bar, in pixels.For
text
, this represents the font size, in pixels.
Default value:
30
for point, circle, square marks; width/height’sstep
2
for bar marks with discrete dimensions;5
for bar marks with continuous dimensions;11
for text marks.
- strokeanyOf(
Color
,Gradient
, None) Default Stroke Color. This property has higher precedence than
config.color
.Default value: (None)
- strokeCapstring
The stroke cap for line ending style. One of
"butt"
,"round"
, or"square"
.Default value:
"butt"
- strokeDashList(float)
An array of alternating stroke, space lengths for creating dashed or dotted lines.
- strokeDashOffsetfloat
The offset (in pixels) into which to begin drawing with the stroke dash array.
- strokeJoinstring
The stroke line join method. One of
"miter"
,"round"
or"bevel"
.Default value:
"miter"
- strokeMiterLimitfloat
The miter limit at which to bevel a line join.
- strokeOffsetfloat
The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.
- strokeOpacityfloat
The stroke opacity (value between [0,1]).
Default value:
1
- strokeWidthfloat
The stroke width, in pixels.
- tensionfloat
Depending on the interpolation type, sets the tension parameter (for line and area marks).
- text
Text
Placeholder text if the
text
channel is not specified- thetafloat
Polar coordinate angle, in radians, of the text label from the origin determined by the
x
andy
properties. Values fortheta
follow the same convention ofarc
markstartAngle
andendAngle
properties: angles are measured in radians, with0
indicating “north”.- timeUnitBandfloat
Default relative band size for a time unit. If set to
1
, the bandwidth of the marks will be equal to the time unit band step. If set to0.5
, bandwidth of the marks will be half of the time unit band step.- timeUnitBandPositionfloat
Default relative band position for a time unit. If set to
0
, the marks will be positioned at the beginning of the time unit band step. If set to0.5
, the marks will be positioned in the middle of the time unit band step.- tooltipanyOf(float, string, boolean,
TooltipContent
, None) The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.
If
tooltip
istrue
or{"content": "encoding"}
, then all fields fromencoding
will be used.If
tooltip
is{"content": "data"}
, then all fields that appear in the highlighted data point will be used.If set to
null
orfalse
, then no tooltip will be used.
See the tooltip documentation for a detailed discussion about tooltip in Vega-Lite.
Default value:
null
- widthfloat
Width of the marks.
- xanyOf(float, enum(‘width’))
X coordinates of the marks, or width of horizontal
"bar"
and"area"
without specifiedx2
orwidth
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- x2anyOf(float, enum(‘width’))
X2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- yanyOf(float, enum(‘height’))
Y coordinates of the marks, or height of vertical
"bar"
and"area"
without specifiedy2
orheight
.The
value
of this channel can be a number or a string"height"
for the height of the plot.- y2anyOf(float, enum(‘height’))
Y2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"height"
for the height of the plot.
- align
-
configure_text
(self, align=Undefined, angle=Undefined, aspect=Undefined, baseline=Undefined, blend=Undefined, color=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined, lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds)¶ MarkConfig schema wrapper
Mapping(required=[])
- Attributes
- align
Align
The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of
"left"
,"right"
,"center"
.- anglefloat
The rotation angle of the text, in degrees.
- aspectboolean
Whether to keep aspect ratio of image marks.
- baseline
TextBaseline
The vertical text baseline. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thelineHeight
rather thanfontSize
alone.- blend
Blend
The color blend mode for drawing an item on its current background. Any valid CSS mix-blend-mode value can be used.
__Default value:
"source-over"
- coloranyOf(
Color
,Gradient
) Default color.
Default value: ■
"#4682b4"
Note:
This property cannot be used in a style config.
The
fill
andstroke
properties have higher precedence thancolor
and will overridecolor
.
- cornerRadiusfloat
The radius in pixels of rounded rectangle corners.
Default value:
0
- cornerRadiusBottomLeftfloat
The radius in pixels of rounded rectangle bottom left corner.
Default value:
0
- cornerRadiusBottomRightfloat
The radius in pixels of rounded rectangle bottom right corner.
Default value:
0
- cornerRadiusTopLeftfloat
The radius in pixels of rounded rectangle top right corner.
Default value:
0
- cornerRadiusTopRightfloat
The radius in pixels of rounded rectangle top left corner.
Default value:
0
- cursor
Cursor
The mouse cursor used over the mark. Any valid CSS cursor type can be used.
- dir
TextDirection
The direction of the text. One of
"ltr"
(left-to-right) or"rtl"
(right-to-left). This property determines on which side is truncated in response to the limit parameter.Default value:
"ltr"
- dxfloat
The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- dyfloat
The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- ellipsisstring
The ellipsis string for text truncated in response to the limit parameter.
Default value:
"…"
- fillanyOf(
Color
,Gradient
, None) Default Fill Color. This property has higher precedence than
config.color
.Default value: (None)
- fillOpacityfloat
The fill opacity (value between [0,1]).
Default value:
1
- filledboolean
Whether the mark’s color should be used as fill color instead of stroke color.
Default value:
false
for allpoint
,line
, andrule
marks as well asgeoshape
marks for graticule data sources; otherwise,true
.Note: This property cannot be used in a style config.
- fontstring
The typeface to set the text in (e.g.,
"Helvetica Neue"
).- fontSizefloat
The font size, in pixels.
Default value:
11
- fontStyle
FontStyle
The font style (e.g.,
"italic"
).- fontWeight
FontWeight
The font weight. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- heightfloat
Height of the marks.
- hrefstring
A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
- interpolate
Interpolate
The line interpolation method to use for line and area marks. One of the following:
"linear"
: piecewise linear segments, as in a polyline."linear-closed"
: close the linear segments to form a polygon."step"
: alternate between horizontal and vertical segments, as in a step function."step-before"
: alternate between vertical and horizontal segments, as in a step function."step-after"
: alternate between horizontal and vertical segments, as in a step function."basis"
: a B-spline, with control point duplication on the ends."basis-open"
: an open B-spline; may not intersect the start or end."basis-closed"
: a closed B-spline, as in a loop."cardinal"
: a Cardinal spline, with control point duplication on the ends."cardinal-open"
: an open Cardinal spline; may not intersect the start or end, but will intersect other control points."cardinal-closed"
: a closed Cardinal spline, as in a loop."bundle"
: equivalent to basis, except the tension parameter is used to straighten the spline."monotone"
: cubic interpolation that preserves monotonicity in y.
- invalidenum(‘filter’, None)
Defines how Vega-Lite should handle marks for invalid values (
null
andNaN
).If set to
"filter"
(default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks).If
null
, all data items are included. In this case, invalid values will be interpreted as zeroes.
- limitfloat
The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
– indicating no limit- lineBreakstring
A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.
- lineHeightfloat
The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.
- opacityfloat
The overall opacity (value between [0,1]).
Default value:
0.7
for non-aggregate plots withpoint
,tick
,circle
, orsquare
marks or layeredbar
charts and1
otherwise.- orderanyOf(None, boolean)
For line and trail marks, this
order
property can be set tonull
orfalse
to make the lines use the original order in the data sources.- orient
Orientation
The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.
For bar, rule and tick, this determines whether the size of the bar and tick
should be applied to x or y dimension. * For area, this property determines the orient property of the Vega output. * For line and trail marks, this property determines the sort order of the points in
the line
if
config.sortLineBy
is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored.- radiusfloat
Polar coordinate radial offset, in pixels, of the text label from the origin determined by the
x
andy
properties.- shapeanyOf(
SymbolShape
, string) Shape of the point marks. Supported values include:
plotting shapes:
"circle"
,"square"
,"cross"
,"diamond"
,"triangle-up"
,"triangle-down"
,"triangle-right"
, or"triangle-left"
.the line symbol
"stroke"
centered directional shapes
"arrow"
,"wedge"
, or"triangle"
a custom SVG path string (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)
Default value:
"circle"
- sizefloat
Default size for marks.
For
point
/circle
/square
, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.For
bar
, this represents the band size of the bar, in pixels.For
text
, this represents the font size, in pixels.
Default value:
30
for point, circle, square marks; width/height’sstep
2
for bar marks with discrete dimensions;5
for bar marks with continuous dimensions;11
for text marks.
- strokeanyOf(
Color
,Gradient
, None) Default Stroke Color. This property has higher precedence than
config.color
.Default value: (None)
- strokeCapstring
The stroke cap for line ending style. One of
"butt"
,"round"
, or"square"
.Default value:
"butt"
- strokeDashList(float)
An array of alternating stroke, space lengths for creating dashed or dotted lines.
- strokeDashOffsetfloat
The offset (in pixels) into which to begin drawing with the stroke dash array.
- strokeJoinstring
The stroke line join method. One of
"miter"
,"round"
or"bevel"
.Default value:
"miter"
- strokeMiterLimitfloat
The miter limit at which to bevel a line join.
- strokeOffsetfloat
The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.
- strokeOpacityfloat
The stroke opacity (value between [0,1]).
Default value:
1
- strokeWidthfloat
The stroke width, in pixels.
- tensionfloat
Depending on the interpolation type, sets the tension parameter (for line and area marks).
- text
Text
Placeholder text if the
text
channel is not specified- thetafloat
Polar coordinate angle, in radians, of the text label from the origin determined by the
x
andy
properties. Values fortheta
follow the same convention ofarc
markstartAngle
andendAngle
properties: angles are measured in radians, with0
indicating “north”.- timeUnitBandfloat
Default relative band size for a time unit. If set to
1
, the bandwidth of the marks will be equal to the time unit band step. If set to0.5
, bandwidth of the marks will be half of the time unit band step.- timeUnitBandPositionfloat
Default relative band position for a time unit. If set to
0
, the marks will be positioned at the beginning of the time unit band step. If set to0.5
, the marks will be positioned in the middle of the time unit band step.- tooltipanyOf(float, string, boolean,
TooltipContent
, None) The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.
If
tooltip
istrue
or{"content": "encoding"}
, then all fields fromencoding
will be used.If
tooltip
is{"content": "data"}
, then all fields that appear in the highlighted data point will be used.If set to
null
orfalse
, then no tooltip will be used.
See the tooltip documentation for a detailed discussion about tooltip in Vega-Lite.
Default value:
null
- widthfloat
Width of the marks.
- xanyOf(float, enum(‘width’))
X coordinates of the marks, or width of horizontal
"bar"
and"area"
without specifiedx2
orwidth
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- x2anyOf(float, enum(‘width’))
X2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- yanyOf(float, enum(‘height’))
Y coordinates of the marks, or height of vertical
"bar"
and"area"
without specifiedy2
orheight
.The
value
of this channel can be a number or a string"height"
for the height of the plot.- y2anyOf(float, enum(‘height’))
Y2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"height"
for the height of the plot.
- align
-
configure_tick
(self, align=Undefined, angle=Undefined, aspect=Undefined, bandSize=Undefined, baseline=Undefined, blend=Undefined, color=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined, lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, thickness=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds)¶ TickConfig schema wrapper
Mapping(required=[])
- Attributes
- align
Align
The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of
"left"
,"right"
,"center"
.- anglefloat
The rotation angle of the text, in degrees.
- aspectboolean
Whether to keep aspect ratio of image marks.
- bandSizefloat
The width of the ticks.
Default value: 3/4 of step (width step for horizontal ticks and height step for vertical ticks).
- baseline
TextBaseline
The vertical text baseline. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thelineHeight
rather thanfontSize
alone.- blend
Blend
The color blend mode for drawing an item on its current background. Any valid CSS mix-blend-mode value can be used.
__Default value:
"source-over"
- coloranyOf(
Color
,Gradient
) Default color.
Default value: ■
"#4682b4"
Note:
This property cannot be used in a style config.
The
fill
andstroke
properties have higher precedence thancolor
and will overridecolor
.
- cornerRadiusfloat
The radius in pixels of rounded rectangle corners.
Default value:
0
- cornerRadiusBottomLeftfloat
The radius in pixels of rounded rectangle bottom left corner.
Default value:
0
- cornerRadiusBottomRightfloat
The radius in pixels of rounded rectangle bottom right corner.
Default value:
0
- cornerRadiusTopLeftfloat
The radius in pixels of rounded rectangle top right corner.
Default value:
0
- cornerRadiusTopRightfloat
The radius in pixels of rounded rectangle top left corner.
Default value:
0
- cursor
Cursor
The mouse cursor used over the mark. Any valid CSS cursor type can be used.
- dir
TextDirection
The direction of the text. One of
"ltr"
(left-to-right) or"rtl"
(right-to-left). This property determines on which side is truncated in response to the limit parameter.Default value:
"ltr"
- dxfloat
The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- dyfloat
The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- ellipsisstring
The ellipsis string for text truncated in response to the limit parameter.
Default value:
"…"
- fillanyOf(
Color
,Gradient
, None) Default Fill Color. This property has higher precedence than
config.color
.Default value: (None)
- fillOpacityfloat
The fill opacity (value between [0,1]).
Default value:
1
- filledboolean
Whether the mark’s color should be used as fill color instead of stroke color.
Default value:
false
for allpoint
,line
, andrule
marks as well asgeoshape
marks for graticule data sources; otherwise,true
.Note: This property cannot be used in a style config.
- fontstring
The typeface to set the text in (e.g.,
"Helvetica Neue"
).- fontSizefloat
The font size, in pixels.
Default value:
11
- fontStyle
FontStyle
The font style (e.g.,
"italic"
).- fontWeight
FontWeight
The font weight. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- heightfloat
Height of the marks.
- hrefstring
A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
- interpolate
Interpolate
The line interpolation method to use for line and area marks. One of the following:
"linear"
: piecewise linear segments, as in a polyline."linear-closed"
: close the linear segments to form a polygon."step"
: alternate between horizontal and vertical segments, as in a step function."step-before"
: alternate between vertical and horizontal segments, as in a step function."step-after"
: alternate between horizontal and vertical segments, as in a step function."basis"
: a B-spline, with control point duplication on the ends."basis-open"
: an open B-spline; may not intersect the start or end."basis-closed"
: a closed B-spline, as in a loop."cardinal"
: a Cardinal spline, with control point duplication on the ends."cardinal-open"
: an open Cardinal spline; may not intersect the start or end, but will intersect other control points."cardinal-closed"
: a closed Cardinal spline, as in a loop."bundle"
: equivalent to basis, except the tension parameter is used to straighten the spline."monotone"
: cubic interpolation that preserves monotonicity in y.
- invalidenum(‘filter’, None)
Defines how Vega-Lite should handle marks for invalid values (
null
andNaN
).If set to
"filter"
(default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks).If
null
, all data items are included. In this case, invalid values will be interpreted as zeroes.
- limitfloat
The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
– indicating no limit- lineBreakstring
A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.
- lineHeightfloat
The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.
- opacityfloat
The overall opacity (value between [0,1]).
Default value:
0.7
for non-aggregate plots withpoint
,tick
,circle
, orsquare
marks or layeredbar
charts and1
otherwise.- orderanyOf(None, boolean)
For line and trail marks, this
order
property can be set tonull
orfalse
to make the lines use the original order in the data sources.- orient
Orientation
The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.
For bar, rule and tick, this determines whether the size of the bar and tick
should be applied to x or y dimension. * For area, this property determines the orient property of the Vega output. * For line and trail marks, this property determines the sort order of the points in
the line
if
config.sortLineBy
is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored.- radiusfloat
Polar coordinate radial offset, in pixels, of the text label from the origin determined by the
x
andy
properties.- shapeanyOf(
SymbolShape
, string) Shape of the point marks. Supported values include:
plotting shapes:
"circle"
,"square"
,"cross"
,"diamond"
,"triangle-up"
,"triangle-down"
,"triangle-right"
, or"triangle-left"
.the line symbol
"stroke"
centered directional shapes
"arrow"
,"wedge"
, or"triangle"
a custom SVG path string (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)
Default value:
"circle"
- sizefloat
Default size for marks.
For
point
/circle
/square
, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.For
bar
, this represents the band size of the bar, in pixels.For
text
, this represents the font size, in pixels.
Default value:
30
for point, circle, square marks; width/height’sstep
2
for bar marks with discrete dimensions;5
for bar marks with continuous dimensions;11
for text marks.
- strokeanyOf(
Color
,Gradient
, None) Default Stroke Color. This property has higher precedence than
config.color
.Default value: (None)
- strokeCapstring
The stroke cap for line ending style. One of
"butt"
,"round"
, or"square"
.Default value:
"butt"
- strokeDashList(float)
An array of alternating stroke, space lengths for creating dashed or dotted lines.
- strokeDashOffsetfloat
The offset (in pixels) into which to begin drawing with the stroke dash array.
- strokeJoinstring
The stroke line join method. One of
"miter"
,"round"
or"bevel"
.Default value:
"miter"
- strokeMiterLimitfloat
The miter limit at which to bevel a line join.
- strokeOffsetfloat
The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.
- strokeOpacityfloat
The stroke opacity (value between [0,1]).
Default value:
1
- strokeWidthfloat
The stroke width, in pixels.
- tensionfloat
Depending on the interpolation type, sets the tension parameter (for line and area marks).
- text
Text
Placeholder text if the
text
channel is not specified- thetafloat
Polar coordinate angle, in radians, of the text label from the origin determined by the
x
andy
properties. Values fortheta
follow the same convention ofarc
markstartAngle
andendAngle
properties: angles are measured in radians, with0
indicating “north”.- thicknessfloat
Thickness of the tick mark.
Default value:
1
- timeUnitBandfloat
Default relative band size for a time unit. If set to
1
, the bandwidth of the marks will be equal to the time unit band step. If set to0.5
, bandwidth of the marks will be half of the time unit band step.- timeUnitBandPositionfloat
Default relative band position for a time unit. If set to
0
, the marks will be positioned at the beginning of the time unit band step. If set to0.5
, the marks will be positioned in the middle of the time unit band step.- tooltipanyOf(float, string, boolean,
TooltipContent
, None) The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.
If
tooltip
istrue
or{"content": "encoding"}
, then all fields fromencoding
will be used.If
tooltip
is{"content": "data"}
, then all fields that appear in the highlighted data point will be used.If set to
null
orfalse
, then no tooltip will be used.
See the tooltip documentation for a detailed discussion about tooltip in Vega-Lite.
Default value:
null
- widthfloat
Width of the marks.
- xanyOf(float, enum(‘width’))
X coordinates of the marks, or width of horizontal
"bar"
and"area"
without specifiedx2
orwidth
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- x2anyOf(float, enum(‘width’))
X2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- yanyOf(float, enum(‘height’))
Y coordinates of the marks, or height of vertical
"bar"
and"area"
without specifiedy2
orheight
.The
value
of this channel can be a number or a string"height"
for the height of the plot.- y2anyOf(float, enum(‘height’))
Y2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"height"
for the height of the plot.
- align
-
configure_title
(self, align=Undefined, anchor=Undefined, angle=Undefined, baseline=Undefined, color=Undefined, dx=Undefined, dy=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, frame=Undefined, limit=Undefined, lineHeight=Undefined, offset=Undefined, orient=Undefined, subtitleColor=Undefined, subtitleFont=Undefined, subtitleFontSize=Undefined, subtitleFontStyle=Undefined, subtitleFontWeight=Undefined, subtitleLineHeight=Undefined, subtitlePadding=Undefined, **kwds)¶ TitleConfig schema wrapper
Mapping(required=[])
- Attributes
- align
Align
Horizontal text alignment for title text. One of
"left"
,"center"
, or"right"
.- anchor
TitleAnchor
The anchor position for placing the title and subtitle text. One of
"start"
,"middle"
, or"end"
. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.- anglefloat
Angle in degrees of title and subtitle text.
- baseline
TextBaseline
Vertical text baseline for title and subtitle text. One of
"top"
,"middle"
,"bottom"
, or"alphabetic"
.- coloranyOf(None,
Color
) Text color for title text.
- dxfloat
Delta offset for title and subtitle text x-coordinate.
- dyfloat
Delta offset for title and subtitle text y-coordinate.
- fontstring
Font name for title text.
- fontSizefloat
Font size in pixels for title text.
- fontStyle
FontStyle
Font style for title text.
- fontWeight
FontWeight
Font weight for title text. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- frameanyOf(
TitleFrame
, string) The reference frame for the anchor position, one of
"bounds"
(to anchor relative to the full bounding box) or"group"
(to anchor relative to the group width or height).- limitfloat
The maximum allowed length in pixels of title and subtitle text.
- lineHeightfloat
Line height in pixels for multi-line title text.
- offsetfloat
The orthogonal offset in pixels by which to displace the title group from its position along the edge of the chart.
- orient
TitleOrient
Default title orientation (
"top"
,"bottom"
,"left"
, or"right"
)- subtitleColoranyOf(None,
Color
) Text color for subtitle text.
- subtitleFontstring
Font name for subtitle text.
- subtitleFontSizefloat
Font size in pixels for subtitle text.
- subtitleFontStyle
FontStyle
Font style for subtitle text.
- subtitleFontWeight
FontWeight
Font weight for subtitle text. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- subtitleLineHeightfloat
Line height in pixels for multi-line subtitle text.
- subtitlePaddingfloat
The padding in pixels between title and subtitle text.
- align
-
configure_trail
(self, align=Undefined, angle=Undefined, aspect=Undefined, baseline=Undefined, blend=Undefined, color=Undefined, cornerRadius=Undefined, cornerRadiusBottomLeft=Undefined, cornerRadiusBottomRight=Undefined, cornerRadiusTopLeft=Undefined, cornerRadiusTopRight=Undefined, cursor=Undefined, dir=Undefined, dx=Undefined, dy=Undefined, ellipsis=Undefined, fill=Undefined, fillOpacity=Undefined, filled=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, height=Undefined, href=Undefined, interpolate=Undefined, invalid=Undefined, limit=Undefined, lineBreak=Undefined, lineHeight=Undefined, opacity=Undefined, order=Undefined, orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, tension=Undefined, text=Undefined, theta=Undefined, timeUnitBand=Undefined, timeUnitBandPosition=Undefined, tooltip=Undefined, width=Undefined, x=Undefined, x2=Undefined, y=Undefined, y2=Undefined, **kwds)¶ LineConfig schema wrapper
Mapping(required=[])
- Attributes
- align
Align
The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of
"left"
,"right"
,"center"
.- anglefloat
The rotation angle of the text, in degrees.
- aspectboolean
Whether to keep aspect ratio of image marks.
- baseline
TextBaseline
The vertical text baseline. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to thelineHeight
rather thanfontSize
alone.- blend
Blend
The color blend mode for drawing an item on its current background. Any valid CSS mix-blend-mode value can be used.
__Default value:
"source-over"
- coloranyOf(
Color
,Gradient
) Default color.
Default value: ■
"#4682b4"
Note:
This property cannot be used in a style config.
The
fill
andstroke
properties have higher precedence thancolor
and will overridecolor
.
- cornerRadiusfloat
The radius in pixels of rounded rectangle corners.
Default value:
0
- cornerRadiusBottomLeftfloat
The radius in pixels of rounded rectangle bottom left corner.
Default value:
0
- cornerRadiusBottomRightfloat
The radius in pixels of rounded rectangle bottom right corner.
Default value:
0
- cornerRadiusTopLeftfloat
The radius in pixels of rounded rectangle top right corner.
Default value:
0
- cornerRadiusTopRightfloat
The radius in pixels of rounded rectangle top left corner.
Default value:
0
- cursor
Cursor
The mouse cursor used over the mark. Any valid CSS cursor type can be used.
- dir
TextDirection
The direction of the text. One of
"ltr"
(left-to-right) or"rtl"
(right-to-left). This property determines on which side is truncated in response to the limit parameter.Default value:
"ltr"
- dxfloat
The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- dyfloat
The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
- ellipsisstring
The ellipsis string for text truncated in response to the limit parameter.
Default value:
"…"
- fillanyOf(
Color
,Gradient
, None) Default Fill Color. This property has higher precedence than
config.color
.Default value: (None)
- fillOpacityfloat
The fill opacity (value between [0,1]).
Default value:
1
- filledboolean
Whether the mark’s color should be used as fill color instead of stroke color.
Default value:
false
for allpoint
,line
, andrule
marks as well asgeoshape
marks for graticule data sources; otherwise,true
.Note: This property cannot be used in a style config.
- fontstring
The typeface to set the text in (e.g.,
"Helvetica Neue"
).- fontSizefloat
The font size, in pixels.
Default value:
11
- fontStyle
FontStyle
The font style (e.g.,
"italic"
).- fontWeight
FontWeight
The font weight. This can be either a string (e.g
"bold"
,"normal"
) or a number (100
,200
,300
, …,900
where"normal"
=400
and"bold"
=700
).- heightfloat
Height of the marks.
- hrefstring
A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
- interpolate
Interpolate
The line interpolation method to use for line and area marks. One of the following:
"linear"
: piecewise linear segments, as in a polyline."linear-closed"
: close the linear segments to form a polygon."step"
: alternate between horizontal and vertical segments, as in a step function."step-before"
: alternate between vertical and horizontal segments, as in a step function."step-after"
: alternate between horizontal and vertical segments, as in a step function."basis"
: a B-spline, with control point duplication on the ends."basis-open"
: an open B-spline; may not intersect the start or end."basis-closed"
: a closed B-spline, as in a loop."cardinal"
: a Cardinal spline, with control point duplication on the ends."cardinal-open"
: an open Cardinal spline; may not intersect the start or end, but will intersect other control points."cardinal-closed"
: a closed Cardinal spline, as in a loop."bundle"
: equivalent to basis, except the tension parameter is used to straighten the spline."monotone"
: cubic interpolation that preserves monotonicity in y.
- invalidenum(‘filter’, None)
Defines how Vega-Lite should handle marks for invalid values (
null
andNaN
).If set to
"filter"
(default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks).If
null
, all data items are included. In this case, invalid values will be interpreted as zeroes.
- limitfloat
The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value:
0
– indicating no limit- lineBreakstring
A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.
- lineHeightfloat
The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.
- opacityfloat
The overall opacity (value between [0,1]).
Default value:
0.7
for non-aggregate plots withpoint
,tick
,circle
, orsquare
marks or layeredbar
charts and1
otherwise.- orderanyOf(None, boolean)
For line and trail marks, this
order
property can be set tonull
orfalse
to make the lines use the original order in the data sources.- orient
Orientation
The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.
For bar, rule and tick, this determines whether the size of the bar and tick
should be applied to x or y dimension. * For area, this property determines the orient property of the Vega output. * For line and trail marks, this property determines the sort order of the points in
the line
if
config.sortLineBy
is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored.- pointanyOf(boolean,
OverlayMarkDef
, enum(‘transparent’)) A flag for overlaying points on top of line or area marks, or an object defining the properties of the overlayed points.
If this property is
"transparent"
, transparent points will be used (for enhancing tooltips and selections).If this property is an empty object (
{}
) ortrue
, filled points with default properties will be used.If this property is
false
, no points would be automatically added to line or area marks.Default value:
false
.- radiusfloat
Polar coordinate radial offset, in pixels, of the text label from the origin determined by the
x
andy
properties.- shapeanyOf(
SymbolShape
, string) Shape of the point marks. Supported values include:
plotting shapes:
"circle"
,"square"
,"cross"
,"diamond"
,"triangle-up"
,"triangle-down"
,"triangle-right"
, or"triangle-left"
.the line symbol
"stroke"
centered directional shapes
"arrow"
,"wedge"
, or"triangle"
a custom SVG path string (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)
Default value:
"circle"
- sizefloat
Default size for marks.
For
point
/circle
/square
, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.For
bar
, this represents the band size of the bar, in pixels.For
text
, this represents the font size, in pixels.
Default value:
30
for point, circle, square marks; width/height’sstep
2
for bar marks with discrete dimensions;5
for bar marks with continuous dimensions;11
for text marks.
- strokeanyOf(
Color
,Gradient
, None) Default Stroke Color. This property has higher precedence than
config.color
.Default value: (None)
- strokeCapstring
The stroke cap for line ending style. One of
"butt"
,"round"
, or"square"
.Default value:
"butt"
- strokeDashList(float)
An array of alternating stroke, space lengths for creating dashed or dotted lines.
- strokeDashOffsetfloat
The offset (in pixels) into which to begin drawing with the stroke dash array.
- strokeJoinstring
The stroke line join method. One of
"miter"
,"round"
or"bevel"
.Default value:
"miter"
- strokeMiterLimitfloat
The miter limit at which to bevel a line join.
- strokeOffsetfloat
The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.
- strokeOpacityfloat
The stroke opacity (value between [0,1]).
Default value:
1
- strokeWidthfloat
The stroke width, in pixels.
- tensionfloat
Depending on the interpolation type, sets the tension parameter (for line and area marks).
- text
Text
Placeholder text if the
text
channel is not specified- thetafloat
Polar coordinate angle, in radians, of the text label from the origin determined by the
x
andy
properties. Values fortheta
follow the same convention ofarc
markstartAngle
andendAngle
properties: angles are measured in radians, with0
indicating “north”.- timeUnitBandfloat
Default relative band size for a time unit. If set to
1
, the bandwidth of the marks will be equal to the time unit band step. If set to0.5
, bandwidth of the marks will be half of the time unit band step.- timeUnitBandPositionfloat
Default relative band position for a time unit. If set to
0
, the marks will be positioned at the beginning of the time unit band step. If set to0.5
, the marks will be positioned in the middle of the time unit band step.- tooltipanyOf(float, string, boolean,
TooltipContent
, None) The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.
If
tooltip
istrue
or{"content": "encoding"}
, then all fields fromencoding
will be used.If
tooltip
is{"content": "data"}
, then all fields that appear in the highlighted data point will be used.If set to
null
orfalse
, then no tooltip will be used.
See the tooltip documentation for a detailed discussion about tooltip in Vega-Lite.
Default value:
null
- widthfloat
Width of the marks.
- xanyOf(float, enum(‘width’))
X coordinates of the marks, or width of horizontal
"bar"
and"area"
without specifiedx2
orwidth
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- x2anyOf(float, enum(‘width’))
X2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"width"
for the width of the plot.- yanyOf(float, enum(‘height’))
Y coordinates of the marks, or height of vertical
"bar"
and"area"
without specifiedy2
orheight
.The
value
of this channel can be a number or a string"height"
for the height of the plot.- y2anyOf(float, enum(‘height’))
Y2 coordinates for ranged
"area"
,"bar"
,"rect"
, and"rule"
.The
value
of this channel can be a number or a string"height"
for the height of the plot.
- align
-
configure_view
(self, clip=Undefined, continuousHeight=Undefined, continuousWidth=Undefined, cornerRadius=Undefined, cursor=Undefined, discreteHeight=Undefined, discreteWidth=Undefined, fill=Undefined, fillOpacity=Undefined, height=Undefined, opacity=Undefined, step=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeJoin=Undefined, strokeMiterLimit=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, width=Undefined, **kwds)¶ ViewConfig schema wrapper
Mapping(required=[])
- Attributes
- clipboolean
Whether the view should be clipped.
- continuousHeightfloat
The default height when the plot has a continuous y-field.
Default value:
200
- continuousWidthfloat
The default width when the plot has a continuous x-field.
Default value:
200
- cornerRadiusfloat
The radius in pixels of rounded rectangle corners.
Default value:
0
- cursor
Cursor
The mouse cursor used over the view. Any valid CSS cursor type can be used.
- discreteHeightanyOf(float, Mapping(required=[step]))
The default height when the plot has either a discrete y-field or no y-field. The height can be either a number indicating a fixed height or an object in the form of
{step: number}
defining the height per discrete step.Default value: a step size based on
config.view.step
.- discreteWidthanyOf(float, Mapping(required=[step]))
The default width when the plot has either a discrete x-field or no x-field. The width can be either a number indicating a fixed width or an object in the form of
{step: number}
defining the width per discrete step.Default value: a step size based on
config.view.step
.- fillanyOf(
Color
, None) The fill color.
Default value:
undefined
- fillOpacityfloat
The fill opacity (value between [0,1]).
Default value:
1
- heightfloat
Default height
Deprecated: Since Vega-Lite 4.0. Please use continuousHeight and discreteHeight instead.
- opacityfloat
The overall opacity (value between [0,1]).
Default value:
0.7
for non-aggregate plots withpoint
,tick
,circle
, orsquare
marks or layeredbar
charts and1
otherwise.- stepfloat
Default step size for x-/y- discrete fields.
- strokeanyOf(
Color
, None) The stroke color.
Default value:
"#ddd"
- strokeCapstring
The stroke cap for line ending style. One of
"butt"
,"round"
, or"square"
.Default value:
"butt"
- strokeDashList(float)
An array of alternating stroke, space lengths for creating dashed or dotted lines.
- strokeDashOffsetfloat
The offset (in pixels) into which to begin drawing with the stroke dash array.
- strokeJoinstring
The stroke line join method. One of
"miter"
,"round"
or"bevel"
.Default value:
"miter"
- strokeMiterLimitfloat
The miter limit at which to bevel a line join.
- strokeOpacityfloat
The stroke opacity (value between [0,1]).
Default value:
1
- strokeWidthfloat
The stroke width, in pixels.
- widthfloat
Default width
Deprecated: Since Vega-Lite 4.0. Please use continuousWidth and discreteWidth instead.
-
copy
(self, deep=True, ignore=())¶ Return a copy of the object
- Parameters
- deepboolean or list, optional
If True (default) then return a deep copy of all dict, list, and SchemaBase objects within the object structure. If False, then only copy the top object. If a list or iterable, then only copy the listed attributes.
- ignorelist, optional
A list of keys for which the contents should not be copied, but only stored by reference.
-
display
(self, renderer=Undefined, theme=Undefined, actions=Undefined, **kwargs)¶ Display chart in Jupyter notebook or JupyterLab
Parameters are passed as options to vega-embed within supported frontends. See https://github.com/vega/vega-embed#options for details.
- Parameters
- rendererstring (‘canvas’ or ‘svg’)
The renderer to use
- themestring
The Vega theme name to use; see https://github.com/vega/vega-themes
- actionsbool or dict
Specify whether action links (“Open In Vega Editor”, etc.) are included in the view.
- **kwargs :
Additional parameters are also passed to vega-embed as options.
-
classmethod
from_dict
(dct, validate=True, _wrapper_classes=None)¶ Construct class from a dictionary representation
- Parameters
- dctdictionary
The dict from which to construct the class
- validateboolean
If True (default), then validate the input against the schema.
- _wrapper_classeslist (optional)
The set of SchemaBase classes to use when constructing wrappers of the dict inputs. If not specified, the result of cls._default_wrapper_classes will be used.
- Returns
- objSchema object
The wrapped schema
- Raises
- jsonschema.ValidationError :
if validate=True and dct does not conform to the schema
-
classmethod
from_json
(json_string, validate=True, **kwargs)¶ Instantiate the object from a valid JSON string
- Parameters
- json_stringstring
The string containing a valid JSON chart specification.
- validateboolean
If True (default), then validate the input against the schema.
- **kwargs :
Additional keyword arguments are passed to json.loads
- Returns
- chartChart object
The altair Chart object built from the specification.
-
project
(self, type='mercator', center=Undefined, clipAngle=Undefined, clipExtent=Undefined, coefficient=Undefined, distance=Undefined, fraction=Undefined, lobes=Undefined, parallel=Undefined, precision=Undefined, radius=Undefined, ratio=Undefined, reflectX=Undefined, reflectY=Undefined, rotate=Undefined, scale=Undefined, spacing=Undefined, tilt=Undefined, translate=Undefined, **kwds)¶ Add a geographic projection to the chart.
This is generally used either with
mark_geoshape
or with thelatitude
/longitude
encodings.Available projection types are [‘albers’, ‘albersUsa’, ‘azimuthalEqualArea’, ‘azimuthalEquidistant’, ‘conicConformal’, ‘conicEqualArea’, ‘conicEquidistant’, ‘equalEarth’, ‘equirectangular’, ‘gnomonic’, ‘identity’, ‘mercator’, ‘orthographic’, ‘stereographic’, ‘transverseMercator’]
- Attributes
- typeProjectionType
The cartographic projection to use. This value is case-insensitive, for example “albers” and “Albers” indicate the same projection type. You can find all valid projection types [in the documentation](https://vega.github.io/vega-lite/docs/projection.html#projection-types).
Default value: mercator
- centerList(float)
Sets the projection’s center to the specified center, a two-element array of longitude and latitude in degrees.
Default value: [0, 0]
- clipAnglefloat
Sets the projection’s clipping circle radius to the specified angle in degrees. If null, switches to [antimeridian](http://bl.ocks.org/mbostock/3788999) cutting rather than small-circle clipping.
- clipExtentList(List(float))
Sets the projection’s viewport clip extent to the specified bounds in pixels. The extent bounds are specified as an array [[x0, y0], [x1, y1]], where x0 is the left-side of the viewport, y0 is the top, x1 is the right and y1 is the bottom. If null, no viewport clipping is performed.
- coefficientfloat
- distancefloat
- fractionfloat
- lobesfloat
- parallelfloat
- precisionMapping(required=[length])
Sets the threshold for the projection’s [adaptive resampling](http://bl.ocks.org/mbostock/3795544) to the specified value in pixels. This value corresponds to the [Douglas–Peucker distance](http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm).
If precision is not specified, returns the projection’s current resampling
precision which defaults to √0.5 ≅ 0.70710….
- radiusfloat
- ratiofloat
- reflectXboolean
- reflectYboolean
- rotateList(float)
Sets the projection’s three-axis rotation to the specified angles, which must be a two- or three-element array of numbers [lambda, phi, gamma] specifying the rotation angles in degrees about each spherical axis. (These correspond to yaw, pitch and roll.)
Default value: [0, 0, 0]
- scalefloat
Sets the projection’s scale (zoom) value, overriding automatic fitting.
- spacingfloat
- tiltfloat
- translateList(float)
Sets the projection’s translation (pan) value, overriding automatic fitting.
-
properties
(self, **kwargs)¶ Set top-level properties of the Chart.
Argument names and types are the same as class initialization.
-
repeat
(self, repeat=Undefined, row=Undefined, column=Undefined, columns=Undefined, **kwargs)¶ Return a RepeatChart built from the chart
Fields within the chart can be set to correspond to the row or column using alt.repeat(‘row’) and alt.repeat(‘column’).
- Parameters
- repeatlist
a list of data column names to be repeated. This cannot be used along with the
row
orcolumn
argument.- rowlist
a list of data column names to be mapped to the row facet
- columnlist
a list of data column names to be mapped to the column facet
- columnsint
the maximum number of columns before wrapping. Only referenced if
repeat
is specified.- **kwargs :
additional keywords passed to RepeatChart.
- Returns
- chartRepeatChart
a repeated chart.
-
resolve_axis
(self, x=Undefined, y=Undefined, **kwds)¶ AxisResolveMap schema wrapper
Mapping(required=[])
- Attributes
-
resolve_legend
(self, color=Undefined, fill=Undefined, fillOpacity=Undefined, opacity=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeDash=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, **kwds)¶ LegendResolveMap schema wrapper
Mapping(required=[])
- Attributes
- color
ResolveMode
- fill
ResolveMode
- fillOpacity
ResolveMode
- opacity
ResolveMode
- shape
ResolveMode
- size
ResolveMode
- stroke
ResolveMode
- strokeDash
ResolveMode
- strokeOpacity
ResolveMode
- strokeWidth
ResolveMode
- color
-
classmethod
resolve_references
(schema=None)¶ Resolve references in the context of this object’s schema or root schema.
-
resolve_scale
(self, color=Undefined, fill=Undefined, fillOpacity=Undefined, opacity=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeDash=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, x=Undefined, y=Undefined, **kwds)¶ ScaleResolveMap schema wrapper
Mapping(required=[])
- Attributes
- color
ResolveMode
- fill
ResolveMode
- fillOpacity
ResolveMode
- opacity
ResolveMode
- shape
ResolveMode
- size
ResolveMode
- stroke
ResolveMode
- strokeDash
ResolveMode
- strokeOpacity
ResolveMode
- strokeWidth
ResolveMode
- x
ResolveMode
- y
ResolveMode
- color
-
save
(self, fp, format=None, override_data_transformer=True, scale_factor=1.0, vegalite_version='4.8.1', vega_version='5', vegaembed_version='6', **kwargs)¶ Save a chart to file in a variety of formats
Supported formats are json, html, png, svg
- Parameters
- fpstring filename or file-like object
file in which to write the chart.
- formatstring (optional)
the format to write: one of [‘json’, ‘html’, ‘png’, ‘svg’]. If not specified, the format will be determined from the filename.
- override_data_transformerboolean (optional)
If True (default), then the save action will be done with the MaxRowsError disabled. If False, then do not change the data transformer.
- scale_factorfloat
For svg or png formats, scale the image by this factor when saving. This can be used to control the size or resolution of the output. Default is 1.0
- **kwargs :
Additional keyword arguments are passed to the output method associated with the specified format.
-
serve
(self, ip='127.0.0.1', port=8888, n_retries=50, files=None, jupyter_warning=True, open_browser=True, http_server=None, **kwargs)¶ Open a browser window and display a rendering of the chart
- Parameters
- htmlstring
HTML to serve
- ipstring (default = ‘127.0.0.1’)
ip address at which the HTML will be served.
- portint (default = 8888)
the port at which to serve the HTML
- n_retriesint (default = 50)
the number of nearby ports to search if the specified port is already in use.
- filesdictionary (optional)
dictionary of extra content to serve
- jupyter_warningbool (optional)
if True (default), then print a warning if this is used within the Jupyter notebook
- open_browserbool (optional)
if True (default), then open a web browser to the given HTML
- http_serverclass (optional)
optionally specify an HTTPServer class to use for showing the figure. The default is Python’s basic HTTPServer.
- **kwargs :
additional keyword arguments passed to the save() method
-
show
(self, embed_opt=None, open_browser=None)¶ Show the chart in an external browser window.
This requires a recent version of the altair_viewer package.
- Parameters
- embed_optdict (optional)
The Vega embed options that control the dispay of the chart.
- open_browserbool (optional)
Specify whether a browser window should be opened. If not specified, a browser window will be opened only if the server is not already connected to a browser.
-
to_dict
(self, *args, **kwargs)¶ Convert the chart to a dictionary suitable for JSON export
-
to_json
(self, validate=True, ignore=[], context={}, indent=2, sort_keys=True, **kwargs)¶ Emit the JSON representation for this object as a string.
- Parameters
- validateboolean or string
If True (default), then validate the output dictionary against the schema. If “deep” then recursively validate all objects in the spec. This takes much more time, but it results in friendlier tracebacks for large objects.
- ignorelist
A list of keys to ignore. This will not passed to child to_dict function calls.
- contextdict (optional)
A context dictionary that will be passed to all child to_dict function calls
- indentinteger, default 2
the number of spaces of indentation to use
- sort_keysboolean, default True
if True, sort keys in the output
- **kwargs
Additional keyword arguments are passed to
json.dumps()
- Returns
- specstring
The JSON specification of the chart object.
-
transform_aggregate
(self, aggregate=Undefined, groupby=Undefined, **kwds)¶ Add an AggregateTransform to the schema.
- Parameters
- aggregateList(
AggregatedFieldDef
) Array of objects that define fields to aggregate.
- groupbyList(string)
The data fields to group by. If not specified, a single group containing all data objects will be used.
- **kwds :
additional keywords are converted to aggregates using standard shorthand parsing.
- aggregateList(
- Returns
- selfChart object
returns chart to allow for chaining
See also
alt.AggregateTransform
underlying transform object
Examples
The aggregate transform allows you to specify transforms directly using the same shorthand syntax as used in encodings:
>>> import altair as alt >>> chart1 = alt.Chart().transform_aggregate( ... mean_acc='mean(Acceleration)', ... groupby=['Origin'] ... ) >>> print(chart1.transform[0].to_json()) { "aggregate": [ { "as": "mean_acc", "field": "Acceleration", "op": "mean" } ], "groupby": [ "Origin" ] }
It also supports including AggregatedFieldDef instances or dicts directly, so you can create the above transform like this:
>>> chart2 = alt.Chart().transform_aggregate( ... [alt.AggregatedFieldDef(field='Acceleration', op='mean', ... **{'as': 'mean_acc'})], ... groupby=['Origin'] ... ) >>> chart2.transform == chart1.transform True
-
transform_bin
(self, as_=Undefined, field=Undefined, bin=True, **kwargs)¶ Add a BinTransform to the schema.
- Parameters
- as_anyOf(string, List(string))
The output fields at which to write the start and end bin values.
- binanyOf(boolean,
BinParams
) An object indicating bin properties, or simply
true
for using default bin parameters.- fieldstring
The data field to bin.
- Returns
- selfChart object
returns chart to allow for chaining
See also
alt.BinTransform
underlying transform object
Examples
>>> import altair as alt >>> chart = alt.Chart().transform_bin("x_binned", "x") >>> chart.transform[0] BinTransform({ as: 'x_binned', bin: True, field: 'x' })
>>> chart = alt.Chart().transform_bin("x_binned", "x", ... bin=alt.Bin(maxbins=10)) >>> chart.transform[0] BinTransform({ as: 'x_binned', bin: BinParams({ maxbins: 10 }), field: 'x' })
-
transform_calculate
(self, as_=Undefined, calculate=Undefined, **kwargs)¶ Add a CalculateTransform to the schema.
- Parameters
- as_string
The field for storing the computed formula value.
- calculatestring or alt.expr expression
A expression string. Use the variable
datum
to refer to the current data object.- **kwargs
transforms can also be passed by keyword argument; see Examples
- Returns
- selfChart object
returns chart to allow for chaining
See also
alt.CalculateTransform
underlying transform object
Examples
>>> import altair as alt >>> from altair import datum, expr
>>> chart = alt.Chart().transform_calculate(y = 2 * expr.sin(datum.x)) >>> chart.transform[0] CalculateTransform({ as: 'y', calculate: (2 * sin(datum.x)) })
It’s also possible to pass the
CalculateTransform
arguments directly:>>> kwds = {'as': 'y', 'calculate': '2 * sin(datum.x)'} >>> chart = alt.Chart().transform_calculate(**kwds) >>> chart.transform[0] CalculateTransform({ as: 'y', calculate: '2 * sin(datum.x)' })
As the first form is easier to write and understand, that is the recommended method.
-
transform_density
(self, density, as_=Undefined, bandwidth=Undefined, counts=Undefined, cumulative=Undefined, extent=Undefined, groupby=Undefined, maxsteps=Undefined, minsteps=Undefined, steps=Undefined)¶ Add a DensityTransform to the spec.
- Attributes
- densitystr
The data field for which to perform density estimation.
- as_[str, str]
The output fields for the sample value and corresponding density estimate. Default value:
["value", "density"]
- bandwidthfloat
The bandwidth (standard deviation) of the Gaussian kernel. If unspecified or set to zero, the bandwidth value is automatically estimated from the input data using Scott’s rule.
- countsboolean
A boolean flag indicating if the output values should be probability estimates (false) or smoothed counts (true). Default value:
false
- cumulativeboolean
A boolean flag indicating whether to produce density estimates (false) or cumulative density estimates (true). Default value:
false
- extentList([float, float])
A [min, max] domain from which to sample the distribution. If unspecified, the extent will be determined by the observed minimum and maximum values of the density value field.
- groupbyList(str)
The data fields to group by. If not specified, a single group containing all data objects will be used.
- maxstepsfloat
The maximum number of samples to take along the extent domain for plotting the density. Default value:
200
- minstepsfloat
The minimum number of samples to take along the extent domain for plotting the density. Default value:
25
- stepsfloat
The exact number of samples to take along the extent domain for plotting the density. If specified, overrides both minsteps and maxsteps to set an exact number of uniform samples. Potentially useful in conjunction with a fixed extent to ensure consistent sample points for stacked densities.
-
transform_filter
(self, filter, **kwargs)¶ Add a FilterTransform to the schema.
- Parameters
- filtera filter expression or
PredicateComposition
The filter property must be one of the predicate definitions: (1) a string or alt.expr expression (2) a range predicate (3) a selection predicate (4) a logical operand combining (1)-(3) (5) a Selection object
- filtera filter expression or
- Returns
- selfChart object
returns chart to allow for chaining
See also
alt.FilterTransform
underlying transform object
-
transform_flatten
(self, flatten, as_=Undefined)¶ Add a FlattenTransform to the schema.
- Parameters
- flattenList(string)
An array of one or more data fields containing arrays to flatten. If multiple fields are specified, their array values should have a parallel structure, ideally with the same length. If the lengths of parallel arrays do not match, the longest array will be used with
null
values added for missing entries.- asList(string)
The output field names for extracted array values. Default value: The field name of the corresponding array field
- Returns
- selfChart object
returns chart to allow for chaining
See also
alt.FlattenTransform
underlying transform object
-
transform_fold
(self, fold, as_=Undefined)¶ Add a FoldTransform to the spec.
- Parameters
- foldList(string)
An array of data fields indicating the properties to fold.
- as[string, string]
The output field names for the key and value properties produced by the fold transform. Default:
["key", "value"]
- Returns
- selfChart object
returns chart to allow for chaining
See also
Chart.transform_pivot
pivot transform - opposite of fold.
alt.FoldTransform
underlying transform object
-
transform_impute
(self, impute, key, frame=Undefined, groupby=Undefined, keyvals=Undefined, method=Undefined, value=Undefined)¶ Add an ImputeTransform to the schema.
- Parameters
- imputestring
The data field for which the missing values should be imputed.
- keystring
A key field that uniquely identifies data objects within a group. Missing key values (those occurring in the data but not in the current group) will be imputed.
- frameList(anyOf(None, float))
A frame specification as a two-element array used to control the window over which the specified method is applied. The array entries should either be a number indicating the offset from the current data object, or null to indicate unbounded rows preceding or following the current data object. For example, the value
[-5, 5]
indicates that the window should include five objects preceding and five objects following the current object. Default value: :[null, null]
indicating that the window includes all objects.- groupbyList(string)
An optional array of fields by which to group the values. Imputation will then be performed on a per-group basis.
- keyvalsanyOf(List(Mapping(required=[])),
ImputeSequence
) Defines the key values that should be considered for imputation. An array of key values or an object defining a number sequence. If provided, this will be used in addition to the key values observed within the input data. If not provided, the values will be derived from all unique values of the
key
field. Forimpute
inencoding
, the key field is the x-field if the y-field is imputed, or vice versa. If there is no impute grouping, this property must be specified.- method
ImputeMethod
The imputation method to use for the field value of imputed data objects. One of
value
,mean
,median
,max
ormin
. Default value:"value"
- valueMapping(required=[])
The field value to use when the imputation
method
is"value"
.
- Returns
- selfChart object
returns chart to allow for chaining
See also
alt.ImputeTransform
underlying transform object
-
transform_joinaggregate
(self, joinaggregate=Undefined, groupby=Undefined, **kwargs)¶ Add a JoinAggregateTransform to the schema.
- Parameters
- joinaggregateList(
JoinAggregateFieldDef
) The definition of the fields in the join aggregate, and what calculations to use.
- groupbyList(string)
The data fields for partitioning the data objects into separate groups. If unspecified, all data points will be in a single group.
- **kwargs
joinaggregates can also be passed by keyword argument; see Examples.
- joinaggregateList(
- Returns
- selfChart object
returns chart to allow for chaining
See also
alt.JoinAggregateTransform
underlying transform object
Examples
>>> import altair as alt >>> chart = alt.Chart().transform_joinaggregate(x='sum(y)') >>> chart.transform[0] JoinAggregateTransform({ joinaggregate: [JoinAggregateFieldDef({ as: 'x', field: 'y', op: 'sum' })] })
-
transform_loess
(self, on, loess, as_=Undefined, bandwidth=Undefined, groupby=Undefined)¶ Add a LoessTransform to the spec.
- Parameters
- onstr
The data field of the independent variable to use a predictor.
- loessstr
The data field of the dependent variable to smooth.
- as_[str, str]
The output field names for the smoothed points generated by the loess transform. Default value: The field names of the input x and y values.
- bandwidthfloat
A bandwidth parameter in the range
[0, 1]
that determines the amount of smoothing. Default value:0.3
- groupbyList(str)
The data fields to group by. If not specified, a single group containing all data objects will be used.
- Returns
- selfChart object
returns chart to allow for chaining
See also
Chart.transform_regression
regression transform
alt.LoessTransform
underlying transform object
-
transform_lookup
(self, lookup=Undefined, from_=Undefined, as_=Undefined, default=Undefined, **kwargs)¶ Add a DataLookupTransform or SelectionLookupTransform to the chart
- Returns
- selfChart object
returns chart to allow for chaining
See also
alt.DataLookupTransform
underlying transform object
alt.SelectionLookupTransform
underlying transform object
- Attributes
- lookupstring
Key in primary data source.
- from_anyOf(
LookupData
,LookupSelection
) Secondary data reference.
- as_anyOf(string, List(string))
The output fields on which to store the looked up data values.
For data lookups, this property may be left blank if
from_.fields
has been specified (those field names will be used); iffrom_.fields
has not been specified,as_
must be a string.For selection lookups, this property is optional: if unspecified, looked up values will be stored under a property named for the selection; and if specified, it must correspond to
from_.fields
.- defaultstring
The default value to use if lookup fails. Default value:
null
-
transform_pivot
(self, pivot, value, groupby=Undefined, limit=Undefined, op=Undefined)¶ Add a pivot transform to the chart.
- Parameters
- pivotstr
The data field to pivot on. The unique values of this field become new field names in the output stream.
- valuestr
The data field to populate pivoted fields. The aggregate values of this field become the values of the new pivoted fields.
- groupbyList(str)
The optional data fields to group by. If not specified, a single group containing all data objects will be used.
- limitfloat
An optional parameter indicating the maximum number of pivoted fields to generate. The default (
0
) applies no limit. The pivotedpivot
names are sorted in ascending order prior to enforcing the limit. Default value:0
- opstring
The aggregation operation to apply to grouped
value
field values. Default value:sum
- Returns
- selfChart object
returns chart to allow for chaining
See also
Chart.transform_fold
fold transform - opposite of pivot.
alt.PivotTransform
underlying transform object
-
transform_quantile
(self, quantile, as_=Undefined, groupby=Undefined, probs=Undefined, step=Undefined)¶ Add a quantile transform to the chart
- Parameters
- quantilestr
The data field for which to perform quantile estimation.
- as[str, str]
The output field names for the probability and quantile values.
- groupbyList(str)
The data fields to group by. If not specified, a single group containing all data objects will be used.
- probsList(float)
An array of probabilities in the range (0, 1) for which to compute quantile values. If not specified, the step parameter will be used.
- stepfloat
A probability step size (default 0.01) for sampling quantile values. All values from one-half the step size up to 1 (exclusive) will be sampled. This parameter is only used if the probs parameter is not provided. Default value:
["prob", "value"]
- Returns
- selfChart object
returns chart to allow for chaining
See also
alt.QuantileTransform
underlying transform object
-
transform_regression
(self, on, regression, as_=Undefined, extent=Undefined, groupby=Undefined, method=Undefined, order=Undefined, params=Undefined)¶ Add a RegressionTransform to the chart.
- Parameters
- onstr
The data field of the independent variable to use a predictor.
- regressionstr
The data field of the dependent variable to predict.
- as_[str, str]
The output field names for the smoothed points generated by the regression transform. Default value: The field names of the input x and y values.
- extent[float, float]
A [min, max] domain over the independent (x) field for the starting and ending points of the generated trend line.
- groupbyList(str)
The data fields to group by. If not specified, a single group containing all data objects will be used.
- methodenum(‘linear’, ‘log’, ‘exp’, ‘pow’, ‘quad’, ‘poly’)
The functional form of the regression model. One of
"linear"
,"log"
,"exp"
,"pow"
,"quad"
, or"poly"
. Default value:"linear"
- orderfloat
The polynomial order (number of coefficients) for the ‘poly’ method. Default value:
3
- paramsboolean
A boolean flag indicating if the transform should return the regression model parameters (one object per group), rather than trend line points. The resulting objects include a
coef
array of fitted coefficient values (starting with the intercept term and then including terms of increasing order) and anrSquared
value (indicating the total variance explained by the model). Default value:false
- Returns
- selfChart object
returns chart to allow for chaining
See also
Chart.transform_loess
LOESS transform
alt.RegressionTransform
underlying transform object
-
transform_sample
(self, sample=1000)¶ Add a SampleTransform to the schema.
- Parameters
- samplefloat
The maximum number of data objects to include in the sample. Default: 1000.
- Returns
- selfChart object
returns chart to allow for chaining
See also
alt.SampleTransform
underlying transform object
-
transform_stack
(self, as_, stack, groupby, offset=Undefined, sort=Undefined)¶ Add a StackTransform to the schema.
- Parameters
- as_anyOf(string, List(string))
Output field names. This can be either a string or an array of strings with two elements denoting the name for the fields for stack start and stack end respectively. If a single string(eg.”val”) is provided, the end field will be “val_end”.
- stackstring
The field which is stacked.
- groupbyList(string)
The data fields to group by.
- offsetenum(‘zero’, ‘center’, ‘normalize’)
Mode for stacking marks. Default: ‘zero’.
- sortList(
SortField
) Field that determines the order of leaves in the stacked charts.
- Returns
- selfChart object
returns chart to allow for chaining
See also
alt.StackTransform
underlying transform object
-
transform_timeunit
(self, as_=Undefined, field=Undefined, timeUnit=Undefined, **kwargs)¶ Add a TimeUnitTransform to the schema.
- Parameters
- as_string
The output field to write the timeUnit value.
- fieldstring
The data field to apply time unit.
- timeUnit
TimeUnit
The timeUnit.
- **kwargs
transforms can also be passed by keyword argument; see Examples
- Returns
- selfChart object
returns chart to allow for chaining
See also
alt.TimeUnitTransform
underlying transform object
Examples
>>> import altair as alt >>> from altair import datum, expr
>>> chart = alt.Chart().transform_timeunit(month='month(date)') >>> chart.transform[0] TimeUnitTransform({ as: 'month', field: 'date', timeUnit: 'month' })
It’s also possible to pass the
TimeUnitTransform
arguments directly; this is most useful in cases where the desired field name is not a valid python identifier:>>> kwds = {'as': 'month', 'timeUnit': 'month', 'field': 'The Month'} >>> chart = alt.Chart().transform_timeunit(**kwds) >>> chart.transform[0] TimeUnitTransform({ as: 'month', field: 'The Month', timeUnit: 'month' })
As the first form is easier to write and understand, that is the recommended method.
-
transform_window
(self, window=Undefined, frame=Undefined, groupby=Undefined, ignorePeers=Undefined, sort=Undefined, **kwargs)¶ Add a WindowTransform to the schema
- Parameters
- windowList(
WindowFieldDef
) The definition of the fields in the window, and what calculations to use.
- frameList(anyOf(None, float))
A frame specification as a two-element array indicating how the sliding window should proceed. The array entries should either be a number indicating the offset from the current data object, or null to indicate unbounded rows preceding or following the current data object. The default value is
[null, 0]
, indicating that the sliding window includes the current object and all preceding objects. The value[-5, 5]
indicates that the window should include five objects preceding and five objects following the current object. Finally,[null, null]
indicates that the window frame should always include all data objects. The only operators affected are the aggregation operations and thefirst_value
,last_value
, andnth_value
window operations. The other window operations are not affected by this.Default value: :
[null, 0]
(includes the current object and all preceding objects)- groupbyList(string)
The data fields for partitioning the data objects into separate windows. If unspecified, all data points will be in a single group.
- ignorePeersboolean
Indicates if the sliding window frame should ignore peer values. (Peer values are those considered identical by the sort criteria). The default is false, causing the window frame to expand to include all peer values. If set to true, the window frame will be defined by offset values only. This setting only affects those operations that depend on the window frame, namely aggregation operations and the first_value, last_value, and nth_value window operations.
Default value:
false
- sortList(
SortField
) A sort field definition for sorting data objects within a window. If two data objects are considered equal by the comparator, they are considered “peer” values of equal rank. If sort is not specified, the order is undefined: data objects are processed in the order they are observed and none are considered peers (the ignorePeers parameter is ignored and treated as if set to
true
).- **kwargs
transforms can also be passed by keyword argument; see Examples
- windowList(
Examples
A cumulative line chart
>>> import altair as alt >>> import numpy as np >>> import pandas as pd >>> data = pd.DataFrame({'x': np.arange(100), ... 'y': np.random.randn(100)}) >>> chart = alt.Chart(data).mark_line().encode( ... x='x:Q', ... y='ycuml:Q' ... ).transform_window( ... ycuml='sum(y)' ... ) >>> chart.transform[0] WindowTransform({ window: [WindowFieldDef({ as: 'ycuml', field: 'y', op: 'sum' })] })
-
classmethod
validate
(instance, schema=None)¶ Validate the instance against the class schema in the context of the rootschema.
-
classmethod
validate_property
(name, value, schema=None)¶ Validate a property against property schema in the context of the rootschema