Skip to content

Instantly share code, notes, and snippets.

View NookieGrey's full-sized avatar

Nugzar Gagulia NookieGrey

View GitHub Profile
class GraphTooltip extends React.Component {
render() {
const {datum, x, y, color} = this.props;
return (
<g style={{pointerEvents: 'none'}}>
<foreignObject x={x} y={y} width="1" height="1">
<div
className="advisor-clients-portfolio-analytics-historical-tooltip-dot"
style={{backgroundColor: color}}
!(function () {
var tipPerItem = document.createElement('div');
tipPerItem.setAttribute('id', 'tipPerItem');
document.getElementById('tooltipDiv').appendChild(tipPerItem);
var oldTooltip = window.tooltip;
window.tooltip = function (what, isItIn, event, textString, attachFunction, numCheck, renameBtn, noHide) {
document.getElementById('tipPerItem').innerHTML = '';