Fill zegraph in the X direction

Source: Internet
Author: User

The default effect is

It is expected to be filled in the X direction without leaving the two sides. The method is to use zg1.graphpane. xaxis. Scale. Max and min, and it must be set after the image is drawn.

 

Zg1.graphpane. curvelist. Clear ();

Zg1.graphpane. xaxis. type = axistype. date;
Zg1.graphpane. xaxis. Scale. format = "M'/'d ";

String sdate1 = datetime. Now. addmonths (-3). tostring ("yyyy-mm-dd ");
String sdate2 = datetime. Now. tostring ("yyyy-mm-dd ");

Double X1 = (double) New xdate (convert. toint32 (sdate1.substring (0, 4), convert. toint32 (sdate1.substring (5, 2), convert. toint32 (sdate1.substring (8, 2 )));
Double X2 = (double) New xdate (convert. toint32 (sdate2.substring (0, 4), convert. toint32 (sdate2.substring (5, 2), convert. toint32 (sdate2.substring (8, 2 )));

Pub. createline (ZG1, sdate1, listview1.selecteditems [0]. subitems [1]. Text );
Pub. creategraph (ZG1, sdate1, sdate2, listview1.selecteditems [0]. subitems [1]. Text); // the last stroke of the pattern to be filled

Zg1.graphpane. xaxis. Scale. max = x2;
Zg1.graphpane. xaxis. Scale. min = x1;

Zg1.refresh ();

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.