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

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


The following commit(s) were added to refs/heads/gh-pages by this push:
     new 5b902df5 fix: types
5b902df5 is described below

commit 5b902df563c6e537177dd5e2e0bc9d433781ad5e
Author: Ovilia <zwl.s...@gmail.com>
AuthorDate: Fri Feb 2 14:30:56 2024 +0800

    fix: types
---
 public/examples/ts/bar-stack-normalization-and-variation.ts | 4 ++--
 public/examples/ts/bar-stack-normalization.ts               | 4 ++--
 public/examples/ts/flame-graph.ts                           | 7 +++++--
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/public/examples/ts/bar-stack-normalization-and-variation.ts 
b/public/examples/ts/bar-stack-normalization-and-variation.ts
index 84691c97..bdada7c2 100644
--- a/public/examples/ts/bar-stack-normalization-and-variation.ts
+++ b/public/examples/ts/bar-stack-normalization-and-variation.ts
@@ -33,7 +33,7 @@ const categoryWidth = gridWidth / rawData[0].length;
 const barWidth = categoryWidth * 0.6;
 const barPadding = (categoryWidth - barWidth) / 2;
 
-const series = [
+const series: echarts.BarSeriesOption[] = [
     'Direct',
     'Mail Ad',
     'Affiliate Ad',
@@ -47,7 +47,7 @@ const series = [
         barWidth: '60%',
         label: {
             show: true,
-            formatter: (params) => Math.round(params.value * 1000) / 10 + '%'
+            formatter: (params: any) => Math.round(params.value * 1000) / 10 + 
'%'
         },
         data: rawData[sid].map((d, did) =>
         totalData[did] <= 0 ? 0 : d / totalData[did]
diff --git a/public/examples/ts/bar-stack-normalization.ts 
b/public/examples/ts/bar-stack-normalization.ts
index 0c7ab038..38c922d4 100644
--- a/public/examples/ts/bar-stack-normalization.ts
+++ b/public/examples/ts/bar-stack-normalization.ts
@@ -28,7 +28,7 @@ const grid = {
     bottom: 50
 };
 
-const series = [
+const series: echarts.BarSeriesOption[] = [
     'Direct',
     'Mail Ad',
     'Affiliate Ad',
@@ -42,7 +42,7 @@ const series = [
         barWidth: '60%',
         label: {
             show: true,
-            formatter: (params) => Math.round(params.value * 1000) / 10 + '%'
+            formatter: (params: any) => Math.round(params.value * 1000) / 10 + 
'%'
         },
         data: rawData[sid].map((d, did) =>
         totalData[did] <= 0 ? 0 : d / totalData[did]
diff --git a/public/examples/ts/flame-graph.ts 
b/public/examples/ts/flame-graph.ts
index 214523e0..d79d38d6 100644
--- a/public/examples/ts/flame-graph.ts
+++ b/public/examples/ts/flame-graph.ts
@@ -8,9 +8,12 @@ difficulty: 4
 import {
   CustomSeriesRenderItem,
   CustomSeriesRenderItemAPI,
-  CustomSeriesRenderItemParams
+  CustomSeriesRenderItemParams,
+  CustomSeriesRenderItemReturn
 } from 'echarts';
 
+declare function structuredClone(value: any, options?: any): any;
+
 interface StackTrace {
   id: string;
   name: string;
@@ -151,7 +154,7 @@ const renderItem: CustomSeriesRenderItem = (
         }
       }
     }
-  };
+  } as CustomSeriesRenderItemReturn;
 };
 
 myChart.showLoading();


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

Reply via email to