You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "laterdayi (via GitHub)" <gi...@apache.org> on 2023/02/28 09:54:12 UTC
[GitHub] [echarts] laterdayi opened a new issue, #18319: [Bug] 类型“TopLevelFormatterParams” CallbackDataParams 上不存在属性“at”
laterdayi opened a new issue, #18319:
URL: https://github.com/apache/echarts/issues/18319
### Version
last
### Link to Minimal Reproduction
_No response_
### Steps to Reproduce
类型“TopLevelFormatterParams”上不存在属性“at”。
类型“CallbackDataParams”上不存在属性“at”
```
formatter(params) {
console.log(params);
return `
${params?.at(0)?.marker} ${params?.at(0)?.seriesName }
`;
}
```
### Current Behavior
类型“TopLevelFormatterParams”上不存在属性“at”。
类型“CallbackDataParams”上不存在属性“at”
```
formatter(params) {
console.log(params);
return `
${params?.at(0)?.marker} ${params?.at(0)?.seriesName }
`;
}
```
### Expected Behavior
类型“TopLevelFormatterParams”上不存在属性“at”。
类型“CallbackDataParams”上不存在属性“at”
```
formatter(params) {
console.log(params);
return `
${params?.at(0)?.marker} ${params?.at(0)?.seriesName }
`;
}
```
### Environment
```markdown
- OS:
- Browser:
- Framework:
```
### Any additional comments?
_No response_
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org.apache.org
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] [echarts] plainheart commented on issue #18319: [Bug] 类型“TopLevelFormatterParams” CallbackDataParams 上不存在属性“at”
Posted by "plainheart (via GitHub)" <gi...@apache.org>.
plainheart commented on issue #18319:
URL: https://github.com/apache/echarts/issues/18319#issuecomment-1448066968
`tooltip` 的 `formatter` 回调参数的类型可能是单个对象也可能是一个数组,因此建议使用 `Array.isArray` 判断下。
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
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
Re: [I] [Bug] 类型“TopLevelFormatterParams” CallbackDataParams 上不存在属性“at” [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #18319:
URL: https://github.com/apache/echarts/issues/18319#issuecomment-2689109558
This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
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] [echarts] echarts-bot[bot] commented on issue #18319: [Bug] 类型“TopLevelFormatterParams” CallbackDataParams 上不存在属性“at”
Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on issue #18319:
URL: https://github.com/apache/echarts/issues/18319#issuecomment-1447882870
@laterdayi It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
<details><summary><b>TRANSLATED</b></summary><br>
**TITLE**
[Bug] Property 'at' does not exist on type 'TopLevelFormatterParams' CallbackDataParams
**BODY**
### Version
last
### Link to Minimal Reproduction
_No response_
### Steps to Reproduce
The attribute "at" does not exist on type "TopLevelFormatterParams".
The attribute 'at' does not exist on type 'CallbackDataParams'
```
formatter(params) {
console.log(params);
return `
${params?. at(0)?. marker} ${params?. at(0)?. seriesName }
`;
}
```
### Current Behavior
The attribute "at" does not exist on type "TopLevelFormatterParams".
The attribute 'at' does not exist on type 'CallbackDataParams'
```
formatter(params) {
console.log(params);
return `
${params?. at(0)?. marker} ${params?. at(0)?. seriesName }
`;
}
```
### Expected Behavior
The attribute "at" does not exist on type "TopLevelFormatterParams".
The attribute 'at' does not exist on type 'CallbackDataParams'
```
formatter(params) {
console.log(params);
return `
${params?. at(0)?. marker} ${params?. at(0)?. seriesName }
`;
}
```
### Environment
```markdown
- OS:
- Browser:
- Framework:
```
### Any additional comments?
_No response_
</details>
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
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] [echarts] laterdayi commented on issue #18319: [Bug] 类型“TopLevelFormatterParams” CallbackDataParams 上不存在属性“at”
Posted by "laterdayi (via GitHub)" <gi...@apache.org>.
laterdayi commented on issue #18319:
URL: https://github.com/apache/echarts/issues/18319#issuecomment-1448198331
@plainheart 请问 `params?.at(0)?.data.value` 会提示类型错误,但实际情况中data会是一个对象,应该如何标注类型 ?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
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
Re: [I] [Bug] 类型“TopLevelFormatterParams” CallbackDataParams 上不存在属性“at” [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #18319: [Bug] 类型“TopLevelFormatterParams” CallbackDataParams 上不存在属性“at”
URL: https://github.com/apache/echarts/issues/18319
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
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] [echarts] laterdayi commented on issue #18319: [Bug] 类型“TopLevelFormatterParams” CallbackDataParams 上不存在属性“at”
Posted by "laterdayi (via GitHub)" <gi...@apache.org>.
laterdayi commented on issue #18319:
URL: https://github.com/apache/echarts/issues/18319#issuecomment-1448208436
@plainheart 如果有自定义的数据在params里应该如何定义里面的类型防止ts报错
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
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] [echarts] laterdayi commented on issue #18319: [Bug] 类型“TopLevelFormatterParams” CallbackDataParams 上不存在属性“at”
Posted by "laterdayi (via GitHub)" <gi...@apache.org>.
laterdayi commented on issue #18319:
URL: https://github.com/apache/echarts/issues/18319#issuecomment-1447923878
如何从formatter的params中获取到params data 中自定义的数据,并且类型是对的
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
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] [echarts] laterdayi commented on issue #18319: [Bug] 类型“TopLevelFormatterParams” CallbackDataParams 上不存在属性“at”
Posted by "laterdayi (via GitHub)" <gi...@apache.org>.
laterdayi commented on issue #18319:
URL: https://github.com/apache/echarts/issues/18319#issuecomment-1447918796
```
属性“value”在类型“OptionDataItem”上不存在。你是否指的是“valueOf”?
类型“string”上不存在属性“value”。
```
const initOptions: ECOption = {
...BAR_OPTION,
tooltip: {
...BAR_OPTION.tooltip,
formatter(params) {
return Array.isArray(params)
? `
${params?.at(0)?.name} </br>
${params?.at(0)?.marker}UPH:${params?.at(0)?.data.value} </br>
${useChartMarker('#41b584')}Goal UPH:${params?.at(0)?.data.targetUph}
`
: '';
}
}
};
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
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
Re: [I] [Bug] 类型“TopLevelFormatterParams” CallbackDataParams 上不存在属性“at” [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #18319:
URL: https://github.com/apache/echarts/issues/18319#issuecomment-2704939779
This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!
--
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.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
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