Android custom Statistical Chart (bar chart, line chart, pie chart)
Recently, due to project requirements, I have studied some statistical charts. At the beginning, I read many blog posts, most of which reference third-party libraries. Although simple,
class mainclass {public static void main (string ARGs []) {jframe frame = new jframe ("Java data statistics graph"); frame. setlayout (New gridlayout (2, 2, 10, 10); frame. add (New barchart (). getchartpanel (); // Add a bar comment frame. add (New barchart1 (). getchartpanel (); // Add another effect frame of the bar chart. add (New piechart (). getchartpanel (); // Add a pie
, SummaryThese are a simple example to realize, want to know more students can self-query information, in fact, the above code is easy to understand, just to combine their own actual situation, you can develop their own application, we can see that I am here in Application , in fact, a lot of other cases of data statistics on the javaweb application of a lot of other, we can also know for themselves. PS: If you are performing an error in this article
, SummaryThese are a simple example to realize, want to know more students can self-query information, in fact, the above code is easy to understand, just to combine their own actual situation, you can develop their own application, we can see that I am here in Application , in fact, a lot of other cases of data statistics on the javaweb application of a lot of other, we can also know for themselves. PS: If you are performing an error in this article
Piechart (). Getchartpanel ()); Add pie chart
frame.add (new Timeserieschart (). Getchartpanel ()); Add Line chart
frame.setbounds (m, M, N);
Frame.setvisible (True);
}
Five, summary
Above all is a simple example to realize, want to understand deeper students can query data, in fact, the above code is ea
.add (New Month (5, 2002), 111.59999999999999D); Timeseries1.add (New Month (6, 2002), 108.8D); Timeseries1.add (New Month (7, 2002), 101.59999999999999D); Timeseriescollection timeseriescollection = new Timeseriescollection (); Timeseriescollection.addseries (timeseries); Timeseriescollection.addseries (TIMESERIES1); Return TimeserIescollection; } public Chartpanel Getchartpanel () {return frame1; }}For example, the following:Take a second look at the M
First, Introduction:1, draw the data chart, with it, want to draw a line on the page, bar chart, from this easy.2, the use of this Baidu Echarts.js plug-in, is to draw pictures on the canvas on the display on the page.Echarts's introduction to the website:Echarts, abbreviated from Enterprise Charts, business-grade data graph, a pure JavaScript
In the previous post we've made a line chart, and next we'll make a column and pie chart.
The drawing process of a column chart is similar to a line chart, and the following will only post the code without further explanation.
Pie
The above describes the histogram, only the JS code backstage transfer, etc. we introduced the use of pie chart in the process of doing the introductionWith the introduction of histogram, in the use of pie chart, in fact, it is very easy, on the code // open Web page load
Some time ago the company made public opinion related software, public opinion used a large number of charts, considerable data interaction. At that time did not tidy down, once used these things yesterday, so prepare to record down, easy to use later.
Baidu Echart is Baidu for data display do a chart plug-in bar, generally we use is not a problem, mainly for dynamic data analysis. Here I use
the Visualmap component is used to show the population density of different regions and other data.series[i]-parallel-– a series of parallel coordinate systems.series[i]-lines--– Line ChartSeries[i]-graph ——-diagramSeries[i]-gauge ——-instrument Panel
var option = {
title: {
text: ' Echarts simple histogram '
},
tooltip: {},
legend: {
data:[' fan count ']
},
Xaxis: {
data: ["An
starting point, and then draws the subsequent wedge in a counterclockwise direction to represent the subsequent value.
Sort the wedges in ascending or descending order by another field by using the sort field parameter.
Specify a different field in the callout field to label the wedge in the chart, usually as a text (string) field.
By default, the value of the input data is added to the legend of the
Http://www.builderau.com.au/program/java/soa/Creating-pie-charts-with-JSP-is-a-breeze/0,339024620,320273905,00.htm
Creating pie charts with JSP is a breeze
Java Server Pages (JSP) makes it easy to read and summarise data from a database and then display the results in a pie
In the course of data warehouse and data mining today, the teacher is always proposing bar charts, pie charts, and so on,
We also told us to come back and draw a few more. Alas, it's annoying,
Come back in the evening and have a whimsy. Why don't I write a pie chart generator by myself,
Haha, just do it, so we have
)), SolidBrush, STG, SCG);Draw the arc line.Objgraphics.drawpie (Pens.black, STG, SCG);Add the current arc angle to the general angle.STG + = SCG;}Draw a descriptive textObjgraphics.drawstring ("Histogram", New Font ("XXFarEastFont-Arial", FontStyle.Bold), Brushes.blue, 50, 272);Objgraphics.drawstring ("Pie chart", New Font ("Song Body", "fontstyle.bold"), Brushes.blue, 250, 272);Output to ClientObjbitmap.
time, drag the small portion on the left to the right, and the pie chart is complete.A three-dimensional pie chart is also frequently used. Let's use this chart to change it: open its "chart type" dialog box and select it in the
This lesson is easy and will soon be out of school.
I have always liked to eat cookies.
I remember when I was a child, 2B was just a pencil, not synonymous with some young people. The people in China were not wealthy. the most stupid thing was to put a piece of fat meat in a group of flour, then put it in the hot ash in the stove at home. When the rice is cooked, the cake is also baked, and a bite of fat oil is taken out. It's sweet, and now I think o
.
If you don't talk nonsense, let's take a look at the notes:
How is it so dazzling? In addition, the finger can rotate the pie chart at will. When I saw it, my eyes were bright and I really wanted to implement it myself. Now let's take a look at the effect of the Implementation. Although the same function is implemented, the color is not as bright as it is.
Only one image can be seen after decompilatio
);
Timeseries1.add (New Month (6, 2002), 108.8D);
Timeseries1.add (New Month (7, 2002), 101.59999999999999D);
Timeseriescollection timeseriescollection = new Timeseriescollection ();
Timeseriescollection.addseries (timeseries); Timeseriescollection.addserieS (timeseries1);
return timeseriescollection;
Public Chartpanel Getchartpanel () {return frame1; }
}
The effect chart is as follows:
Take another look a
): After learning to use DWR (AJAX) In the Java EE, sometimes the data returned from the server to the client is an object, you manually pieced together the JSON string easy error, through the degree Niang know json-lib this class library, Easy to support conversion of objects in Java to JSON strings.Dependent class Library: Json-lib-2.4-jdk15.jarEzmorph-1.0.6.jarCommons-logging.jarCommons-lang.jarCommons-c
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.