Wrong data on x-Axe. Missing last value.
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
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.
Hello! Which version of SQLPage are you using? The latest versions included upgrades to apex charts, which fixed axis some axes tick computation errors.
SQLPage v0.34.0
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:
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
@DiegoMartinaglia thank you very much for reporting this, and sorry for the delay. I can confirm the issue and I reported it upstream: https://github.com/apexcharts/apexcharts.js/issues/5015
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;