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

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


The following commit(s) were added to refs/heads/main by this push:
     new 1859ec5  chore: update generate script
1859ec5 is described below

commit 1859ec5285b11a19b56896523583a52467c60229
Author: Ovilia <[email protected]>
AuthorDate: Fri Nov 15 15:47:23 2024 +0800

    chore: update generate script
---
 scripts/generate.js              |  2 ++
 scripts/template/src/index.ts    | 10 ++++++++++
 scripts/template/test/index.html |  1 +
 3 files changed, 13 insertions(+)

diff --git a/scripts/generate.js b/scripts/generate.js
index c1e409e..6300a25 100644
--- a/scripts/generate.js
+++ b/scripts/generate.js
@@ -80,6 +80,8 @@ function replaceCustomSeriesName(filePath, name, 
kebabCaseName) {
       /\$CUSTOM_SERIES_KEBAB_NAME\$/g,
       kebabCaseName
     );
+    const pascalCase = name.charAt(0).toUpperCase() + name.slice(1);
+    newContent = newContent.replace(/\$CUSTOM_SERIES_PASCAL_NAME\$/g, 
pascalCase);
     fs.writeFileSync(filePath, newContent);
   }
 }
diff --git a/scripts/template/src/index.ts b/scripts/template/src/index.ts
index cd848f8..fa5ee96 100644
--- a/scripts/template/src/index.ts
+++ b/scripts/template/src/index.ts
@@ -24,10 +24,20 @@ import type {
 } from 'echarts/types/src/chart/custom/CustomSeries.d.ts';
 import type { EChartsExtensionInstallRegisters } from 
'echarts/src/extension.ts';
 
+type $CUSTOM_SERIES_PASCAL_NAME$ItemPayload = {
+
+};
+
 const renderItem = (
   params: echarts.CustomSeriesRenderItemParams,
   api: echarts.CustomSeriesRenderItemAPI
 ) => {
+  const itemPayload = params.itemPayload as 
$CUSTOM_SERIES_PASCAL_NAME$ItemPayload;
+
+  const cnt = params.dataInsideLength;
+  if (params.dataIndex === cnt - 1) {
+  }
+
   return {
     type: 'group',
     children: [],
diff --git a/scripts/template/test/index.html b/scripts/template/test/index.html
index b55ae08..72a6fb1 100644
--- a/scripts/template/test/index.html
+++ b/scripts/template/test/index.html
@@ -20,6 +20,7 @@
             series: {
                 type: 'custom',
                 renderItem: '$CUSTOM_SERIES_NAME$',
+                coordinateSystem: 'none',
                 itemPayload: {
                 }
             }


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

Reply via email to