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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Line plot with categorical x-axis is too wide

I need a scatter plot where the x-axis is a datetime and the y-axis takes values from 0 to 4. 

 

If I choose "scatter chart" in visualization, the datetime is taken as "linear" and I get a scatter plot of only 5 points, one for each of the y-axis categories. I am not given the option to set datetime as "categorical" in this case.

 

I found a workaround by choosing the "line chart", that allows me to set the x-axis as categorical. If I set stroke to 0, the line chart becomes the scatter chart that I am looking for. However, the separation between the points is really large. I would like them to be closer to each other even if the name of all categories (my datetimes) are not shown, because I would like to see a bigger datetime span (ideally a whole day). Is that possible? 

 

My plot when I choose "scatter chart"My plot when I choose "scatter chart"My plot when I choose "line chart"My plot when I choose "line chart"

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @v-cherch-msft 

 

thanks a lot for your help, that is not a good option for me, because actually all the data point come from a single day. I really need to show all points, not aggregated at any level. 

 

What I have done at the end is converting the time into a numerical continuous value. This allows me to use the scatter plot and I get the result that I need. 

 

Thanks in any case

View solution in original post

3 REPLIES 3
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous 

You may add a column to get the date column like below in query editor.Then use the date column as x-axis in line chart.

a1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-cherch-msft 

 

thanks a lot for your help, that is not a good option for me, because actually all the data point come from a single day. I really need to show all points, not aggregated at any level. 

 

What I have done at the end is converting the time into a numerical continuous value. This allows me to use the scatter plot and I get the result that I need. 

 

Thanks in any case

Hi @Anonymous 

Glad to hear you've solved it, please accept your reply as solution, that way, other community members will easily find the solution when they get same issue.

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors