Hello everyone,
I’m here trying to plot a 3d chart using plotly.js, and a have the following issue:
If I use directly the array, I can get some value:
var data = [{
z: z_data,
type: 'surface',
hovertemplate: '<b>Data:</b> ' + datas[0]+
'<br><b>Frequência:</b> %{x:.2f} (Hz)<br>' +
'<b>Amplitude: </b>%{z:.3f} (mm/s)<extra></extra>',
contours: {
z: {
show: false,
usecolormap: false,
highlightcolor: "#0000ff",
project: { z: true }
}
}
}];
But if I try to get the ‘y’ value on that array, it is not working, I don’t know if there is a good approach for that:
var data = [{
z: z_data,
type: 'surface',
hovertemplate: '<b>Data:</b> ' + data['%{y}'] +
'<br><b>Frequência:</b> ' + freq['%{x}'] +
'<b>Amplitude: </b>%{z:.3f} (mm/s)<extra></extra>',
contours: {
z: {
show: false,
usecolormap: false,
highlightcolor: "#0000ff",
project: { z: true }
}
}
}];
If someone has some tip or some idea what I could do, it would be a pleasure.