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
|
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;