-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add more example of chart usage
- Loading branch information
1 parent
f8e24e3
commit 73a7dc9
Showing
2 changed files
with
102 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,94 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".MainActivity"> | ||
|
||
<TextView | ||
android:id="@+id/tv_title_1" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
android:text="Pie Chart" | ||
android:textSize="24sp" | ||
android:textStyle="bold" | ||
android:layout_marginLeft="16dp" | ||
android:layout_marginTop="16dp"/> | ||
<com.dewakoding.androidchartjs.AndroidChartJSView | ||
android:id="@+id/android_chart_1" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintRight_toRightOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/tv_title_1"/> | ||
<TextView | ||
android:id="@+id/tv_title_2" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintTop_toBottomOf="@id/android_chart_1" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
android:text="Bar Chart" | ||
android:textSize="24sp" | ||
android:textStyle="bold" | ||
android:layout_marginLeft="16dp" | ||
android:layout_marginTop="16dp"/> | ||
<com.dewakoding.androidchartjs.AndroidChartJSView | ||
android:id="@+id/android_chart_2" | ||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintTop_toBottomOf="@id/tv_title_2" | ||
app:layout_constraintLeft_toLeftOf="parent"/> | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
<TextView | ||
android:id="@+id/tv_title_1" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="Bar Chart" | ||
android:textSize="24sp" | ||
android:textStyle="bold" | ||
android:layout_marginLeft="16dp" | ||
android:layout_marginTop="16dp"/> | ||
|
||
<com.dewakoding.androidchartjs.AndroidChartJSView | ||
android:id="@+id/android_chart_1" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintRight_toRightOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/tv_title_1"/> | ||
|
||
<TextView | ||
android:id="@+id/tv_title_2" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="Line Chart" | ||
android:textSize="24sp" | ||
android:textStyle="bold" | ||
android:layout_marginLeft="16dp" | ||
android:layout_marginTop="16dp"/> | ||
<com.dewakoding.androidchartjs.AndroidChartJSView | ||
android:id="@+id/android_chart_2" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintTop_toBottomOf="@id/tv_title_2" | ||
app:layout_constraintLeft_toLeftOf="parent"/> | ||
<TextView | ||
android:id="@+id/tv_title_3" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="Pie Chart" | ||
android:textSize="24sp" | ||
android:textStyle="bold" | ||
android:layout_marginLeft="16dp" | ||
android:layout_marginTop="16dp"/> | ||
<com.dewakoding.androidchartjs.AndroidChartJSView | ||
android:id="@+id/android_chart_3" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintTop_toBottomOf="@id/tv_title_2" | ||
app:layout_constraintLeft_toLeftOf="parent"/> | ||
<TextView | ||
android:id="@+id/tv_title_4" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="Doughnut Chart" | ||
android:textSize="24sp" | ||
android:textStyle="bold" | ||
android:layout_marginLeft="16dp" | ||
android:layout_marginTop="16dp"/> | ||
<com.dewakoding.androidchartjs.AndroidChartJSView | ||
android:id="@+id/android_chart_4" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintTop_toBottomOf="@id/tv_title_2" | ||
app:layout_constraintLeft_toLeftOf="parent"/> | ||
<TextView | ||
android:id="@+id/tv_title_5" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="Doughnut Chart" | ||
android:textSize="24sp" | ||
android:textStyle="bold" | ||
android:layout_marginLeft="16dp" | ||
android:layout_marginTop="16dp"/> | ||
<com.dewakoding.androidchartjs.AndroidChartJSView | ||
android:id="@+id/android_chart_5" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintTop_toBottomOf="@id/tv_title_2" | ||
app:layout_constraintLeft_toLeftOf="parent"/> | ||
</LinearLayout> | ||
|
||
|
||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</ScrollView> |