Skip to content

when using dimensions() #335

Description

@aravindGear4

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions