Skip to content

Commit 0a8f972

Browse files
committed
Merge pull request #28 from trestletech/master
Support custom functions for y axes.
2 parents 7c9a715 + d2e6699 commit 0a8f972

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

rickshaw.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,12 @@ angular.module('angular-rickshaw', [])
165165
graph: graph
166166
};
167167
if (scope.features.yAxis.tickFormat) {
168-
yAxisConfig.tickFormat = Rickshaw.Fixtures.Number[scope.features.yAxis.tickFormat];
168+
var tickFormat = scope.features.yAxis.tickFormat;
169+
if (typeof tickFormat === 'string'){
170+
yAxisConfig.tickFormat = Rickshaw.Fixtures.Number[tickFormat];
171+
} else {
172+
yAxisConfig.tickFormat = tickFormat;
173+
}
169174
}
170175
if (!yAxis) {
171176
yAxis = new Rickshaw.Graph.Axis.Y(yAxisConfig);

0 commit comments

Comments
 (0)