Javascript 如何在标签底部留出间隙或边距?
我正在使用图书馆。 我想做一个间隙或空白底部的标签。任何帮助都将不胜感激。谢谢Javascript 如何在标签底部留出间隙或边距?,javascript,gauge,Javascript,Gauge,我正在使用图书馆。 我想做一个间隙或空白底部的标签。任何帮助都将不胜感激。谢谢 我正在使用上面的代码。我对仪表没有任何了解,所以我只添加了一条注释:尝试定义线高度(字体:20px/0px sans seif)。 selectGauge3 = new Gauge(document.getElementById("canvas-preview")); var opts = { angle: 0.05, radiusScale: 0.8, // Relative radius lineWidth
我正在使用上面的代码。我对仪表没有任何了解,所以我只添加了一条注释:尝试定义线高度(字体:20px/0px sans seif)。
selectGauge3 = new Gauge(document.getElementById("canvas-preview"));
var opts = {
angle: 0.05,
radiusScale: 0.8, // Relative radius
lineWidth: 0.05,
pointer: {
//Extra optional pointer options:
iconPath: 'http://localhost/gauge/gauge.js-gh-pages/yellow1.png', // Icon image source
iconScale: 0.90, // Size scaling factor
iconAngle: 100.0, // Rotation offset angle, degrees
strokeWidth: 0,
length: 0.5,
},
staticLabels: {
font: "18px sans-serif", // Specifies font
labels: [300, 436, 573, 710,850], // Print labels at these values
fractionDigits: 0 // Optional: Numerical precision. 0=round off.
},
staticZones: [
{strokeStyle: "#00FF00", min: 300, max: 436},
{strokeStyle: "#0000FF", min: 437, max: 573},
{strokeStyle: "#FFFF00", min: 574, max: 710},
{strokeStyle: "#FF0000", min: 711, max: 850},
],
limitMax: false,
limitMin: false,
strokeColor: '#E0E0E0',
generateGradient: false,
highDpiSupport: true
};
selectGauge3.minValue = 300;
selectGauge3.maxValue = 850;
selectGauge3.setOptions(opts);
selectGauge3.set(310);