lovasoa / SQLpage

SQL-only webapp builder, empowering data analysts to build websites and applications quickly
https://sql.ophir.dev
MIT License
895 stars 63 forks source link

Charts : problems with long series #181

Open DSMejantel opened 6 months ago

DSMejantel commented 6 months ago
          I have similar problems with long series.

I want series as stacked values for each classes. It's ok for 1st et 2nd and after it's horrible. Some classes are a lot of times on x axys. For the 3rd, instead of the "34" we have the "41" ! image

There is the code : `-- Différents Dispositifs en place par Classe select 'chart' as component, 'Différents dispositifs par classe' as title, 'bar' as type, 500 as height, TRUE as labels, TRUE as stacked, 'Classes' as xtitle, 'Nombre de dispositifs' as ytitle; select Nom_dispositif as series, classe as x, coalesce(Nombre,0) as value FROM stats01 WHERE etab=$id ORDER BY classe;

This is the beginning of the debug with "34" as 3rd position... Debug output

{"component":"debug","title":"Différents dispositifs par classe","type":"bar","height":500,"labels":true,"stacked":true,"xtitle":"Classes","ytitle":"Nombre de dispositifs"}

{"series":"SEGPA","x":"31","value":5}

{"series":"UEE","x":"31","value":2}

{"series":"ULIS","x":"31","value":2}

{"series":"Mat. Pédagogique","x":"33","value":2}

{"series":"PAI","x":"33","value":1}

{"series":"PIAL","x":"33","value":2}

{"series":"PPRE","x":"33","value":2}

{"series":"SEGPA","x":"33","value":1}

{"series":"ULIS","x":"33","value":2}

{"series":"FLS","x":"34","value":3}

{"series":"Mat. Pédagogique","x":"34","value":1}`

Originally posted by @DSMejantel in https://github.com/lovasoa/SQLpage/issues/172#issuecomment-1881794140

lovasoa commented 6 months ago

Is this a different issue than https://github.com/lovasoa/SQLpage/issues/172 ? If it's the same problem, I don't think we need to track it twice. It has already been reported to the graph library upstream: https://github.com/apexcharts/apexcharts.js/issues/4178

DSMejantel commented 6 months ago

Sorry, but il didn't know if the problème was the same. So il have duplicate m'y post. Maybe it can be thé same origin from apexcharts.js. I will close this issue.