app/src/main/res/layout/fragment_statistics.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ap="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".statistics.StatisticsFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.google.android.material.button.MaterialButton
android:id="@+id/reminderTableButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:text="@string/tabular_view" />
<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<Spinner
android:id="@+id/timeSpinner"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="center"
android:entries="@array/analysis_days" />
</LinearLayout>
<com.androidplot.xy.XYPlot
android:id="@+id/medicinesPerDayChart"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
ap:graphAnchor="left_top"
ap:graphHeight="50dp"
ap:graphHeightMode="fill"
ap:graphHorizontalPosition="0"
ap:graphHorizontalPositioning="absolute_from_left"
ap:graphPaddingBottom="15dp"
ap:graphPaddingLeft="20dp"
ap:graphPaddingRight="5dp"
ap:graphPaddingTop="20dp"
ap:graphVerticalPosition="0"
ap:graphVerticalPositioning="absolute_from_top"
ap:gridClippingEnabled="false"
ap:legendAnchor="left_bottom"
ap:legendHeight="50dp"
ap:legendHeightMode="absolute"
ap:legendHorizontalPosition="0"
ap:legendHorizontalPositioning="absolute_from_left"
ap:legendVerticalPosition="0"
ap:legendVerticalPositioning="absolute_from_bottom"
ap:legendVisible="true"
ap:legendWidth="10dp"
ap:legendWidthMode="fill"
ap:lineLabelInsetBottom="-13dp"
ap:lineLabelInsetLeft="-13dp"
ap:lineLabels="left|bottom"
ap:marginTop="10dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal">
<com.androidplot.pie.PieChart
android:id="@+id/takenSkippedChartTotal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
tools:ignore="NestedWeights" />
<com.androidplot.pie.PieChart
android:id="@+id/takenSkippedChart"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>