Skip to content

Overlays

Customize drawing tool appearance — trend lines, rectangles, fibonacci retracements, and more.

← Back to Custom Styles overview

Copy the property path into your setCustomStyles config. You only need to include the values you want to change.

PropertyDescriptionTypeExample
overlay.point.colorColor of drawing anchor pointscolor'#1677FF'
overlay.point.radiusSize of drawing anchor pointsnumber5
overlay.point.borderColorBorder around anchor pointscolor'rgba(22, 119, 255, 0.35)'
overlay.point.activeColorColor when a point is selectedcolor'#1677FF'
overlay.point.activeRadiusSize when a point is selectednumber5
overlay.line.colorColor of drawn linescolor'#1677FF'
overlay.line.sizeThickness of drawn linesnumber1
overlay.line.smoothSmooth/curve drawn linesbooleanfalse
overlay.line.styleLine style (solid or dashed)'dashed' | 'solid''solid'
overlay.rect.colorFill color of rectanglescolor'rgba(22, 119, 255, 0.25)'
overlay.rect.borderColorBorder color of rectanglescolor'#1677FF'
overlay.rect.borderSizeBorder thickness of rectanglesnumber1
overlay.rect.borderRadiusCorner roundness of rectanglesnumber0
overlay.polygon.colorFill color of polygonscolor'#1677FF'
overlay.circle.colorFill color of circlescolor'rgba(22, 119, 255, 0.25)'
overlay.text.colorText color on drawing labelscolor'#FFFFFF'
overlay.text.sizeFont size on drawing labelsnumber12
overlay.text.backgroundColorBackground of drawing labelscolor'#1677FF'

Example

typescript
chart.setCustomStyles({
  global: {
    overlay: {
      line: { color: '#E11D74', size: 2 },
      rect: { color: 'rgba(225, 29, 116, 0.2)', borderColor: '#E11D74' },
    },
  },
})

Developers who need full TypeScript interfaces can use the type reference.