I’ve got a chart with a couple of annotation points in it. One of these points is within the Y-axis range, but the other is not.
Is there a way to automatically have ApexCharts include every annotation within the rendering range so that all annotations are always visible at least?
This is what my chart looks like:
import ApexCharts from "apexcharts";
var options = {
chart: {
type: "line",
},
series: [
{
name: "sales",
data: [30, 40, 35, 50, 49, 60, 70, 91, 125],
},
],
xaxis: {
categories: [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999],
},
annotations: {
points: [
{
x: 1993,
y: 150,
marker: {
size: 4,
fillColor: "#f00",
strokeColor: "transparent",
},
},
{
x: 1996,
y: 50,
marker: {
size: 4,
fillColor: "#f00",
strokeColor: "transparent",
},
},
],
},
};
var chart = new ApexCharts(document.querySelector("#chart"), options);
chart.render();