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 combine two charts sharing the same x-axis in a single view Options · View
dll
#1 Posted : Saturday, August 14, 2010 6:50:36 PM
Rank: Member

Groups: Registered

Joined: 8/1/2010
Posts: 19
Location: LED
Hi,

Could you please give some hint how to combine two chart series on the single view (area?) with sharing common x-asix, actually, just like on the illustration below:




Thanks,
Dmitri
Baydalka Volodymyr
#2 Posted : Monday, August 16, 2010 12:42:09 PM
Rank: Developers Team


Groups: Registered, Administrators

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

Please, check the attached sample. That demonstrates how to use one axis for several areas.

Best regards,
File Attachment(s):
TwoSeriesSample.zip (14kb) downloaded 7 time(s).
Volodymyr Baydalka
Andriod development and support team
dll
#3 Posted : Tuesday, August 17, 2010 9:22:58 AM
Rank: Member

Groups: Registered

Joined: 8/1/2010
Posts: 19
Location: LED
Unfortunately, sample did not work, see image below:



Also, calling
Code:
area1.getAxes().remove(area1.getDefaultXAxis());
as stated in your sample causes NPE inside AiCharts. So I had to remove it, just left setting the new default XAxis.


The NPE stacktrace:
Code:
java.lang.NullPointerException
        at com.artfulbits.aiCharts.Base.ChartArea$1.onChanged(ChartArea.java:174)
        at com.artfulbits.aiCharts.Base.ChartArea$1.onChanged(ChartArea.java:167)
        at com.artfulbits.aiCharts.Base.ChartCollection.onChanged(ChartCollection.java:268)
        at com.artfulbits.aiCharts.Base.ChartCollection.remove(ChartCollection.java:195)
        at com.dll.test.DetailsActivity.buildCandleSeries(DetailsActivity.java:191)
        at com.dll.test.DetailsActivity.displayChart(DetailsActivity.java:610)
        at com.dll.test.DetailsActivity.onClick(DetailsActivity.java:468)
        at android.view.View.performClick(View.java:2408)
        at android.widget.CompoundButton.performClick(CompoundButton.java:99)
        at android.view.View$PerformClick.run(View.java:8817)
        at android.os.Handler.handleCallback(Handler.java:587)
        at android.os.Handler.dispatchMessage(Handler.java:92)
        at android.os.Looper.loop(Looper.java:144)
        at android.app.ActivityThread.main(ActivityThread.java:4937)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:521)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
        at dalvik.system.NativeStart.main(Native Method)

Baydalka Volodymyr
#4 Posted : Tuesday, August 17, 2010 11:52:47 PM
Rank: Developers Team


Groups: Registered, Administrators

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

What aiCharts version do you use?

Best regards,
Volodymyr Baydalka
Andriod development and support team
dll
#5 Posted : Wednesday, August 18, 2010 12:00:29 AM
Rank: Member

Groups: Registered

Joined: 8/1/2010
Posts: 19
Location: LED
I suppose 1.5 - that one I've downloaded from trial section. Actually I have aicharts.zip folder with stuff inside but there is no version.txt file or so. How can I check the latest version ?
dll
#6 Posted : Wednesday, August 18, 2010 12:27:29 AM
Rank: Member

Groups: Registered

Joined: 8/1/2010
Posts: 19
Location: LED
Re-downloaded trial package - it says 1.5.0.2 , the problem with NPE above still reproducible.
dll
#7 Posted : Wednesday, August 18, 2010 12:41:42 AM
Rank: Member

Groups: Registered

Joined: 8/1/2010
Posts: 19
Location: LED
Instead of removing I tried to hide ( setVisible(false) ) the old xAxis - and it seems it worked. See the picture below.

But how can I change the height ratio of those two areas ? I would like the bottom area to take 1/3 or even less of entire height - right now it is taking the exactly 1/2.


Baydalka Volodymyr
#8 Posted : Wednesday, August 18, 2010 7:00:33 PM
Rank: Developers Team


Groups: Registered, Administrators

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

Please, check next thread to get the solution http://www.artfulbits.com/Support/forum.aspx?g=posts&t=66

Best regards,
Volodymyr Baydalka
Andriod development and support team
Users browsing this topic
Guest (2)
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.