Skip to content

Commit

Permalink
modified to add dynamically changing y axis label
Browse files Browse the repository at this point in the history
  • Loading branch information
christine_lu authored and christine_lu committed Apr 17, 2015
1 parent 1cc101f commit 349798e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions dist/angularjs-nvd3-directives.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! angularjs-nvd3-directives - v0.0.8 - 2015-04-03
/*! angularjs-nvd3-directives - v0.0.8 - 2015-04-17
* http://angularjs-nvd3-directives.github.io/angularjs-nvd3-directives
* Copyright (c) 2015 Christian Maurer; Licensed Apache License, v2.0 */
(function() {
Expand Down Expand Up @@ -605,7 +605,7 @@ function configureYaxis (chart, scope, attrs) {
chart.yAxis.tickFormat(scope.yaxistickformat());
}
if (attrs.yaxislabel) {
chart.yAxis.axisLabel(attrs.yaxislabel);
chart.yAxis.axisLabel(scope.yaxislabel);
}
if (attrs.yaxisscale) {
chart.yAxis.scale(scope.yaxisscale());
Expand Down Expand Up @@ -784,7 +784,7 @@ function configureY2axis (chart, scope, attrs) {
}
}
function initializeMargin(scope, attrs){
var margin = (scope.$eval(attrs.margin) || {left: 50, top: 50, bottom: 50, right: 50});
var margin = (scope.$eval(attrs.margin) || {left: 100, top: 50, bottom: 50, right: 50});
if (typeof(margin) !== 'object') {
// we were passed a vanilla int, convert to full margin object
margin = {left: margin, top: margin, bottom: margin, right: margin};
Expand Down Expand Up @@ -1424,7 +1424,7 @@ function initializeMargin(scope, attrs){
yaxisticksize: '&',
yaxistickpadding: '&',
yaxistickformat: '&',
yaxislabel: '@',
yaxislabel: '=',
yaxisscale: '&',
yaxisdomain: '&',
yaxisrange: '&',
Expand Down
2 changes: 1 addition & 1 deletion src/directives/nvD3AxisConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function configureYaxis (chart, scope, attrs) {
chart.yAxis.tickFormat(scope.yaxistickformat());
}
if (attrs.yaxislabel) {
chart.yAxis.axisLabel(attrs.yaxislabel);
chart.yAxis.axisLabel(scope.yaxislabel);
}
if (attrs.yaxisscale) {
chart.yAxis.scale(scope.yaxisscale());
Expand Down
2 changes: 1 addition & 1 deletion src/directives/nvd3Directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@
yaxisticksize: '&',
yaxistickpadding: '&',
yaxistickformat: '&',
yaxislabel: '@',
yaxislabel: '=',
yaxisscale: '&',
yaxisdomain: '&',
yaxisrange: '&',
Expand Down

0 comments on commit 349798e

Please sign in to comment.