Class: Lines

STX.Renderer. Lines

new Lines(config)

Creates a Lines renderer

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

See STX.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
width number <optional>

Width of the rendered line

subtype string <optional>

Subtype of rendering: "step" or "none"

type string <optional>

Type of rendering "line", "mountain"

// create series for the renderer
stxx.addSeries("NOK", {display:"NOK",data:{useDefaultQuoteFeed:true},width:4});
stxx.addSeries("SNE", {display:"Sony",data:{useDefaultQuoteFeed:true},width:4});

// create the y axis to assign to the renderer
var axis=new STXChart.YAxis();

// create a renderer and associate it to the chart
renderer=stxx.setSeriesRenderer(new STX.Renderer.Lines({params:{name:"lines", type:"mountain", yAxis:axis}}));

// remove all series form the renderer (not always needed) , attach new series, and render.
	.attachSeries("NOK", "#FFBE00")
	.attachSeries("SNE", "#FF9300")
// This is an example on how completely remove a renderer and all associated data.
// This should only be necessary if you are also removing the chart itself.

// remove all series from the renderer including series data from the masterData

      		// detach the series renderer from the chart.

      		// delete the renderer itself.
      		delete renderer;