Skip to content

Instantly share code, notes, and snippets.

@pbeshai
Created May 4, 2015 03:39
Show Gist options
  • Save pbeshai/aa9f021c52fd930f0acc to your computer and use it in GitHub Desktop.
Save pbeshai/aa9f021c52fd930f0acc to your computer and use it in GitHub Desktop.
.radial-heatmap circle.highlight {
stroke: #FA7F9F;
}
{data.map((d, i) => {
// set the highlight class name if this element is highlighted
const className = highlight && d[radiusKey] === highlight[radiusKey] ? 'highlight' : '';
return (
<circle key={i} className={className} r={r(d[radiusKey])} cx={width / 2}
cy={-r(0) / 2} strokeWidth={strokeWidth} stroke={color(d[colorKey])}
onMouseOver={this._handleHover.bind(this, d)}
onMouseOut={this._handleHover.bind(this, null)}
/>
);
})}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment