when using dimensions()
aravindGear4 opened this issue · 1 comments
aravindGear4 commented
Fllowing is my create and update code for my parallel coordinates.
function updateParallelCordsEvents(data){
var dimensions={
"region_txt":{"title":"Region", "orient":"left", "type":"string"},
"nperps":{"title":"Perpetrators","orient":"left","type":"number"},
"weaptype1_txt":{"title":"Weapon", "orient":"left", "type":"string"},
"nkillter":{"title":"Prep. Killed", "orient":"left","type":"number"},
"nkill":{"title":"Killed","orient":"left","type":"number"},
"nwound":{"title":"Wounded", "orient":"left", "type":"number"},
"attacktype1_txt":{"title":"Attack Type", "orient":"left", "type":"number"},
"targtype1_txt":{"title":"Target","orient":"right", "type":"string"},
};
if(gtdParacords){
try{
gtdParacords.removeAxes();
gtdParacords.brushReset();
gtdParacords.render();
} catch(err){
console.log("Ignored:"+err);
}
}
var mode="queue";
if(data.length<100 || !($('#isQueuing').is(':checked'))){
mode="default";
}
gtdParacords = d3.parcoords()("#gtdParacords").composite("darker")
.data(data).dimensions(dimensions).hideAxis(hideAxes)
.mode(mode).color(function(d){
return getEntityColor(d[category]);
}).margin(marigin)//.smoothness(.2)
.render().shadows().createAxes().brushMode("1D-axes-multi").on("brush",processSelected)
.reorderable().interactive(); // command line mode
}
I want to orient my labels for axes, so I use .dimensions(dimensions) but I do not want to specify scale myself in this. So I use detectDimensions() but when I use both, scaling is not working working properly
After first Update:
For the first time it is plotting correctly but when i update it, it still remain the old scale.
Thank You,
Aravind.
aravindGear4 commented
I got around this issue by doing the following, I know it is not correct but this is what I did:
line 259:
- if (!__.dimensions[k].yscale){
+ if (true){//!__.dimensions[k].yscale - quick fix for scalling issue