Skip to content

Commit

Permalink
Implement chinmaymk#109
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmaymk committed Sep 11, 2014
1 parent bf36e7b commit bd0a4bb
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/angular-charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ angular.module('angularCharts').directive('acChart', function($templateCache, $c
innerRadius: 0, // Only on pie Charts
lineLegend: 'lineEnd', // Only on line Charts
lineCurveType: 'cardinal',
isAnimate: true
isAnimate: true,
yAxisTickFormat: 's'
};

var totalWidth = element[0].clientWidth;
Expand Down Expand Up @@ -260,7 +261,7 @@ angular.module('angularCharts').directive('acChart', function($templateCache, $c
.scale(y)
.orient("left")
.ticks(10)
.tickFormat(d3.format('s'));
.tickFormat(d3.format(config.yAxisTickFormat));

/**
* Start drawing the chart!
Expand Down Expand Up @@ -410,7 +411,7 @@ angular.module('angularCharts').directive('acChart', function($templateCache, $c
.scale(y)
.orient("left")
.ticks(5)
.tickFormat(d3.format('s'));
.tickFormat(d3.format(config.yAxisTickFormat));

var line = d3.svg.line()
.interpolate(config.lineCurveType)
Expand Down Expand Up @@ -635,7 +636,7 @@ angular.module('angularCharts').directive('acChart', function($templateCache, $c
.scale(y)
.orient("left")
.ticks(5)
.tickFormat(d3.format('s'));
.tickFormat(d3.format(config.yAxisTickFormat));

d3.svg.line()
.interpolate(config.lineCurveType)
Expand Down Expand Up @@ -883,7 +884,7 @@ angular.module('angularCharts').directive('acChart', function($templateCache, $c
.scale(y)
.orient("left")
.ticks(5)
.tickFormat(d3.format('s'));
.tickFormat(d3.format(config.yAxisTickFormat));

var yData = [0];
var linedata = [];
Expand Down Expand Up @@ -1047,7 +1048,7 @@ angular.module('angularCharts').directive('acChart', function($templateCache, $c
}
}

function updateToolTip(event) {
function updateToolTip(d, event) {
if (scope.$tooltip) {
scope.$tooltip.css({
left: (event.pageX + 20) + 'px',
Expand Down

0 comments on commit bd0a4bb

Please sign in to comment.