[html-chart] add z-index:999 to anchor

otherwise it is not always visible
This commit is contained in:
Christopher Lam
2020-05-16 18:53:05 +08:00
parent 0f56bed0d9
commit 5b597dfea4

View File

@@ -387,7 +387,7 @@ document.getElementById(chartid).onclick = function(evt) {
var datasetIndex = activepoints[0]['_datasetIndex'];
var datasetURLs = myChart.data.datasets[datasetIndex].urls;
// console.log('index=',index,'datasetIndex=',datasetIndex);
anchor.style = 'position:absolute; top:' + (evt.clientY - 30) + 'px; left:' + (evt.clientX - 20) + 'px; display: block; padding: 5px; border-radius: 5px; background: #4E9CAF; text-align:center; color:white; ';
anchor.style = 'position:absolute; top:' + (evt.clientY - 30) + 'px; left:' + (evt.clientX - 20) + 'px; display: block; padding: 5px; border-radius: 5px; background: #4E9CAF; text-align:center; color:white; z-index: 999;';
switch (typeof(datasetURLs)) {
case 'string':
anchor.href = datasetURLs;