is there a way to make the point marker size the same size(width) as the
line: {
shape: ‘hvh’,
?
is there a way to make the point marker size the same size(width) as the
line: {
shape: ‘hvh’,
?
Add marker: { line: { width: 3 } }
var myPlot = document.getElementById('myDiv'),
d3 = Plotly.d3,
N = 16,
x = d3.range(N),
y = d3.range(N).map( d3.random.normal() ),
data = [ { x:x, y:y, type:'scatter',
mode:'lines+markers',
marker: {
color: 'red', //can make this 'transparent' to hide the red line visibly and spot the start and end points extending
size: 45, // 45 seems to work
symbol: 'line-ew-open',
line: {
width: 3
}
},
line: {
shape: 'hvh',
color: '#fabd00',
width: 3
}
} ],
layout = {
hovermode:'closest',
hoverdistance:1,
title:'Click on Points'
};
Plotly.newPlot('myDiv', data, layout, {showSendToCloud: true});
myPlot.on('plotly_click', function(data){
var pts = '';
for(var i=0; i < data.points.length; i++){
pts = 'x = '+data.points[i].x +'\ny = '+
data.points[i].y.toPrecision(4) + '\n\n';
}
alert('Closest point clicked:\n\n'+pts);
});