inner rungs display
This commit is contained in:
@@ -136,12 +136,18 @@ export function createShape(shapeType, points, options={}, ...callbacks) {
|
||||
options.shape = shapeType.code
|
||||
// programatically adds a shape to the chart
|
||||
let shapeId
|
||||
if( points.time || points.price )
|
||||
shapeId = chart.createShape(points, options)
|
||||
else if( points.length === 1 )
|
||||
shapeId = chart.createShape(points[0], options)
|
||||
else
|
||||
shapeId = chart.createMultipointShape(points, options)
|
||||
try {
|
||||
if (points.time || points.price)
|
||||
shapeId = chart.createShape(points, options)
|
||||
else if (points.length === 1)
|
||||
shapeId = chart.createShape(points[0], options)
|
||||
else
|
||||
shapeId = chart.createMultipointShape(points, options)
|
||||
}
|
||||
catch (e) {
|
||||
console.error('Could not create shape', shapeType, points, options, e)
|
||||
return null
|
||||
}
|
||||
if( callbacks.length )
|
||||
shapeCallbacks[shapeId] = callbacks
|
||||
// console.log(`created ${shapeType.name}`, shapeId)
|
||||
|
||||
Reference in New Issue
Block a user