I am trying to use the Parallel coordinate Chart from PlotlyJS. But the values I am using are dynamic (user pics column headers from csv) but I am having trouble visualizing due to dimension issues depending on the dataset.
My question is:
How do I get the Min and Max values of xarray1['x']? If I console.log(xarray1['x']) it outputs to the console the values. When I use Math.max(xarray1['x']) it outputs "Nan".
Here is my code.
var data = [{
type: 'parcoords',
pad: [80,80,80,80],
line: {
color: 'blue',
colorscale: [[0, 'red'], [0.5, 'green'], [1, 'blue']]
},
dimensions: [{
range: [0, 4.5],
label: column1,
values: xarray1['x']
}, {
constraintrange: [5, 6],
range: [4,8],
label: column2,
values: yarray1['y']
}, {
label: column3,
range: [0, 2.5],
values: xarray2['x']
}, {
label: column4,
range: [1, 7],
values: yarray2['y']
}]
}];
var layout = {
width: 800
};
Math.max(... xarray1['x'])
orMath.max.apply(0, xarray1['x'])
- dandavis