Skip to content
EliteChart

drawAxisAnnotation

Documentation


Documentation / @elitechart/core / drawAxisAnnotation

code
function drawAxisAnnotation(
   paint, 
   vp, 
   annotation, 
   style?): void;

Defined in: renderer/axis-annotation.ts:122

Paint one annotation pill on the right price gutter. No-op when the annotation's price is outside the viewport's visible price window (clamped to the plot edge to match the canonical last-price-pill behaviour).

Parameters

paint

Paint

vp

Viewport

annotation

AxisAnnotation

style?

AxisAnnotationStyle = DEFAULT_AXIS_ANNOTATION_STYLE

Returns

void

Example

code
import { drawAxisAnnotation, asPrice } from '@elitechart/core';
drawAxisAnnotation(paint, viewport, {
  id: 'a', price: asPrice(67_500), label: '67500',
});