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 Search | Active Topics | Log In | Register

A new issue a small configuration, or and error ? Options · View
fkizewski
#1 Posted : Thursday, September 23, 2010 5:48:51 PM
Rank: Newbie

Groups: Registered

Joined: 9/20/2010
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 6:40:54 PM
Rank: Developers Team


Groups: Registered, Administrators

Joined: 7/28/2009
Posts: 447
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 1:04:27 PM
Rank: Newbie

Groups: Registered

Joined: 9/20/2010
Posts: 8
Location: France
Thanks for the example, it's correctly works now.

Regards, Fabrice
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-2016 ArtfulBits. All rights reserved.