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
smartposter  
#1 Posted : Tuesday, September 18, 2012 6:48:34 PM(UTC)
smartposter
Rank: Member

Groups: Registered
Joined: 9/11/2012(UTC)
Posts: 11
Location: beijing

in a line chart, I want to set the x axis as date and the span of x axis is 50 seconds.
so in onCreate() i set the start value as now and the end value is now+50s.
onCreate(){
area.getDefaultXAxis().setLabelFormat(new SimpleDateFormat("HH:MM:SS"));
area.getDefaultXAxis().setValueType(ChartAxis.ValueType.Date);
long now=System.currentTimeMillis();
Date xDateStart=new Date(now);
Date xDateEnd = new Date(now + 50000);
area.getDefaultXAxis().getScale().setDateRange(xDateStart,xDateEnd);
}

the maximum points is 50 and the update frequency is one point every seconds. When the points reach maximum number, i want to move the scale of x axis accordingly.

long now=System.currentTimeMillis();
Date xDateEnd=new Date(now);
m_targetCollection.addDate(xDateEnd,value);
if(m_pointsCounter > m_maxPoints)
{
//when reach maximum points, move the start date to end date - 50 seconds
Date xDateStart = new Date(now - 50000);

chartView.getAreas().get("spo").getDefaultXAxis().getScale().setDateRange(xDateStart,xDateEnd);
}

but the UI display is as attached picture. The x axis is always display 13:09:00 and never update.
smartposter attached the following image(s):
linechart.png (44kb) downloaded 9 time(s).

You cannot view/download attachments. Try to login or register.
smartposter  
#2 Posted : Wednesday, September 19, 2012 6:36:22 AM(UTC)
smartposter
Rank: Member

Groups: Registered
Joined: 9/11/2012(UTC)
Posts: 11
Location: beijing

anybody can help?
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.