Hoverlabel disabled?
comimoma opened this issue · 1 comments
Hi,
Thanks for providing the Grafana plugin with plot.ly package.
I'm using Grafana 7.1.5 to create some box plots from multiple mySQL queries. Without defining hoveron for each trace, only the last trace I created would have hover label on. I am able to turn the last trace's hover label off by setting 'hoverinfo': 'none', yet it didn't help me to enable the hover label for other box plots. I am not sure if you'd have any solution for this issue; I just want to bring this up as other users may encounter the same problem.
Below is what I have for script in json format:
console.log(data);
var trace1 = {
y: data.series[5].fields[1].values.buffer,
"type": "box",
"name": "trace1",
"yaxis": "y1",
"width": 0.1,
"marker":{"color": "hsl(0, 50%, 50%)", "size": 2.5},
"line": {"width": 1},
// "boxpoints": "all",
// "pointpos": 0
};
var trace2 = {
y: data.series[3].fields[1].values.buffer,
"type": "box",
"name": "trace2",
"yaxis": "y2",
"width": 0.1,
"marker":{"color": "hsl(45, 50%, 50%)", "size": 2.5},
"line": {"width": 1},
// "boxpoints": "all",
// "pointpos": 0
};
var trace3 = {
y: data.series[4].fields[1].values.buffer,
"type": "box",
"name": "trace3",
"yaxis": "y3",
"width": 0.1,
"marker":{"color": "hsl(90, 50%, 50%)", "size": 2.5},
"line": {"width": 1},
// "boxpoints": "all",
// "pointpos": 0
};
var trace4 = {
y: data.series[7].fields[1].values.buffer,
"type": "box",
"name": "trace4",
"yaxis": "y3",
"width": 0.1,
"marker":{"color": "hsl(135, 50%, 50%)", "size": 2.5},
"line": {"width": 1},
// "boxpoints": "all",
// "pointpos": 0
};
var trace5 = {
y: data.series[0].fields[1].values.buffer,
"type": "box",
"name": "trace5",
"yaxis": "y3",
"width": 0.1,
"marker":{"color": "hsl(180, 50%, 50%)", "size": 2.5},
"line": {"width": 1},
// "boxpoints": "all",
// "pointpos": 0
};
var trace6 = {
y: data.series[1].fields[1].values.buffer,
"type": "box",
"name": "trace6",
"yaxis": "y3",
"width": 0.1,
"marker":{"color": "hsl(225, 50%, 50%)", "size": 2.5},
"line": {"width": 1},
// "boxpoints": "all",
// "pointpos": 0
};
var trace7 = {
y: data.series[2].fields[1].values.buffer,
"type": "box",
"name": "trace7",
"yaxis": "y3",
"width": 0.1,
"marker":{"color": "hsl(270, 50%, 50%)", "size": 2.5},
"line": {"width": 1},
// "boxpoints": "all",
// "pointpos": 0
};
var trace8 = {
y: data.series[6].fields[1].values.buffer,
"type": "box",
"name": "trace8",
"yaxis": "y4",
"width": 0.1,
"marker":{"color": "hsl(315, 50%, 50%)", "size": 2.5},
"line": {"width": 1},
"hoverinfo": "none",
// "boxpoints": "all",
// "pointpos": 0
};
serie = [trace1,
trace2,
trace3,
trace4,
trace5,
trace6,
trace7,
trace8
]
return {data:serie,layout:{title:'Box Plot Chart'}};
It think it is not related to this plugin. You should check Plotly documentation and test your chart in a code playground with only Plotly.js library first.