How do I create an href in forge charts?

Deepti Nair
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 3, 2025

I want to add URL to forge components such as Pie charts & Bar charts.

 

How do I do it?

Thanks,

Deepti

1 answer

0 votes
Akash Singh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 3, 2025

@Deepti Nair Could you please confirm if you are using UI Kit or Custom UI in your Forge app? Also, if are you looking to add anchor tags or links to another page?

Deepti Nair
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 3, 2025

Hi Ankit, 

I am using UI Kit, and wish to add anchor tags to bar charts and pie charts

Deepti Nair
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 3, 2025

essentially I want to navigate to the respective jira issues when they click on the charts

Akash Singh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2025

Hi @Deepti Nair 

I believe you're looking to add hyperlinks to chart elements (such as the legend or segments) so users can navigate directly to Jira issues when clicking on them. Unfortunately, the Chart components in Forge UI Kit are still in EAP and do not natively support this functionality.

A workaround is to use the Link component separately and position it over the chart using XCSS to create a clickable effect. However, this approach might be tricky in terms of alignment and responsiveness.

For better customization and interactivity, you might consider switching to Custom UI and integrating a charting library like Recharts or Chart.js. This would allow you to handle click events directly on chart elements and dynamically link them to Jira issues.

Hope this helps!

Deepti Nair
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 6, 2025

I am trying to go with the option of Custom UI.

When I try to call my jira api within the deployed Gadget. I am getting the following error. 

Refused to connect to <domain/rest/api/3/search/jql>because it violates the document's Content Security Policy.

The domain we are hitting to receive Jira tickets is the same domain wherein the Custom UI App is deployed.

Could you please advice - what is missing.

 

Permissions are as follows within the manifest file.

permissions:

content:
styles:
- unsafe-inline
scopes:
- read:jira-work

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events