Code: Select all
navigation: {
bindingsClassName: 'tools-container', // informs Stock Tools where to look for HTML elements for adding technical indicators, annotations etc.
annotationsOptions:{
events:{
add:function (){
console.log('in the add annotation event');
let chart = this.chart;
console.log('here is hte char,,',chart.annotations);
},
afterUpdate:function(){
//we cant use this since this one gets fired too many times.
//instead we need custom dialog to edit and then save/update
//console.log('here in the update chart...need to save this in database..',this.chart.annotations);
},
remove:function(){
console.log('here in the remove annotation event,.');
}
},
typeOptions: {
line: {
stroke: <user defined>
strokeWidth: chartOptions.annLineWidth
},
},
Thanks