# Annotations query results for custom plugin

**URL:** <https://community.grafana.com/t/annotations-query-results-for-custom-plugin/117509>\
**Category:** Grafana Plugin Development\
**Tags:** annotation, alerting\
**Created:** [March 21, 2024, 7:04am UTC](https://community.grafana.com/t/annotations-query-results-for-custom-plugin/117509 "2024-03-21T07:04:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaduga](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/vaduga/32/57313_2.png) [@vaduga](https://community.grafana.com/u/vaduga)\
**Post date:** [March 21, 2024, 7:04am UTC](https://community.grafana.com/t/annotations-query-results-for-custom-plugin/117509/1 "2024-03-21T07:04:26Z")

</div>

hi,  
the only panels that are able to visualize annotations are times series , graph and candlestick.  
However, I’d like to use results of annotations query (configured in the dashboard settings, applying dashboard variables) in my custom plugin .  
The problem is that ‘annotations’ array in the ‘data’ object passed to my panel plugin is always empty.

Where can I find the place in grafana’s code where it prevents annotations from being passed to any other viz but times-series?  
Is there a workaround to get annotation query results in custom plugin?

---

<div class="post-metadata">

**Author:** ![mikhailvolkov](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/mikhailvolkov/32/41625_2.png) [@mikhailvolkov](https://community.grafana.com/u/mikhailvolkov)\
**Post date:** [March 21, 2024, 1:04pm UTC](https://community.grafana.com/t/annotations-query-results-for-custom-plugin/117509/2 "2024-03-21T13:04:18Z")

</div>

@vaduga You need to add data support in the `module.ts`:

```auto
.setDataSupport({
    annotations: true,
    alertStates: true,
  });

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/grafana/original/2X/e/ef5308cc58c9e5a13187b5012eb99f406928462f.png) [@system](https://community.grafana.com/u/system)\
**Post date:** [March 21, 2025, 1:04pm UTC](https://community.grafana.com/t/annotations-query-results-for-custom-plugin/117509/3 "2025-03-21T13:04:56Z")

</div>

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
