Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
You are right. Right now annotations option doesn't work when chart type is Timeline. There's no information when ApexCharts js will support this so the roadmap for Timeline annotations is unclear.
I think there might be an alternative solution that is using patterned bar chart with annotations:
https://www.koolreport.com/examples/reports/apexcharts/bar/patterned/
You can use transparent/white patterns for some ranges to make the bars look like timeline. It's not perfect but could substitute timeline in some cases.
I found this >>
https://codepen.io/jenniarg21/pen/abyqwMN
It shows that annotations are working on apexcharts timeline somehow.. They added an indication for a day (today) which is exactly what i want to do. What do you think?
You could probably add an annotation to a TimeLineChart with datetime xaxis like this:
"options" => [
"annotations" => [
"xaxis" => [[
"x" => strtotime('2019-03-05') * 1000, // use unix time * 1000 here instead of a datetime string
Let us know how this works for your case.
Wow it works! I had tried almost the same, but my mistake was that i used just a number instead of strtotime function.
Now i tried this, just perfect:
'annotations' => [
'xaxis' => [
[
'x' => strtotime('2024-03-07') * 1000,
'strokeDashArray' => 1,
'borderColor' => '#775DD0',
'label' => [
'borderColor' => '#775DD0',
'style' => [
'color' => '#fff',
'background' => '#775DD0'
],
'text' => 'TODAY'
]
], ]],
Now i have to find how to add url links..
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo