Solve the Problem of incomplete display of X axis coordinates in the mschart Control

Source: Internet
Author: User

Some time ago, Microsoft's mschart control was used for development. Although it is powerful, it has never been used, and it has been in the process of exploration. It took half a day to study a small problem. I finally solved the problem of incomplete display of the X axis coordinates. Of course, I also found a lot of information on the Internet to solve the problem. I will make a summary today and leave it to my friends later.

If the x-axis coordinates exceed 9 digits, they cannot be completely displayed, and they are displayed separately. This makes people uncomfortable. In fact, you only need to make the following settings:

Chart1.chartareas [0]. axisx. interval = 1;// Set the interval between X axis coordinates to 1
Chart1.chartareas [0]. axisx. intervaloffset = 1;// Set the X axis coordinate offset to 1
Chart1.chartareas [0]. axisx. labelstyle. isstaggered =True;// Set whether to display the data in a staggered manner. For example, if the data is displayed in two rows

To put it bluntly, it's really easy! It is really a headache for people who have never played mschart !!

Effect: the first one is not set, and the second one is set.

 

 

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.