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
n_j  
#1 Posted : Monday, November 23, 2009 9:07:48 PM(UTC)
n_j
Rank: Member

Groups: Registered
Joined: 11/19/2009(UTC)
Posts: 20
Location: Mumbai

ChartAxisScale.setRange(min, max) takes only double values. My x-axis is of type Date with format 'h:mm aa', how to set range in this case? for example, I want the minimum value to be 12:00AM and maximum value 8:00PM.

Please help.

Baydalka Volodymyr  
#2 Posted : Monday, November 23, 2009 9:53:04 PM(UTC)
Baydalka Volodymyr
Rank: Member

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

Hi,

In date-time mode one double is equal to one millisecond. Try to use this code

Calendar calendar = Calendar.getInstance();

calendar.set(2010, 8, 1); // some min date
double min = calendar.getTimeInMillis();
calendar.set(2010, 8, 10); // some max date
double max = calendar.getTimeInMillis();

axis.setValueType(ValueType.Date);
axis.getScale().setRange(min, max);

Best regards,
Volodymyr Baydalka
Andriod development and support team
n_j  
#3 Posted : Monday, November 23, 2009 9:54:29 PM(UTC)
n_j
Rank: Member

Groups: Registered
Joined: 11/19/2009(UTC)
Posts: 20
Location: Mumbai

thanks, I will try that.
n_j  
#4 Posted : Tuesday, November 24, 2009 11:37:10 AM(UTC)
n_j
Rank: Member

Groups: Registered
Joined: 11/19/2009(UTC)
Posts: 20
Location: Mumbai

Hi,

I tried to set range using this code,

Calendar calendar = Calendar.getInstance();
calendar.set(2009, 11, 4, 12, 0);
long min = calendar.getTimeInMillis();
calendar.set(2009, 11, 4, 0, 0);
long max = calendar.getTimeInMillis();


The problem is that if I use setRange(min,max) method no values are displayed on x-axis and if I don't set the range, the specific values are displayed.

Please help.

Edited by user Tuesday, November 24, 2009 11:37:51 AM(UTC)  | Reason: Not specified

pturchenko  
#5 Posted : Thursday, November 26, 2009 7:16:59 PM(UTC)
Guest
Rank: Guest

Groups: Guests
Joined: 7/9/2009(UTC)
Posts: 3,342

Please make sure you do not receive this offset due to GTM timezome offset. Perhaps your data points falling off the range because of that.
n_j  
#6 Posted : Thursday, November 26, 2009 7:40:58 PM(UTC)
n_j
Rank: Member

Groups: Registered
Joined: 11/19/2009(UTC)
Posts: 20
Location: Mumbai

I am not working with reference to any timezone, I just want the minimum value of to be 12PM and the max value to be midnight. The setRange(min, max) is not working for any date values.
Users browsing this topic
Guest (2)
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.