Skip to content

Error on sorting for chart component #951

Open
@DSMejantel

Description

@DSMejantel

Introduction

Data are not sorting correctly

To Reproduce

{"component":"debug","title":"Récoltes","type":"bar","stacked":1,"labels":1,"toolbar":1,"xticks":"10","xtitle":"Années"}
{"series":"Miel de Montagne","x":"2020","y":105}
{"series":"Miel  de Forêt","x":"2020","y":40}
{"series":"Miel de Montagne","x":"2021","y":70}
{"series":"Miel de Pissenlit","x":"2022","y":80}
{"series":"Miel de Pissenlit","x":"2023","y":22}
{"series":"Miel de Ronce","x":"2023","y":98}
{"series":"Miel de Ronce","x":"2024","y":193}
SET xticks = (SELECT count(distinct annee) FROM production where rucher_id=$id);
select 
    'chart'    as component,
    'Récoltes' as title,
    'bar'      as type,
    TRUE as stacked,
    TRUE as labels,
    TRUE       as toolbar,
    $xticks as xticks,
    "Années" as xtitle
     where $tab='5';
select 
    categorie as series,
    strftime('%Y',annee) as x,
    sum(total)  as y
    FROM production JOIN miel on production.produit=miel.id where rucher_id=$id and $tab='5' group by strftime('%Y',annee), categorie order by annee;

Actual behavior

Screenshots

Image

Version information

  • OS: Ubuntu
  • Database SQLite
  • SQLPage Version 0.35.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions