- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个标准的 Angular 仪,但我不知道如何从数据标签中删除银色边框(描边)。
使用以下代码,取自http://www.highcharts.com/demo/gauge-speedometer
$(function () {
$('#container').highcharts({
chart: {
type: 'gauge',
plotBackgroundColor: null,
plotBackgroundImage: null,
plotBorderWidth: 0,
plotShadow: false
},
title: {
text: 'Speedometer'
},
pane: {
startAngle: -150,
endAngle: 150,
background: [{
backgroundColor: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0, '#FFF'],
[1, '#333']
]
},
borderWidth: 0,
outerRadius: '109%'
}, {
backgroundColor: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0, '#333'],
[1, '#FFF']
]
},
borderWidth: 1,
outerRadius: '107%'
}, {
// default background
}, {
backgroundColor: '#DDD',
borderWidth: 0,
outerRadius: '105%',
innerRadius: '103%'
}]
},
// the value axis
yAxis: {
min: 0,
max: 200,
minorTickInterval: 'auto',
minorTickWidth: 1,
minorTickLength: 10,
minorTickPosition: 'inside',
minorTickColor: '#666',
tickPixelInterval: 30,
tickWidth: 2,
tickPosition: 'inside',
tickLength: 10,
tickColor: '#666',
labels: {
step: 2,
rotation: 'auto'
},
title: {
text: 'km/h'
},
plotBands: [{
from: 0,
to: 120,
color: '#55BF3B' // green
}, {
from: 120,
to: 160,
color: '#DDDF0D' // yellow
}, {
from: 160,
to: 200,
color: '#DF5353' // red
}]
},
series: [{
name: 'Speed',
data: [80],
tooltip: {
valueSuffix: ' km/h'
}
}]
},
// Add some life
function (chart) {
if (!chart.renderer.forExport) {
setInterval(function () {
var point = chart.series[0].points[0],
newVal,
inc = Math.round((Math.random() - 0.5) * 20);
newVal = point.y + inc;
if (newVal < 0 || newVal > 200) {
newVal = point.y - inc;
}
point.update(newVal);
}, 3000);
}
});
});
我知道我可以在数据标签中设置文本样式,例如:
dataLabels: {
format: '<span style="font-size:18px">Consumption: {y} kWh</span>',
x: 0,
y: 50
},
但我似乎找不到消除中风的方法。查看源代码,它被写为 rect-tag 中的属性。
<rect x="0.5" y="0.5" width="95" height="27" fill="none" stroke="silver" stroke-width="1" rx="3" ry="3"></rect>
有没有办法使用 Highcharts 消除此笔划?如有任何帮助,我们将不胜感激!
最佳答案
如果您想从显示的 dataLabel 中删除边框,您可以使用 Highcharts API 中的 dataLabels.borderWidth 参数: http://api.highcharts.com/highcharts/plotOptions.series.dataLabels.borderWidth
plotOptions: {
series: {
dataLabels: {
borderWidth: 0
}
}
},
在这里您可以看到它如何工作的示例: http://jsfiddle.net/74eqcqso/1/
关于javascript - Highcharts Angular gauge - 如何删除数据标签笔划?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39589628/
所以我试图通过使用套接字创建一个类似同步绘画程序的东西。我有一个服务器端..和一个客户端,我试图将inkCollection从服务器发送到客户端。这适用于简单的文本,但我似乎无法发送inkCollec
我正在胡思乱想,无法控制路径宽度。 看到倒数第二行,真是莫名其妙: var paper = Raphael(20, 20, 320, 320); function arc(center, radi
我想提一下,这篇文章类似于 Continuous drawing in CGContext with drawRect但它没有任何代码片段解决方案,所以再次询问。 我正在学习 iOS 开发应用程序。我
我正在创建很多元素,这些元素基本上基于模板,但具有不同的大小和颜色 - 圆圈、方框、星号、菱形、图表中经常使用的元素。我发现我可以使用 SVG Symbol 来定义我的模板,如下例所示: http:/
我正在使用 Chart.js 创建圆环图,但遇到了圆环上的笔划被 Canvas 对象 chop 的问题。 Canvas 上的填充/边距并没有为我解决问题。知道发生了什么事吗? JSFiddle her
我试过设置描边颜色。它可以使用 linearGradient 但不能使用 solidColor :
我目前正在调整文件输入以使用预览显示其内容 标签。 ..... 使用一些 CSS,它在 Chrome 上正确呈现,但我在 Firefox 上(并且仅在 Firefox 上)在正
我有一组三 Angular 坐标。每三个点一个 vector 。在下图中,这个三 Angular 形是 thin yellow 三 Angular 形。我需要向这个向内和向外突出的三 Angular
我是一名优秀的程序员,十分优秀!