Skip to content

Exposed the 'A' attribute binding for the directive

Compare
Choose a tag to compare
@mike-schultz mike-schultz released this 06 Apr 19:22
· 53 commits to master since this release

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. The following are equivalent :

<div zingchart zc-values="myValues"></div>

<zingchart zc-values="myValues"></zingchart>

This will allow you to utilize percentage values in the height/width render options by maintaining a DIV's inherit properties.
Example:

//JS
$scope.myValues = [0,2,3,5];
$scope.myRender = {
  height: 400,
  width: 100%
}

//HTML
<div zingchart zc-values="myValues" zc-render="myRender"></div>