amv

AMVennDiagramView

AMVennDiagramView is a view can display the diagram like Venn diagram.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

39

Maintenance

Last Commit

2yrs ago

Contributors

3

Package

Dependencies

0

License

MIT

Categories

Readme

AMVennDiagramView

Pod Platform Pod License Pod Version Carthage Compatible Swift Package Manager compatible

AMVennDiagramView is a view can display the diagram like Venn diagram. It displays two circles whose area ratio is almost an accurate.

Demo

2018-02-17 18 31 11

Usage

Create vennDiagramView.

let vennDiagramView = AMVennDiagramView(frame: view.bounds)
view.addSubview(vennDiagramView)
vennDiagramView.setupVennDiagram(value1: 1000, value2: 500, commonValue: 200)
vennDiagramView.dataSource = self

Conform to the protocol in the class implementation.

// MARK:- Required
func vennDiagramView(_ vennDiagramView: AMVennDiagramView, fillColorForSection section: Int) -> UIColor
func vennDiagramView(_ vennDiagramView: AMVennDiagramView, strokeColorForSection section: Int) -> UIColor
    
// MARK:- Optional
func vennDiagramView(_ vennDiagramView: AMVennDiagramView, titleForSection section: Int, value: CGFloat) -> String  // default is empty
func titleForCommonArea(in vennDiagramView: AMVennDiagramView, value: CGFloat) -> String // default is empty
func vennDiagramView(_ vennDiagramView: AMVennDiagramView, textColorForSection section: Int) -> UIColor // default is black
func textColorForCommonArea(in vennDiagramView: AMVennDiagramView) -> UIColor // default is black
func vennDiagramView(_ vennDiagramView: AMVennDiagramView, textFontForSection section: Int) -> UIFont // default is System 17.0
func textFontForCommonArea(in vennDiagramView: AMVennDiagramView) -> UIFont // default is System 17.0

section of value1 is 0. section of value2 is 1.

Installation

CocoaPods

Add this to your Podfile.

pod 'AMVennDiagramView'

Carthage

Add this to your Cartfile.

github "adventam10/AMVennDiagramView"

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100