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.
- Host: GitHub
- URL: https://github.com/pwcong/histogramview
- Owner: pwcong
- Created: 2016-09-08T15:27:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-23T14:00:50.000Z (7 months ago)
- Last Synced: 2024-10-23T15:33:35.504Z (7 months ago)
- Language: Kotlin
- Homepage:
- Size: 197 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HistogramView [](https://jitpack.io/#pwcong/HistogramView)
A simple view to show data by histogram.



*******# 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;
}```
*******