mpchartandroid-Column Chart

Source: Internet
Author: User

  1. Mchart = (Linechart) Findviewbyid (R.ID.CHART1);
  2. Mchart.setdescription (""); //Set Chart description information
  3. Mchart.setscaleenabled (false); //Set whether the chart can be scaled
  4. Mchart.setbackgroundcolor (Color.White); //Set chart background color
  5. Mchart.setdrawgridbackground (false); //Set whether the table is displayed
  6. Xaxis Xaxis = Mchart.getxaxis (); //Get the X-axis instance of the chart
  7. Xaxis.setposition (Xaxisposition.bottom); //Set the x-axis display position
  8. Xaxis.setdrawgridlines (false); //Set whether to display the X-axis table
  9. Xaxis.setavoidfirstlastclipping (true); //Set X-axis start and end point label does not exceed screen
  10. Xaxis.setdrawaxisline (true); //Set display x-axis
  11. Xaxis.setspacebetweenlabels (0); //Set X axis label not spaced
  12. YAxis Leftaxis = Mchart.getaxisleft (); //Get the left y-axis instance of the chart
  13. Leftaxis.setaxismaxvalue (3.4482f); //Set y-axis maximum value
  14. Leftaxis.setaxisminvalue (3.1872f);   Sets the y-axis minimum value.
  15. Leftaxis.setstartatzero (false); //Set chart starting point starting from 0
  16. Leftaxis.enablegriddashedline (10f, 10f, 0f); //Set the horizontal table to be dashed

Bardataset Set1 = new Bardataset (YVALS1, NULL);
Set1.setbarspacepercent (0f);//May be considered to set the thickness between the pillars, the larger the number, the distance between the pillars is large

mpchartandroid-Column Chart

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.