Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when using dimensions() #335

Open
aravindGear4 opened this issue Apr 10, 2017 · 1 comment
Open

when using dimensions() #335

aravindGear4 opened this issue Apr 10, 2017 · 1 comment

Comments

@aravindGear4
Copy link
Contributor

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:

without detect dimesion

For the first time it is plotting correctly but when i update it, it still remain the old scale.

Thank You,
Aravind.

@aravindGear4
Copy link
Contributor Author

aravindGear4 commented Apr 28, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant