You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by ov...@apache.org on 2018/09/06 04:55:56 UTC

[incubator-echarts] branch master updated: test(svg): add test case for #9014

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

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


The following commit(s) were added to refs/heads/master by this push:
     new f30cdc9  test(svg): add test case for #9014
     new 978f709  Merge branch 'master' of github.com:ecomfe/echarts
f30cdc9 is described below

commit f30cdc9661f4dbd374e535c36a36e6826d7ee9be
Author: Ovilia <zw...@gmail.com>
AuthorDate: Thu Sep 6 12:54:27 2018 +0800

    test(svg): add test case for #9014
---
 test/svg-gradient-opacity.html | 197 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 197 insertions(+)

diff --git a/test/svg-gradient-opacity.html b/test/svg-gradient-opacity.html
new file mode 100644
index 0000000..ffc55ab
--- /dev/null
+++ b/test/svg-gradient-opacity.html
@@ -0,0 +1,197 @@
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<html>
+    <head>
+        <meta charset="utf-8">
+        <script src="lib/esl.js"></script>
+        <script src="lib/config.js"></script>
+    </head>
+    <body>
+        <style>
+            html, body, #main {
+                width: 100%;
+                height: 100%;
+                /* background-image: url(old_mathematics.png); */
+                /* background-repeat: repeat; */
+            }
+        </style>
+        <div id="main"></div>
+
+        </div>
+        <script>
+            var chart;
+            require([
+                'echarts'
+            ], function (echarts) {
+
+                chart = echarts.init(document.getElementById('main'), null, {
+                    renderer: 'svg'
+                });
+
+                option = {
+                    "title": {
+                        "text": "请在 Safari 中测试透明度"
+                    },
+                    "tooltip": {
+                        "trigger": "axis"
+                    },
+                    "legend": {
+                        "data": [],
+                        "show": false
+                    },
+                    "grid": {
+                        "left": 5,
+                        "right": 15,
+                        "bottom": "2%",
+                        "top": "4%",
+                        "containLabel": true,
+                        "show": true,
+                        "backgroundColor": "transparent"
+                    },
+                    "xAxis": {
+                        "type": "category",
+                        "boundaryGap": false,
+                        "data": [
+                        "0:00",
+                        "0:30",
+                        "1:00",
+                        "1:30",
+                        "2:00",
+                        "2:30",
+                        "3:00",
+                        "3:30",
+                        "4:00",
+                        "4:30",
+                        "5:00",
+                        "5:30",
+                        "6:00",
+                        "6:30",
+                        "7:00",
+                        "7:30",
+                        "8:00",
+                        "8:30",
+                        "9:00",
+                        "9:30",
+                        "10:00",
+                        "10:30",
+                        "11:00",
+                        "11:30",
+                        "12:00",
+                        "12:30",
+                        "13:00"
+                        ],
+                        "splitLine": {
+                        "show": false
+                        },
+                        "axisTick": {
+                        "show": false
+                        },
+                        "axisLine": {
+                        "show": false
+                        },
+                        "axisLabel": {
+                        "fontSize": 10
+                        }
+                    },
+                    "yAxis": {
+                        "type": "value",
+                        "min": 0,
+                        "axisTick": {
+                        "show": false
+                        },
+                        "axisLabel": {
+                        "fontSize": 10
+                        },
+                        "axisLine": {
+                        "show": false
+                        },
+                        "splitLine": {
+                        "show": true
+                        },
+                        "interval": 69211
+                    },
+                    "series": [
+                        {
+                        "name": "1",
+                        "type": "line",
+                        "smooth": true,
+                        "itemStyle": {
+                            "normal": {
+                            "opacity": 0
+                            }
+                        },
+                        "lineStyle": {
+                            "normal": {
+                            "width": 1.5,
+                            "color": "#AC5AFF"
+                            }
+                        },
+                        "z": 0,
+                        "areaStyle": {
+                            "normal": {
+                            "color": new echarts.graphic.LinearGradient(
+                                            0, 0, 0, 1,
+                                            [
+                                                { offset: 0, color: 'rgba(172,90,255,1)' },
+                                                { offset: 1, color: 'rgba(172,90,255,0.5)' }
+                                            ]
+                            )
+                            }
+                        },
+                        "data": [
+                            31574,
+                            164657,
+                            276844,
+                            101562,
+                            112015,
+                            92247,
+                            76087,
+                            75194,
+                            58138,
+                            57983,
+                            70396,
+                            90285,
+                            94566,
+                            91314,
+                            114043,
+                            91601,
+                            73448,
+                            45801,
+                            76783,
+                            257652,
+                            264912,
+                            110699,
+                            144759,
+                            117858,
+                            83102,
+                            71152,
+                            62269
+                        ]
+                        }
+                    ],
+                    "animationEasing": "circularOut"
+                    };
+
+                chart.setOption(option);
+            });
+        </script>
+    </body>
+</html>


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