whitespace COMPANY whitespace SERVICES whitespace PRODUCTS whitespace PURCHASE whitespace SUPPORT whitespace CONTACTS whitespace Home whitespace Contact Us whitespace Site Map whitespace
whitespace
SUPPORT
whitespace
FORUM
whitespace
FAQS
whitespace
SUBSCRIPTION
whitespace
REQUEST ON-LINE
whitespace
whitespace

Technical Support Forum

Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
uri.m  
#1 Posted : Wednesday, July 7, 2010 4:53:30 PM(UTC)
uri.m
Rank: Member

Groups: Registered
Joined: 6/20/2010(UTC)
Posts: 12

I Have x values in the shape of time diffs (long that represent diff in milisecond) i want to display it on the axis in the format of hh:mm:ss. SimpleDateFormat isn't good for me cause it's not a date... Anyone has an idea?
Baydalka Volodymyr  
#2 Posted : Wednesday, July 7, 2010 9:26:15 PM(UTC)
Baydalka Volodymyr
Rank: Member

Groups: Registered
Joined: 7/28/2009(UTC)
Posts: 447
Man

Hi,

You may derive your own format class and set it to ChartAxis.setFormat method.

Code:
area.getDefaultXAxis().setFormat(new Format()
{
	@Override
	public StringBuffer format(Object val, StringBuffer builder,
			FieldPosition pos)
	{
		Number number = (Number)val;
		builder.append(DateUtils.formatElapsedTime(number.longValue() / 1000));				
		return builder;
	}

	@Override
	public Object parseObject(String string, ParsePosition position)
	{
		return null;
	}			
});




Best regards,
Volodymyr Baydalka
Andriod development and support team
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Company | Services | Practices | Technologies | Career | Contacts | Privacy
© 2005-2017 ArtfulBits. All rights reserved.