图表JS没有显示在悬停时使用小数据

时间:2015-02-12 09:51:15

标签: javascript jquery chart.js

如果我在条形图中有大量数据和小数据,则在onhover功能中不会显示小数据。 这是链接http://jsfiddle.net/ramakrishnap/zju8044k/ 例如:

//Bar chart for Broadcasts data
                    var broadcastData = {
                        labels : ['01-29-15','01-30-15','01-31-15','02-01-15','02-02-15','02-03-15','02-04-15','02-05-15','02-06-15','02-07-15','02-08-15','02-09-15','02-10-15','02-11-15','02-12-15'],
                        datasets : [
                        {
                            label: "Opt-In",
                            fillColor : "#4e8eb1",
                            strokeColor : "#9b9b9b",
                            pointColor : "#fff",
                            pointStrokeColor : "#990000",
                            data : [3,3,6,3,4,6,6,47079,8,11,5,5,13,10,]
                        }
                    ]
                    }
                     // get Bar chart canvas
                    var broadcasts = document.getElementById('broadcast').getContext('2d');
                    // draw Bar chart
                    new Chart(broadcasts).Bar(broadcastData);

1 个答案:

答案 0 :(得分:0)

尝试将commonSeriesSettings属性添加到图表

  

commonSeriesSettings:{

     

hoverMode:'includePoints',selectionMode:'includePoints',

     

}