Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Google Api Heat map

Hi all,

I am using the latest google api to visualize a heat map with countries.

Although it seems that my expression calculations are correct, each number of observations do no map to the correct country.

Find my text box exp below:

='http://chart.googleapis.com/chart?'

      & 'chf=bg,s,a0c2ff'  /*Background color */

      & '&chs=460x320&cht=map:fixed=-75,-180,85,180' //Chart Size, Zoom Type and Boundary

      & '&chco=' & '808080'  /* Color for no dimension value */

      & ',' & $(vColorSelect) /*Color Gradient, from left to right - no measure value to highest measure value*/

      & '&chld=' & concat(DISTINCT [Origin Country Code], '|', fieldIndex('[Origin Country Code]', [Origin Country Code])) /*list of dimension value*/

      & '&chd=t:' & concat(ceil(100*aggr(sum($(vMeasureSelect))/max(TOTAL aggr(DISTINCT sum($(vMeasureSelect)), [Origin Country Code])), [Origin Country Code])), ',', [Origin Country Code])

      /*list of measure values for driving the intensity of color for each dimension member*/

Any ideas why is this happening??

1 Solution

Accepted Solutions
Not applicable
Author

I managed to resolve the issue on my own.

It all came down to the sorting of the HeatMap values. I added a new field in the script that corresponded to the sort of values. In that way the correct values were mapped to the countries.

Thanks anyway

View solution in original post

3 Replies
fkeuroglian
Partner - Master
Partner - Master

Please put an example attached

thank you

Not applicable
Author

Hi Fernando,

You can find a sample attached.

Not applicable
Author

I managed to resolve the issue on my own.

It all came down to the sorting of the HeatMap values. I added a new field in the script that corresponded to the sort of values. In that way the correct values were mapped to the countries.

Thanks anyway