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 18:44:37 UTC

[incubator-echarts] 01/05: tweak and add test.

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

commit d6d05bb54cd5034c22316f9ac3e2e273d98981bf
Author: sushuang <su...@gmail.com>
AuthorDate: Fri Sep 7 17:21:45 2018 +0800

    tweak and add test.
---
 .eslintrc.yaml   |  3 +--
 test/encode.html | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 73 insertions(+), 2 deletions(-)

diff --git a/.eslintrc.yaml b/.eslintrc.yaml
index 698128c..2124f62 100644
--- a/.eslintrc.yaml
+++ b/.eslintrc.yaml
@@ -95,10 +95,9 @@ rules:
     no-multi-spaces:
         - 2
         -
+            ignoreEOLComments: true
             exceptions:
                 Property: true
-                BinaryExpression: true
-                VariableDeclarator: true
     no-new-object: 2
     no-spaced-func: 2
     no-trailing-spaces: 2
diff --git a/test/encode.html b/test/encode.html
index 661be69..13af96d 100644
--- a/test/encode.html
+++ b/test/encode.html
@@ -50,6 +50,8 @@ under the License.
         <h1>define which dim on x or y. encode: {x: 2, y: 1, label: 4}</h1>
         <div class="chart" id="dimXY"></div>
 
+        <div class="chart" id="ignoreX"></div>
+
 
 
 
@@ -378,5 +380,75 @@ under the License.
 
 
 
+        <script>
+
+            var chart;
+            var myChart;
+            var option;
+
+            require([
+                'echarts'/*, 'map/js/china' */
+            ], function (echarts) {
+
+                var option = {
+                    xAxis: {},
+                    yAxis: {},
+                    dataZoom: [{
+                        type: 'inside',
+                        xAxisIndex: 0
+                    }, {
+                        type: 'slider',
+                        xAxisIndex: 0
+                    }, {
+                        type: 'inside',
+                        yAxisIndex: 0
+                    }, {
+                        type: 'slider',
+                        yAxisIndex: 0
+                    }],
+                    series: [{
+                        type: 'custom',
+                        renderItem: function (params, api) {
+                            var y = api.coord([0, api.value(0)])[1];
+                            var x = 100;
+                            return {
+                                type: 'circle',
+                                shape: {
+                                    cx: x,
+                                    cy: y,
+                                    r: 30
+                                },
+                                style: {
+                                    fill: 'blue'
+                                }
+                            };
+                        },
+                        encode: {
+                            x: null,
+                            y: 0
+                        },
+                        data: [
+                            [122, null],
+                            [333, null]
+                        ]
+                    }, {
+                        type: 'scatter',
+                        data: [[21, 43], [55, 66]]
+                    }]
+                };
+
+                chart = myChart = testHelper.create(echarts, 'ignoreX', {
+                    option: option,
+                    title: [
+                        'series not controlled by xAxis but only by yAxis',
+                        'x axis can not filter blue circle, but y axis can do'
+                    ],
+                    info: option.series[0].encode
+                });
+            });
+
+        </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