jeecgboot / JimuReport

「可视化报表,DataV、帆软的开源替代」积木报表是一款类Excel操作风格,在线拖拽设计的报表工具。功能涵盖: 报表设计、打印设计、图形报表、仪表盘门户设计、大屏设计等,完全免费!秉承“简单、易用、专业”的产品理念,极大的降低报表开发难度、缩短开发周期、解决各类报表难题。
http://jimureport.com
GNU General Public License v3.0
6.43k stars 1.65k forks source link

图形报表折线图X轴无法排序 #690

Closed guolin1126 closed 2 years ago

guolin1126 commented 2 years ago
版本号:1.4.0-beta
问题描述:图形报表实现折线图时,X轴无法排序,每次查询出来X轴顺序都不一样
错误日志&截图:

image

重现步骤:

image

友情提示(为了提高issue处理效率):

lvdandan16 commented 2 years ago

收录 ws

1298191366 commented 2 years ago

你用的是sql数据源还是api数据源,如果是sql数据源的话写order by应该会管用吧,如果是api查看每次传过来的数据是否就是错乱的,如果不是的话请提供你的sql语句或者提供报表配置及数据 http://report.jeecg.com/2376604

guolin1126 commented 2 years ago

用的是sql数据源,一开始就写了order by 的,但是并没有用,你们可以模拟一下,sql很简单的,就是按照时间排序实现不了

sql如下:

select to_char(statistical_time,'yyyymmdd') as statistical_time, order_count as 每日订单总数量, sku_shipments as sku每日发货数量, sku_count as sku总数量, sku_stock as sku在库库存总数量,
sku_storage as sku每日入库数量, sku_the_library as sku每日出库数量, order_storage as 每日入库单量,
order_refund as 每日退款订单量,
order_returns as 每日退货订单量,
order_supply_again as 每日补发订单量,  mail_receiving as 每日邮件接收数量, mail_handling as 每日邮件处理数量 , tongtool_operation_log as 每日通途操作日志数量,
tongtool_remarks as 每日通途备注数量 from report_data_quantity order by to_char(statistical_time,'yyyymmdd') 

------------------ 原始邮件 ------------------ 发件人: "jeecgboot/JimuReport" @.>; 发送时间: 2021年12月1日(星期三) 上午9:53 @.>; @.**@.>; 主题: Re: [jeecgboot/JimuReport] 图形报表折线图X轴无法排序 (Issue #690)

你用的是sql数据源还是api数据源,如果是sql数据源的话写order by应该会管用吧,如果是api查看每次传过来的数据是否就是错乱的,如果不是的话请提供你的sql语句或者提供报表配置及数据 http://report.jeecg.com/2376604

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

1298191366 commented 2 years ago

我就是用的order by之后没有重现出来问题,我本地用的是mysql,你用的是什么数据库,或者跟新到最新版1.4.2尝试一下,如果还是不行的话请提供报表示例和数据或者去官网做个例子,方便问题重现和修改

zhangdaiscott commented 2 years ago

你的表和数据提供下

guolin1126 commented 2 years ago

数据库用的PostgreSQ, 我在编辑预览出来数据就是排序正常的

------------------ 原始邮件 ------------------ 发件人: "jeecgboot/JimuReport" @.>; 发送时间: 2021年12月7日(星期二) 中午11:10 @.>; @.**@.>; 主题: Re: [jeecgboot/JimuReport] 图形报表折线图X轴无法排序 (Issue #690)

你的表和数据提供下

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

lvdandan16 commented 2 years ago

重新编辑预览后正常了?

guolin1126 commented 2 years ago

只是在数据集的编辑里面预览是正常的排序,但是在做成折线图之后预览排序是失效的

------------------ 原始邮件 ------------------ 发件人: "jeecgboot/JimuReport" @.>; 发送时间: 2021年12月20日(星期一) 晚上7:03 @.>; @.**@.>; 主题: Re: [jeecgboot/JimuReport] 图形报表折线图X轴无法排序 (Issue #690)

重新编辑预览后正常了?

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

lvdandan16 commented 2 years ago

你这个表数据和表结构,提供一下,我们测试一下,

guolin1126 commented 2 years ago

数据库是PostgreSQL;

CREATE TABLE public.test_data_quantity ( statistical_time date NULL,  ddsl int4 NULL,  shipments int4 NULL,  ffsl int4 NULL,  stock int4 NULL, s_storage int4 NULL,  s_library int4 NULL,  refund int4 NULL );

INSERT INTO public.test_data_quantity (statistical_time, ddsl, shipments, ffsl, stock, s_storage, s_library, refund) VALUES('2021-12-20', 2102, 2185, 133191, 146274, 1567, 12334, 23343); INSERT INTO public.test_data_quantity (statistical_time, ddsl, shipments, ffsl, stock, s_storage, s_library, refund) VALUES('2021-12-21', 2193, 2213, 133264, 143607, 1830, 4545, 45465); INSERT INTO public.test_data_quantity (statistical_time, ddsl, shipments, ffsl, stock, s_storage, s_library, refund) VALUES('2021-12-22', 2019, 1908, 133341, 143661, 2145, 7544, 4255); INSERT INTO public.test_data_quantity (statistical_time, ddsl, shipments, ffsl, stock, s_storage, s_library, refund) VALUES('2021-12-23', 1886, 1898, 133466, 143669, 543, 4425, 7775); INSERT INTO public.test_data_quantity (statistical_time, ddsl, shipments, ffsl, stock, s_storage, s_library, refund) VALUES('2021-12-24', 1679, 1720, 133554, 143669, 5224, 3577, 9754); INSERT INTO public.test_data_quantity (statistical_time, ddsl, shipments, ffsl, stock, s_storage, s_library, refund) VALUES('2021-12-25', 1252, 1133, 133556, 143681, 1395, 3454, 6454); INSERT INTO public.test_data_quantity (statistical_time, ddsl, shipments, ffsl, stock, s_storage, s_library, refund) VALUES('2021-12-26', 1396, 88, 133556, 143681, 0, 6412, 1642); INSERT INTO public.test_data_quantity (statistical_time, ddsl, shipments, ffsl, stock, s_storage, s_library, refund) VALUES('2021-12-27', 1843, 3030, 133556, 143669, 22, 15485, 1124); INSERT INTO public.test_data_quantity (statistical_time, ddsl, shipments, ffsl, stock, s_storage, s_library, refund) VALUES('2021-12-28', 2414, 2317, 133557, 143654, 28, 4495, 1254); INSERT INTO public.test_data_quantity (statistical_time, ddsl, shipments, ffsl, stock, s_storage, s_library, refund) VALUES('2021-12-29', 2271, 2334, 133729, 143652, 186, 4674, 4513); INSERT INTO public.test_data_quantity (statistical_time, ddsl, shipments, ffsl, stock, s_storage, s_library, refund) VALUES('2021-12-30', 2212, 2188, 133854, 143675, 134, 1646, 4854);

------------------ 原始邮件 ------------------ 发件人: "jeecgboot/JimuReport" @.>; 发送时间: 2021年12月20日(星期一) 晚上7:10 @.>; @.**@.>; 主题: Re: [jeecgboot/JimuReport] 图形报表折线图X轴无法排序 (Issue #690)

你这个表数据和表结构,提供一下,我们测试一下,

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>