Skip to content

Instantly share code, notes, and snippets.

@ankushg
Last active August 22, 2021 18:30
Show Gist options
  • Save ankushg/8621454 to your computer and use it in GitHub Desktop.
Save ankushg/8621454 to your computer and use it in GitHub Desktop.
HoloGraphLibrary PieGraph Example
<com.echo.holographlibrary.PieGraph
android:layout_width="match_parent"
android:layout_height="200dp"
android:id="@+id/graph"/>
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