Home > @i2analyze/notebook-sdk > visual > IBrushSetsManager > getColorForElement
visual.IBrushSetsManager.getColorForElement() method
Gets the CSS color string for a chart element based on the active brush sets.
Signature:
getColorForElement(elementId: ElementId): string | null;
Introduced: version 1.9
Parameters
| Parameter | Type | Description |
|---|---|---|
| elementId | ElementId | The identifier of the chart element. |
Returns:
string | null
The CSS color string for the element, or null if the element is not brushed.
Remarks
For elements that represent multiple records, this method uses the maximum brush index across all constituent records. Higher brush indices represent higher importance.
Color resolution uses a two-layer precedence system:
- System overlay brush sets (for example, Find-on-Chart) take precedence 2. Falls back to the active plug-in-owned brush set 3. Returns
nullif no constituent records are brushed in any active set.