- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试找到一种解决方案,让我能够在每个栏的顶部设置图像。目前我还没有找到解决方案。
我试过:
const weather_serie = {
type: 'scatter',
data: this.visualisationService
.generate_serie(this.categories[elem], weather, this.period)
.map((val, index) => {
if (val.hasOwnProperty('weather')) {
return {
y: isNaN(visit_serie.data[index])
? 0
: visit_serie.data[index],
marker: {
symbol: 'url(https://openweathermap.org/img/w/${
val.weather
}.png)'
}
};
} else {
return NaN;
}
}),
enableMouseTracking: false,
showInLegend: true
};
plotOptions: {
bar:{
dataLabels: {
align: 'center',
enabled: true,
useHTML: true,
formatter: function() {
return '<img src="http://highcharts.com/demo/gfx/sun.png"><img> ';
}
}
}
最佳答案
在第一种情况下,您应该禁用系列上的分组
:
plotOptions: {
series: {
grouping: false
}
}
现场演示:http://jsfiddle.net/BlackLabel/v7qx1s5u/
在第二种情况下,您可以为点定义单独的数据标签:
series: [{
type: 'column',
data: [{
x: 0,
y: 1,
dataLabels: {
align: 'center',
enabled: true,
useHTML: true,
formatter: function() {
return '<img src="https://www.highcharts.com/samples/graphics/sun.png"><img>';
}
}
},
[1, 2],
[2, 3]
]
}]
或者在 formatter
函数中定义一些规则,其中数据标签应该是一些图像:
dataLabels: {
align: 'center',
enabled: true,
useHTML: true,
formatter: function(){
if (this.point.index === 1){
return '<img src="https://www.highcharts.com/samples/graphics/sun.png"><img> ';
}
}
}
关于Highcharts:如何在条形图系列顶部设置独特的图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52257163/
对于 Prometheus 指标集合,如标题,我真的找不到只能通过 type Summary 完成的用例。 ,似乎它们都可以通过 type Histogram 以某种方式完成还。 让我们以请求并发度量
这个问题在这里已经有了答案: Ignore case while using duplicated (1 个回答) 关闭 9 个月前。 使用不区分大小写的 unique(tolower(x)) 删除
应用程序监控服务的一个有用功能是每次发生新的、独特的错误/问题/异常时发送警报(例如电子邮件)(即不是每次发生)。要么只是第一次,要么最多每次 X 次(一天或一周等)。例如,这可以通过 Visual
应用程序监控服务的一个有用功能是每次发生新的、独特的错误/问题/异常时发送警报(例如电子邮件)(即不是每次发生)。要么只是第一次,要么最多每次 X 次(一天或一周等)。例如,这可以通过 Visual
我想要相当于 DB2 中 MySql 的 GROUP_CONCAT 功能。 我尝试过 DB2 的 XML Aggrigate 函数来合并 murows。 SELECT a.ID, sub
我正在运行 python 数据库迁移脚本 (Flask-Migrate) 并添加了 alembic.ddl.imp import DefaultImpl 来解决第一组错误,但现在我收到以下错误。我正在
我有一个逗号分隔的文件“myfile.csv”,其中第 5 列是日期/时间戳。 (mm/dd/yyyy hh:mm)。 我需要列出所有包含重复日期的行(有很多) 我正在通过 cygwin 为 WinX
我使用的是 MySQL 5.7。 我有一个表格如下: -------------------------------------------------- | id | currentcy_id |
所以我有一个像这样的 ng-repeat: Join Ride /md-switch> 但是,每个 md-switch 都有相同的模型,因此当我在 Control
据我了解, Mongoose 预保存 Hook 在将文档插入集合之前但在验证发生之后触发。因此,如果一次验证失败,则不会调用预保存 Hook 。 就我而言,无论如何都会调用它们: 下面的简单代码的作用
如果我对我的目标文件执行此 grep,我会得到例如 275 作为结果。 但是我想学习 awk,所以在 awk 中尝试了这个: awk 'BEGIN { count=0 } /my pattern/
我是一名优秀的程序员,十分优秀!