Class: Renderer

Renderer

Base class for a Renderer. Renderers are classes which process data and render them on the chart. The classes implementing the renderers can be found in js/modules/renderers. There is a one-to-one relationship between a symbol and a renderer. There must be data loaded into the chart in order for a renderer to display it, but the renderer can be created before the data is added. It is only necessary to include renderers for chart types you wish to support; however, some renderers require others to run so they may import renderers you have not set up in the configuration. It is possible to create your own renderers though it is beyond this documentation to describe how to do so at the present time.

Since:
  • 9.4.0

Type Definitions


DirectionalRendererTheme

Describes color treatment for a renderer's plot when it is different for each direction. Not all properties are applicable to all plot types.

Type:
  • object
Properties:
Name Type Argument Description
color string <optional>

Color of line or candle.

wick string <optional>

Color of candle wick.

border string <optional>

Color of candle border.

hollow string <optional>

Color of hollow area in hollow candle.

baseColor string <optional>

Color of base of gradient in baseline chart.

borderColor string <optional>

Color of edge of baseline chart.

width string <optional>

Width of candle.

Since:
  • 9.4.0


RendererConfig

Configuration for renderers support. The keys for this mapping will match the file names of the renderer modules, but may be capitalized.

Type:
Since:
  • 9.4.0


RendererParameters

Parameters needed to define how a plot is to be drawn on the chart.

Type:
  • object
Properties:
Name Type Argument Description
yAxis YAxis <optional>

If the plot should appear on its own y-axis, specify it here.

colorFunction ColorFunction <optional>

Specify color of plot under certain conditions.

Since:
  • 9.4.0


SingleRendererConfig

Configuration for a single renderer.

Type:
Properties:
Name Type Argument Description
tension number <optional>

Certain line renderers support splining. This property sets the splining constant. If not provided, will use the tension parameter from the chart section.

extendLastTick boolean <optional>

For line chart, if set to true, will complete the line drawing to the end of the bar's area.

label boolean <optional>

Set to display a label on the y axis for this plot type.

size number <optional>

Size of vertex or scatter dot.

baseColor string <optional>

Base color of baseline/mountain chart.

color string <optional>
<nullable>

Color of line.

borderColor string <optional>

Edge color of mountain/baseline.

width string <optional>

Width of candle.

pattern string | Array.<number> <optional>

Pattern of line for plot types that draw lines.

vertex object <optional>

If present, will draw a point at each vertex.

Properties
Name Type Argument Description
color string <optional>

Color of point.

width string | number <optional>

Width of point (diameter).

up DirectionalRendererTheme <optional>

Treatment when colored bar is considered to be "up".

down DirectionalRendererTheme <optional>

Treatment when colored bar is considered to be "down".

even DirectionalRendererTheme <optional>

Treatment when colored bar is considered to be "even".

bar DirectionalRendererTheme <optional>

Treatment for a non-colored "bar" plot type.

Since:
  • 9.4.0 Introduced
  • 10.1.0 Renamed lineWidth to size.