You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2018/09/09 19:58:49 UTC

[incubator-echarts] branch release updated: add test case of dataType filter.

This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch release
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git


The following commit(s) were added to refs/heads/release by this push:
     new 41a8c07  add test case of dataType filter.
41a8c07 is described below

commit 41a8c0739f2ab1485814c3c3acbe6c4581368fae
Author: sushuang <su...@gmail.com>
AuthorDate: Mon Sep 10 02:53:16 2018 +0800

    add test case of dataType filter.
---
 test/ec-event.html | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 106 insertions(+)

diff --git a/test/ec-event.html b/test/ec-event.html
index 3cfbebb..fac3c65 100644
--- a/test/ec-event.html
+++ b/test/ec-event.html
@@ -46,6 +46,7 @@ under the License.
         <div id="main3"></div>
         <div id="main4"></div>
         <div id="main5"></div>
+        <div id="main6"></div>
 
 
         <script>
@@ -360,5 +361,110 @@ under the License.
 
 
 
+        <script>
+
+            require([
+                'echarts'/*, 'map/js/china' */
+            ], function (echarts) {
+
+                var option = {
+                    tooltip: {},
+                    animationDurationUpdate: 1500,
+                    animationEasingUpdate: 'quinticInOut',
+                    series : [
+                        {
+                            type: 'graph',
+                            symbolSize: 20,
+                            roam: true,
+                            label: {
+                                normal: {
+                                    show: true
+                                }
+                            },
+                            edgeSymbol: ['circle', 'arrow'],
+                            edgeSymbolSize: [4, 10],
+                            edgeLabel: {
+                                normal: {
+                                    textStyle: {
+                                        fontSize: 20
+                                    }
+                                }
+                            },
+                            focusNodeAdjacency: true,
+                            data: [{
+                                name: '节点1',
+                                x: 300,
+                                y: 300,
+                                value: 2321
+                            }, {
+                                name: '节点2',
+                                x: 800,
+                                y: 300
+                            }],
+                            links: [{
+                                source: 0,
+                                target: 1,
+                                symbolSize: [5, 20],
+                                label: {
+                                    normal: {
+                                        show: true
+                                        // position: 'end'
+                                    }
+                                },
+                                lineStyle: {
+                                    normal: {
+                                        width: 5,
+                                        curveness: 0.2
+                                    }
+                                }
+                            }, {
+                                source: '节点2',
+                                target: '节点1',
+                                label: {
+                                    normal: {
+                                        show: true
+                                    }
+                                },
+                                lineStyle: {
+                                    normal: { curveness: 0.2 }
+                                }
+                            }],
+                            lineStyle: {
+                                normal: {
+                                    curveness: 0
+                                }
+                            }
+                        }
+                    ]
+                };
+
+                var chart = testHelper.create(echarts, 'main6', {
+                    title: [
+                        'dataType filter',
+                        '[click node, console.log]: "clk", "clk node"',
+                        '[click edge, console.log]: "clk", "clk edge"',
+                    ],
+                    option: option
+                });
+
+                chart.on('click', function () {
+                    console.log('clk');
+                });
+                chart.on('click', {dataType: 'node'}, function () {
+                    console.log('clk node');
+                });
+                chart.on('click', {dataType: 'edge'}, function () {
+                    console.log('clk edge');
+                });
+
+            });
+
+        </script>
+
+
+
+
+
+
     </body>
 </html>
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org