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

Parameters:
Name Type Description
config object

Config for renderer

Properties
Name Type Argument Description
params object <optional>

Parameters to control the renderer itself

Properties
Name Type Argument Default Description
useChartLegend boolean <optional>
false

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>
"close"

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.

Since:
  • 5.1.1, creates only Bar type charts
Example
// Colored bar chart
		var renderer=stxx.setSeriesRenderer(new CIQ.Renderer.Bars({params:{name:"bars", colored:true}}));