API Reference

Class: Bars

CIQ.Renderer. Bars

new Bars(config)

Creates a Bars renderer, a derivation of the OHLC renderer.

Note: by default the renderer will display bars as underlays. As such, they will appear below any other studies or drawings.

The Bars renderer is used to create the following drawing types: bar, colored bar.

See CIQ.Renderer#construct for parameters required by all renderers

Name Type Description
config object

Config for renderer

Name Type Argument Description
params object <optional>

Parameters to control the renderer itself

Name Type Argument Default Description
useChartLegend boolean <optional>

Set to true to use the built in canvas legend renderer. See CIQ.ChartEngine.Chart#legendRenderer;

style string <optional>

Style name to use in lieu of defaults for the type

colored boolean <optional>

For bar or hlc, specifies using a condition or colorFunction to determine color

colorBasis string <optional>

Will compute color based on whether current close is higher or lower than previous close. Set to "open" to compute this off the open rather than yesterday's close.

colorFunction function <optional>

Override function (or string) used to determine color of bar. May be an actual function or a string name of the registered function (see CIQ.Renderer.registerColorFunction)

Common valid parameters for use by attachSeries.:
border_color - Color to use for uncolored bars.
border_color_up - Color to use for up bars.
border_color_down - Color to use for down bars.
border_color_even - Color to use for even bars.

  • 5.1.1, creates only Bar type charts

// Colored bar chart
var renderer = stxx.setSeriesRenderer(
	new CIQ.Renderer.Bars({ params: { name: "bars", colored: true } })