• Stars
    star
    534
  • Rank 83,095 (Top 2 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 11 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Fork of the HoloGraphLibrary by Daniel Nadeau with additionnal features

HoloGraphLibrary

Fork of the HoloGraphLibrary by Daniel Nadeau, with additionnal features

Welcome

This is a library written to allow beautiful graphs and charts to be easily incorporated into your Android application. Included are:

  • LineGraph view
  • BarGraph view
  • PieGraph view
  • MultiSeriesDonutGraph view

LineGraph BarGraph PieGraph MultiSeriesDonutGraph

Usage

LineGraph View

<com.echo.holographlibrary.LineGraph
        android:layout_width="match_parent"
        android:layout_height="200dp"
        android:id="@+id/graph"/>
Line l = new Line();
LinePoint p = new LinePoint();
p.setX(0);
p.setY(5);
l.addPoint(p);
p = new LinePoint();
p.setX(8);
p.setY(8);
l.addPoint(p);
p = new LinePoint();
p.setX(10);
p.setY(4);
l.addPoint(p);
l.setColor(Color.parseColor("#FFBB33"));
		
LineGraph li = (LineGraph)findViewById(R.id.graph);
li.addLine(l);
li.setRangeY(0, 10);
li.setLineToFill(0);

BarGraph View

<com.echo.holographlibrary.BarGraph
        android:layout_width="match_parent"
        android:layout_height="200dp"
        android:id="@+id/graph"/>
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("$");

PieGraph View

<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);

#MultiSeriesDonutGraph View

<com.echo.holographlibrary.MultiSeriesDonutGraph
        android:layout_width="match_parent"
        android:layout_height="200dp"
        android:id="@+id/graph"/>
MultiSeriesDonutGraph mg = (MultiSeriesDonutGraph) v.findViewById(R.id.multiseriesdonutgraph);

MultiSeriesDonutSlice slice = new MultiSeriesDonutSlice();
slice.setColor(Color.parseColor("#99CC00"));
slice.setValue(2);
mg.addSlice(0, slice);
slice = new MultiSeriesDonutSlice();
slice.setColor(Color.parseColor("#FFBB33"));
slice.setValue(3);
mg.addSlice(0, slice);
slice = new MultiSeriesDonutSlice();
slice.setColor(Color.parseColor("#AA66CC"));
slice.setValue(8);
mg.addSlice(0, slice);

slice = new MultiSeriesDonutSlice();
slice.setColor(Color.parseColor("#99CC00"));
slice.setValue(8);
mg.addSlice(1, slice);
slice = new MultiSeriesDonutSlice();
slice.setColor(Color.parseColor("#FFBB33"));
slice.setValue(5);
mg.addSlice(1, slice);
slice = new MultiSeriesDonutSlice();
slice.setColor(Color.parseColor("#AA66CC"));
slice.setValue(3);
mg.addSlice(1, slice);

Have fun!

More Repositories

1

Universal-init.d

A simple Android application which emulates the behavior of the init.d kernel mechanism (automatic execution of the scripts contained within the /system/etc/init.d folder at each boot)
Java
56
star
2

FlashGordon

Edify to Bash parser and translator, in the form of an Android app allowing to flash zips without using the recovery
Java
48
star
3

APKreator

Create gorgeous Android root apps in seconds with only a few lines of XML!
Java
33
star
4

Pimp_my_Z1

An Open-Source Android App to Control various sysfs interfaces available on the Xperia Z1 on certain kernels
Java
14
star
5

MPC2000XL

A Virtual Akai MPC 2000XL Drum Machine made with HTML5
CSS
10
star
6

Android_Scripts

A collection of useful scripts for Android developers and power users
Shell
10
star
7

APKreator-website

A full-blown realtime collaborative code-editor with Github & Google Drive integration
JavaScript
8
star
8

Pimp-my-Rom

Backup for the legacy Aroma Version of Pimp My Rom
8
star
9

android_device_samsung_i9300

International Galaxy S3 (i9300) Device Tree for Ubuntu Touch (raring-ringtail)
C
8
star
10

GLASSInput

InputMethodService for Google Glass on Android, allowing to navigate using the volume & menu/back buttons. See github.com/zhuowei/Xenologer
Java
5
star
11

zRamSettings

small app written to illustrate my answer on how to modify zRam compression level through java in the following xda-developers thread : http://forum.xda-developers.com/showthread.php?p=40187680
Java
5
star
12

CMDProcessorLibrary

An implementation of AOKP's CMDProcessor as a standalone library. This provides a concise and easy-to-use Java abstraction layer for the UNIX Shell on Android.
Java
5
star
13

RainbowLog

Ultra-Lightweight Colored Output for JavaScript's `console.log()`
CSS
4
star
14

APKreatorWebsite

The AngularJS/Hoodie Frontend & NodeJS/Express backend of my APKreator project
Java
3
star
15

android_vendor_samsung

r3p0 Proprietary blobs for Ubuntu Touch on the international Samsung Galaxy S3 (i9300)
3
star
16

AndroguideBlog

My Ghost blog
JavaScript
2
star
17

smart-watch

A Smartwatch built with CSS & Polymer
CSS
2
star
18

Ubuntu-Touch_manifests

Modified CM & local manifests involved in building Ubuntu Touch for the international Samsung Galaxy S3 (i9300)
2
star
19

i9300_interactive_build-script

An interactive shell script for building Ubuntu Touch (and cyanogenmod) for the Samsung Galaxy S3 (i9300)
Shell
2
star
20

android_device_samsung_smdk4412-common

Common Device-Tree for Ubuntu Touch on pegasus (Exynos4412) devices.
Java
1
star
21

android_vendor_cm

CM common vendor repo modified for Ubuntu Touch
Shell
1
star
22

bug-droid

A configurable CSS/Polymer Android Mascot
CSS
1
star
23

android_kernel_samsung_smdk4412

Pegasus (Exynos4412) Kernel sources for Ubuntu Touch
C
1
star
24

Z1CameraFix

A workaround for the Xperia Z1 CM-based roms camera issues, based on code and idea by @drklaw on XDA
Java
1
star
25

AngularPolymerBoilerplate

Boilerplate code for apps using both AngularJS & Polymer
CSS
1
star