You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "gowthamzinc (via GitHub)" <gi...@apache.org> on 2025/04/24 16:50:08 UTC
[PR] Feature - Need to show custom tooltip only for actual index [echarts]
gowthamzinc opened a new pull request, #20938:
URL: https://github.com/apache/echarts/pull/20938
### What problem does this feature solve?
**Existing tooltip**

### What does the proposed API look like?
**Expected tooltip on Hover**

**Expected data on click**

--
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] Feature - Radar Chart - Need to show custom tooltip only for actual index [echarts]
Posted by "gowthamzinc (via GitHub)" <gi...@apache.org>.
gowthamzinc commented on PR #20938:
URL: https://github.com/apache/echarts/pull/20938#issuecomment-3752802326
@Ovilia @plainheart just a gentle reminder — I’ve already re-requested your review after addressing the changes.
Could you please take another look when you have a moment? 🙏
--
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] Feature - Radar Chart - Need to show custom tooltip only for actual index [echarts]
Posted by "gowthamzinc (via GitHub)" <gi...@apache.org>.
gowthamzinc commented on code in PR #20938:
URL: https://github.com/apache/echarts/pull/20938#discussion_r2152946747
##########
src/chart/radar/RadarSeries.ts:
##########
@@ -102,6 +107,17 @@ class RadarSeriesModel extends SeriesModel<RadarSeriesOption> {
});
}
+ /**
+ * @overwrite
+ */
+ getDataParams(dataIndex: number, dataType: any, el?: Element): RadarCallbackDataParams {
+ const params = super.getDataParams(dataIndex) as RadarCallbackDataParams;
+ // indicatorIndex && indicatorAxes
+ params.indicatorIndex = (el && (el as any).__dimIdx) ?? null;
Review Comment:
[Removed ?? and used ternary operator](https://github.com/apache/echarts/pull/20938/commits/0d4759484050247a60c7a5cd5bee9a3f2c2df6f1)
--
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] Feature - Radar Chart - Need to show custom tooltip only for actual index [echarts]
Posted by "gowthamzinc (via GitHub)" <gi...@apache.org>.
gowthamzinc commented on code in PR #20938:
URL: https://github.com/apache/echarts/pull/20938#discussion_r2152946747
##########
src/chart/radar/RadarSeries.ts:
##########
@@ -102,6 +107,17 @@ class RadarSeriesModel extends SeriesModel<RadarSeriesOption> {
});
}
+ /**
+ * @overwrite
+ */
+ getDataParams(dataIndex: number, dataType: any, el?: Element): RadarCallbackDataParams {
+ const params = super.getDataParams(dataIndex) as RadarCallbackDataParams;
+ // indicatorIndex && indicatorAxes
+ params.indicatorIndex = (el && (el as any).__dimIdx) ?? null;
Review Comment:
Avoided using ??
[Instead of indicatorAxes just pass name of that axis](https://github.com/apache/echarts/pull/20938/commits/0d4759484050247a60c7a5cd5bee9a3f2c2df6f1)
--
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] Feature - Radar Chart - Need to show custom tooltip only for actual index [echarts]
Posted by "gowthamzinc (via GitHub)" <gi...@apache.org>.
gowthamzinc commented on code in PR #20938:
URL: https://github.com/apache/echarts/pull/20938#discussion_r2152942448
##########
src/chart/radar/RadarSeries.ts:
##########
@@ -71,6 +72,10 @@ export interface RadarSeriesOption
data?: (RadarSeriesDataItemOption | RadarSeriesDataValue)[]
}
+export interface RadarCallbackDataParams extends CallbackDataParams {
+ indicatorIndex: number,
+ indicatorAxes: Array<IndicatorAxis>
Review Comment:
[Instead of indicatorAxes just pass indicatorName of that axis](https://github.com/apache/echarts/pull/20938/commits/0d4759484050247a60c7a5cd5bee9a3f2c2df6f1)
--
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] Feature - Radar Chart - Need to show custom tooltip only for actual index [echarts]
Posted by "gowthamzinc (via GitHub)" <gi...@apache.org>.
gowthamzinc commented on code in PR #20938:
URL: https://github.com/apache/echarts/pull/20938#discussion_r2152942448
##########
src/chart/radar/RadarSeries.ts:
##########
@@ -71,6 +72,10 @@ export interface RadarSeriesOption
data?: (RadarSeriesDataItemOption | RadarSeriesDataValue)[]
}
+export interface RadarCallbackDataParams extends CallbackDataParams {
+ indicatorIndex: number,
+ indicatorAxes: Array<IndicatorAxis>
Review Comment:
[Instead of indicatorAxes just passed indicatorName of that axis](https://github.com/apache/echarts/pull/20938/commits/0d4759484050247a60c7a5cd5bee9a3f2c2df6f1)
--
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] Feature - Radar Chart - Need to show custom tooltip only for actual index [echarts]
Posted by "gowthamzinc (via GitHub)" <gi...@apache.org>.
gowthamzinc commented on code in PR #20938:
URL: https://github.com/apache/echarts/pull/20938#discussion_r2152946747
##########
src/chart/radar/RadarSeries.ts:
##########
@@ -102,6 +107,17 @@ class RadarSeriesModel extends SeriesModel<RadarSeriesOption> {
});
}
+ /**
+ * @overwrite
+ */
+ getDataParams(dataIndex: number, dataType: any, el?: Element): RadarCallbackDataParams {
+ const params = super.getDataParams(dataIndex) as RadarCallbackDataParams;
+ // indicatorIndex && indicatorAxes
+ params.indicatorIndex = (el && (el as any).__dimIdx) ?? null;
Review Comment:
Removed ?? and used ternary operator
[Instead of indicatorAxes just pass name of that axis](https://github.com/apache/echarts/pull/20938/commits/0d4759484050247a60c7a5cd5bee9a3f2c2df6f1)
--
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] Feature - Radar Chart - Need to show custom tooltip only for actual index [echarts]
Posted by "Ovilia (via GitHub)" <gi...@apache.org>.
Ovilia commented on code in PR #20938:
URL: https://github.com/apache/echarts/pull/20938#discussion_r2142052578
##########
src/chart/radar/RadarSeries.ts:
##########
@@ -71,6 +72,10 @@ export interface RadarSeriesOption
data?: (RadarSeriesDataItemOption | RadarSeriesDataValue)[]
}
+export interface RadarCallbackDataParams extends CallbackDataParams {
+ indicatorIndex: number,
+ indicatorAxes: Array<IndicatorAxis>
Review Comment:
We should not expose indicatorAxes. Try to expose attributes like `indicatorName` instead. You may not return the indicatorAxis array, instead, only return the indicator of interest. If users need to get the names of all indicators, they should save the variable of names of each indicators, just as in other cases of ECharts.
##########
src/chart/radar/RadarSeries.ts:
##########
@@ -102,6 +107,17 @@ class RadarSeriesModel extends SeriesModel<RadarSeriesOption> {
});
}
+ /**
+ * @overwrite
+ */
+ getDataParams(dataIndex: number, dataType: any, el?: Element): RadarCallbackDataParams {
+ const params = super.getDataParams(dataIndex) as RadarCallbackDataParams;
+ // indicatorIndex && indicatorAxes
+ params.indicatorIndex = (el && (el as any).__dimIdx) ?? null;
Review Comment:
Avoid using `??`.
--
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] Feature - Radar Chart - Need to show custom tooltip only for actual index [echarts]
Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on PR #20938:
URL: https://github.com/apache/echarts/pull/20938#issuecomment-2829877129
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
Re: [PR] Feature - Radar Chart - Need to show custom tooltip only for actual index [echarts]
Posted by "gowthamzinc (via GitHub)" <gi...@apache.org>.
gowthamzinc commented on PR #20938:
URL: https://github.com/apache/echarts/pull/20938#issuecomment-3146867352
Hi plz do the needful - code review
--
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