You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/10/16 06:26:23 UTC

[GitHub] [incubator-echarts] Ovilia commented on a change in pull request #13304: feat: decal

Ovilia commented on a change in pull request #13304:
URL: https://github.com/apache/incubator-echarts/pull/13304#discussion_r506082319



##########
File path: src/visual/aria.ts
##########
@@ -142,11 +190,12 @@ export default function (dom, ecModel) {
         return result;
     }
 
-    function getConfig(path) {
-        const userConfig = ariaModel.get(path);
+    function getConfig(model: Model, path: string) {
+        const userConfig = model.get(path);
         if (userConfig == null) {
             const pathArr = path.split('.');
-            let result = ecModel.getLocale('aria');
+            // FIXME: remove as any

Review comment:
       @pissang Please help improve the type here.

##########
File path: src/visual/aria.ts
##########
@@ -158,14 +207,15 @@ export default function (dom, ecModel) {
     }
 
     function getTitle() {
-        let title = ecModel.getModel('title').option;
-        if (title && title.length) {
-            title = title[0];
+        let title = ecModel.get('title') as TitleOption | TitleOption[];
+        if (title && (title as TitleOption[]).length) {
+            title = (title as TitleOption[])[0];
         }
-        return title && title.text;
+        return title && (title as TitleOption).text;
     }
 
-    function getSeriesTypeName(type) {
-        return ecModel.getLocale(['series', 'typeNames'])[type] || '自定义图';
+    function getSeriesTypeName(type: string) {
+        // FIXME: remove as any

Review comment:
       @pissang Please help improve the type here.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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