You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "susiwen8 (via GitHub)" <gi...@apache.org> on 2026/05/02 13:39:54 UTC
[PR] fix(radar): pass indicator index to tooltip valueFormatter [echarts]
susiwen8 opened a new pull request, #21599:
URL: https://github.com/apache/echarts/pull/21599
## Summary
- Pass radar indicator indexes through tooltip markup fragments so `tooltip.valueFormatter(value, dataIndex)` receives the indicator index for radar values.
- Add a unit regression for the tooltip markup callback path.
- Add a manual HTML case to `test/tooltip-valueFormatter.html`.
## Root Cause
Radar builds one tooltip `nameValue` block per indicator, but those blocks did not carry their indicator position. The common tooltip markup layer already forwards `fragment.dataIndex` to `valueFormatter`, so radar value formatters received `undefined`.
## Related
Fixes #20109
## Testing
- `npx jest --config test/ut/jest.config.cjs --coverage=false test/ut/spec/component/tooltip/tooltip.test.ts`
- `npm run checktype`
- `npm run lint`
- Screenshot/manual verification of radar tooltip values showing `idx:0`, `idx:1`, and `idx:2`
--
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: [PR] fix(radar): pass indicator index to tooltip valueFormatter [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #21599:
URL: https://github.com/apache/echarts/pull/21599#issuecomment-4363928926
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-21599@e762e56
<!-- ECHARTS_PR_PREVIEW -->
--
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: [PR] fix(radar): pass indicator index to tooltip valueFormatter [echarts]
Posted by "Ovilia (via GitHub)" <gi...@apache.org>.
Ovilia commented on code in PR #21599:
URL: https://github.com/apache/echarts/pull/21599#discussion_r3206071747
##########
src/chart/radar/RadarSeries.ts:
##########
@@ -115,13 +115,14 @@ class RadarSeriesModel extends SeriesModel<RadarSeriesOption> {
return createTooltipMarkup('section', {
header: nameToDisplay,
sortBlocks: true,
- blocks: zrUtil.map(indicatorAxes, axis => {
+ blocks: zrUtil.map(indicatorAxes, (axis, indicatorIndex) => {
const val = data.get(data.mapDimension(axis.dim), dataIndex);
return createTooltipMarkup('nameValue', {
markerType: 'subItem',
markerColor: markerColor,
name: axis.name,
value: val,
+ dataIndex: indicatorIndex,
Review Comment:
I'm not sure whether it's a better idea to name this to be `indicatorIndex` instead of `dataIndex`. I would like to hear what other committers think.
--
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: [PR] fix(radar): pass indicator index to tooltip valueFormatter [echarts]
Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on PR #21599:
URL: https://github.com/apache/echarts/pull/21599#issuecomment-4363912402
Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout [the coding standard](https://echarts.apache.org/en/coding-standard.html) and Wiki about [How to make a pull request](https://github.com/apache/echarts/wiki/How-to-make-a-pull-request).
The pull request is marked to be `PR: author is committer` because you are a committer of this project.
To reviewers: If this PR is going to be described in the changelog in the future release, please make sure this PR has one of the following labels: `PR: doc ready`, `PR: awaiting doc`, `PR: doc unchanged`
This message is shown because the PR description doesn't contain the document related template.
--
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