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 49ca3ea  test(bar): Add test cases.
49ca3ea is described below

commit 49ca3ea317c7c8a639e68b407d9fd987883e465e
Author: SHUANG SU <[email protected]>
AuthorDate: Thu Sep 26 22:30:21 2019 +0800

    test(bar): Add test cases.
---
 test/bar2.html | 236 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 236 insertions(+)

diff --git a/test/bar2.html b/test/bar2.html
index 74a64d1..9692cb7 100644
--- a/test/bar2.html
+++ b/test/bar2.html
@@ -48,6 +48,9 @@ under the License.
         <div class="chart" id="main1"></div>
         <h1>Narrow grid</h1>
         <div class="chart" id="main2"></div>
+        <div class="chart" id="main3"></div>
+        <div class="chart" id="main4"></div>
+        <div class="chart" id="main5"></div>
 
 
         <script>
@@ -251,5 +254,238 @@ under the License.
 
 
 
+
+
+        <script>
+
+            var echarts;
+            var chart;
+            var myChart;
+            var groupCategories = [];
+            var groupColors = [];
+
+            require([
+                'echarts'
+            ], function (ec) {
+                echarts = ec;
+                var dataCount = 10;
+                var dayTimestamp = 24 * 60 * 60 * 1000;
+
+                function makeSeriesData() {
+                    var result = [];
+                    var date = +(new Date(2019, 8, 10));
+                    for (var i = 0; i < dataCount; i++) {
+                        result.push([+date, Math.random() * 1000]);
+                        date += dayTimestamp;
+                    }
+                    return result;
+                }
+
+                option = {
+                    xAxis: {
+                        type: 'time',
+                        boundaryGap: ['20%', '20%'],
+                        splitLine: {show: false}
+                    },
+                    yAxis: {
+                        axisLine: {show: false},
+                        axisTick: {show: false},
+                        splitLine: {show: false}
+                    },
+                    legend: {},
+                    series: [{
+                        name: 'barA1',
+                        type: 'bar',
+                        stack: 'a',
+                        itemStyle: {
+                            shadowBlur: 10,
+                            borderColor: '#ef1',
+                            borderWidth: 5
+                        },
+                        data: makeSeriesData()
+                    }, {
+                        name: 'barA2',
+                        type: 'bar',
+                        stack: 'a',
+                        itemStyle: {
+                            borderColor: '#1dd',
+                            borderWidth: 5
+                        },
+                        data: makeSeriesData()
+                    }, {
+                        name: 'barB',
+                        type: 'bar',
+                        itemStyle: {
+                            shadowBlur: 5,
+                            borderColor: '#ef1',
+                            borderWidth: 3
+                        },
+                        data: makeSeriesData()
+                    }]
+                };
+
+                var chart = testHelper.create(echarts, 'main3', {
+                    title: [
+                        'bar on time axis',
+                        'click the legend, the bar should display normally'
+                    ],
+                    option: option
+                    // recordCanvas: true
+                });
+            });
+
+        </script>
+
+
+
+
+
+
+
+        <script>
+
+            var echarts;
+            var chart;
+            var myChart;
+            var groupCategories = [];
+            var groupColors = [];
+
+            require([
+                'echarts'
+            ], function (ec) {
+                echarts = ec;
+                var dataCount = 10;
+
+                function makeSeriesData() {
+                    var result = [];
+                    var date = 100;
+                    for (var i = 0; i < dataCount; i++) {
+                        result.push([+date, Math.random() * 1000]);
+                        date += 5;
+                    }
+                    return result;
+                }
+                var itemStyle = {
+                    shadowBlur: 5
+                };
+
+                option = {
+                    xAxis: {
+                        scale: true,
+                        splitLine: {show: false}
+                    },
+                    yAxis: {
+                        axisLabel: {
+                            margin: 40
+                        },
+                        axisLine: {show: false},
+                        axisTick: {show: false},
+                        splitLine: {show: false}
+                    },
+                    legend: {},
+                    series: [{
+                        name: 'barA',
+                        type: 'bar',
+                        itemStyle: itemStyle,
+                        data: makeSeriesData()
+                    }, {
+                        name: 'barB',
+                        type: 'bar',
+                        itemStyle: itemStyle,
+                        data: makeSeriesData()
+                    }]
+                };
+
+                var chart = testHelper.create(echarts, 'main4', {
+                    title: [
+                        'bar on value axis',
+                        'click the legend, the bar should display normally'
+                    ],
+                    option: option
+                    // recordCanvas: true
+                });
+            });
+
+        </script>
+
+
+
+
+
+
+        <script>
+
+            var echarts;
+            var chart;
+            var myChart;
+            var groupCategories = [];
+            var groupColors = [];
+
+            require([
+                'echarts'
+            ], function (ec) {
+                echarts = ec;
+                var dataCount = 10;
+
+                function makeSeriesData() {
+                    var result = [];
+                    var date = 10;
+                    for (var i = 0; i < dataCount; i++) {
+                        result.push([+date, Math.random() * 1000]);
+                        date += 1;
+                    }
+                    return result;
+                }
+                var itemStyle = {
+                    shadowBlur: 5
+                };
+
+                option = {
+                    xAxis: {
+                        type: 'category',
+                        scale: true,
+                        boundaryGap: false,
+                        splitLine: {show: false},
+                        axisLine: {show: false}
+                    },
+                    yAxis: {
+                        axisLabel: {
+                            margin: 40
+                        },
+                        axisLine: {show: false},
+                        axisTick: {show: false},
+                        splitLine: {show: false}
+                    },
+                    legend: {},
+                    series: [{
+                        name: 'lineA',
+                        type: 'line',
+                        data: makeSeriesData()
+                    }, {
+                        name: 'barA',
+                        type: 'bar',
+                        itemStyle: itemStyle,
+                        data: makeSeriesData()
+                    }, {
+                        name: 'barB',
+                        type: 'bar',
+                        itemStyle: itemStyle,
+                        data: makeSeriesData()
+                    }]
+                };
+
+                var chart = testHelper.create(echarts, 'main5', {
+                    title: [
+                        'bar on category axis',
+                        'click the legend, the bar should display normally'
+                    ],
+                    option: option
+                    // recordCanvas: true
+                });
+            });
+
+        </script>
+
+
     </body>
 </html>
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to