Skip to main content
Skip to main content

Custom drawing tool authoring

Most apps do not need this page

If you want to draw trend lines, levels, Fibonacci, or boxes, use the built-in tools. Start with Drawing tools recipes and the catalog.

This page is for library maintainers who need a shape that does not exist yet — for example a proprietary annotation type that must ship inside @efixdata/exeria-chart.

Two different meanings of “custom drawing tool”

PathWhoWhat you do
RecipesApp developersCall toolDrawer.drawTool({ type: "trendLine", … }) with an existing type
AuthoringPackage maintainersAdd a new type in chart source code

Maintainer workflow (high level)

  1. Copy the closest existing shape (for example trendLine.ts or hLine.ts) under packages/chart/src/objects/shapes/.
  2. Implement drawing, hit-testing, and drag handles.
  3. Register the new type in Renderer.ts.
  4. Add labels (and optional ChartUI menu entry) in DrawingTools.tsx.
  5. Document the new key in the drawing catalog.

Same boundary as Custom indicator authoring: app developers use built-in keys; new keys ship with the package or a licensed plugin.