TauPaneOverlayConfig¶
Inherits: Resource
Inherited By: TauBarConfig, TauScatterConfig
Abstract class for overlay configurations rendered inside a pane.
Description¶
TauPaneOverlayConfig is the base class for overlay configuration objects placed in TauPaneConfig.overlays. It is never instantiated directly. The two concrete subclasses are TauBarConfig, which configures bar overlays, and TauScatterConfig, which configures scatter overlays.
Properties defined on TauPaneOverlayConfig apply to every overlay type. z_order controls the draw order of series within the overlay. hoverable controls whether samples in the overlay participate in hover hit testing. visual_callbacks attaches per-sample computed rendering properties. overlay_type identifies the overlay type and is set automatically by each concrete subclass at construction.
visual_callbacks provides a callback-driven way to override style properties per sample at draw time. This property can also be accessed through a typed accessor: TauBarConfig exposes bar_visual_callbacks and TauScatterConfig exposes scatter_visual_callbacks.
After TauPlot.plot_xy() succeeds, the plot holds a reference to every TauPaneOverlayConfig instance it received. Mutating a property at runtime is supported, but requires calling TauPlot.queue_refresh() to apply the change.
Example¶
# Create a BAR overlay
var bar := TauBarConfig.new()
bar.z_order = TauPaneOverlayConfig.ZOrder.SERIES_ORDER
bar.hoverable = false
var pane := TauPaneConfig.new()
pane.y_left_axis = TauAxisConfig.new()
pane.overlays = [bar]
Notes¶
-
overlay_typeis set by the subclass.TauBarConfigsets it toBARandTauScatterConfigsets it toSCATTERat construction. Do not assign this property manually. -
visual_callbacksis not serializable. The property is not exported and cannot be saved in a.tresresource file. Assign it at runtime only. Use the typed accessor on the concrete subclass (bar_visual_callbacksonTauBarConfig,scatter_visual_callbacksonTauScatterConfig).
Enums¶
ZOrder¶
Controls the order in which series are drawn within the overlay.
| Value | Meaning |
|---|---|
SERIES_ORDER |
Series are drawn in dataset order from index 0 to N-1. The last series in the dataset is drawn on top. |
REVERSE_SERIES_ORDER |
Series are drawn in reverse dataset order. The first series in the dataset is drawn on top. |
Properties¶
overlay_type¶
overlay_type: PaneOverlayType
The type of overlay this configuration instance describes. TauBarConfig sets it to BAR and TauScatterConfig sets it to SCATTER. Intended for lookup purposes only (see note 1).
z_order¶
z_order: ZOrder
The draw order for series within the overlay. Default is REVERSE_SERIES_ORDER.
Controls which series appears on top when markers or bars at the same X position overlap. SERIES_ORDER draws series from index 0 to N-1, placing the last series on top. REVERSE_SERIES_ORDER draws series from index N-1 down to 0, placing the first series on top.
visual_callbacks¶
visual_callbacks: VisualCallbacks
Per-sample visual callbacks attached to this overlay. Default is null.
hoverable¶
hoverable: bool
Controls whether samples in this overlay participate in hover hit testing. Default is true.
When false, the overlay is invisible to the hover system. No hover signals fire, no tooltip appears, and no highlight renders for any sample in this overlay.
Related Classes¶
TauPlotThe plot node. ConsumesTauPaneOverlayConfiginstances when building the plot.TauPaneConfigHolds the list of overlay configurations via itsoverlaysproperty.TauBarConfigConcrete subclass for bar overlays.TauScatterConfigConcrete subclass for scatter overlays.VisualCallbacksBase class for per-sample visual callbacks, assigned tovisual_callbacks.BarVisualCallbacksTyped callbacks for bar overlays, assigned throughTauBarConfig.bar_visual_callbacks.ScatterVisualCallbacksTyped callbacks for scatter overlays, assigned throughTauScatterConfig.scatter_visual_callbacks.TauXYStyleProvides the series color palette applied whenvisual_callbacksisnull.