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

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

本文介绍了使用FLOT图表在悬停时更改条形图的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Is it possible to change the color of a bar on hover with Flot horizontal bar charts

推荐答案

这对我有用设置'highlightColor'字段:

This worked for me by setting the 'highlightColor' field:

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

查看此。

这篇关于使用FLOT图表在悬停时更改条形图的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 05:27