Created
February 21, 2019 15:58
-
-
Save maxkoretskyi/6f8a5d121e90947ff4946ff6199b304b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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