1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-25 23:55:24 +00:00

Fixed graphs tooltip

This commit is contained in:
Anatoliy Guskov 2015-09-23 11:01:28 +03:00
parent 993931e486
commit e0e644820e

View file

@ -955,80 +955,83 @@
labels : [0, 0, 0, 0, 0], labels : [0, 0, 0, 0, 0],
datasets : [ datasets : [
{ {
fillColor: "rgba(241,72,70,0.5)", fillColor: "rgba(44,127,184,0.5)",
strokeColor: "rgba(241,72,70,1)", strokeColor: "rgba(44,127,184,1)",
pointColor : "rgba(241,72,70,1)", pointColor: "rgba(44,127,184,1)",
pointStrokeColor : "#fff", pointStrokeColor: "#fff",
pointHighlightFill : "#fff", data: [0, 0, 0, 0, 0]
pointHighlightStroke : "rgba(220,220,220,1)",
data : [0, 0, 0, 0, 0]
} }
] ]
}; };
var diskLineData = { var diskLineData = {
labels : [0, 0, 0, 0, 0], labels : [0, 0, 0, 0, 0],
datasets : [ datasets : [
{ {
"fillColor": "rgba(220,220,220,0.5)", fillColor: "rgba(127,205,187,0.5)",
"strokeColor": "rgba(220,220,220,1)", strokeColor: "rgba(127,205,187,1)",
"pointColor": "rgba(220,220,220,1)", pointColor: "rgba(127,205,187,1)",
"pointStrokeColor": "#fff", pointStrokeColor: "#fff",
"data": [0, 0, 0, 0, 0] data: [0, 0, 0, 0, 0],
label: "Read"
}, },
{ {
"fillColor": "rgba(249,134,33,0.5)", fillColor: "rgba(44,127,184,0.5)",
"strokeColor": "rgba(249,134,33,1)", strokeColor: "rgba(44,127,184,1)",
"pointColor": "rgba(249,134,33,1)", pointColor: "rgba(44,127,184,1)",
"pointStrokeColor": "#fff", pointStrokeColor: "#fff",
"data": [0, 0, 0, 0, 0] data: [0, 0, 0, 0, 0],
label: "Write"
}, },
] ]
}; };
var netLineData = { var netLineData = {
labels : [0, 0, 0, 0, 0], labels : [0, 0, 0, 0, 0],
datasets : [ datasets : [
{ {
"fillColor": "rgba(83,191,189,0.5)", fillColor: "rgba(127,205,187,0.5)",
"strokeColor": "rgba(83,191,189,1)", strokeColor: "rgba(127,205,187,1)",
"pointColor": "rgba(83,191,189,1)", pointColor: "rgba(127,205,187,1)",
"pointStrokeColor": "#fff", pointStrokeColor: "#fff",
"data": [0, 0, 0, 0, 0] data: [0, 0, 0, 0, 0],
label: "Inbound"
}, },
{ {
"fillColor": "rgba(151,187,205,0.5)", fillColor: "rgba(44,127,184,0.5)",
"strokeColor": "rgba(151,187,205,1)", strokeColor: "rgba(44,127,184,1)",
"pointColor": "rgba(151,187,205,1)", pointColor: "rgba(44,127,184,1)",
"pointStrokeColor": "#fff", pointStrokeColor: "#fff",
"data": [0, 0, 0, 0, 0] data: [0, 0, 0, 0, 0],
label: "Outbound"
}, },
] ]
}; };
var cpuOpt = { var cpuOpt = {
animation: false, animation: false,
pointDotRadius: 2, pointDotRadius: 2,
scaleLabel: "<%=value%> %", scaleLabel: "<%=value%> %",
tooltipTemplate: "<%=value%> %",
scaleShowGridLines : false,
scaleOverride: true, scaleOverride: true,
scaleSteps: 5, scaleSteps: 5,
scaleStepWidth: 20, scaleStepWidth: 20,
scaleStartValue: 0, scaleStartValue: 0,
responsive: true responsive: true
}; };
var diskOpt = { var diskOpt = {
animation: false, animation: false,
pointDotRadius: 2, pointDotRadius: 2,
scaleLabel: "<%=value%> Mb/s", scaleLabel: "<%=value%> Mb/s",
multiTooltipTemplate: "<%=datasetLabel%> - <%=value%> Mb/s",
scaleShowGridLines : false,
responsive: true responsive: true
}; };
var netOpt = { var netOpt = {
animation: false, animation: false,
pointDotRadius: 2, pointDotRadius: 2,
scaleLabel: "<%=value%> Mbps", scaleLabel: "<%=value%> Mbps",
responsive: true multiTooltipTemplate: "<%=datasetLabel%> - <%=value%> Mbps",
scaleShowGridLines : false,
responsive: true,
}; };
var cpu_ctx = $("#cpuChart").get(0).getContext("2d"); var cpu_ctx = $("#cpuChart").get(0).getContext("2d");