From eb0bb3c564d6da4a1d71a4af521ff541618ffb9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BA=AE?= Date: Tue, 26 Jul 2016 00:14:31 +0800 Subject: [PATCH] add showLegend --- src/area_stack.jsx | 12 ++++++++---- src/bar.jsx | 12 ++++++++---- src/bar_group.jsx | 12 ++++++++---- src/bar_stack.jsx | 12 ++++++++---- src/commonProps.jsx | 6 ++++-- src/line.jsx | 12 ++++++++---- src/pie.jsx | 12 ++++++++---- src/scatter.jsx | 12 ++++++++---- 8 files changed, 60 insertions(+), 30 deletions(-) diff --git a/src/area_stack.jsx b/src/area_stack.jsx index 4df9103..bee4403 100644 --- a/src/area_stack.jsx +++ b/src/area_stack.jsx @@ -27,7 +27,8 @@ export default class LineTooltip extends VoronoiEvt { const { width, height, - focus + focus, + showLegend } = this.props; var focusDom; @@ -41,9 +42,12 @@ export default class LineTooltip extends VoronoiEvt { {this.props.children} - + {showLegend? + + : null + } {this.props.children} - + {showLegend? + + : null + } {this.props.children} - + {showLegend? + + : null + } {this.props.children} - + {showLegend? + + : null + } {this.props.children} - + {showLegend? + + : null + } {this.props.children} - + {showLegend? + + : null + } diff --git a/src/scatter.jsx b/src/scatter.jsx index ad94e7c..78ce8c3 100644 --- a/src/scatter.jsx +++ b/src/scatter.jsx @@ -28,7 +28,8 @@ export default class LineTooltip extends VoronoiEvt { const { width, height, - focus + focus, + showLegend } = this.props; var focusDom; @@ -42,9 +43,12 @@ export default class LineTooltip extends VoronoiEvt { {this.props.children} - + {showLegend? + + : null + }