Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at the 2025 Microsoft Fabric Community Conference. March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for $400 discount. Register now

Reply
frithjof_v
Super User
Super User

Queryset render barchart strange bar thicknesses

The query gives normal results in tabular view:

 

frithjof_v_3-1731743042920.png

 


However, when rendering as bar chart, the bars are overlapping:

frithjof_v_1-1731742682859.png

 

 

If I expand the Visual window, the bars don't overlap, but the first and the last bar is only half the thickness of the other bars:

 

frithjof_v_2-1731742877631.png

 

 

1 ACCEPTED SOLUTION

Hi @frithjof_v ,
After our testing, the process of recognizing the bar chart is related to the page size, but the adaptability is not so smart, there are some defects in this area, so I suggest you make some changes to the code, to ensure that there is no overlap!

Direct
| summarize TotalTrips = count() by Hour = bin(tpep_pickup_datetime, 1h) // Group by 1-hour intervals
| order by Hour asc // Sort in ascending order to observe a clear timeline
| extend FormattedHour = format_datetime(Hour, "yyyy-MM-dd HH:mm") // Format time for better readability on the X-axis
| take 10 // Limit the data to 10 records to reduce visual clutter
| render barchart with (kind=default, ytitle="Total Trips", xtitle="Hour", title="Total Trips by 1-Hour Intervals") // Add chart title and axis labels



vxingshenmsft_0-1731897758896.png

At present, the use of KQL for the process of drawing, only the default width of the column, can not change the width of the column at will, resulting in the appearance of a relatively small point, but can avoid some of the problems arising from the duplication of the column, I hope to help you with your questions!

Hope it helps!

Best regards,
Community Support Team_ Tom Shen

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

 



View solution in original post

3 REPLIES 3
StrategicSavvy
Resolver II
Resolver II

hi @frithjof_v  , I would recommend trying different web browser to see helps bcz it seems to be some rendering issue by webbrowse engine.

I'm using Edge

Hi @frithjof_v ,
After our testing, the process of recognizing the bar chart is related to the page size, but the adaptability is not so smart, there are some defects in this area, so I suggest you make some changes to the code, to ensure that there is no overlap!

Direct
| summarize TotalTrips = count() by Hour = bin(tpep_pickup_datetime, 1h) // Group by 1-hour intervals
| order by Hour asc // Sort in ascending order to observe a clear timeline
| extend FormattedHour = format_datetime(Hour, "yyyy-MM-dd HH:mm") // Format time for better readability on the X-axis
| take 10 // Limit the data to 10 records to reduce visual clutter
| render barchart with (kind=default, ytitle="Total Trips", xtitle="Hour", title="Total Trips by 1-Hour Intervals") // Add chart title and axis labels



vxingshenmsft_0-1731897758896.png

At present, the use of KQL for the process of drawing, only the default width of the column, can not change the width of the column at will, resulting in the appearance of a relatively small point, but can avoid some of the problems arising from the duplication of the column, I hope to help you with your questions!

Hope it helps!

Best regards,
Community Support Team_ Tom Shen

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

 



Helpful resources

Announcements