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

Custom X-Axis Options · View
fishjd
#1 Posted : Friday, April 08, 2011 8:19:28 PM
Rank: Newbie

Groups: Registered

Joined: 4/8/2011
Posts: 3
I am extending the zoom example.

1) I set the number of points on the x-axis from 200 to 2,000.

2) For the labels on the x Axis I want the 254th point on the to display '1' and 2*254 to display '2' ....

3) When zoomed I want the same labeling system. (My application zooms in both x and y axis.)

4) The grid lines should align with the labels. One Grid line every 254 points on the x Axis.

Any examples or code sample would be greatly appreciated.

Thank you very much,

Fish

Baydalka Volodymyr
#2 Posted : Monday, April 11, 2011 12:31:39 PM
Rank: Developers Team


Groups: Registered, Administrators

Joined: 7/28/2009
Posts: 447
Hi,

Try to us e ChartAxis.getScale().setInterval() method to specify labels interval. Unfortunately you can't specify labels interval while chart is zoomed in.

Also check following sample -

Best regards,
File Attachment(s):
aiCharts.Sample311.zip (15kb) downloaded 10 time(s).
Volodymyr Baydalka
Andriod development and support team
fishjd
#3 Posted : Monday, April 11, 2011 11:17:32 PM
Rank: Newbie

Groups: Registered

Joined: 4/8/2011
Posts: 3
Hi,

Once again I have failed to communicate, Sad , but your example helped me toward a solution. Thank you very much.

My point #2 from my previous message should be clarified to:
On the xAxis on the 254th data point display "1" on the label, not "1*254" See the chart below.

xValue -> xLabel
0 -> 0
254 -> 1
508 -> 2
762 -> 3
1016 -> 4
1207 -> 5
1524 -> 6
...
4826 -> 19

with a max xValue of 5001.

The code ChartAxis.getScale().setInterval() was a key to the solution, as well as a modified setFormat() you provided in the example.

The completed example is attached.

This support item may be closed.

Will the "setInterval() not working when zoomed" be fixed in the next release? Please keep me posted on the progress.

Thank you for your help.

Fish


File Attachment(s):
MainActivity.java.txt (3kb) downloaded 7 time(s).
Baydalka Volodymyr
#4 Posted : Tuesday, April 12, 2011 12:48:43 PM
Rank: Developers Team


Groups: Registered, Administrators

Joined: 7/28/2009
Posts: 447
Hi,

fishjd wrote:
Will the "setInterval() not working when zoomed" be fixed in the next release? Please keep me posted on the progress.


We can't guarantee that we will change it, because it's not a bug. That is serious change of behavior, that may affect for other customers that use or expect this behavior.

Also, if you do not need to change labels interval, you may use custom labels. Please check following sample.

Best regards,
File Attachment(s):
aiCharts.Sample311.zip (15kb) downloaded 7 time(s).
Volodymyr Baydalka
Andriod development and support team
fishjd
#5 Posted : Tuesday, April 12, 2011 6:49:52 PM
Rank: Newbie

Groups: Registered

Joined: 4/8/2011
Posts: 3
The CustomLables() works great.

The only problem is when the user zooms in very close there are no labels displayed. We need to determine how zoomed in we are so we can display the proper amount of labels. I was looking for the visible start x and end x but couldn't find them. How do we determine how zoomed in the graph is?
Baydalka Volodymyr
#6 Posted : Wednesday, April 13, 2011 1:56:13 PM
Rank: Developers Team


Groups: Registered, Administrators

Joined: 7/28/2009
Posts: 447
Hi,

Please check following thread http://www.artfulbits.co....aspx?g=posts&t=300
Also please check attached sample.

Best regards,
File Attachment(s):
aiCharts.Sample311.zip (15kb) downloaded 13 time(s).
Volodymyr Baydalka
Andriod development and support team
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.