Skip to main content

GeoAnalytics

Discussion Board for collaboration regarding Qlik GeoAnalytics.

cancel
Showing results for 
Search instead for 
Did you mean: 
Quinn
Partner - Contributor II
Partner - Contributor II

Qlik Sense Map Chart's marker size based on screen resolution

Hi,

Sorry about my low knowdelge about QLik Sense Map graphs, but I have a little trouble with point layer markers; it's known that point markers size is managed by zoom and may be changed if users adds an expression on "Size and shape" submenu in layer's properties. But what if I want a fixed size based on zoom level/resolution? Is there any way to get one of those variables into expression editor to set a fixed size for those markers when they scale up/down mapsides?

Thank you

Labels (2)
1 Solution

Accepted Solutions
Andrei_Cusnir
Support
Support

Hello,

 

Thanks for elaborating in detail to your use case scenario. I am not sure how you can force an extension to load before a certain event, because the engine takes care of all the events and the resource loading. Therefore, interfering with this is most probably not possible and I would say, it is not suggested at all. It might cause other issue during the process that might crush your app or even corrupt it.

 

However, if you do build an extension, then you can just update the public variable and it shouldn't matter when the variables get updated, because the Map chart will adjust based on the value. So if the initial value is 10 and when your custom extension is loaded, it will become 30 then (ideally) Map chart will update the size of the marker to the new variable's value. 

 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂

View solution in original post

5 Replies
Andrei_Cusnir
Support
Support

Hello,

 

For the moment there are not any functions in Qlik Sense that will return the screen resolution, so you could change the size of the points based on the value. Also by default the size of the markers doesn't change when you zoom:

 

Workaround 1:

1. Create a new variable:

 

2. The definition value should be the size of the bubble that you want to have

 

3. Create a new Variable input and use the following configurations:

  • Appearance > Variable > Name: varScreenResolution
  • Appearance > Variable > Shown as: Drop down
  • Appearance > Values> Fixed or dynamic values: Dynamic
  • Appearance > Values> Dynamic values: ='20~720 × 480|500~1920 × 1080'
  • Use the screen resolution label and a value for the bubble

4. In Map chart:

  • Layers > Field > Size by: $(varScreenResolution)
  • Layers > Field > Range: Custom
  • Layers > Field > Minimum size value: 10
  • Layers > Field > Maximum size value: 100

 

Outcome is:

 

Workaround 2:

  • You can try creating a custom extension [1]
  • Use the code "window.innerWidth and window.innerHeight" or other code to get the size
  • Save this value in a variable
  • I haven't implemented a similar solution, but I feel confident that if you try testing things out, you might be able to achieve the desired outcome.

 

I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, addressed your concerns or at least pointed you in the right direction, please mark it as Accepted Solution to give further visibility to other community members. 
 

---

[1] https://help.qlik.com/en-US/sense-developer/November2020/Subsystems/Extensions/Content/Sense_Extensi...

Help users find answers! Don't forget to mark a solution that worked for you! 🙂
Quinn
Partner - Contributor II
Partner - Contributor II
Author

Hi!

Thanks for the reply, but sadly I had forgot to say this dashboard that i'm developing must be hands-free from users (it's displayed onto a giant window and it must display all information without modifying any parameter, it's all dynamic).

So, first solution doesn't fit my scenario; on the other hand, I already had taken some ideas for developing a custom extension to archieve this, but the problem is: how I can tell a custom extension to load before the dashboard with 1-N frame(s) (wich be considered by the custom extension as arrayList to get all width-height vars) with maps and get those variables init & loaded before map frames loads? This would be a possible solution to this kind

Very pleased about your info and reply,

Andrei_Cusnir
Support
Support

Hello,

 

Thanks for elaborating in detail to your use case scenario. I am not sure how you can force an extension to load before a certain event, because the engine takes care of all the events and the resource loading. Therefore, interfering with this is most probably not possible and I would say, it is not suggested at all. It might cause other issue during the process that might crush your app or even corrupt it.

 

However, if you do build an extension, then you can just update the public variable and it shouldn't matter when the variables get updated, because the Map chart will adjust based on the value. So if the initial value is 10 and when your custom extension is loaded, it will become 30 then (ideally) Map chart will update the size of the marker to the new variable's value. 

 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂
Quinn
Partner - Contributor II
Partner - Contributor II
Author

Hello,

That's what I though from first time... anyway, i'ts even marked to be any update about reaching this from internal development?

Thanks for your attention,

Andrei_Cusnir
Support
Support

Hello,

 

I am not 100% sure, that I understood the last request completely. However, you can submit a feature request [1], if you have some suggestions to bring up to the RnD's attention and any further updates/responses will be shared there, regarding the process. 

 

I hope that this information is helpful. 

---

[1] https://community.qlik.com/t5/Knowledge-Base/How-To-Submit-Feature-Requests-For-Qlik-Products/ta-p/1...

Help users find answers! Don't forget to mark a solution that worked for you! 🙂