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

How to set the YAXIS label width? Options · View
ccoroom
#1 Posted : Wednesday, April 14, 2010 6:38:59 PM
Rank: Member

Groups: Registered

Joined: 3/15/2010
Posts: 10
I have multiple areas on a chart.
They should share same x point, but have different value range.

Y Axis of each area are aligned automatically based on values it had. Then, I have different chart area width.

Now, the only solution I found is adjust label position inside.

getDefaultYAxis().setLabelPosition(ChartAxis.LabelPosition.Inside)

But, it looks not good for me. Is there a way to auto align start position of each area as same?

Thanks.
Baydalka Volodymyr
#2 Posted : Thursday, April 15, 2010 2:29:34 PM
Rank: Developers Team


Groups: Registered, Administrators

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

Please, check this sample and let me know if you need some additional support.

Best regards,
File Attachment(s):
MultipleAreas.zip (8kb) downloaded 9 time(s).
Volodymyr Baydalka
Andriod development and support team
ccoroom
#3 Posted : Thursday, April 15, 2010 3:06:14 PM
Rank: Member

Groups: Registered

Joined: 3/15/2010
Posts: 10
I have already checked the example. setAutoAlignAreas() doesn't solve my problem.

Please check the attached image files. I want to align two y axis start with same position.
"y.png" shows the issue that I faced. and "y2.png" shows my temporary solution (somewhat ugly).

Thank you.
ccoroom attached the following image(s):
y.png (16kb) downloaded 125 time(s).
y2.png (14kb) downloaded 123 time(s).
pturchenko
#4 Posted : Thursday, April 15, 2010 3:47:41 PM
Rank: Guest

Groups:

Joined: 7/9/2009
Posts: 3,383
Please provide library version and sample to reproduce this issue.
ccoroom
#5 Posted : Tuesday, April 20, 2010 9:06:27 AM
Rank: Member

Groups: Registered

Joined: 3/15/2010
Posts: 10
pturchenko wrote:
Please provide library version and sample to reproduce this issue.


I use version 1.5 of aichart on Android 2.
And the case is always re-produceable by using two areas with two different kind of series.

Quote:
ChartSeries series1 = new ChartSeries("candle_series", ChartTypes.CandleStick);
ChartPointCollection mHiLoPoints = series1.getPoints();
ChartPoint point = new ChartPoint(0, 1, 2, 3, 4); // add small number
mHiLoPoints.add(point);

ChartSeries series2 = new ChartSeries("column_series", ChartTypes.Column);
ChartPointCollection mHiLoPoints = series2.getPoints();
point = new ChartPoint(0, 1000000); // add large number
mColumnPoints.add(point);


Is it possible to align two different area on the same y axis line?
pturchenko
#6 Posted : Wednesday, April 21, 2010 6:17:49 PM
Rank: Guest

Groups:

Joined: 7/9/2009
Posts: 3,383
Hi. We can't reproduce issue with the code snippets you gave. Please create a separate sample that can demonstrate incorrect behavior and attach it to your post.
ccoroom
#7 Posted : Thursday, April 22, 2010 8:58:42 AM
Rank: Member

Groups: Registered

Joined: 3/15/2010
Posts: 10
pturchenko wrote:
Hi. We can't reproduce issue with the code snippets you gave. Please create a separate sample that can demonstrate incorrect behavior and attach it to your post.


Hi, I found ways to reproduce this issue.

1. use setBounds() when creating areas.
Quote:
mAreaCandle.setBounds(new Rect(0, 5, mDisplay.getWidth(), (mDisplay.getHeight()/3) * 2 - 25));
mAreaColumn.setBounds(new Rect(0, ((mDisplay.getHeight()/3) * 2) + 10, mDisplay.getWidth(), mDisplay.getHeight() - 40));


I have attached a sample project to demonstrate this.


2. add points after the chart is created.
Without using setBounds(), it is fine add points to series points when creating a chart. But, when I add some points after that I can see the same issue.

I think that there are potentially more ways to reproduce this issue. Maybe retouching the areas after they are created cause this problem.

Can I get the patch for this issue? My company bought 1 year subscription license. Please let me know.

Thanks.
File Attachment(s):
chart.zip (13kb) downloaded 6 time(s).
Baydalka Volodymyr
#8 Posted : Thursday, April 22, 2010 5:43:19 PM
Rank: Developers Team


Groups: Registered, Administrators

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

If you use ChartArea.setBounds method, you should implement areas alignment by yourself. There is a sample with some workaround to do that.

Best regards,
File Attachment(s):
AreaAlignSample.zip (15kb) downloaded 25 time(s).
Volodymyr Baydalka
Andriod development and support team
dll
#9 Posted : Thursday, August 19, 2010 8:21:09 AM
Rank: Member

Groups: Registered

Joined: 8/1/2010
Posts: 19
Location: LED
Thanks, it worked well now ! :)

The only artifact, is when I add two series - xAxis hides first value, however it shows it fine when second chart is not added (in both cases xAxis is the same, data set is the same):




Baydalka Volodymyr
#10 Posted : Thursday, August 26, 2010 7:35:59 PM
Rank: Developers Team


Groups: Registered, Administrators

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

Make sure that axis range is correct. From your image I can see that your data is shifted to the right.

Best regards,
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.