jvectormap
Version:
jQuery plugin for embedding vector maps with reach API and methods for data visualization to the web-pages.
21 lines (17 loc) • 352 B
JavaScript
jvm.OrdinalScale = function(scale){
this.scale = scale;
};
jvm.OrdinalScale.prototype.getValue = function(value){
return this.scale[value];
};
jvm.OrdinalScale.prototype.getTicks = function(){
var ticks = [],
key;
for (key in this.scale) {
ticks.push({
label: key,
value: this.scale[key]
});
}
return ticks;
};