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

Chart scrolling doesn't work Options · View
aazwork
#1 Posted : Friday, October 01, 2010 3:37:02 PM
Rank: Member


Groups: Registered

Joined: 6/10/2010
Posts: 29
Location: Belarus
Hello

1) A time ago I had ChartView as root layout on Activity.
Chart had ability to scroll left/right

2) Now I put my ChartView into Layouts tree (like showed below) and I can not scroll my chart now.
Why?
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/LinearLayout01"
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    xmlns:android="http://schemas.android.com/apk/res/android">
    <RelativeLayout android:id="@+id/RelativeLayout01"
        android:layout_width="wrap_content" android:layout_height="wrap_content"
        android:gravity="center_horizontal">
        <LinearLayout android:id="@+id/chart_view_chart_area"
            android:layout_centerHorizontal="true" android:background="#ffffffff"
            android:layout_alignParentTop="true" android:gravity="center"
            android:layout_height="fill_parent" android:layout_marginBottom="20dp"
            android:padding="2dp" android:layout_width="wrap_content">
            <!--
                <ChartView android:id="@+id/chart_view" android:layout_width="fill_parent" android:layout_height="fill_parent" />
ChartView will be inserted programmatically  (see below)
            -->

        </LinearLayout>
        ....
    </RelativeLayout>
</LinearLayout>


Code:

rootLayout = (LinearLayout) inflater.inflate(R.layout.chart_view, null);
chartView = new ChartView(this);
LinearLayout chartArea = (LinearLayout) rootLayout.findViewById(R.id.chart_view_chart_area);
chartArea.removeAllViews();
chartArea.addView(chartView);
regards
Baydalka Volodymyr
#2 Posted : Friday, October 01, 2010 5:22:33 PM
Rank: Developers Team


Groups: Registered, Administrators

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

How do you set LayoutParams for ChartView? How do you turn on scrolling?

FYI, you may add ChartView to XML layout (in the same way as a regular Android's view) via tag <com.artfulbits.aiCharts.ChartView>

Best regards,
Volodymyr Baydalka
Andriod development and support team
aazwork
#3 Posted : Monday, October 04, 2010 10:30:51 AM
Rank: Member


Groups: Registered

Joined: 6/10/2010
Posts: 29
Location: Belarus
Baydalka Volodymyr wrote:
How do you set LayoutParams for ChartView? How do you turn on scrolling?

All Charts params I set up by code. And in the past I had not to set specific parameters to scroll.
Right now I added the following code:
Code:
setPanning(ChartView.PANNING_HORIZONTAL);
And had a success!
Thanks a lot!

Baydalka Volodymyr wrote:
FYI, you may add ChartView to XML layout (in the same way as a regular Android's view) via tag <com.artfulbits.aiCharts.ChartView>

I know, thanks!
regards
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.