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

GeoAnalytics | How to use images to plot on a graph Dynamically

Hello,

Love the power and flexibility Of GeoAnalytics !

But I have a request that I hope you can answer.

My goal is to to optain that map (simplify version, I am more about the logic behind it) :

AlexTheTRex_0-1624345578068.png

Raw data are :

YearShark Attack
2019110
2020200
202190

 

My goal is to have some flexibility to change the number of shark (but keeping the ratio) and  change gap between axis  So what I am looking for, if some trick exists to do it directly on the chart (in only one point layer), not on the script ? (with some repeat, pick,  valueloop, valuelist or I don't know extacly what magic trick)

For the moment I can do that with some table create in the script part and a point layer. (see below) But I am looking for a more flexible way.

Script:

AlexTheTRex_2-1624346090185.png

GeoMap:

AlexTheTRex_1-1624346039416.png

Hope there is something to do it 🙂

Best,

Alex

 

 

Labels (1)
1 Solution

Accepted Solutions
Patric_Nordstrom
Employee
Employee

The number of points depends on the dimension for the layer. So convert the indata to one entry per image, in this case each image represent 10 attacks by the following in the load script.

sharks:
load * Inline [
Shark Year,Shark Attack
2019,110
2020,200
2021,90
];

Let vNooR = NoOfRows('sharks');
For i = 0 to (vNooR-1)
	Let vYear = Peek('Shark Year', $(i), 'sharks');
    Let vNrOfAttacks = Peek('Shark Attack', $(i), 'sharks');
    shark_graph:
    load '$(vYear)-' & recno() as "Shark Point", '$(vYear)' as "Shark Year", recno() as "Shark Row" AutoGenerate (1*$(vNrOfAttacks)/10);
Next

 

I used a similar approach in "Parliament diagram" in https://community.qlik.com/t5/Documents/Top-10-Viz-tips-part-III-QlikWorld-2020/ta-p/1679607

Then add a point layer with Shark Point as dimension,  Location: Latitude [Shark Row] and Shark Year * 4 as Longitude. Base map "None" and User defined degrees as projection, modify the location to set offset and ratio.

Patric_Nordstrom_0-1625059488933.pngPatric_Nordstrom_1-1625059537790.png

 

 

 

Thanks,

Patric

View solution in original post

2 Replies
Patric_Nordstrom
Employee
Employee

The number of points depends on the dimension for the layer. So convert the indata to one entry per image, in this case each image represent 10 attacks by the following in the load script.

sharks:
load * Inline [
Shark Year,Shark Attack
2019,110
2020,200
2021,90
];

Let vNooR = NoOfRows('sharks');
For i = 0 to (vNooR-1)
	Let vYear = Peek('Shark Year', $(i), 'sharks');
    Let vNrOfAttacks = Peek('Shark Attack', $(i), 'sharks');
    shark_graph:
    load '$(vYear)-' & recno() as "Shark Point", '$(vYear)' as "Shark Year", recno() as "Shark Row" AutoGenerate (1*$(vNrOfAttacks)/10);
Next

 

I used a similar approach in "Parliament diagram" in https://community.qlik.com/t5/Documents/Top-10-Viz-tips-part-III-QlikWorld-2020/ta-p/1679607

Then add a point layer with Shark Point as dimension,  Location: Latitude [Shark Row] and Shark Year * 4 as Longitude. Base map "None" and User defined degrees as projection, modify the location to set offset and ratio.

Patric_Nordstrom_0-1625059488933.pngPatric_Nordstrom_1-1625059537790.png

 

 

 

Thanks,

Patric

AlexTheTRex
Contributor II
Contributor II
Author

Legendary anwser !

Thanks for the support. I start to really like Qlik for it's flexibility (coming from MS PowerBI)

Best,

Alex