Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create an href in forge charts?

Deepti Nair 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
Community Champion
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 February 3, 2025

Hi Ankit, 

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

Deepti Nair February 3, 2025

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

Akash Singh
Community Champion
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 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
Akash Singh
Community Champion
February 16, 2025

@Deepti Nair You might find this discussion on the Atlassian Developer Community helpful: Unable to make API calls in Forge app. It provides insights into similar issues.

Additionally, I highly recommend joining the Atlassian Developer Community—it’s a great place to connect with other developers and get expert advice.

If you're making the API call from the frontend, you can use the requestJira function from @forge/bridge. You can find more details on its usage here: requestJira - Forge UI Bridge API.

If this answer helped you, please mark it as accepted to assist others facing the same issue. 🚀

Suggest an answer

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

Atlassian Community Events