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
fkizewski  
#1 Posted : Thursday, September 23, 2010 7:48:51 PM(UTC)
fkizewski
Rank: Newbie

Groups: Registered
Joined: 9/20/2010(UTC)
Posts: 8
Location: France

Hi,

I put this data in a chart lines:
35.4 => 2010-09-17 11:37:05
35.4 => 2010-09-20 15:35:21
35.7 => 2010-09-20 15.35.48
The result is:
See the yAxis value!


Now, if i add just this data:
37.8 => 2010-09-18 11:37:06
The result is:
That's better!

Can you explain me if i make a mistake or if it's necessary to add set anything in the configuration of the chart.

Regards, Fabrice
Baydalka Volodymyr  
#2 Posted : Thursday, September 23, 2010 8:40:54 PM(UTC)
Baydalka Volodymyr
Rank: Member

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

Hi,

This issue is related to double's math. Consider to use labels format. Please, check following code :

Code:

class NumberFormat extends Format
{
    private int multiplier = 2;
    
    public NumberFormat(int digits) 
    {
        multiplier = (int) MathUtilities.exp(digits * MathUtilities.log(10));
    }
    
    public StringBuffer format(Object obj, StringBuffer toAppendTo_o, FieldPosition pos_io) 
    {
        Double value = (Double)obj;
        toAppendTo_o.append( Math.floor(multiplier * value.doubleValue()) / multiplier );
        return toAppendTo_o;
    }
    
    public int[] getFields()    
    {
        return null; 
    }
}

...

chartArea.getDefaultYAxis().setFormat(new NumberFormat(2));

...



Best regards,
Volodymyr Baydalka
Andriod development and support team
fkizewski  
#3 Posted : Monday, September 27, 2010 3:04:27 PM(UTC)
fkizewski
Rank: Newbie

Groups: Registered
Joined: 9/20/2010(UTC)
Posts: 8
Location: France

Thanks for the example, it's correctly works now.

Regards, Fabrice

Edited by user Monday, September 27, 2010 3:05:36 PM(UTC)  | Reason: Not specified

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.