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

susiwen8 pushed a commit to branch codex/normalized-stacked-area
in repository https://gitbox.apache.org/repos/asf/echarts.git


The following commit(s) were added to refs/heads/codex/normalized-stacked-area 
by this push:
     new b751f1554 Make normalized area visual case denser
b751f1554 is described below

commit b751f1554c8c4dc13d071cf385a0069825d3ed78
Author: susiwen8 <[email protected]>
AuthorDate: Mon May 4 21:53:30 2026 +0800

    Make normalized area visual case denser
    
    The normalized stacked area HTML case now uses 100 deterministic data 
points so the preview better represents a realistic dense area chart while 
preserving the same top-boundary-at-one verification shape.
    
    Constraint: Visual fixture should stay deterministic for screenshot review
    Rejected: Use random data | screenshots would drift between runs
    Confidence: high
    Scope-risk: narrow
    Reversibility: clean
    Tested: npx jest --config test/ut/jest.config.cjs --coverage=false 
test/ut/spec/series/lineStack.test.ts
    Tested: git diff --check -- test/area-stack.html
    Tested: Browser preview at test/area-stack.html with 100 data points
    Not-tested: broader visual regression suite
---
 test/area-stack.html | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/test/area-stack.html b/test/area-stack.html
index 1058945b1..bdcbee7e6 100644
--- a/test/area-stack.html
+++ b/test/area-stack.html
@@ -759,6 +759,20 @@ under the License.
 
             require(['echarts'], function (echarts) {
 
+                var xAxisData = [];
+                var directData = [];
+                var emailData = [];
+                var adsData = [];
+                var searchData = [];
+
+                for (var i = 0; i < 100; i++) {
+                    xAxisData.push('Day ' + (i + 1));
+                    directData.push(Math.round(28 + Math.sin(i / 5) * 12 + (i 
% 9)));
+                    emailData.push(Math.round(24 + Math.cos(i / 7) * 10 + (i % 
7)));
+                    adsData.push(Math.round(20 + Math.sin(i / 9 + 1) * 8 + (i 
% 5) * 2));
+                    searchData.push(Math.round(30 + Math.cos(i / 6 + 2) * 14 + 
(i % 11)));
+                }
+
                 var option = {
                     legend: {
                         top: 25
@@ -775,7 +789,7 @@ under the License.
                     xAxis: {
                         type: 'category',
                         boundaryGap: false,
-                        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri']
+                        data: xAxisData
                     },
                     yAxis: {
                         type: 'value',
@@ -790,7 +804,7 @@ under the License.
                             stackNormalize: true,
                             areaStyle: {},
                             symbol: 'none',
-                            data: [10, 30, 20, 40, 25]
+                            data: directData
                         },
                         {
                             name: 'Email',
@@ -799,7 +813,7 @@ under the License.
                             stackNormalize: true,
                             areaStyle: {},
                             symbol: 'none',
-                            data: [20, 10, 30, 20, 25]
+                            data: emailData
                         },
                         {
                             name: 'Ads',
@@ -808,7 +822,7 @@ under the License.
                             stackNormalize: true,
                             areaStyle: {},
                             symbol: 'none',
-                            data: [30, 40, 10, 20, 25]
+                            data: adsData
                         },
                         {
                             name: 'Search',
@@ -817,7 +831,7 @@ under the License.
                             stackNormalize: true,
                             areaStyle: {},
                             symbol: 'none',
-                            data: [40, 20, 40, 20, 25]
+                            data: searchData
                         }
                     ]
                 };


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

Reply via email to