File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -178,8 +178,10 @@ export default class BarChart extends React.Component {
178178
179179 const isHighlighted =
180180 this . props . highlighted &&
181- column === this . props . highlighted . column &&
182- Event . is ( this . props . highlighted . event , event ) ;
181+ ( ( column === this . props . highlighted . column &&
182+ Event . is ( this . props . highlighted . event , event ) ) ||
183+ ( this . props . highlightEntireEvent &&
184+ Event . is ( this . props . highlighted . event , event ) ) )
183185
184186 const isSelected =
185187 this . props . selected &&
@@ -354,6 +356,12 @@ BarChart.propTypes = {
354356 */
355357 columns : PropTypes . arrayOf ( PropTypes . string ) ,
356358
359+ /**
360+ * When true, the entire `highlighted` event will be highlighted, instead of
361+ * only the column bar that's currently being hovered
362+ */
363+ highlightEntireEvent : PropTypes . bool ,
364+
357365 /**
358366 * The style of the bar chart drawing (using SVG CSS properties).
359367 * This is an object with a key for each column which is being drawn,
@@ -500,6 +508,7 @@ BarChart.propTypes = {
500508BarChart . defaultProps = {
501509 visible : true ,
502510 columns : [ "value" ] ,
511+ highlightEntireEvent : false ,
503512 spacing : 1.0 ,
504513 offset : 0 ,
505514 minBarHeight : 1 ,
You can’t perform that action at this time.
0 commit comments