In my Angular Chart JS Application could it be that there are "0" values in my data array. If I have "0" values, the tooltip is not working for this bar. When I change it to "0.1" its working...
The Issue appears only in IE10/11 - In Firefox its working fine.
Anybody has a suggestion how to solve it ?
Here is my Code and link to a plunker: http://plnkr.co/edit/p0bepcBrfQ31EoZsrtso
<body>
<div ng-controller="jsonServerBox">
<ul>
<li ng-repeat="module in ocw.modules" ng-style="{'background-color': module.background, 'color': module.fontcolor, 'border': module.border}">
<div class=""><canvas id="base" class="chart chart-base" widht="" chart-type="module.type" chart-data="module.data" chart-labels="module.labels" chart-series="module.series" chart-colours="module.colors" chart-options="module.options"></canvas></div>
</li>
</ul>
And JSON File:
{"modules":[{
"border":"1px solid rgb(69, 69, 69)",
"background":"rgb(69, 69, 69)",
"fontcolor":"white",
"type":"Bar",
"series":"SeriesA",
"data":[[0, 0.1,20,20]],
"labels":["A","B","S","O"],
"colors":[{
"fillColor":"white",
"strokeColor":"white",
"pointColor":null,
"pointStrokeColor":"",
"pointHighlightFill":"transparent",
"pointHighlightStroke":"white"
}],
"options":{
"scaleShowGridLines":false,
"pointHitDetectionRadius":2,
"barValueSpacing":1,
"scaleBeginAtZero":false
}
}]}
只需将pointHitDetectionRadius
增加(或删除)到一个较大的值(即使您增加图表大小也可以使用,但我认为这不是一个选择),并且您会看到工具提示(我在IE10模式下的IE11中检查了该提示-除非我增加pointHitDetectionRadius
或扩大窗口以扩大图表,否则工具提示不会出现在Plnkr屏幕上
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.