Thursday, February 20, 2014

100 seeking -> How on android phone line graph, the horizontal axis is time, vertical axis digital


For example, I have a set of data, hoping to draw a line graph, the horizontal axis represents time and the vertical axis represents the number of my money.

Example:
2013-2-1 50
2013-2-3 80
2013-3-5 90
2013-6-10 120
2013-6-20 40
2013-7-31 77

Want more data in accordance with the horizontal axis is time, vertical axis is expressed by the digital line graph, how to draw?

Time is mainly horizontal divergence, and put me confused lived. . .

              


<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
upupup
Reply:
Date Time convert Timestamp
Or take the first few days each year
Min Max draw the horizontal axis is calculated and then calculate the coordinates of each point does not have to
Reply:
What is divergent. .
Reply:
Top a starting date for each date with this date than it, is not that what the coordinate values ​​of x
Reply:
 
SimpleDateFormat sdf = new SimpleDateFormat ("yyyy-MM-dd");
Date start = sdf.parse ("2010-01-01");
Date now = sdf.parse ("2013-01-01");
long x = Math.abs ((start.getTime ()-now.getTime ()) / (24 * 60 * 60 * 1000));
System.out.println ("------>" + x);

Reply:
With AChartEngine
Reply:
Reply
references 6th Floor monodin of:
with AChartEngine


This has been achieved by achartengine demand.
There is a new problem: how the x-axis when zooming out to a certain extent, the coordinates of the x-axis does not overlap together?
Reply:
How do display data break point details?
Reply:
The landlord Hello, I am currently have encountered this problem, you can share with your solution, the possibility to send a trouble code 397984514@qq.com

Reply:
references, 5th Floor wlcw16 reply:
 
SimpleDateFormat sdf = new SimpleDateFormat ("yyyy-MM-dd");
Date start = sdf.parse ("2010-01-01");
Date now = sdf.parse ("2013-01-01");
long x = Math.abs ((start.getTime ()-now.getTime ()) / (24 * 60 * 60 * 1000));
System.out.println ("------>" + x);

Hello, how these time values ​​that define the horizontal scale up to it, can send a demo to me 397984514@qq.com grateful

No comments:

Post a Comment