How to use the altair.vega.v4.schema.core.VegaSchema function in altair

To help you get started, we’ve selected a few altair examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github altair-viz / altair / altair / vega / v4 / schema / core.py View on Github external
class onEvents(VegaSchema):
    """onEvents schema wrapper

    List(allOf(Mapping(required=[events]), oneOf(Mapping(required=[encode]),
    Mapping(required=[update]))))
    """
    _schema = {'$ref': '#/defs/onEvents'}
    _rootschema = Root._schema

    def __init__(self, *args):
        super(onEvents, self).__init__(*args)


class onTrigger(VegaSchema):
    """onTrigger schema wrapper

    List(Mapping(required=[trigger]))
    """
    _schema = {'$ref': '#/defs/onTrigger'}
    _rootschema = Root._schema

    def __init__(self, *args):
        super(onTrigger, self).__init__(*args)


class onMarkTrigger(VegaSchema):
    """onMarkTrigger schema wrapper

    List(Mapping(required=[trigger]))
    """
github altair-viz / altair / altair / vega / v4 / schema / core.py View on Github external
steps : anyOf(float, :class:`signal`)

    as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)

    """
    _schema = {'$ref': '#/defs/densityTransform'}
    _rootschema = Root._schema

    def __init__(self, type=Undefined, distribution=Undefined, extent=Undefined, method=Undefined,
                 signal=Undefined, steps=Undefined, **kwds):
        super(densityTransform, self).__init__(type=type, distribution=distribution, extent=extent,
                                               method=method, signal=signal, steps=steps, **kwds)


class extentTransform(VegaSchema):
    """extentTransform schema wrapper

    Mapping(required=[type, field])

    Attributes
    ----------

    field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)

    type : enum('extent')

    signal : string

    """
    _schema = {'$ref': '#/defs/extentTransform'}
    _rootschema = Root._schema
github altair-viz / altair / altair / vega / v4 / schema / core.py View on Github external
super(facet, self).__init__(facet=facet, data=data, **kwds)


class markclip(VegaSchema):
    """markclip schema wrapper

    oneOf(:class:`booleanOrSignal`, Mapping(required=[path]), Mapping(required=[sphere]))
    """
    _schema = {'$ref': '#/refs/markclip'}
    _rootschema = Root._schema

    def __init__(self, *args, **kwds):
        super(markclip, self).__init__(*args, **kwds)


class style(VegaSchema):
    """style schema wrapper

    oneOf(string, List(string))
    """
    _schema = {'$ref': '#/refs/style'}
    _rootschema = Root._schema

    def __init__(self, *args, **kwds):
        super(style, self).__init__(*args, **kwds)


class marktype(VegaSchema):
    """marktype schema wrapper

    string
    """
github altair-viz / altair / altair / vega / v4 / schema / core.py View on Github external
_schema = load_schema()
    _rootschema = _schema

    def __init__(self, autosize=Undefined, axes=Undefined, background=Undefined, config=Undefined,
                 data=Undefined, description=Undefined, encode=Undefined, height=Undefined,
                 layout=Undefined, legends=Undefined, marks=Undefined, padding=Undefined,
                 projections=Undefined, scales=Undefined, signals=Undefined, title=Undefined,
                 usermeta=Undefined, width=Undefined, **kwds):
        super(Root, self).__init__(autosize=autosize, axes=axes, background=background, config=config,
                                   data=data, description=description, encode=encode, height=height,
                                   layout=layout, legends=legends, marks=marks, padding=padding,
                                   projections=projections, scales=scales, signals=signals, title=title,
                                   usermeta=usermeta, width=width, **kwds)


class autosize(VegaSchema):
    """autosize schema wrapper

    oneOf(enum('pad', 'fit', 'fit-x', 'fit-y', 'none'), Mapping(required=[type]))
    """
    _schema = {'$ref': '#/defs/autosize'}
    _rootschema = Root._schema

    def __init__(self, *args, **kwds):
        super(autosize, self).__init__(*args, **kwds)


class axis(VegaSchema):
    """axis schema wrapper

    Mapping(required=[orient, scale])
github altair-viz / altair / altair / vega / v4 / schema / core.py View on Github external
super(style, self).__init__(*args, **kwds)


class marktype(VegaSchema):
    """marktype schema wrapper

    string
    """
    _schema = {'$ref': '#/refs/marktype'}
    _rootschema = Root._schema

    def __init__(self, *args):
        super(marktype, self).__init__(*args)


class sortOrder(VegaSchema):
    """sortOrder schema wrapper

    oneOf(enum('ascending', 'descending'), :class:`signal`)
    """
    _schema = {'$ref': '#/refs/sortOrder'}
    _rootschema = Root._schema

    def __init__(self, *args, **kwds):
        super(sortOrder, self).__init__(*args, **kwds)


class scaleField(VegaSchema):
    """scaleField schema wrapper

    oneOf(string, :class:`signal`)
    """
github altair-viz / altair / altair / vega / v4 / schema / core.py View on Github external
type : enum('fold')

    signal : string

    as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)

    """
    _schema = {'$ref': '#/defs/foldTransform'}
    _rootschema = Root._schema

    def __init__(self, fields=Undefined, type=Undefined, signal=Undefined, **kwds):
        super(foldTransform, self).__init__(fields=fields, type=type, signal=signal, **kwds)


class formulaTransform(VegaSchema):
    """formulaTransform schema wrapper

    Mapping(required=[type, expr, as])

    Attributes
    ----------

    expr : :class:`exprString`

    type : enum('formula')

    initonly : anyOf(boolean, :class:`signal`)

    signal : string

    as : anyOf(string, :class:`signal`)
github altair-viz / altair / altair / vega / v4 / schema / core.py View on Github external
oneOf(List(allOf(:class:`rule`, allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
    Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
    Mapping(required=[scale, value]), Mapping(required=[scale, band]),
    Mapping(required=[offset]))))), allOf(:class:`stringModifiers`, anyOf(oneOf(:class:`signal`,
    Mapping(required=[value]), Mapping(required=[field]), Mapping(required=[range])),
    Mapping(required=[scale, value]), Mapping(required=[scale, band]),
    Mapping(required=[offset]))))
    """
    _schema = {'$ref': '#/refs/orientValue'}
    _rootschema = Root._schema

    def __init__(self, *args, **kwds):
        super(orientValue, self).__init__(*args, **kwds)


class colorRGB(VegaSchema):
    """colorRGB schema wrapper

    Mapping(required=[r, g, b])

    Attributes
    ----------

    b : :class:`numberValue`

    g : :class:`numberValue`

    r : :class:`numberValue`

    """
    _schema = {'$ref': '#/refs/colorRGB'}
    _rootschema = Root._schema
github altair-viz / altair / altair / vega / v4 / schema / core.py View on Github external
type : enum('geopoint')

    signal : string

    as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)

    """
    _schema = {'$ref': '#/defs/geopointTransform'}
    _rootschema = Root._schema

    def __init__(self, fields=Undefined, projection=Undefined, type=Undefined, signal=Undefined, **kwds):
        super(geopointTransform, self).__init__(fields=fields, projection=projection, type=type,
                                                signal=signal, **kwds)


class geoshapeTransform(VegaSchema):
    """geoshapeTransform schema wrapper

    Mapping(required=[type])

    Attributes
    ----------

    type : enum('geoshape')

    field : oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)

    pointRadius : anyOf(float, :class:`signal`, :class:`expr`, :class:`paramField`)

    projection : string

    signal : string
github altair-viz / altair / altair / vega / v4 / schema / core.py View on Github external
size : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`)

    as : anyOf(string, :class:`signal`)

    """
    _schema = {'$ref': '#/defs/voronoiTransform'}
    _rootschema = Root._schema

    def __init__(self, type=Undefined, x=Undefined, y=Undefined, extent=Undefined, signal=Undefined,
                 size=Undefined, **kwds):
        super(voronoiTransform, self).__init__(type=type, x=x, y=y, extent=extent, signal=signal,
                                               size=size, **kwds)


class wordcloudTransform(VegaSchema):
    """wordcloudTransform schema wrapper

    Mapping(required=[type])

    Attributes
    ----------

    type : enum('wordcloud')

    font : anyOf(string, :class:`signal`, :class:`expr`, :class:`paramField`)

    fontSize : anyOf(float, :class:`signal`, :class:`expr`, :class:`paramField`)

    fontSizeRange : oneOf(List(anyOf(float, :class:`signal`)), :class:`signal`, None)

    fontStyle : anyOf(string, :class:`signal`, :class:`expr`, :class:`paramField`)
github altair-viz / altair / altair / vega / v4 / schema / core.py View on Github external
type : enum('flatten')

    signal : string

    as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)

    """
    _schema = {'$ref': '#/defs/flattenTransform'}
    _rootschema = Root._schema

    def __init__(self, fields=Undefined, type=Undefined, signal=Undefined, **kwds):
        super(flattenTransform, self).__init__(fields=fields, type=type, signal=signal, **kwds)


class foldTransform(VegaSchema):
    """foldTransform schema wrapper

    Mapping(required=[type, fields])

    Attributes
    ----------

    fields : oneOf(List(oneOf(:class:`scaleField`, :class:`paramField`, :class:`expr`)),
    :class:`signal`)

    type : enum('fold')

    signal : string

    as : oneOf(List(anyOf(string, :class:`signal`)), :class:`signal`)