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

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

commit bc065fd0cb9b4b2cf10e8f38e2df5d95329b731f
Author: Ovilia <[email protected]>
AuthorDate: Tue Aug 27 18:26:06 2024 +0800

    test(pictorial): add test case when value is 0
---
 test/pictorial-zero-value.html | 54 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/test/pictorial-zero-value.html b/test/pictorial-zero-value.html
index 49935bb2b..7a7b92489 100644
--- a/test/pictorial-zero-value.html
+++ b/test/pictorial-zero-value.html
@@ -32,6 +32,7 @@ under the License.
 
         <div id="main"></div>
         <div id="main2"></div>
+        <div id="main3"></div>
 
         <script>
             var chart;
@@ -167,5 +168,58 @@ under the License.
                 option && myChart.setOption(option);
             });
         </script>
+
+
+
+        <script>
+            require(['echarts'], function (echarts) {
+                option = {
+                    xAxis: {
+                        type: 'value',
+                        boundaryGap: [0, 0.01]
+                    },
+                    yAxis: {
+                        type: 'category',
+                        data: ['Brazil', 'Indonesia']
+                    },
+                    series: [
+                        {
+                        name: '2011',
+                        type: 'bar',
+                        data: [0, 630230]
+                        },
+                        {
+                        type: 'pictorialBar',
+                        symbolPosition: 'end',
+                        symbolSize: 40,
+                        symbolOffset: [2, 0],
+                        zlevel: 2,
+                        data: [
+                            {
+                            value: 0,
+                            symbol:
+                                
'image://https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg'
+                            },
+                            {
+                            value: 630230,
+                            symbol:
+                                
'image://https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg'
+                            }
+                        ]
+                        }
+                    ]
+                };
+
+
+                var chart = testHelper.create(echarts, 'main3', {
+                    title: [
+                        'Image should not be flipped when data is 0.',
+                    ],
+                    option: option
+                });
+
+            });
+
+        </script>
     </body>
 </html>


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

Reply via email to