Skip to content

Wrong data on x-Axe. Missing last value. #883

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

Open
DiegoMartinaglia opened this issue Apr 8, 2025 · 5 comments
Open

Wrong data on x-Axe. Missing last value. #883

DiegoMartinaglia opened this issue Apr 8, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@DiegoMartinaglia
Copy link

DiegoMartinaglia commented Apr 8, 2025

Introduction

To Reproduce

When showing the following chart:

select
    'chart'   as component,
    'Revenue' as title,
    0         as ymin,
    TRUE      as toolbar;
select
    'Chicago Store' as series,
    2021            as x,
    35              as value;
select
    'Chicago Store' as series,
    2022            as x,
    15              as value;
select
    'Chicago Store' as series,
    2023            as x,
    45              as value;
select
    'New York Store' as series,
    2021             as x,
    30               as value;
select
    'New York Store' as series,
    2022             as x,
    55               as value;
select
    'New York Store' as series,
    2023             as x,
    19               as value;
select
    'New York Store' as series,
    2024             as x,
    11               as value;
select
    'New York Store' as series,
    2025             as x,
    22              as value;

Actual behavior

The value 2025 is not shown on the x-Axe. Instead is shown the value of 2024 at the position where 2025 should be. I think there is some problem with the distribution over the x-Axis.

Screenshots

Image

Image

Expected behavior

The value 2025 should be shown and the value of 2024 should be befor.

Version information

  • OS:
  • Database [e.g. SQLite, Postgres]
  • SQLPage Version : v0.34.0

Additional context

Add any other context about the problem here.

@DiegoMartinaglia DiegoMartinaglia added the bug Something isn't working label Apr 8, 2025
@DiegoMartinaglia DiegoMartinaglia changed the title Wrong data on y scale Wrong data on x-Axe. Missing last value. Apr 8, 2025
@lovasoa
Copy link
Collaborator

lovasoa commented Apr 8, 2025

Hello! Which version of SQLPage are you using? The latest versions included upgrades to apex charts, which fixed axis some axes tick computation errors.

@DiegoMartinaglia
Copy link
Author

SQLPage v0.34.0

@DiegoMartinaglia
Copy link
Author

DiegoMartinaglia commented Apr 14, 2025

Hello Lovasoa,
I can give you another example which shows the problem (hoping it helps). The data:

y series x
35 year-2023 2023-01-01
46 year-2023 2023-02-01
96 year-2023 2023-03-01
76 year-2023 2023-04-01
90 year-2023 2023-05-01
106 year-2023 2023-06-01
74 year-2023 2023-07-01
57 year-2023 2023-08-01
82 year-2023 2023-09-01
92 year-2023 2023-10-01
50 year-2023 2023-11-01
105 year-2023 2023-12-01
46 year-2023 2024-01-01
25 year-2024 2024-01-01
11 year-2023 2024-02-01
48 year-2024 2024-02-01
11 year-2023 2024-03-01
53 year-2024 2024-03-01
14 year-2023 2024-04-01
65 year-2024 2024-04-01
13 year-2023 2024-05-01
29 year-2024 2024-05-01
20 year-2023 2024-06-01
42 year-2024 2024-06-01
21 year-2023 2024-07-01
29 year-2024 2024-07-01
6 year-2023 2024-08-01
32 year-2024 2024-08-01
30 year-2024 2024-09-01
132 year-2024 2024-10-01
38 year-2024 2024-11-01
28 year-2024 2024-12-01
120 year-2024 2025-01-01
64 year-2024 2025-02-01
15 year-2024 2025-03-01

Both graph selected:

Image

The graph = "year-2024" has data until 2025 but stops befor.
If I select only one graph, either year-2023 or year-2024, its working correctly.

Thanks

@lovasoa
Copy link
Collaborator

lovasoa commented Apr 21, 2025

@DiegoMartinaglia thank you very much for reporting this, and sorry for the delay. I can confirm the issue and I reported it upstream: apexcharts/apexcharts.js#5015

@lovasoa
Copy link
Collaborator

lovasoa commented May 19, 2025

I updated apexcharts, but the bug is still present in the latest version.

select 'chart' as component;
select 'a' as series, 1 as x, 1 as y union all
select 'a', 2, 2 union all
select 'b', 4, 4 union all
select 'b', 5, 5;

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants