mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Rework network mergetree tooltip
This commit is contained in:
parent
43664d49cb
commit
8d0f2f4dc2
1 changed files with 19 additions and 0 deletions
|
|
@ -34,11 +34,30 @@ $.getJSON(url, function(response) {
|
|||
x: {
|
||||
show: true
|
||||
},
|
||||
|
||||
/*
|
||||
y: {
|
||||
formatter: function(value, { series, seriesIndex, dataPointIndex, w }) {
|
||||
return value+" %"
|
||||
}
|
||||
}
|
||||
*/
|
||||
custom: function({ series, seriesIndex, dataPointIndex, w }) {
|
||||
const network_data = response.rsp[seriesIndex];
|
||||
const data = network_data.data[dataPointIndex];
|
||||
return `
|
||||
<div class="apexcharts-tooltip-title" style="font-family: Helvetica, Arial, sans-serif; font-size: 12px;"><strong>${network_data.name}</strong></div>
|
||||
<div class="apexcharts-tooltip-series-group apexcharts-tooltip-series-group-0 apexcharts-active" style="order: 1; display: flex;">
|
||||
<div class="apexcharts-tooltip-text" style="font-family: Helvetica, Arial, sans-serif; font-size: 12px;">
|
||||
<div class="apexcharts-tooltip-y-group">
|
||||
<span class="apexcharts-tooltip-text-y-label">${data.host}: </span>
|
||||
<span class="apexcharts-tooltip-text-y-value">${data.y} %</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
},
|
||||
title: {
|
||||
text: 'Networks Score'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue