Skip to content
EliteChart

drawAxisPlusButton

Documentation


Documentation / @elitechart/core / drawAxisPlusButton

code
function drawAxisPlusButton(
   paint, 
   bbox, 
   style?): void;

Defined in: renderer/axis-plus-button.ts:110

Render a round "+" badge at the given bbox. Call from your Cursor- layer paint pass after computeAxisPlusBbox returns non-null.

Parameters

paint

Paint

bbox

size

number

x

number

y

number

style?

AxisPlusButtonStyle = DEFAULT_AXIS_PLUS_BUTTON_STYLE

Returns

void

Example

code
import { drawAxisPlusButton, computeAxisPlusBbox } from '@elitechart/core';
const bbox = computeAxisPlusBbox(viewport, cursor);
if (bbox !== null) drawAxisPlusButton(paint, bbox);