arch-kiosk / arch-kiosk-office

💼 central place for collaboration
GNU Affero General Public License v3.0
1 stars 0 forks source link

Q&V Chart: limit number of categories #2770

Open urapadmin opened 5 months ago

urapadmin commented 5 months ago

The number of images per unit shows that a bar and a pie chart have too many categories to make any sense. So we need a new option to limit the number of categories:

      chart1:
        type: "bar"
        title: "#: image load by #(/$/constants/labels/unit)"
        categories: "unit id"
        values: "file"
        sort_by: "value"
        operation: "count"
        max_categories: 25
        threshold: 1

if max categories is given, the 24 categories with the highest value are shown while all others are summed up under "others".

urapadmin commented 4 months ago

Kiosk 1.6.2

luizaogs commented 4 months ago

If I just open the query I get the following graph, without "others":

Screenshot 2024-06-21 at 3 24 04 PM

If I then click on the arrows to expand the window, I can see others as the last item. If I then use the arrows to minimize the window, others shows up in the minimized version of the graph:

Screenshot 2024-06-21 at 3 25 18 PM
urapadmin commented 4 months ago

indeed. Very strange. Seems to happen only on first rendering. If I choose a different graph (instead of maximizing) and go back to the "image load by unit" I get "others".

Also the numbers are different if not wrong on first rendering.