How does the chart control display all labels on the X axis?

Source: Internet
Author: User

When you use the chart control in vs2012, there are too many labels on the X axis, so that only some of them can be displayed by default,

Of course, we can set to display all labels on the X axis.

First, find the "ChartAreas set" through the chart control properties, and click

So I came to the ChartAreas Set Editor, found the "Axes set" in the ChartAreas1 attribute on the right, and clicked it,

Because we want to set the x Axis, select "x axis" on the left of the Axis Set Editor.

Select "IntervalAutoMode" in the properties on the right and select "VariableCount" in the following items to set the x-axis interval to variable,

 

 

Variable X axis Interval

In this case, if there are too many labels on the X axis, the labels on the X axis may not be displayed. Therefore, the labels on the X axis must be displayed in the upper and lower layers.

 

Find the IsStaggered attribute in the Axis collection editor and set it to "True".

 

 

In the Axis collection Editor, find the IsStaggered attribute and set it to "True".

 

Then, all labels on the X axis are displayed.

 

 

Of course, there is another way to make the X axis label Rotate 90 degrees to display,

After changing the X Axis, select the Angle option in the "Axis Set Editor" and set the value to 90,

 

After changing the X Axis, select the Angle option in the "Axis Set Editor" and set the value to 90,

 

 

Click "OK" to exit the settings.

Run

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.