Skip to content

Instantly share code, notes, and snippets.

@maxkoretskyi
Created February 21, 2019 15:58
Show Gist options
  • Select an option

  • Save maxkoretskyi/6f8a5d121e90947ff4946ff6199b304b to your computer and use it in GitHub Desktop.

Select an option

Save maxkoretskyi/6f8a5d121e90947ff4946ff6199b304b to your computer and use it in GitHub Desktop.
class CustomTooltip {
init(params) {
var eGui = this.eGui = document.createElement('div');
var color = params.color || 'white';
var data = params.api.getRowNode(params.rowIndex).data;
eGui.classList.add('custom-tooltip');
eGui.style['background-color'] = color;
eGui.innerHTML =
'<p><span class"name">' + data.athlete + '</span></p>' +
'<p><span>Country: </span>' + data.country + '</p>' +
'<p><span>Total: </span>' + data.total + '</p>';
}
getGui() {
return this.eGui;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment