Skip to content
Main Navigation Guide
Chart API
Instance API
ProPreviewCustomizeSponsor
9.x Docs
8.x Docs

🇬🇧 English

🇨🇳 简体中文

🇬🇧 English

🇨🇳 简体中文

Appearance

Sidebar Navigation

init

dispose

version

registerLocale

getSupportedLocales

registerStyles

registerFigure

getSupportedFigures

getFigureClass

registerIndicator

getSupportedIndicators

registerOverlay

getSupportedOverlays

registerXAxis

registerYAxis

utils

On this page

registerFigure(figure) ​

registerFigure used to custom figure.

Reference ​

typescript
(
  overlay: {
    name: string
    draw: (ctx: CanvasRenderingContext2D, attrs: any, styles: object) => void
    checkEventOn: (coordinate: Coordinate, attrs: any, styles: object) => boolean
  }
) => void

Parameters ​

  • figure Figure configuration.
    • name Name, unique identifier.
    • draw Drawing method.
    • checkEventOn Checks if the event is on a figure.

Returns ​

registerFigure returns undefined 。

Usage ​

Used in custom indicators ​

Used in custom overlays ​

Edit this page on GitHub

Last updated:

Pager
Previous pageregisterStyles
Next pagegetSupportedFigures

Released under the Apache License V2.

Copyright © 2018-2025 liihuu