android - 图表库中的水平滚动 - WilliamChart

标签 android charts statistics

我正在使用 WilliamChart 库来显示一些统计数据。问题是我无法使其可滚动。

我找到了下面的方法,但是没有用:

setHorizontalScrollBarEnabled(true)

有人知道怎么解决吗?

提前致谢

最佳答案

@pindleskin:我在使用 AndroidPLot Chart 时遇到了同样的问题。在您的 xml 中尝试这种方式。希望对你有帮助

<?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="match_parent"
        >

        <ScrollView
            android:layout_width="fill_parent"
            android:layout_height="match_parent"
            android:scrollbars="vertical"
            >

            <HorizontalScrollView
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:fillViewport="true"
                >

                <RelativeLayout
                    android:layout_width="fill_parent"
                    android:layout_height="230dp" >

                    <RelativeLayout
                        android:id="@+id/RLayout_chart_container"
                        android:orientation="horizontal"
                        android:layout_width="fill_parent"
                        android:layout_height="230dp" >

    ///// Add your Chart Here

     </RelativeLayout>


                </RelativeLayout>
            </HorizontalScrollView>
        </ScrollView>


    </LinearLayout>

关于android - 图表库中的水平滚动 - WilliamChart,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31961728/

相关文章:

android - 在 android studio 2.3 中检索项目的父项时出错

r - 使用 'bife' 包的固定效应 logit 模型的拟合优度

android - 在 .so 中混合使用 c/c++ 和程序集时避免文本重定位

java - Android NDK调用具有不同命名空间的 native 方法

javascript - 使用 c3.js 创建自定义圆环图或饼图

php - Javascript 图表未插入 DIV 容器中

excel - Excel 中的实时图表 : for future dates, 行降至零

algorithm - 什么是比较方差很小的数据集之间相似性的好方法?

Android 市场统计 API?

java - 在Android中,如何使用Java反射调用sun.misc.Unsafe方法?