in src/PieChart.js [190:215]
renderMarkerLine(pathData) {
const { markerLineClassName, markerLineStyle } = this.props;
const lineD = {
value: this.props.markerLineValue,
};
const [onMouseEnter, onMouseMove, onMouseLeave, onClick] = [
'onMouseEnterLine',
'onMouseMoveLine',
'onMouseLeaveLine',
'onClick',
].map(eventName => {
// partially apply this line's data point as 2nd callback argument
const callback = methodIfFuncProp(eventName, this.props, this);
return isFunction(callback) ? bindTrailingArgs(callback, lineD) : null;
});
return (
<path
style={markerLineStyle}
className={`rct-marker-line ${markerLineClassName}`}
d={pathData}
{...{ onMouseEnter, onMouseMove, onMouseLeave, onClick }}
/>
);
}