Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard concept #6

Open
timlinux opened this issue Nov 27, 2020 · 17 comments
Open

Dashboard concept #6

timlinux opened this issue Nov 27, 2020 · 17 comments

Comments

@timlinux
Copy link
Owner

dashboard-v2

GeoPackage if you want to try:

CasteloBranco.zip

@timlinux
Copy link
Owner Author

CasteloBranco.gpkg.zip

Version 2 with nicer implementation

Screenshot 2020-11-29 at 12 28 33

@pigreco
Copy link

pigreco commented Nov 29, 2020

create a virtual field (test) on the highways layer and populate it with is_selected ()

then use the following expression:

round(
aggregate( 
'highway',
'sum', 
round( length( transform( $geometry, 'EPSG:4326', 'EPSG:32629' ) ) / 1000 ),
filter:="test"='true'), 
1 )

image

@pigreco
Copy link

pigreco commented Nov 29, 2020

improved solution, use this expression:

if( num_selected('highway') > 0 ,round(
aggregate( 
'highway',
'sum', 
round( length( transform( $geometry, 'EPSG:4326', 'EPSG:32629' ) ) / 1000 ),
filter:="test"='true'), 
1 ),0)

CasteloBranco.gpkg.zip

@PedroVenancio
Copy link

Joining all ideas!

if( num_selected('highway') > 0, 
  round( 
    aggregate( 
      'highway', 
      'sum', 
      ( (length( transform( $geometry, 'EPSG:4326', 'EPSG:3857' ) ) / 1000) ), 
      filter:=is_selected('highway', $currentfeature ) 
    )
  , 1)
, 0)

@PedroVenancio
Copy link

imagem

CasteloBranco.zip

@timlinux
Copy link
Owner Author

Uploading image.png…

CasteloBranco.gpkg.zip

@mauriciomarquezgoa
Copy link

image

Muchas gracias!!! Espectacular!

@pigreco
Copy link

pigreco commented Nov 30, 2020

To have the dashboard in the mouse pointer:
use the @canvas_cursor_point variable in the geometry_generator field:

CasteloBranco.zip

@narceliodesa
Copy link

Very interesting, I think they could develop a new Decoration module called Dashboard. Where we could have the styling options linked to each panel. This frees us from the need to create a point file to assemble the dashboard graph.

Today in decorations the closest thing to that is the Title Label
Screenshot from 2020-11-30 17-41-39

@narceliodesa
Copy link

The bar above was made using the decorations.
It is as responsive as the points, but further customization is not possible.
dash

@timlinux
Copy link
Owner Author

timlinux commented Dec 1, 2020

Here is an update that uses a better positioning schema and increases the number of elements to cover a secondary layer for building.

image

CasteloBranco.gpkg.zip

@timlinux
Copy link
Owner Author

timlinux commented Dec 1, 2020

image

This update adds a new font column to the dashboard table and adds column icons. You need to first install the UN-OCHA glyph font icons for it to work. These are a free font available here: https://unhcr.github.io/Humanitarian-Font/

Latest GeoPackage containing all the logic for the above image is available here:

CasteloBranco.gpkg.zip

@timlinux
Copy link
Owner Author

timlinux commented Dec 2, 2020

Another update using @nyalldawson 's tip to use layer dependencies to automatically update the dashboard labels

CasteloBranco.zip

@timlinux
Copy link
Owner Author

timlinux commented Dec 7, 2020

Here is the GeoPackage we created while recording this YouTube video walkthrough:

https://youtu.be/lJTV90SvRAM

QGISDashboardWalkthrough-Badajoz.zip

@nazuk27
Copy link

nazuk27 commented Dec 8, 2020

Is it possible to publish these dashboards online using qgis2web plugin or any other web service with all the features (i.e. automatic dashboard update features) available online?

@beerockxs
Copy link

I've been trying to get something like this to work for my project. The problem is that the project CRS is not 4326, I need to use a projected CRS. The coordinates returned by point_n( @map_extent, 4 ) are those of the top left corner of the visible extent, in my projected CRS, but the label does not appear. Changing the project CRS to 4326 makes them appear, but shouldn't they also work in a projected CRS?

@beerockxs
Copy link

For anyone else having this issues: Projected CRSs work fine, what you need to make sure is that the layer your creating the labels on has the same CRS as your project CRS, then this works. This QGIS issue seems related: qgis#26660

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants