Forum Discussion

DeeTee's avatar
DeeTee
New Member
2 years ago
Solved

Compressing Chart X-Axis Categorical Data Within the Line Chart Border

Hi experts,

 

I have issue with trying to change the scale of the X-axis so that I can view the line graph entirely without having to scroll horizontally.

 

 

Currently, the x-axis in this case is categorical data i.e. address (postal code) while y-axis is number. There are about 10 thousands data points. Is there a way to compress the line charts within the border without having to scroll?

Any help is appreciated. TIA.

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi DeeTee ,
    Based on your description and the screenshot provided, the line graph x-axis seems to be of text type, and if it is of text type, we cannot compress the x-axis. However, you can change the granularity of the display on the x-axis if you can change these text type numbers to numeric type.

     

    Best regards,
    Albert He

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

     

2 Replies

  • foodd's avatar
    foodd
    Community Champion

    Hello DeeTee, and thank you for sharing a question with the Community.   The following is informational.  Please remember to adhere to the decorum of the Community Forum when asking a question.

    Please provide your work-in-progress Power BI Desktop file (with sensitive information removed) that covers your issue or question completely in a usable format (not as a screenshot). You can upload the PBIX file to a cloud storage service such as OneDrive, Google Drive, Dropbox, or to a Github repository, and then share a file’s URL.

    https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216

    Please show the expected outcome based on the sample data you provided.

    https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523/highlight/true#M607150

    This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi DeeTee ,
    Based on your description and the screenshot provided, the line graph x-axis seems to be of text type, and if it is of text type, we cannot compress the x-axis. However, you can change the granularity of the display on the x-axis if you can change these text type numbers to numeric type.

     

    Best regards,
    Albert He

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