Change color of bar on hover with FLOT charts

六月ゝ 毕业季﹏ 提交于 2019-12-10 18:03:39

问题


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


回答1:


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
    }
});

See this fiddle for working example.



来源:https://stackoverflow.com/questions/13266803/change-color-of-bar-on-hover-with-flot-charts

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!