fix: render usage timeline bars correctly
This commit is contained in:
@@ -145,6 +145,12 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
var node = chartTemplate.content.cloneNode(true);
|
||||
var okHeight = maxValue ? Math.round((point.calls_ok / maxValue) * 160) : 0;
|
||||
var errorHeight = maxValue ? Math.round((point.calls_error / maxValue) * 160) : 0;
|
||||
if (point.calls_ok > 0) {
|
||||
okHeight = Math.max(okHeight, 6);
|
||||
}
|
||||
if (point.calls_error > 0) {
|
||||
errorHeight = Math.max(errorHeight, 6);
|
||||
}
|
||||
node.querySelector('.chart-bar.success').style.height = okHeight + 'px';
|
||||
node.querySelector('.chart-bar.success').dataset.tip = formatCount(point.calls_ok) + ' ok';
|
||||
node.querySelector('.chart-bar.error').style.height = errorHeight + 'px';
|
||||
|
||||
Reference in New Issue
Block a user