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

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
width number <optional>

Width of the rendered line

subtype string <optional>
"none"

Subtype of rendering: "step" or "none"

type string <optional>
"line"

Type of rendering "line", "mountain"

Examples
// 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();
axis.position="left";
axis.textStyle="#FFBE00";

// 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.
renderer.removeAllSeries()
	.attachSeries("NOK", "#FFBE00")
	.attachSeries("SNE", "#FF9300")
	.ready();
// 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
      		renderer.removeAllSeries(true);

      		// detach the series renderer from the chart.
      		stxx.removeSeriesRenderer(renderer);

      		// delete the renderer itself.
      		delete renderer;