inner rungs display

This commit is contained in:
Tim
2024-04-13 14:02:42 -04:00
parent 7352646a9f
commit 2fa5f23e07
3 changed files with 51 additions and 23 deletions

View File

@@ -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)