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
+45-11Lines changed: 45 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,38 +6,72 @@ An AngularJS directive for ZingChart to make your charts work dynamically with y
6
6
#### Try out our demo! http://zingchart.github.io/ZingChart-AngularJS
7
7
#### Full blog post @ http://www.zingchart.com/blog/2015/03/05/zingchart-angularjs/
8
8
9
-
---
10
-
11
-
Note: As of v1.0.1, the attribute is now exposed to the directive allowing you to bind the zingchart directive to an actual DOM element along with the `<zingchart>` element. This will allow you to utilize percentage values in the height/width render options while maintaining a DIV's inherit properties. The following are equivalent :
9
+
*[Install](#install)
10
+
*[Usage](#usage)
11
+
*[FAQ](#faq)
12
+
*[Options](#options)
12
13
13
-
`<div zingchart zc-values="myValues"></div>`
14
-
15
-
`<zingchart zc-values="myValues"></zingchart>`
16
14
15
+
<aid="install"></a>
17
16
## Install
18
-
19
-
20
17
```
21
18
bower install zingchart-angularjs
22
19
```
23
20
24
21
Inject into your app...
22
+
25
23
```js
26
24
var app =angular.module('myApp', ['zingchart-angularjs']);
ZingChart internally attaches itself to the element that is specified in the render function, and continues to build children elements inside. In this Angular directives case, it will attach itself to either :
57
+
58
+
* The `<zingchart>` if the element binding syntax is used
59
+
* The `<div>` if the `zingchart` attribute binding syntax is used.
60
+
61
+
Since the element `zingchart` is not a valid HTML element, the browser will not assign css attributes to the element where as a div has inherit properties such as `display:block`.
62
+
63
+
**How to**
64
+
65
+
We reccomended using the attribute binding syntax on a div to automatically inherit the `display:block` CSS attribute. You will also need to apply a value of `100%` to the zc-height and zc-width attributes.
0 commit comments