You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-3
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,15 @@ To initialize a <i>JBBarChartView</i>, you only need a few lines of code (see be
72
72
barChartView.dataSource = self;
73
73
barChartView.delegate = self;
74
74
[self addSubview:barChartView];
75
+
76
+
Just like you would for a `UITableView`, ensure you clear these properties in your `dealloc`:
77
+
78
+
- (void)dealloc
79
+
{
80
+
JBBarChartView *barChartView = ...; // i.e. _barChartView
81
+
barChartView.delegate = nil;
82
+
barChartView.dataSource = nil;
83
+
}
75
84
76
85
At a minimum, you need to inform the data source how many bars are in the chart:
77
86
@@ -99,9 +108,18 @@ Lastly, ensure you have set the *frame* of your barChartView & call *reloadData*
99
108
Similiarily, to initialize a JBLineChartView, you only need a few lines of code (see below). Line charts can also be initialized via a <b>nib</b> or with a <b>frame</b>.
0 commit comments