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
programmer425  
#1 Posted : Sunday, March 18, 2012 7:52:51 AM(UTC)
programmer425
Rank: Newbie

Groups: Registered
Joined: 3/18/2012(UTC)
Posts: 2

Hello,
I've been working on an older Android application that uses your aiCharts library and I seem to have run into a little problem. The program used an old version of the aiCharts library, which appears to have issues on most devices running Android 3.0 and higher.
The obvious solution is for us to simply get a more updated version of the library. This seems to solve the crashing, but it relays an error that says a previously working function no longer exists.

Here is the function that worked with the older library:

Code:

ChartAxis.LabelFormat customFormat = new ChartAxis.LabelFormat(yaxis) {
	 @Override 
	 protected String doubleFormat(double value) {
	 	 long seconds = (long) (value / 1000);
	 	 return DateUtils.formatElapsedTime(seconds); 
	 }
};
yaxis.setFormat(customFormat);


"ChartAxis.LabelFormat" appears to have vanished from the updated library. For some reason I can't seem to locate any documentation on exactly what that function used to do and so it has become very difficult to simulate it so that the program isn't any different. I was hoping that someone here might be able to help out?
Baydalka Volodymyr  
#2 Posted : Monday, March 19, 2012 2:56:21 PM(UTC)
Baydalka Volodymyr
Rank: Member

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

Hi,

In version 1.5 we use system Format class to specify labels formating. Example:

Code:
chartArea.getDefaultXAxis().setLabelFormat(new Format()
{
	@Override
	public StringBuffer format(Object object, StringBuffer buffer, FieldPosition field)
	{
		long seconds = ((Double)object).longValue() / 1000;
    buffer.append(DateUtils.formatElapsedTime(seconds)); 
    return buffer;
	}

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


or use default formaters SimpleDateFormat

Best regards,
Volodymyr Baydalka
Andriod development and support team
programmer425  
#3 Posted : Monday, March 19, 2012 8:37:38 PM(UTC)
programmer425
Rank: Newbie

Groups: Registered
Joined: 3/18/2012(UTC)
Posts: 2

Thank you very much! That is exactly what I was looking for!
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.