Improve performance of highlightCallback
parent
de302999fa
commit
1692a754a2
|
@ -355,7 +355,8 @@ export default class Dygraph extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
highlightCallback = ({pageX}) => {
|
highlightCallback = ({pageX}) => {
|
||||||
this.setState({isHidden: false, pageX})
|
this.pageX = pageX
|
||||||
|
this.setState({isHidden: false})
|
||||||
}
|
}
|
||||||
|
|
||||||
legendFormatter = legend => {
|
legendFormatter = legend => {
|
||||||
|
@ -381,7 +382,6 @@ export default class Dygraph extends Component {
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
legend,
|
legend,
|
||||||
pageX,
|
|
||||||
sortType,
|
sortType,
|
||||||
isHidden,
|
isHidden,
|
||||||
isSnipped,
|
isSnipped,
|
||||||
|
@ -396,7 +396,7 @@ export default class Dygraph extends Component {
|
||||||
{...legend}
|
{...legend}
|
||||||
graph={this.graphRef}
|
graph={this.graphRef}
|
||||||
legend={this.legendRef}
|
legend={this.legendRef}
|
||||||
pageX={pageX}
|
pageX={this.pageX}
|
||||||
sortType={sortType}
|
sortType={sortType}
|
||||||
onHide={this.handleHideLegend}
|
onHide={this.handleHideLegend}
|
||||||
isHidden={isHidden}
|
isHidden={isHidden}
|
||||||
|
|
Loading…
Reference in New Issue