3liz / lizmap-javascript-scripts

Scripts for Lizmap Web Client
Mozilla Public License 2.0
22 stars 42 forks source link

[Bug]: Possibility of displaying statistics based on entities of a layer (without using filter tool) #89

Closed mjmolivo closed 3 weeks ago

mjmolivo commented 3 weeks ago

What is the bug? (in English)

It is not really a bug about the scripts, I was wondering if there are any ways of showing graphs about one layer that would change depending on which polygon is being clicked on. For example, I need to display statistics on different water basins. My water basins are gathered in a single layer "basins". But when configuring the dataviz tool implemented in the Lizmap extension for QGIS, I can't find a way to make a graph based on each of my water basins. It is displaying statistics for the whole layer. Is there a way to filter graphs by using a JS script ? Thanks

Logs from the Javascript console

-

Versions, safeguards, check summary etc

Versions :

List of Lizmap Web Client modules :
* Version Lizmap Web Client 3.8 needed
List of safeguards :
* Mode : safe
* Allow parent folder : no
* Prevent other drive : yes
* Prevent PG service : yes
* Prevent PG Auth DB : yes
* Force PG user&pass : yes
* Prevent ECW : yes

Check Lizmap plugin

Browsers

Firefox

Browsers version

Firefox 131.0.3

Gustry commented 3 weeks ago

Like the Cats demo project ? https://demo.lizmap.com/lizmap/index.php/view/map?repository=features&project=cats

mjmolivo commented 3 weeks ago

Yes exactly, is the atlas tool required to solve my problem ?

Gustry commented 3 weeks ago

No at all, the "Lizmap atlas" is not linked. Please download the demo and look.

It exactly the topic of the video tutorial : https://docs.lizmap.com/current/en/publish/lizmap_plugin/dataviz.html#video-tutorial

mjmolivo commented 3 weeks ago

Thank you very much