简体   繁体   English

使用FLOT图表在悬停时更改条形图的颜色

[英]Change color of bar on hover with FLOT charts

是否可以使用Flot水平条形图在悬停时更改条形图的颜色

This worked for me by setting the 'highlightColor' field: 通过设置'highlightColor'字段,这对我有用:

$.plot("#placeholder", [data], {
    series: {
        bars: {
            show: true,
            align: 'center',
            barWidth: .6,
            horizontal: true
        },
        highlightColor: 'rgb(190,232,216)'
    },
    grid: {
        hoverable: true
    }
});

See this fiddle for working example. 看到这个小提琴的工作示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM