You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/05/10 11:15:16 UTC

[echarts] branch enhance-visual-regression-test updated: test: not throw error in sankey-ringed

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

shenyi pushed a commit to branch enhance-visual-regression-test
in repository https://gitbox.apache.org/repos/asf/echarts.git


The following commit(s) were added to refs/heads/enhance-visual-regression-test by this push:
     new fd7a5b3  test: not throw error in sankey-ringed
fd7a5b3 is described below

commit fd7a5b37edf6716f5d69fe877044d859f6e3f70a
Author: pissang <bm...@gmail.com>
AuthorDate: Mon May 10 19:14:17 2021 +0800

    test: not throw error in sankey-ringed
---
 test/sankey-ringed.html | 59 +++++++++++++++++++++++++++----------------------
 1 file changed, 32 insertions(+), 27 deletions(-)

diff --git a/test/sankey-ringed.html b/test/sankey-ringed.html
index ccce5f0..9de1168 100644
--- a/test/sankey-ringed.html
+++ b/test/sankey-ringed.html
@@ -40,9 +40,9 @@ under the License.
 
                 var chart = echarts.init(document.getElementById('main'), null, {});
 
-                window.onresize = function () {
-                    chart.resize();
-                };
+                // window.onresize = function () {
+                //     chart.resize();
+                // };
 
                 var testData =  {
                     nodes: [
@@ -104,32 +104,37 @@ under the License.
                     ]
                 };
 
-                chart.setOption({
-                    color: ['#67001f', '#b2182b', '#d6604d', '#f4a582', '#fddbc7', '#d1e5f0', '#92c5de', '#4393c3', '#2166ac', '#053061'],
-                    tooltip: {
-                        trigger: 'item',
-                        triggerOn: 'mousemove'
-                    },
-                    animation: false,
-                    series: [
-                        {
-                            type: 'sankey',
-                            bottom: '10%',
-                            focusNodeAdjacency: true,
-                            data: testData.nodes,
-                            links: testData.links,
-                            label: {
-                                position: 'left'
-                            },
-                            lineStyle: {
-                                normal: {
-                                    color: 'source',
-                                    curveness: 0.5
+                try {
+                    chart.setOption({
+                        color: ['#67001f', '#b2182b', '#d6604d', '#f4a582', '#fddbc7', '#d1e5f0', '#92c5de', '#4393c3', '#2166ac', '#053061'],
+                        tooltip: {
+                            trigger: 'item',
+                            triggerOn: 'mousemove'
+                        },
+                        animation: false,
+                        series: [
+                            {
+                                type: 'sankey',
+                                bottom: '10%',
+                                focusNodeAdjacency: true,
+                                data: testData.nodes,
+                                links: testData.links,
+                                label: {
+                                    position: 'left'
+                                },
+                                lineStyle: {
+                                    normal: {
+                                        color: 'source',
+                                        curveness: 0.5
+                                    }
                                 }
                             }
-                        }
-                    ]
-                });
+                        ]
+                    });
+                }
+                catch (e) {
+                    console.error(e);
+                }
             });
         </script>
     </body>

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