Add your own property type when creating the scale:
var scaleType = { LINEAR: "LINEAR", POWER: "POWER", LOG: "LOG", ORDINAL: "ORDINAL" }; var scale_a = d3.scale.ordinal() .domain([1,2,3]) .range([0,100]); scale_a.type = scaleType.ORDINAL; var scale_b = d3.scale.linear() .domain([0,100]) .range([0,100]); scale_b.type = scaleType.LINEAR;
user1618323
source share