'Show current date on apexchart rangeBar

I have a rangeBar apexchart chart. When I zoom in I can see the bars for specific time, but I want to know in which date this time is on. Currently when I am zooming in to on day range it's imposible to know in which day I am currently on.

enter image description here



Solution 1:[1]

You could display your date as an annotation on your x or y axis.

Here is how you could do it in your chart options (on the x axis so displayed vertically on your chart) :

annotations: {
                xaxis: [
                    {
                        x: new Date().getTime(),
                        borderColor: '#00E396',
                        label: {
                            borderColor: '#00E396',
                            style: {
                                color: '#fff',
                                background: '#00E396'
                            },
                            text: "Today"
                        }
                    }
                ]
            }

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 rak007