Skip to content

Commit 7775479

Browse files
author
scarroll
committed
Line Chart and Bar Chart example
1 parent 0cbaff4 commit 7775479

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

README.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,43 @@ In the view, you just pass the appropriate attributes.
6262
<dotchart size="dotchart.data" valuesx="dotchart.valX" valuesy="dotchart.valY" options="dotchart.options"></dotchart>
6363
```
6464

65-
That's it, you have a dot chart!
65+
That's it, you have a dot chart!
66+
67+
### Bar Chart
68+
69+
You set up your options and data in the controller. [Bar Chart Reference](http://g.raphaeljs.com/reference.html#Paper.barchart)
70+
71+
```
72+
$scope.barchart = {
73+
options: {},
74+
data: {}
75+
};
76+
```
77+
78+
In the view, you just pass the appropriate attributes.
79+
80+
```
81+
<barchart values="barchart.data" options="barchart.options"></barchart>
82+
```
83+
84+
That's it, you have a bar chart!
85+
86+
### Line Chart
87+
88+
You set up your options and data in the controller. [Line Chart Reference](http://g.raphaeljs.com/reference.html#Paper.linechart)
89+
90+
```
91+
$scope.linechart = {
92+
options: {}
93+
dataX: [],
94+
dataY: []
95+
};
96+
```
97+
98+
In the view, you just pass the appropriate attributes.
99+
100+
```
101+
<linechart values-x="linechart.dataX" values-y="linechart.dataY" options="linechart.options"></linechart>
102+
```
103+
104+
That's it, you have a line chart!

0 commit comments

Comments
 (0)