Last active
August 22, 2021 18:30
-
-
Save ankushg/8621454 to your computer and use it in GitHub Desktop.
HoloGraphLibrary PieGraph Example
This file contains hidden or 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
<com.echo.holographlibrary.PieGraph | |
android:layout_width="match_parent" | |
android:layout_height="200dp" | |
android:id="@+id/graph"/> |
This file contains hidden or 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
PieGraph pg = (PieGraph)findViewById(R.id.graph); | |
PieSlice slice = new PieSlice(); | |
slice.setColor(Color.parseColor("#99CC00")); | |
slice.setValue(2); | |
pg.addSlice(slice); | |
slice = new PieSlice(); | |
slice.setColor(Color.parseColor("#FFBB33")); | |
slice.setValue(3); | |
pg.addSlice(slice); | |
slice = new PieSlice(); | |
slice.setColor(Color.parseColor("#AA66CC")); | |
slice.setValue(8); | |
pg.addSlice(slice); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment