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

Labels Adapter Options · View
Sol-Tec
#1 Posted : Monday, February 11, 2013 12:54:40 PM
Rank: Member

Groups: Registered

Joined: 2/5/2013
Posts: 10
Hi,
after some evaluations, we've bought license and subscription for aiChart Library.
We've a problem using labels adapters. I'll show you a little snippet of code:
Code:
ChartAxis y_axis = area.getDefaultYAxis();
y_axis.setLabelsAdapter(ChartAxis.SMART_LABELS_ADAPTER);
ChartAxisScale axisScaleY = y_axis.getScale();
axisScaleY.setRange(minY, maxY);
axisScaleY.setInterval(3);

For Y axis, I define a SMART_LABELS_ADAPTER and 3 intervals for the grid. I've also enabled zoom gesture (for Y and X).
All works fine.

I need to 'restore' the chart to the original configuration in terms of intervals, using a button. After some zoom gesture I get, correctly, 4 or more intervals on Y axis: clicking on the button I reset the zoom and i want to restore the 3 intervals as if the chart was just created.
Zoom's reset operation works as expected but re-using code I've written before I can't restore the chart, I still have 4 intervals.

How can I fix this behavior?

Thank you in advance.
Best regards
Baydalka Volodymyr
#2 Posted : Monday, February 11, 2013 1:03:23 PM
Rank: Developers Team


Groups: Registered, Administrators

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

To reset previous calls of setRange or setInterval you may use setMinimum(null), setMaximum(null) and setInterval(null)

Best regards,
Volodymyr Baydalka
Andriod development and support team
Sol-Tec
#3 Posted : Monday, February 11, 2013 1:26:16 PM
Rank: Member

Groups: Registered

Joined: 2/5/2013
Posts: 10
It is easier than I thought.
Now it works fine.

Thank you.
Sol-Tec
#4 Posted : Tuesday, February 12, 2013 1:33:13 PM
Rank: Member

Groups: Registered

Joined: 2/5/2013
Posts: 10
I'm sorry but i still have some issues.

This is my code used to create chart:
Code:
ChartAxis y_axis = area.getDefaultYAxis();
y_axis.setLabelsAdapter(ChartAxis.SMART_LABELS_ADAPTER);
ChartAxisScale axisScaleY = y_axis.getScale();
axisScaleY.setRange(minY, maxY);
axisScaleY.setInterval(3);


When i've to reset values, I do the following:
Code:
x_axis.getScale().resetZoom();
y_axis.getScale().resetZoom();
y_axis.getScale().setMinimum(null);
y_axis.getScale().setMaximum(null);
y_axis.getScale().setInterval(null);    


As result on Y axis appear automatic labels.
After that if try to set new values I don't get expected result:
Code:
y_axis.getScale().setMinimum(newMinY);
y_axis.getScale().setMaximum(newMaxY);
y_axis.getScale().setInterval(3);


Zoom scale is correctly reset, threre are the 3 intervals I requested but there is another grid (and its label) and sometimes this unexpected label is overlapped to another.

I'll attach two images: the first one is the chart obtained after creation, the second one is obtained after the excecution of the last two snippets of code.





It seems that some labels generated set to null the scale values are mantained when I define new values.

How can I fix this issue?

Thank you in advance.
Best regards
Baydalka Volodymyr
#5 Posted : Tuesday, February 12, 2013 1:38:58 PM
Rank: Developers Team


Groups: Registered, Administrators

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

I don't recommend you to set setLabelsAdapter(ChartAxis.SMART_LABELS_ADAPTER); for Y axis. It useful for a X axis, or for bar (horizontal) types.

Best regards,
Volodymyr Baydalka
Andriod development and support team
Sol-Tec
#6 Posted : Tuesday, February 12, 2013 1:48:16 PM
Rank: Member

Groups: Registered

Joined: 2/5/2013
Posts: 10
Ok,
I've also tried with DEFAULT_LABELS_ADAPTER and SERIES_LABELS_ADAPTER but i've the same issue.
So which is the best way to define Y axis label?
Baydalka Volodymyr
#7 Posted : Thursday, February 14, 2013 4:34:22 PM
Rank: Developers Team


Groups: Registered, Administrators

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

Unfortunately I can't reproduce that issue. Could you provide values of newMinY and newMaxY values? Do you use ChartAxis.getCustomLabels to set label?

Best regards,
Volodymyr Baydalka
Andriod development and support team
Sol-Tec
#8 Posted : Thursday, February 14, 2013 4:51:29 PM
Rank: Member

Groups: Registered

Joined: 2/5/2013
Posts: 10
Hi,
newMinY and newMaxY values are the same defined for minY and maxY.
I don't set any label, them are generated automatically.

Thank you.

Best regards
Sol-Tec
#9 Posted : Friday, February 15, 2013 2:06:25 PM
Rank: Member

Groups: Registered

Joined: 2/5/2013
Posts: 10
Hi,
do you have any suggestion about my problem?

Right now I've the following issues on Y axis:
- reset of axis scale (in terms of minumim, maximum and interval) works fine but an unexpected new grid appears;
- sometimes the label related to the new grid overlaps another label.

So, is it possible to avoid these issues? Which is the best way to manage Y axis?

Thank you in advance.
Best regards
Baydalka Volodymyr
#10 Posted : Monday, February 18, 2013 2:17:16 PM
Rank: Developers Team


Groups: Registered, Administrators

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

This bug is really hard to reproduce. Could you provide complete sample to test it?

Best regards,
Volodymyr Baydalka
Andriod development and support team
Sol-Tec
#11 Posted : Monday, February 18, 2013 4:53:51 PM
Rank: Member

Groups: Registered

Joined: 2/5/2013
Posts: 10
Hi,
thank you for the response.

I've prepared a simple example that reproduce the issue. I attach the entire Eclipse project (without aiChart Library) so you can test it by yourself.

The steps to reproduce the issue are the following:
- zoom the chart area;
- tap 'Reset' button.

Thank you in advance.

Best regards

File Attachment(s):
aiChartReset.zip (433kb) downloaded 4 time(s).
Sol-Tec
#12 Posted : Friday, February 22, 2013 1:37:24 PM
Rank: Member

Groups: Registered

Joined: 2/5/2013
Posts: 10
Do you have any news about the issue?

I apologize for insistence but this issue is very critical for our developments.

Thank you in advance.
Best regards
Baydalka Volodymyr
#13 Posted : Tuesday, February 26, 2013 2:30:45 PM
Rank: Developers Team


Groups: Registered, Administrators

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

Sorry for delay. We have fixed this bug (thank you for report and sample). To get latest version of aiCharts package, please send request to support@artfulbits.com

Best regards,
Volodymyr Baydalka
Andriod development and support team
Sol-Tec
#14 Posted : Wednesday, February 27, 2013 11:21:22 AM
Rank: Member

Groups: Registered

Joined: 2/5/2013
Posts: 10
Thnak you!

Edit:
The new version works as expected!!
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.