altair.SharedEncoding#
- class altair.SharedEncoding(angle=Undefined, color=Undefined, description=Undefined, detail=Undefined, fill=Undefined, fillOpacity=Undefined, href=Undefined, key=Undefined, latitude=Undefined, latitude2=Undefined, longitude=Undefined, longitude2=Undefined, opacity=Undefined, order=Undefined, radius=Undefined, radius2=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeDash=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, text=Undefined, theta=Undefined, theta2=Undefined, tooltip=Undefined, url=Undefined, x=Undefined, x2=Undefined, xError=Undefined, xError2=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, yError=Undefined, yError2=Undefined, yOffset=Undefined, **kwds)#
SharedEncoding schema wrapper
Mapping(required=[])
- Parameters:
- angleMapping(required=[])
- colorMapping(required=[])
- descriptionMapping(required=[])
- detailanyOf(
FieldDefWithoutScale
, List(FieldDefWithoutScale
)) Additional levels of detail for grouping data in aggregate views and in line, trail, and area marks without mapping data to a specific visual channel.
- fillMapping(required=[])
- fillOpacityMapping(required=[])
- hrefMapping(required=[])
- keyMapping(required=[])
- latitudeMapping(required=[])
- latitude2Mapping(required=[])
- longitudeMapping(required=[])
- longitude2Mapping(required=[])
- opacityMapping(required=[])
- orderanyOf(
OrderFieldDef
, List(OrderFieldDef
),OrderValueDef
) Order of the marks.
For stacked marks, this
order
channel encodes stack order.For line and trail marks, this
order
channel encodes order of data points in the lines. This can be useful for creating a connected scatterplot. Settingorder
to{"value": null}
makes the line marks use the original order in the data sources.Otherwise, this
order
channel encodes layer order of the marks.
Note : In aggregate plots,
order
field should beaggregate
d to avoid creating additional aggregation grouping.- radiusMapping(required=[])
- radius2Mapping(required=[])
- shapeMapping(required=[])
- sizeMapping(required=[])
- strokeMapping(required=[])
- strokeDashMapping(required=[])
- strokeOpacityMapping(required=[])
- strokeWidthMapping(required=[])
- textMapping(required=[])
- thetaMapping(required=[])
- theta2Mapping(required=[])
- tooltipanyOf(
StringFieldDefWithCondition
,StringValueDefWithCondition
, List(StringFieldDef
), None) The tooltip text to show upon mouse hover. Specifying
tooltip
encoding overrides the tooltip property in the mark definition.See the tooltip documentation for a detailed discussion about tooltip in Vega-Lite.
- urlMapping(required=[])
- xMapping(required=[])
- x2Mapping(required=[])
- xErrorMapping(required=[])
- xError2Mapping(required=[])
- xOffsetMapping(required=[])
- yMapping(required=[])
- y2Mapping(required=[])
- yErrorMapping(required=[])
- yError2Mapping(required=[])
- yOffsetMapping(required=[])
- __init__(angle=Undefined, color=Undefined, description=Undefined, detail=Undefined, fill=Undefined, fillOpacity=Undefined, href=Undefined, key=Undefined, latitude=Undefined, latitude2=Undefined, longitude=Undefined, longitude2=Undefined, opacity=Undefined, order=Undefined, radius=Undefined, radius2=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeDash=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, text=Undefined, theta=Undefined, theta2=Undefined, tooltip=Undefined, url=Undefined, x=Undefined, x2=Undefined, xError=Undefined, xError2=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, yError=Undefined, yError2=Undefined, yOffset=Undefined, **kwds)#
Methods
__init__
([angle, color, description, ...])copy
([deep, ignore])Return a copy of the object
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
resolve_references
([schema])Resolve references in the context of this object's schema or root schema.
to_dict
([validate, ignore, context])Return a dictionary representation of the object
to_json
([validate, ignore, context, indent, ...])Emit the JSON representation for this object as a string.
validate
(instance[, schema])Validate the instance against the class schema in the context of the rootschema.
validate_property
(name, value[, schema])Validate a property against property schema in the context of the rootschema