Use of Achartengine methods and summary of events

Source: Internet
Author: User

a while ago.Achartengine, it feels very useful in terms of data display, and then after a period of contact, forAchartenginethe expansion and use of a number of collation and summary, in line with the principle of technology sharing, share to everyone. I tidy up the things are from the network, their meticulous finishing, so do not like to spray.

Achartengine depicts a simple line chart, column chart, pie chart: http://www.eoeandroid.com/thread-188241-1-1.html

1.    Modify background color or set background picture background color settings you need to set two items: Setmarginscolor (set four-sided colors) and SetBackgroundColor (set middle background color) Set background picture:         http://blog.csdn.net/kmyhy/article/details/65902942.    Setaxistitletextsize ( 16);//Set axis title text size 3.    setcharttitletextsize (20); Set Chart title text size 4.    setlabelstextsize (15); Set axis label text size 5.    setlegendtextsize (15); Set the legend text size 6.    renderer.setcharttitle ("personal income Statement");//Set the bar chart name 7.    renderer.setxtitle ("list");// Set X axis name 8.    renderer.setytitle ("Amount");//Set y-axis name 9.    Renderer.setxaxismin (0.5);//Set X-axis minimum value of 0.510.   renderer.setxaxismax (5.5);//Set the maximum value of the x-axis to 511.  renderer.setyaxismin (0);//Set the y-axis with a minimum value of 012.   renderer.setyaxismax (500);//Set y-axis maximum value is 50013.  renderer.setdisplaychartvalues (true);// Sets whether the value 14.  renderer.setshowgrid (TRUE) is displayed above the bar, or whether the grid 15.  renderer.setxlabels (0) is displayed in the chart;// Sets the number of tick labels displayed on the x-axis 16.   If you want to display a custom label on the x-axis, first set the RENDERER.SETXLAbels (0); Next we want to Renderer.addtextlabel () loop add 17.  renderer.setxlabelsalign (align.right);// Sets the relative position relationship between the tick marks and the x-axis 18.  renderer.setylabelsalign (align.right);//sets the relative position relationship between the tick marks and the y-axis 19.   Renderer.setzoombuttonsvisible (TRUE);//settings can be scaled 20.  renderer.setpanlimits (newdouble[] {0, 20, 0, 140});// Set the Pull range 21.  renderer.setzoomlimits (newdouble[] {0.5, 20, 1, 150});//Set the range of scaling 22.   Renderer.setrange (newdouble[]{0d, 5d, 0d, 100d}); Sets the view range of the chart 23.  renderer.setfitlegend (true);//adjusts the appropriate position 24.  renderer.setclickenabled (true )//Set Whether you can slide and zoom out; 25.  dataset and render parameters introduction:       http://blog.csdn.net/lk_blog/ article/details/7645661


26.chartview.repaint (); is the command to re-draw (@firelion provided)
27. About Achartengine Click events, double-click events, sliding events can be resolved with custom events, but it should be noted that the first set renderer.setclickenabled (false);

28. If you add graphics after deformation, you can set Renderer.setinscroll (true); resolution, from @gupengno1
29.renderer.setgridcolor ();//Set grid color
30.renderer.setaxescolor ();//Set the axis color

The above resources are from the network, I sorted out, I hope we can share together and progress together!

Use of Achartengine methods and summary of events

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.