Skip to content
EliteChart

drawCompareLegendRow

Documentation


Documentation / @elitechart/core / drawCompareLegendRow

code
function drawCompareLegendRow(
   paint, 
   vp, 
   label, 
   value, 
   color, 
   slotIndex, 
   style?): void;

Defined in: renderer/ohlcv-legend.ts:118

Render one compare-series legend row below the primary OHLCV strip. Used by the chart when a compare series is active and the crosshair hovers. slotIndex is the 0-based position below the primary row; the chart increments it per compare series so rows stack vertically without overlapping.

Parameters

paint

Paint

vp

Viewport

label

string

value

number

color

string

slotIndex

number

style?

OhlcvLegendStyle = DEFAULT_OHLCV_LEGEND_STYLE

Returns

void

Example

code
import { drawCompareLegendRow } from '@elitechart/core';
drawCompareLegendRow(paint, viewport, 'ETH', 3_200, '#ff8a00', 0);