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

Zoom on Xaxsis Date Options · View
cesaripaolo
#1 Posted : Friday, June 01, 2012 5:32:50 PM
Rank: Member

Groups: Registered

Joined: 10/17/2011
Posts: 16
Location: Italy
Hi,
I have this problem and I'm not able to solve.
I want to plot a ChartView with two series(Bubble and FastLine) of some measure taken from a device.
I don't know a priori how much are these and neither the frequency of the tests.
I do the following
a)series1=new ChartSeries("series1",ChartTypes.FastLine);
series2 = new ChartSeries("series2", ChartTypes.Bubble);

b)read data and store it in the series, computing min and max value of the data range
area.getDefaultXAxis().getScale().setMinimum((double) startDate.getTime());
area.getDefaultXAxis().getScale().setMaximum((double) endMax.getTime());


c)I set some StripLines to have different box colours on Y axsis.
ChartAxisStripLine stripLine1 = createStripLine(50, 30, 255, 255, 0);
area.getDefaultYAxis().getStripLines().add(stripLine1);

d)I set the ValueType of date for the Xaxis and the interval like:
area.getDefaultXAxis().getScale().setInterval(1.0,IntervalType.Month);


e) I add the ZoomControls.

QUESTIONS:
1) How can I set the Range of the interval of One Month in One Month?
if I set the interval on 1 month then
area.getDefaultYAxis().getScale().setZoom(calendar.getInstance(),1.0);but it does not work


2)When user click on ZoomIn and the intervalType is equal to Month i want to switch the interval to Week and the zoomRange Position to weeks like
(area.getDefaultXAxis().getScale().getIntervalType()== IntervalType.Month) {
//set zoom on today and 1 week before area.getDefaultXAxis().getScale().setZoom(Calendar.getInstance().getTimeInMillis(),7.0);
//if i change the interval is there some precomputed constants to convert month in weeks, weeks in days..[I have to compute it in milliseconds..right?]
}

3)once I have the interval in hours I want to keep track of the days. I can insert StripLine with the numeber of the day or edit X axis label(in a such a way that every 24h prints the day: how can I accomplish this?Is there an easy way?

Any suggestion is appreciated

Paolo
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.