Grafana如何更改注释线粗细

是否有任何选项/解决方法来更改Grafana的注释行粗细?

注释的行太细了,几乎看不到。

如果线条样式可以从虚线更改为实线,也会更加明显。

ppsda 回答:Grafana如何更改注释线粗细

您不能增加注释线的粗细。

但是,如果看不清,请尝试区域注释。。您可以按住Ctrl / Cmd并选择区域以创建区域注释。

enter image description here

,

我还没有在 Grafana 中找到任何更改它的方法,但我编写了 Greasemonkey 脚本来完成工作,并且我现在拥有的注释线是 5px 粗而不是 1px:

// ==UserScript==
// @name     Grafana
// @version  1
// @grant    none
// @match http://127.0.0.1:3000/*
// ==/UserScript==

setInterval(function() {

  // change the line thickness
  var annotationLineElArr = document.querySelectorAll('div.graph-panel div.events_line');
  for (i=0;i<annotationLineElArr.length;i++) {
    var annotationLineEl = annotationLineElArr[i];
    annotationLineEl.style.borderLeftWidth = '5px';
  }
  
  // change the bottom marker size
  var annotationMarkerElArr = document.querySelectorAll('div.graph-panel div.events_marker');
  for (i=0;i<annotationMarkerElArr.length;i++) {
    var annotationMarkerEl = annotationMarkerElArr[i];
    annotationMarkerEl.style.borderWidth = 'medium 10px 12px'
    annotationMarkerEl.style.left = '-12px'
  }
  
},1000/1);

之前:

original

之后

modified

由于我将垂直线加粗 4px,因此可能应该将其向左移动 2px 以正好位于它所代表的时间戳的中间,但我不太关心它,因此我没有在这方面更改 CSS .

改变:

@match http://127.0.0.1:3000/*

到您自己的地址以使其正常工作,不要忘记打开脚本和 Greasemonkey。

本文链接:https://www.f2er.com/3147847.html

大家都在问