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/11/24 03:56:48 UTC

[GitHub] [incubator-echarts] zanllp opened a new issue #13672: 4.92版本的@types/echarts EChartOption.Legend中没有selector相关的类型声明

zanllp opened a new issue #13672:
URL: https://github.com/apache/incubator-echarts/issues/13672


   ### Version
   4.9.0
   
   ### Steps to reproduce
   ```ts
   import { EChartOption } from 'echarts'
   
   export const baseLineChartOption: EChartOption = {
     legend: {
       bottom: 0,
       icon: 'roundRect',
       itemHeight: 5,
       itemWidth: 20,
       selectedMode: true,
       show: true,
       type: 'scroll',
       selector: true,
       textStyle: {
         color: '#333',
         fontSize: 12,
         fontWeight: 'bold'
       }
     }
   }
   
   ```
   
   ### What is expected?
   vscode不报错
   
   ### What is actually happening?
   
   vscode提示
   不能将类型“{ bottom: number; icon: string; itemHeight: number; itemWidth: number; selectedMode: true; show: true; type: "scroll"; selector: true; textStyle: { color: string; fontSize: number; fontWeight: "bold"; }; }”分配给类型“Legend”。
     对象文字可以只指定已知属性,并且“selector”不在类型“Legend”中。
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   


----------------------------------------------------------------
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


[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #13672: 4.92版本的@types/echarts EChartOption.Legend中没有selector相关的类型声明

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #13672:
URL: https://github.com/apache/incubator-echarts/issues/13672#issuecomment-732637831


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.
   
   If you are interested in the project, you may also subscribe our [mailing list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵


----------------------------------------------------------------
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


[GitHub] [incubator-echarts] Ovilia commented on issue #13672: 4.92版本的@types/echarts EChartOption.Legend中没有selector相关的类型声明

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #13672:
URL: https://github.com/apache/incubator-echarts/issues/13672#issuecomment-732640254


   4.x 版本的类型是社区维护的 definitelytyped,类型不一定准确。可以试试 5.0 版本(最新的 master 分支或者 npm 的 rc 版本)有没有这个问题。


----------------------------------------------------------------
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


[GitHub] [incubator-echarts] zanllp closed issue #13672: 4.92版本的@types/echarts EChartOption.Legend中没有selector相关的类型声明

Posted by GitBox <gi...@apache.org>.
zanllp closed issue #13672:
URL: https://github.com/apache/incubator-echarts/issues/13672


   


----------------------------------------------------------------
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


[GitHub] [incubator-echarts] Ovilia commented on issue #13672: 4.92版本的@types/echarts EChartOption.Legend中没有selector相关的类型声明

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #13672:
URL: https://github.com/apache/incubator-echarts/issues/13672#issuecomment-732724981


   看起来是的。简单点的话,你还是用原来的版本,然后 as any 一下。复杂点的话,可以考虑给 vue-echarts 提更新版本的 pr,不过现在 echarts 还是 rc 版本,不知道会不会接受这个 pr。


----------------------------------------------------------------
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


[GitHub] [incubator-echarts] zanllp commented on issue #13672: 4.92版本的@types/echarts EChartOption.Legend中没有selector相关的类型声明

Posted by GitBox <gi...@apache.org>.
zanllp commented on issue #13672:
URL: https://github.com/apache/incubator-echarts/issues/13672#issuecomment-732733135


   嗯,已经将legend : {} as any上线了。有时间再看下vue-echarts


----------------------------------------------------------------
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


[GitHub] [incubator-echarts] zanllp commented on issue #13672: 4.92版本的@types/echarts EChartOption.Legend中没有selector相关的类型声明

Posted by GitBox <gi...@apache.org>.
zanllp commented on issue #13672:
URL: https://github.com/apache/incubator-echarts/issues/13672#issuecomment-732652126


   我尝试升到了
   ```json
   {
    "dependencies": {
       "echarts": "5.0.0-rc.1",
       "vue-echarts": "^5.0.0-beta.0"
     }
   }
   ```
   Legend中是有了selector,但是在编译时打印了这样的错误,是因为vue-echarts不支持5.0版本的echarts吗
   ```
   This dependency was not found:
   
   * echarts/map/js/world in ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--13-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Charts/line.vue?vue&type=script&lang=ts&
   
   To install it, you can run: npm install --save echarts/map/js/world
   ERROR in /Users/wuqinchuan/Desktop/jupiter/europa/node_modules/echarts/lib/chart/bar/BarSeries.d.ts(33,5):
   33:5 Property 'coordinateSystem' in type 'BarSeriesModel' is not assignable to the same property in base type 'BaseBarSeriesModel<BarSeriesOption>'.
     Type 'Cartesian2D | Polar' is not assignable to type 'CoordinateSystem'.
       Type 'Cartesian2D' is not assignable to type 'CoordinateSystem'.
         Types of property 'master' are incompatible.
           Type 'Grid' is not assignable to type 'CoordinateSystemMaster'.
       31 |     type: string;
       32 |     static dependencies: string[];
     > 33 |     coordinateSystem: Cartesian2D | Polar;
          |     ^
       34 |     getProgressive(): number | false;
       35 |     getProgressiveThreshold(): number;
       36 |     brushSelector(dataIndex: number, data: List, selectors: BrushCommonSelectorsForSeries): boolean;
   ERROR in /Users/wuqinchuan/Desktop/jupiter/europa/node_modules/echarts/lib/chart/bar/PictorialBarSeries.d.ts(40,5):
   40:5 Property 'coordinateSystem' in type 'PictorialBarSeriesModel' is not assignable to the same property in base type 'BaseBarSeriesModel<PictorialBarSeriesOption>'.
     Type 'Cartesian2D' is not assignable to type 'CoordinateSystem'.
       38 |     type: string;
       39 |     static dependencies: string[];
     > 40 |     coordinateSystem: Cartesian2D;
          |     ^
       41 |     hasSymbolVisual: boolean;
       42 |     defaultSymbol: string;
       43 |     static defaultOption: PictorialBarSeriesOption;
   ERROR in /Users/wuqinchuan/Desktop/jupiter/europa/node_modules/echarts/lib/chart/boxplot/BoxplotSeries.d.ts(31,5):
   31:5 Property 'coordinateSystem' in type 'BoxplotSeriesModel' is not assignable to the same property in base type 'SeriesModel<BoxplotSeriesOption>'.
     Type 'Cartesian2D' is not assignable to type 'CoordinateSystem'.
       29 |     readonly type = "series.boxplot";
       30 |     static readonly dependencies: string[];
     > 31 |     coordinateSystem: Cartesian2D;
          |     ^
       32 |     defaultValueDimensions: {
       33 |         name: string;
       34 |         defaultTooltip: boolean;
   ERROR in /Users/wuqinchuan/Desktop/jupiter/europa/node_modules/echarts/lib/chart/boxplot/BoxplotSeries.d.ts(40,11):
   40:11 Interface 'BoxplotSeriesModel' incorrectly extends interface 'SeriesModel<BoxplotSeriesOption>'.
     Types of property 'coordinateSystem' are incompatible.
       Type 'Cartesian2D' is not assignable to type 'CoordinateSystem'.
       38 |     static defaultOption: BoxplotSeriesOption;
       39 | }
     > 40 | interface BoxplotSeriesModel extends WhiskerBoxCommonMixin<BoxplotSeriesOption> {
          |           ^
       41 |     getBaseAxis(): Axis2D;
       42 | }
   ```
   下面还有很多


----------------------------------------------------------------
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


[GitHub] [incubator-echarts] Ovilia edited a comment on issue #13672: 4.92版本的@types/echarts EChartOption.Legend中没有selector相关的类型声明

Posted by GitBox <gi...@apache.org>.
Ovilia edited a comment on issue #13672:
URL: https://github.com/apache/incubator-echarts/issues/13672#issuecomment-732724981


   看起来是的。简单点的话,你还是用原来的版本,然后 as any 一下。复杂点的话,可以考虑给 vue-echarts 提更新版本的 pr,不过现在 echarts 还是 rc 版本,不知道会不会接受这个 pr。当然,也可以 fork vue-echarts 改版本,然后 npm install 从 github 装。


----------------------------------------------------------------
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