Commit c9b6ae40 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

js/axis.ps: .posBarLabel(), get position of a label

parent 737643fb
......@@ -223,14 +223,16 @@ Axis.prototype = {
var i=1
for (var e in tab){
if (i%step == 0 ){
var pos = (i-0.5)/length;
var pos = this.posBarLabel(i, length)
if (this.reverse) pos = 1 - pos;
this.labels.push(this.label("line", pos, e));
}
i++;
}
}
},
posBarLabel : function (i, length) {
return (i-0.5)/length ;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment