Mi anotación no funciona cuando intento actualizar la versión de mi gráfico de vértice de v3.6.12 a v3.31.0
Solucioné el problema del ejemplo, pero no pude obtener ningún resultado, ya que aún obtiene los valores más altos correctamente.
¿Alguien puede decirme qué estoy haciendo mal?
A continuación se muestra mi fragmento de código que es responsable de la anotación
events: { mounted: function(ctx, config) { const highest1 = ctx.getHighestValueInSeries(0); const highest2 = ctx.getHighestValueInSeries(1); console.log(highest1) console.log(highest2) console.log(ctx) ctx.addPointAnnotation({ x: new Date(ctx.w.globals.seriesX[0][ctx.w.globals.series[0].indexOf(highest1)]).getTime(), y: highest1, label: { style: { cssClass: 'd-none' } }, customSVG: { SVG: '<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="#2196f3" stroke="#fff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-circle"><circle cx="12" cy="12" r="10"></circle></svg>', cssClass: undefined, offsetX: -8, offsetY: 5 } }) ctx.addPointAnnotation({ x: new Date(ctx.w.globals.seriesX[1][ctx.w.globals.series[1].indexOf(highest2)]).getTime(), y: highest2, label: { style: { cssClass: 'd-none' } }, customSVG: { SVG: '<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="#e7515a" stroke="#fff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-circle"><circle cx="12" cy="12" r="10"></circle></svg>', cssClass: undefined, offsetX: -8, offsetY: 5 } }) }, }Versión antigua (v3.6.12) Ejemplo
https://jsfiddle.net/54vfoarg/
Nueva versión (v3.31.0) Ejemplo
https://jsfiddle.net/6287uvc5/
Nota: - El creador de Apex Chart proporciona el método en StackOverflow