-
Notifications
You must be signed in to change notification settings - Fork 0
How to use BarGraph
hiroki fujiwara edited this page Mar 20, 2015
·
1 revision
#BarGraph View
add following code to view layout.
<hm.orz.octworks.extholographlibrary.BarGraph
android:layout_width="match_parent"
android:layout_height="200dp"
android:id="@+id/graph"/>
set value of graph in view class.
ArrayList<Bar> points = new ArrayList<Bar>();
Bar d = new Bar();
d.setColor(Color.parseColor("#99CC00"));
d.setName("Test1");
d.setValue(10);
Bar d2 = new Bar();
d2.setColor(Color.parseColor("#FFBB33"));
d2.setName("Test2");
d2.setValue(20);
points.add(d);
points.add(d2);
BarGraph g = (BarGraph)findViewById(R.id.graph);
g.setBars(points);
g.setUnit("$");