function updatePropertiesBySelectedAnnotation(thickness, dash) {
  const annotation = chart.annotations().getSelectedAnnotation();
  if (annotation === null) return;

  // get annotation stroke settings
  const color = annotation.getType() === 'label' ?
    annotation.background().stroke().color :
    annotation.stroke().color;
  switch (dash) {
    case 'solid':
      dash = null;
      break;
    case 'dotted':
      dash = `${thickness} ${thickness}`;
      break;
    case 'dashed':
      dash = '10 5';
      break;
  }
  const settings = {
    thickness,
    color,
    dash
  };

  setAnnotationStrokeSettings(annotation, settings);
}
/**
 * update annotation stroke settings
 * @param {number} thickness stroke thickness
 * @param {string} dash stroke dash
 */
update annotation stroke settings
@param {number} thickness stroke thickness
@param {string} dash stroke dash
update annotation stroke settings @param { number } thickness stroke thickness @param { string } dash stroke dash
function updatePropertiesBySelectedAnnotation(thickness, dash) {
  const annotation = chart.annotations().getSelectedAnnotation();
  if (annotation === null) return;
  const color = annotation.getType() === 'label' ?
    annotation.background().stroke().color :
    annotation.stroke().color;
  switch (dash) {
    case 'solid':
      dash = null;
      break;
    case 'dotted':
      dash = `${thickness} ${thickness}`;
      break;
    case 'dashed':
      dash = '10 5';
      break;
  }
  const settings = {
    thickness,
    color,
    dash
  };
  setAnnotationStrokeSettings(annotation, settings);
}
function updatePropertiesBySelectedAnnotation ( thickness , dash ) { const annotation = chart . annotations ( ) . getSelectedAnnotation ( ) ; if ( annotation === null ) return ; const color = annotation . getType ( ) === 'label' ? annotation . background ( ) . stroke ( ) . color : annotation . stroke ( ) . color ; switch ( dash ) { case 'solid' : dash = null ; break ; case 'dotted' : dash = ` ${ thickness } ${ thickness } ` ; break ; case 'dashed' : dash = '10 5' ; break ; } const settings = { thickness , color , dash } ; setAnnotationStrokeSettings ( annotation , settings ) ; }
update annotation stroke settings
 @param {number} thickness stroke thickness
 @param {string} dash stroke dash
update annotation stroke settings @param { number } thickness stroke thickness @param { string } dash stroke dash
// get annotation stroke settings