1
0
Fork 0

Handle SAC area click events

This commit is contained in:
Gregory Eremin 2015-03-22 01:53:30 +07:00
parent 5259b8552a
commit 7408860a67
2 changed files with 2 additions and 0 deletions

View File

@ -22,6 +22,7 @@ var Area = React.createClass({
className={'path path-'+ this.props.i} className={'path path-'+ this.props.i}
d={this.state.lastd || this.props.d} d={this.state.lastd || this.props.d}
fill={this.props.color} fill={this.props.color}
onClick={this.props.onClick}
onMouseOver={this.props.onMouseOver} onMouseOver={this.props.onMouseOver}
shapeRendering="optimizeQuality" /> shapeRendering="optimizeQuality" />
); );

View File

@ -195,6 +195,7 @@ var StackedAreaChart = React.createClass({
item={item} i={i} item={item} i={i}
d={roundPathCorners(this.buildPathD(path), 3)} d={roundPathCorners(this.buildPathD(path), 3)}
color={Colors[i]} color={Colors[i]}
onClick={this.handleClick.bind(this, item)}
onMouseOver={this.handleFocusIn.bind(this, i)} /> onMouseOver={this.handleFocusIn.bind(this, i)} />
); );
}.bind(this); }.bind(this);