Skip to content

Commit

Permalink
fix formatting of the Y axis
Browse files Browse the repository at this point in the history
  • Loading branch information
jasoncalabrese committed Sep 27, 2015
1 parent 4ac6d80 commit 4a8660b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/client/chart.js
Expand Up @@ -14,7 +14,7 @@ function init (client, d3, $) {
var utils = client.utils;
var renderer = client.renderer;

var localeFormater = d3.locale(d3locales.locale(client.settings.language));
var localeFormatter = d3.locale(d3locales.locale(client.settings.language));

function brushStarted ( ) {
// update the opacity of the context data points to brush extent
Expand Down Expand Up @@ -43,7 +43,7 @@ function init (client, d3, $) {
var yScale2 = chart.yScale2 = d3.scale.log()
.domain([utils.scaleMgdl(36), utils.scaleMgdl(420)]);

var tickFormat = localeFormater.timeFormat.multi( [
var tickFormat = localeFormatter.timeFormat.multi( [
['.%L', function(d) { return d.getMilliseconds(); }],
[':%S', function(d) { return d.getSeconds(); }],
['%I:%M', function(d) { return d.getMinutes(); }],
Expand Down Expand Up @@ -87,7 +87,7 @@ function init (client, d3, $) {

chart.yAxis = d3.svg.axis()
.scale(yScale)
.tickFormat(localeFormater.timeFormat('d'))
.tickFormat(d3.format('d'))
.tickValues(tickValues)
.orient('left');

Expand All @@ -99,7 +99,7 @@ function init (client, d3, $) {

chart.yAxis2 = d3.svg.axis()
.scale(yScale2)
.tickFormat(localeFormater.timeFormat('d'))
.tickFormat(d3.format('d'))
.tickValues(tickValues)
.orient('right');

Expand Down

0 comments on commit 4a8660b

Please sign in to comment.