この問題について質問があるに違いありませんが、関連することがわかった問題のどれも私の問題を解決しませんでした。そう。
次のシナリオがあります。複数のグラフを下にスクロールできる画面が必要です。この画像がここを表しているように
今のところ、以下のコードを使用すると、この結果が得られます。
つまり、何が起こっているのかというと、両方のチャートが互いに重なっているということです。その理由はわかりません。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/mainLayout">
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ScrollView01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/secondLayout">
<com.github.mikephil.charting.charts.PieChart
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/pieChart" />
<com.github.mikephil.charting.charts.BarChart
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/barChart"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true" />
</RelativeLayout>
</ScrollView>
</RelativeLayout>
MPAndroidchart ライブラリを使用しています。
ありがとう。