Add (or replace, by id) a compare series and attach its primitive. A
duplicate id swaps the series payload in place — the old primitive is
detached first so the chart never carries two lines for one symbol. The
host repaints via attachPrimitive.
Remove every compare series and detach all primitives.
The compare series currently overlaid, in insertion order (a copy).
Remove a compare series by id and detach its primitive. Returns true if a series with that id existed.
Update an existing series' points/color/normalization in place (matched by
id) and repaint. Returns true if the series existed. Cheaper than
remove+add — it reuses the attached primitive instead of detaching it.
C2 public entry point. Manages a set of CompareSeries overlaid on a chart, materializing each as a ComparePrimitive attached through the host's primitive framework. Constructed explicitly by the host (
new CompareController(chart)), which is precisely why compare mode adds nothing to the base bundle: the base chart never references this class.Usage:
All
'percentage'/'indexed'series share one self-scaling normalized Y axis (see CompareScale) so the lines are mutually comparable.