Skip to content

Schema

ipyvizzu.schema

A module for storing the data schema.

ipyvizzu.schema.NAMED_SCHEMA: dict = {'type': 'array', 'items': {'type': 'object', 'properties': {'name': {'type': 'string'}, 'values': {'type': 'array', 'optional': True}, 'type': {'type': 'string', 'optional': True}, 'unit': {'type': 'string', 'optional': True}}, 'required': ['name']}} module-attribute

Store the schema of the series, dimensions and measures data types.

ipyvizzu.schema.RECORD_SCHEMA: dict = {'type': 'array', 'items': {'anyOf': [{'type': 'array'}, {'type': 'object'}]}} module-attribute

Store the schema of the records data type.

ipyvizzu.schema.DATA_SCHEMA: dict = {'type': 'object', 'oneOf': [{'properties': {'series': NAMED_SCHEMA, 'records': RECORD_SCHEMA, 'filter': {'optional': True}}, 'additionalProperties': False}, {'properties': {'dimensions': NAMED_SCHEMA, 'measures': NAMED_SCHEMA, 'filter': {'optional': True}}, 'additionalProperties': False, 'required': ['dimensions', 'measures']}]} module-attribute

Store the schema of the data animation.