Files

87 lines
2.0 KiB
Markdown

+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "DataLink"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++
## DataLink interface
Link configuration. The values may contain variables that need to be processed before showing the link to user.
TODO: &lt;<!-- -->T extends DataQuery<!-- -->&gt; is not strictly true for internal links as we do not need refId for example but all data source defined queries extend this so this is more for documentation.
<b>Signature</b>
```typescript
export interface DataLink<T extends DataQuery = any>
```
<b>Import</b>
```typescript
import { DataLink } from '@grafana/data';
```
<b>Properties</b>
| Property | Type | Description |
| --- | --- | --- |
| [internal](#internal-property) | <code>{</code><br/><code> query: T;</code><br/><code> datasourceUid: string;</code><br/><code> }</code> | |
| [onBuildUrl](#onbuildurl-property) | <code>(event: DataLinkClickEvent) =&gt; string</code> | |
| [onClick](#onclick-property) | <code>(event: DataLinkClickEvent) =&gt; void</code> | |
| [targetBlank](#targetblank-property) | <code>boolean</code> | |
| [title](#title-property) | <code>string</code> | |
| [url](#url-property) | <code>string</code> | |
### internal property
<b>Signature</b>
```typescript
internal?: {
query: T;
datasourceUid: string;
};
```
### onBuildUrl property
<b>Signature</b>
```typescript
onBuildUrl?: (event: DataLinkClickEvent) => string;
```
### onClick property
<b>Signature</b>
```typescript
onClick?: (event: DataLinkClickEvent) => void;
```
### targetBlank property
<b>Signature</b>
```typescript
targetBlank?: boolean;
```
### title property
<b>Signature</b>
```typescript
title: string;
```
### url property
<b>Signature</b>
```typescript
url: string;
```