Releases: zingchart/ZingChart-AngularJS
Watch added to zcRender
Chart Destruction Updates
Added $scope.$on('destroy',...) functionality to clean up the charts when switching between views.
Fixed issue injecting values into json
Directive was not applying the user provided values array to a user provided json properly on update (triggered via watch).
Fix for dynamic DOM id
Fixed an issue where the directive would not properly run when using the ng-attr-id
attribute to dynamically bind an id.
Usage example :
//HTML
<zingchart ng-attr-id="{{myId}}" zc-json="myJson"></zingchart>
//Javascript inside your controller
$scope.myId = "chart-1";
$scope.zcJson = { ...};
Auto-binding id
Allow the id attribute to be optional. If the id is not specified, the directive will auto generate one in the form of zingchart-auto-#
NPM Require support
1.0.4 Added npm require support
Responsiveness
Auto-detect 100% height and width either from the attributes ('zc-height' & 'zc-width) or from the zc-render object. It will automatically set the container DOM to have a style of 100% and width 100% for zingchart to expand to.
Bug Fixes
- The zc-values and zc-json watch functions were triggering an extra re-render
- Use of the
graphset
feature in zingchart would append a type : 'line' to the json.
Exposed the 'A' attribute binding for the directive
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>
Initial Public Release
Initial Public Release