ParasolJS / parasol-es

ES6 module for interactive visualization of multi-objective optimization problems
https://parasoljs.github.io/
MIT License
26 stars 5 forks source link

Bugs occur when plots are not linked #30

Open maxnyf opened 5 years ago

maxnyf commented 5 years ago

It appears as though certain axes on plots lose functionality if using .hideAxes or .setAxesLayout and .linked is not used, regardless of the number of plots.

<!doctype html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
</head>

<title>parasol</title>

<link rel="stylesheet" type="text/css" href="parasol.css" >
<script src="d3.v5.min.js"></script>
<script src="parasol.standalone.js"></script>

<body>
<div id="p0" class="parcoords" style="height:200px; width:850px;"></div>
</body>

<script>
d3.csv('cars.csv').then(function(data) {
var axes = {
0: ['year', 'economy (mpg)', 'cylinders', 'power (hp)']
};
var ps = Parasol(data)('.parcoords')
//.hideAxes(axes)
.setAxesLayout(axes)
//.linked()
});
</script>

In this example, when setting .hideAxes or .setAxesLayout to the axes variable that I created, the resulting plot will have four axes. For both .hideAxes and .setAxesLayout, the two leftmost axes will be fine but the two rightmost axes don't allow for brushing data (the axes with functionality remain the same if reordering the axes). No errors appear in the console when this problem occurs. Note that if you uncomment the .linked() attribute the plots will have full functionality, which is true if there is only one plot or numerous (as far as I can tell now).