Javascript Angular-Chart.js-工具提示不使用0值
在我的Angle Chart JS应用程序中,数据数组中可能有“0”值。如果我有“0”值,则工具提示不适用于此栏。当我将其更改为“0.1”时,其工作 这个问题只出现在IE10/11中——在Firefox中,它工作正常 有人有解决这个问题的建议吗 这是我的代码和plunker的链接:Javascript Angular-Chart.js-工具提示不使用0值,javascript,angularjs,json,chart.js,Javascript,Angularjs,Json,Chart.js,在我的Angle Chart JS应用程序中,数据数组中可能有“0”值。如果我有“0”值,则工具提示不适用于此栏。当我将其更改为“0.1”时,其工作 这个问题只出现在IE10/11中——在Firefox中,它工作正常 有人有解决这个问题的建议吗 这是我的代码和plunker的链接: 只需将pointHitDetectionRadius增加(或删除)到一个更大的值(即使您增加图表大小也可以,但我认为这不是一个选项),您将看到工具提示(我在IE10模式下签入IE11-工具提示不会出现在Plnkr屏
只需将
pointHitDetectionRadius
增加(或删除)到一个更大的值(即使您增加图表大小也可以,但我认为这不是一个选项),您将看到工具提示(我在IE10模式下签入IE11-工具提示不会出现在Plnkr屏幕上,除非我增加pointHitDetectionRadius
或扩展窗口以使图表更大)谢谢-增加图表大小基本上不是一个选项(但也可以看到,图表大小越大,其效果越好).您将其工作的pointHitDetectionRadius增加了多少?我刚刚删除了pointHitDetectionRadius-这将使其成为默认值(我认为是20)。
<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>
{"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
}
}]}