diff --git a/README.md b/README.md new file mode 100644 index 0000000..fb34409 --- /dev/null +++ b/README.md @@ -0,0 +1,56 @@ +# Charts +[![Release](https://img.shields.io/github/release/asayushg/charts.svg?style=flat)](https://jitpack.io/#asayushg/charts) +[![](https://www.jitpack.io/v/asayushg/charts.svg)](https://www.jitpack.io/#asayushg/charts) + +### Gradle Setup + +Step 1. Add the JitPack repository to your build file +Add it in your root build.gradle at the end of repositories: + + allprojects { + repositories { + ... + maven { url 'https://www.jitpack.io' } + } + } +Step 2. Add the dependency + + dependencies { + implementation 'com.github.asayushg:charts:1.0.1' + } + +

Examples :eyes:

+ + + +

Documentation :notebook_with_decorative_cover:

+

1. Pie Chart

+ +Add the PieChart View in your layout as: +``` + +``` + +Create a list of Slice with percentage and color and submit to PieChart view with border width and color as: +``` +val list = ArrayList() +list.add( + PieChart.Slice( + percentage = 20f, + color = Color.RED + ) + ) +findViewById(R.id.pieChart).submitList(pieChartList = list, borderSize = 10f, borderColor = Color.GRAY) +``` + +### Charts Available +- [x] Pie Chart +- [ ] Doughnut Chart +- [ ] Bar Chart +- [ ] Line Chart +- [ ] Area Chart +- [ ] Scatter Plot diff --git a/pie-chart-example.gif b/pie-chart-example.gif new file mode 100644 index 0000000..8d2af3a Binary files /dev/null and b/pie-chart-example.gif differ