function drawAnnotations(annotations) {
  for (const annotation of annotations) {
    if (annotation) {
      let plotIndex = annotations.indexOf(annotation);
      chart.plot(plotIndex).annotations().fromJson(annotation);
    }
  }
}
/**
 * draw annotations using settings from app state
 * @param {Array} annotations array with annotations settings
 */
draw annotations using settings from app state
@param {Array} annotations array with annotations settings
draw annotations using settings from app state @param { Array } annotations array with annotations settings
function drawAnnotations(annotations) {
  for (const annotation of annotations) {
    if (annotation) {
      let plotIndex = annotations.indexOf(annotation);
      chart.plot(plotIndex).annotations().fromJson(annotation);
    }
  }
}
function drawAnnotations ( annotations ) { for ( const annotation of annotations ) { if ( annotation ) { let plotIndex = annotations . indexOf ( annotation ) ; chart . plot ( plotIndex ) . annotations ( ) . fromJson ( annotation ) ; } } }
draw annotations using settings from app state
 @param {Array} annotations array with annotations settings
draw annotations using settings from app state @param { Array } annotations array with annotations settings