mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Dont use jquery
This commit is contained in:
parent
12d17c6d11
commit
e0a056cd2c
1 changed files with 12 additions and 3 deletions
|
@ -63,9 +63,18 @@ module.exports = function timechartFn(Private, config, $rootScope, timefilter, $
|
|||
position: 'nw',
|
||||
labelBoxBorderColor: 'rgb(255,255,255,0)',
|
||||
labelFormatter: function (label, series) {
|
||||
return '<span class="ngLegendValue" ng-click="toggleSeries(' + series._id + ')">' +
|
||||
label +
|
||||
'<span class="ngLegendValueNumber"></span></span>';
|
||||
const labelSpan = document.createElement('span');
|
||||
labelSpan.setAttribute('class', 'ngLegendValue');
|
||||
labelSpan.setAttribute('kbn-accessible-click', '');
|
||||
labelSpan.setAttribute('ng-click', 'toggleSeries(' + series._id + ')');
|
||||
labelSpan.appendChild(document.createTextNode(label));
|
||||
|
||||
const numberSpan = document.createElement('span');
|
||||
numberSpan.setAttribute('class', 'ngLegendValueNumber');
|
||||
|
||||
labelSpan.appendChild(numberSpan);
|
||||
|
||||
return labelSpan.innerHTML;
|
||||
}
|
||||
},
|
||||
colors: ['#01A4A4', '#C66', '#D0D102', '#616161', '#00A1CB', '#32742C', '#F18D05', '#113F8C', '#61AE24', '#D70060']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue