diff --git a/src/charts/chart.js b/src/charts/chart.js index cc5a1f1..7a43b08 100644 --- a/src/charts/chart.js +++ b/src/charts/chart.js @@ -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) diff --git a/src/components/chart/ChartPlaceOrder.vue b/src/components/chart/ChartPlaceOrder.vue index 5dc78f2..31c0414 100644 --- a/src/components/chart/ChartPlaceOrder.vue +++ b/src/components/chart/ChartPlaceOrder.vue @@ -6,7 +6,8 @@ :color="orderColor" v-if="co.orders.length>0" :disabled="!valid"> Place Dexorder - Reset + Reset