7.2.4.1. Module axivion.dashboard.visualization¶
Main Module of the Dashboard Visualization API.
See Visualization Framework on how to use this.
Classes¶
|
Defines a Visualization API Version |
Visualization writing context |
|
Represents the Visualization Framework used to create and execute the module. |
|
Base class to implement by modules of the visualization framework. |
VisualizationApiVersion¶
- class axivion.dashboard.visualization.VisualizationApiVersion(major, minor)¶
Bases:
objectDefines a Visualization API Version
Changes in the major version indicate incompatible API changes where scripts usually will need to be adjusted in order to target the newer version.
Changes in the minor version indicate pure API additions where you don’t need to adjust your module code and can still increase the target framework version.
The framework implementation is backwards compatible, which means that e.g. framework version 2.0 can run modules targeting 1.0 unless the supported minimum target framework version is explicitly lifted in the future.
- Version History:
- 1.0: (Axivion Suite 7.5.0)
Initial Version
- 1.1: (Axivion Suite 7.6.0)
Implementations of
VisualizationWritercan now specify aCacheConfig(a config objects which declares how to cache visualization artifacts among script invocations) by overridingVisualizationWriter.get_cache_config(). By default, this method returns None (None disables caching entirely).
- Parameters:
major (
int)minor (
int)
-
major:
int¶
-
minor:
int¶
VisualizationContext¶
VisualizationRunner¶
- class axivion.dashboard.visualization.VisualizationRunner¶
Bases:
ABCRepresents the Visualization Framework used to create and execute the module.
An instance of this class is passed in the factory method used for creating a module.
- abstract version()¶
Returns the Framework version which is the same as the Axivion Suite Version.
- Return type:
typing.Tuple[int,...]
VisualizationWriter¶
- class axivion.dashboard.visualization.VisualizationWriter¶
Bases:
WriterBase class to implement by modules of the visualization framework.
- abstract visualization_api_version()¶
The API version the module is programmed against.
You can find out the version of the API you are programming against by calling
get_current_visualization_api_version(). Note, that you should not simply callget_current_visualization_api_version()in thevisualization_api_version()implementation.
- get_cache_config()¶
Indicates whether and how to cache visualization artifacts created by this module.
If None, caching is disabled entirely. If not None, visualization artifacts are cached as specified by the returned configuration object. The default value is None—hence, caching is disabled by default. For the sake of performance (especially if there are many and long-running visualization scripts in the Dashboard), it is recommended to specify a cache configuration if possible.
- Return type:
typing.Optional[axivion.dashboard.visualization.cache_config.CacheConfig]
- abstract write_visualization(context)¶
Write the visualization.
- Parameters:
context (
axivion.dashboard.visualization.VisualizationContext)- Return type:
None
Functions¶
The current version of the visualization api |
get_current_visualization_api_version¶
- visualization.get_current_visualization_api_version()¶
The current version of the visualization api
Be sure to hard-code the API version you want to program against in your
VisualizationWriterimplementation like this:def visualization_api_version(self) -> VisualizationApiVersion: return VisualizationApiVersion(1, 1)
Also, read the documentation of
VisualizationApiVersionbefore increasing the target api version of your module.