An open API service indexing awesome lists of open source software.

https://github.com/pwcong/histogramview

A simple view to show data by Histogram.
https://github.com/pwcong/histogramview

Last synced: 3 months ago
JSON representation

A simple view to show data by Histogram.

Awesome Lists containing this project

README

        

# HistogramView [![](https://jitpack.io/v/pwcong/HistogramView.svg)](https://jitpack.io/#pwcong/HistogramView)

A simple view to show data by histogram.

![SnapShot1](https://github.com/pwcong/SnapShot/blob/master/HistogramView/snapshot1.gif)

![SnapShot2](https://github.com/pwcong/SnapShot/blob/master/HistogramView/snapshot2.gif)

![SnapShot3](https://github.com/pwcong/SnapShot/blob/master/HistogramView/snapshot3.gif)
*******

# How To Install

see https://jitpack.io/#pwcong/HistogramView

*******

# Usage

Add it in your xml of Layout.

```

```

Here is the list of attributes:

```










```

And then add some datas. Especially that class of data must be `HistogramEntry` or other class extends `HistogramView`.

```
...

view = (HistogramView) findViewById(R.id.view);
view.setData(getEntries());

private ArrayList getEntries(){

ArrayList entries=new ArrayList<>();

entries.add(new HistogramEntry("小明",18));
entries.add(new HistogramEntry("小红",9));
entries.add(new HistogramEntry("小黑",40));
entries.add(new HistogramEntry("小花",25));
entries.add(new HistogramEntry("小黄",33));

return entries;

}

```

*******