Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Trouble whem embedding charts from Google Trends

Hi everyone,

I'm currently creating some dashboards on Confluence, but I'm having problems when embedding a chart.

I'm using Insert HTML macro. When I preview the chart, after copying and pasting the embed code, everything seems fine. However, when I preview/publish the page the charts are not working properly. (As you can see the images below)

 

1. Preview (working fine)


prev1.png

 

2. After publishing (only can see half of the chart)

prev2.png

 

Can you any help me with this issue?
Thanks

1 answer

I had similar problem when embedding the two pieces of javascripts.

My solution was merging two pieces of javascripts into one.

for example, when embedding the google tends such as

The above page consists of several pieces of javascripts. 

I wanted to embedding first two javascript for TimeSeries and Geomap as followings:

<script type="text/javascript" src="https://ssl.gstatic.com/trends_nrtr/2431_RC04/embed_loader.js"></script>

<script type="text/javascript">

trends.embed.renderExploreWidget("TIMESERIES", {"comparisonItem":[{"keyword":"electron js","geo":"","time":"2004-01-01 2021-04-22"}],"category":0,"property":""}, {"exploreQuery":"date=all&q=electron%20js","guestPath":"https://trends.google.co.kr:443/trends/embed/"});

</script>

and

 

<script type="text/javascript" src="https://ssl.gstatic.com/trends_nrtr/2431_RC04/embed_loader.js">

</script> <script type="text/javascript"> trends.embed.renderExploreWidget("GEO_MAP", {"comparisonItem":[{"keyword":"electron js","geo":"","time":"2004-01-01 2021-04-22"}],"category":0,"property":""}, {"exploreQuery":"date=all&q=electron%20js","guestPath":"https://trends.google.co.kr:443/trends/embed/"});

</script>


First try was use separate HTML macro per javascript. i.e. two HTML macros, The it rendered first one correctly but second one is not fully visible. 

 

Hence I tried to merge two piece of javascript codes into one as follows:

<script type="text/javascript" src="https://ssl.gstatic.com/trends_nrtr/2431_RC04/embed_loader.js"></script>




<script type="text/javascript">

trends.embed.renderExploreWidget("TIMESERIES", {"comparisonItem":[{"keyword":"electron js","geo":"","time":"2004-01-01 2021-04-22"}],"category":0,"property":""}, {"exploreQuery":"date=all&q=electron%20js","guestPath":"https://trends.google.co.kr:443/trends/embed/"});




trends.embed.renderExploreWidget("GEO_MAP", {"comparisonItem":[{"keyword":"electron js","geo":"","time":"2004-01-01 2021-04-22"}],"category":0,"property":""}, {"exploreQuery":"date=all&q=electron%20js","guestPath":"https://trends.google.co.kr:443/trends/embed/"});

</script>


and put it into one HTML macro. Then, finally the rendering displays both of two correctly.

 

May this trick help you.

 

Cheers.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

🥓🙅🏻‍♀️ Meet-less May Badge!

Hello Confluence Community!  What if i told you that you could have a healthier life and be 100% meet-less? This month, we're promoting a healthy, balanced work diet with Confluence. We la...

202 views 2 13
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you