Kusto - 呈现柱形图不遵循数据行顺序
Kusto - rendering columnchart does not honor data row order
我有以下数据,我正在用它渲染柱状图,但柱状图不会按照与数据相同的顺序创建图形,即第一列为 7 月,然后是 8 月,依此类推。
谁能帮我看看如何确保柱形图中的顺序
datatable (Month: string, total_core_hours: long) [
"July",long(2000000),
"August",long(3361305),
"September",long(2478058),
"October",long(2869816),
"November",long(1663719),
"December",long(5039456),
"January",long(22773168),
"February",long(10974652),
"March",long(27346583),
]
| project Month, total_core_hours
| render columnchart
我已尝试使用给定的查询,我得到的结果与数据的顺序相同,即第一列为 7 月,然后是 8 月,依此类推
以下对我有用,通过将字符串转换为日期时间,从而为数据带来自然顺序:
datatable (StartDate: datetime , total_core_hours: long) [
datetime(2021-10-01),long(2869816),
datetime(2021-11-01),long(1663719),
datetime(2021-12-01),long(5039456),
datetime(2022-01-01),long(22773168),
datetime(2022-02-01),long(10974652),
datetime(2022-03-01),long(27346583),
]
| extend formattedStartDate = format_datetime(StartDate, "yyyy-MM")
| project formattedStartDate, total_core_hours
| render columnchart
我有以下数据,我正在用它渲染柱状图,但柱状图不会按照与数据相同的顺序创建图形,即第一列为 7 月,然后是 8 月,依此类推。
谁能帮我看看如何确保柱形图中的顺序
datatable (Month: string, total_core_hours: long) [
"July",long(2000000),
"August",long(3361305),
"September",long(2478058),
"October",long(2869816),
"November",long(1663719),
"December",long(5039456),
"January",long(22773168),
"February",long(10974652),
"March",long(27346583),
]
| project Month, total_core_hours
| render columnchart
我已尝试使用给定的查询,我得到的结果与数据的顺序相同,即第一列为 7 月,然后是 8 月,依此类推
以下对我有用,通过将字符串转换为日期时间,从而为数据带来自然顺序:
datatable (StartDate: datetime , total_core_hours: long) [
datetime(2021-10-01),long(2869816),
datetime(2021-11-01),long(1663719),
datetime(2021-12-01),long(5039456),
datetime(2022-01-01),long(22773168),
datetime(2022-02-01),long(10974652),
datetime(2022-03-01),long(27346583),
]
| extend formattedStartDate = format_datetime(StartDate, "yyyy-MM")
| project formattedStartDate, total_core_hours
| render columnchart