This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a commit to branch fix/bugs in repository https://gitbox.apache.org/repos/asf/incubator-skywalking-ui.git
commit 9a7cc049d4c75e086c2ba2e36580cebbf7d9684f Author: gaohongtao <[email protected]> AuthorDate: Sun Mar 4 21:02:58 2018 +0800 Remove label when data is too small --- src/components/Charts/Sankey/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Charts/Sankey/index.js b/src/components/Charts/Sankey/index.js index 828ad62..efb52e1 100644 --- a/src/components/Charts/Sankey/index.js +++ b/src/components/Charts/Sankey/index.js @@ -49,7 +49,7 @@ class Sankey extends Component { sync: true, }, }; - console.log(dv); + const ignoreNodes = dv.nodes.filter(_ => (_.y1 - _.y0) < 0.1).map(_ => _.name); return ( <div className={styles.chart} style={{ height }} ref={this.handleRoot}> <div ref={this.handleRef}> @@ -87,6 +87,9 @@ class Sankey extends Component { }} offset={0} formatter={(val) => { + if (ignoreNodes.findIndex(_ => _ === val) > -1) { + return ''; + } return ` ${val}`; } } -- To stop receiving notification emails like this one, please contact [email protected].
