You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2025/08/19 17:23:46 UTC
[PR] fix(echarts): Show full labels in bar chart tooltips [superset]
rusackas opened a new pull request, #34759:
URL: https://github.com/apache/superset/pull/34759
## Summary
Fixes #31864
When bar chart axis labels are visually truncated by ECharts due to space constraints, the tooltip now shows the full label text by preferring the `axisValue`/`axisValueLabel` properties which contain the complete text.
This enhancement allows users to hover over data points and see the full name even when the axis label is shortened for display purposes.
## Changes
- Modified the tooltip formatter in `transformProps.ts` to use `axisValue` or `axisValueLabel` when available (for axis tooltips)
- Falls back to the original value extraction for compatibility
- Added comprehensive tests for the tooltip behavior with long labels
## Test plan
1. Create a bar chart with long category names (> 12 characters)
2. Observe that axis labels are visually truncated
3. Hover over the bars to see tooltips
4. Verify that tooltips show the full label text
### Unit tests
Added three new test cases:
- Test that tooltips use `axisValue` when available (richTooltip mode)
- Test fallback behavior when `axisValue` is not present
- Test item tooltips (non-richTooltip mode)
All tests pass successfully.
## Screenshots
N/A - This is a tooltip behavior change that doesn't affect the visual appearance of the chart itself.
π€ Generated with [Claude Code](https://claude.ai/code)
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "EROGE-lab (via GitHub)" <gi...@apache.org>.
EROGE-lab commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-3285824580
Is this fixed with this request?
<img width="296" height="208" alt="Screenshot 2025-09-12 172201" src="https://github.com/user-attachments/assets/57ce6146-27aa-4d23-be41-abe984c0ed04" />
<img width="250" height="227" alt="Screenshot 2025-09-12 172038" src="https://github.com/user-attachments/assets/a2372dba-7d50-4584-8104-0f008b94e6c9" />
The tooltip display is unprofessional. Also, a percentage with two decimal places is not appealing. One decimal place would suffice. This cannot be configured. Superset 5.0
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #34759:
URL: https://github.com/apache/superset/pull/34759#discussion_r3330208508
##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts:
##########
@@ -642,6 +642,116 @@ describe('Does transformProps transform series correctly', () => {
'foo2, bar2': ['foo2', 'bar2'],
});
});
+
+ describe('Tooltip with long labels', () => {
+ it('should use axisValue for tooltip when available (richTooltip)', () => {
+ const longLabelData = [
+ {
+ data: [
+ {
+ 'This is a very long category name that would normally be truncated': 100,
+ __timestamp: 599616000000,
+ },
+ {
+ 'Another extremely long category name for testing purposes': 200,
+ __timestamp: 599916000000,
+ },
+ ],
+ },
+ ];
+
+ const chartProps = new ChartProps({
+ ...chartPropsConfig,
+ formData: {
+ ...formData,
+ richTooltip: true,
+ },
+ queriesData: longLabelData,
+ });
+
+ const transformedProps = transformProps(
+ chartProps as EchartsTimeseriesChartProps,
+ );
+
+ // Get the tooltip formatter function
+ const tooltipFormatter = (transformedProps.echartOptions as any).tooltip
+ .formatter;
+
+ // Simulate params from ECharts with axisValue containing full label
+ const mockParams = [
+ {
+ axisValue:
+ 'This is a very long category name that would normally be truncated',
+ value: [599616000000, 100],
+ seriesName:
+ 'This is a very long category name that would normally be truncated',
+ },
+ ];
+
+ // Call the formatter and check it uses the full label
+ const result = tooltipFormatter(mockParams);
+ expect(result).toContain(
+ 'This is a very long category name that would normally be truncated',
+ );
+ });
Review Comment:
Thanks β no action needed.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-3938758600
## **Sequence Diagram**
The PR changes the ECharts tooltip formatter to prefer axisValue/axisValueLabel (full category labels) when available, falling back to the original value extraction. The diagram shows the core hover β formatter β tooltip text flow that this PR modifies.
```mermaid
sequenceDiagram
participant User
participant ECharts
participant Formatter
participant TooltipUI
User->>ECharts: Hover over bar (trigger tooltip)
ECharts->>Formatter: Call tooltip.formatter(params)
Formatter->>Formatter: Use axisValue or axisValueLabel if present; else use value[xIndex]
Formatter-->>TooltipUI: Return tooltip HTML/text containing full label
TooltipUI-->>User: Display tooltip with full category label
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-3858288794
## **Sequence Diagram**
The PR updates the tooltip formatter to prefer axisValue/axisValueLabel for axis (rich) tooltips so the tooltip shows the full, untruncated category label; it falls back to the existing value extraction for compatibility.
```mermaid
sequenceDiagram
participant User
participant ECharts
participant transformProps
User->>ECharts: Hover over bar (trigger tooltip)
ECharts->>transformProps: Call tooltip.formatter with params
transformProps-->>transformProps: Prefer axisValue or axisValueLabel if present; else use value[index]
transformProps-->>ECharts: Return formatted tooltip (contains full label)
ECharts-->>User: Render tooltip with full category label
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-3938783177
πͺ [Showtime](https://github.com/mistercrunch/superset-showtime) deployed environment on [GHA](https://github.com/apache/superset/actions/runs/22257394683) for [98f14d3](https://github.com/apache/superset/commit/98f14d3)
β’ **Environment:** http://16.147.205.237:8080 (admin/admin)
β’ **Lifetime:** 48h auto-cleanup
β’ **Updates:** New commits create fresh environments automatically
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "EnxDev (via GitHub)" <gi...@apache.org>.
EnxDev commented on code in PR #34759:
URL: https://github.com/apache/superset/pull/34759#discussion_r3195253586
##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts:
##########
@@ -1520,3 +1520,99 @@ test('should assign distinct dash patterns for multiple time offsets consistentl
// must be different patterns
expect(symbol1).not.toEqual(symbol2);
});
+
+describe('Tooltip with long labels', () => {
Review Comment:
Could it make sense to avoid using `describe` 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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-4625011623
### <span aria-hidden="true">β
</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">π¨</span> Latest commit | 9ff0ed8c27f12e0c3bbf0d4a0dd82bc04c25c0bb |
|<span aria-hidden="true">π</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a21c1bf4a060f0008055b94 |
|<span aria-hidden="true">π</span> Deploy Preview | [https://deploy-preview-34759--superset-docs-preview.netlify.app](https://deploy-preview-34759--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">π±</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
|<span aria-hidden="true">π€</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#DctRDoMgDADQu_R7TYpDgt7AY7QokaQTgizRmN19_L2f90Cp-VMazAAvkMpH2LtjuvBtvLMoXDHsXBu2nLWlgvGrisqy6dnLuhXN97L25HgwwUi0TI4iEXkaR5ks_P4) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-34759--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-4297971715
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/34759?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 64.02%. Comparing base ([`72d39be`](https://app.codecov.io/gh/apache/superset/commit/72d39bea857b929246cd9dd74f8480c173da0cd4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`67d8ed5`](https://app.codecov.io/gh/apache/superset/commit/67d8ed5a700fe3b171c5724afbd6acadb5728e43?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #34759 +/- ##
==========================================
+ Coverage 63.99% 64.02% +0.02%
==========================================
Files 2564 2564
Lines 133558 133560 +2
Branches 31031 31033 +2
==========================================
+ Hits 85476 85506 +30
+ Misses 46577 46549 -28
Partials 1505 1505
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/34759/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Ξ | |
|---|---|---|
| [javascript](https://app.codecov.io/gh/apache/superset/pull/34759/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `66.57% <100.00%> (+0.03%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/superset/pull/34759?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #34759:
URL: https://github.com/apache/superset/pull/34759#discussion_r2891200330
##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts:
##########
@@ -808,6 +808,114 @@ describe('Does transformProps transform series correctly', () => {
'foo2, bar2': ['foo2', 'bar2'],
});
});
+
+ describe('Tooltip with long labels', () => {
Review Comment:
fixed!
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-3940293638
πͺ [Showtime](https://github.com/mistercrunch/superset-showtime) deployed environment on [GHA](https://github.com/apache/superset/actions/runs/22271932302) for [33f8510](https://github.com/apache/superset/commit/33f8510)
β’ **Environment:** http://54.202.30.170:8080 (admin/admin)
β’ **Lifetime:** 48h auto-cleanup
β’ **Updates:** New commits create fresh environments automatically
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-3857304153
## PR Assessment and Rebase
### Issue Status
The linked issue #31864 was **closed as "NOT_PLANNED"** on September 9, 2025, because:
- The team couldn't reproduce the issue
- They were focusing on 6.0 development
### However, This PR May Still Be Valuable
**The fix is minimal and low-risk:**
```typescript
// Before: Only uses value array
const xValue = params[0].value[xIndex]
// After: Prefers full label from axisValue/axisValueLabel
const xValue = params[0].axisValue ?? params[0].axisValueLabel ?? params[0].value[xIndex]
```
**Why this matters:**
- When ECharts truncates axis labels due to space constraints, the `value` array contains the truncated text
- The `axisValue`/`axisValueLabel` properties contain the **full, untruncated text**
- This ensures tooltips show complete labels even when axis labels are shortened
**Evidence of continued need:**
- @EROGE-lab commented on this PR (Sept 12, 2025) asking about tooltip display issues
- The issue had multiple users reporting similar problems before it was closed
### Recommendation
Consider merging this PR despite the closed issue because:
1. **Low risk** - Simple fallback logic with null coalescing
2. **Good UX** - Users can see full labels on hover when axis labels are truncated
3. **Well tested** - Includes comprehensive test coverage
4. **No breaking changes** - Falls back to existing behavior if `axisValue` is unavailable
### Technical Notes
- Pre-existing type errors in `transformProps.ts` exist on master (not introduced by this PR)
- The PR rebases cleanly on current master
- Tests are comprehensive and cover the new behavior
@rusackas - Since you closed the issue, would you like to proceed with this PR given the above analysis, or close it as well?
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on code in PR #34759:
URL: https://github.com/apache/superset/pull/34759#discussion_r3357644913
##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts:
##########
@@ -1520,3 +1520,99 @@ test('should assign distinct dash patterns for multiple time offsets consistentl
// must be different patterns
expect(symbol1).not.toEqual(symbol2);
});
+
+describe('Tooltip with long labels', () => {
+ test('should use axisValue for tooltip when available (richTooltip)', () => {
+ const longLabelData: ChartDataResponseResult[] = [
+ createTestQueryData([
+ {
+ 'This is a very long category name that would normally be truncated': 100,
+ __timestamp: 599616000000,
+ },
+ {
+ 'Another extremely long category name for testing purposes': 200,
+ __timestamp: 599916000000,
+ },
+ ]),
+ ];
+
+ const chartProps = createTestChartProps({
+ formData: {
+ richTooltip: true,
+ },
+ queriesData: longLabelData,
+ });
+
+ const transformedProps = transformProps(chartProps);
+
+ // Get the tooltip formatter function
+ const tooltipFormatter = (transformedProps.echartOptions as any).tooltip
+ .formatter;
+
+ // Simulate params from ECharts with axisValue containing full label
+ // Use distinct values for axisValue and seriesName to verify axisValue is used
+ const mockParams = [
+ {
+ axisValue:
+ 'This is a very long category name that would normally be truncated',
+ value: [599616000000, 100],
+ seriesName: 'Some Series Name',
+ },
+ ];
+
+ // Call the formatter and check it uses the full label from axisValue
+ const result = tooltipFormatter(mockParams);
+ expect(result).toContain(
+ 'This is a very long category name that would normally be truncated',
+ );
+ });
+
+ test('should fallback to value when axisValue is not available', () => {
+ const chartProps = createTestChartProps({
+ formData: {
+ richTooltip: true,
+ },
+ });
+
+ const transformedProps = transformProps(chartProps);
+
+ const tooltipFormatter = (transformedProps.echartOptions as any).tooltip
+ .formatter;
+
+ // Simulate params without axisValue
+ const mockParams = [
+ {
+ value: [599616000000, 1],
+ seriesName: 'San Francisco',
+ },
+ ];
+
+ // Should still work with fallback to value
+ const result = tooltipFormatter(mockParams);
+ expect(result).toBeDefined();
+ expect(typeof result).toBe('string');
Review Comment:
These assertions only check that the result is a string β they never verify the formatted x-value actually appears, so a regression in the fallback path would still pass. Assert the value is present (as the `axisValue` test does with `toContain`). Same applies to `should handle item tooltips correctly` (L1615-1616).
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "korbit-ai[bot] (via GitHub)" <gi...@apache.org>.
korbit-ai[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-3201603966
I was unable to post the issues I found. This could be because a force push or squash has changed the commit history since I scanned this pull request. You can get another review by commenting `/korbit-review`.
[](124db2e3-b1a2-4130-8242-993b91ab8cd2)
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-3940396956
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-3857307883
## **Sequence Diagram**
The PR updates the tooltip formatter so that when a user hovers over a bar (axis-style rich tooltip), the formatter prefers axisValue/axisValueLabel (full category text) and falls back to the original value extraction otherwise. This diagram shows the main success path for displaying the full label in the tooltip.
```mermaid
sequenceDiagram
participant User
participant ECharts as Chart
participant Formatter as TooltipFormatter
participant Data as DataPoint
User->>Chart: Hover over bar (trigger tooltip)
Chart->>Formatter: Invoke formatter with params
Formatter->>Data: Read params, prefer axisValue/axisValueLabel
alt axisValue/axisValueLabel present
Data-->>Formatter: Full label (axisValue/axisValueLabel)
else fallback
Data-->>Formatter: Extracted label from value
end
Formatter-->>Chart: Render tooltip content (contains full label)
Chart-->>User: Display tooltip with full category label
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #34759:
URL: https://github.com/apache/superset/pull/34759#discussion_r2772562270
##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts:
##########
@@ -642,6 +642,116 @@ describe('Does transformProps transform series correctly', () => {
'foo2, bar2': ['foo2', 'bar2'],
});
});
+
+ describe('Tooltip with long labels', () => {
+ it('should use axisValue for tooltip when available (richTooltip)', () => {
+ const longLabelData = [
+ {
+ data: [
+ {
+ 'This is a very long category name that would normally be truncated': 100,
+ __timestamp: 599616000000,
+ },
+ {
+ 'Another extremely long category name for testing purposes': 200,
+ __timestamp: 599916000000,
+ },
+ ],
+ },
+ ];
+
+ const chartProps = new ChartProps({
+ ...chartPropsConfig,
+ formData: {
+ ...formData,
+ richTooltip: true,
+ },
+ queriesData: longLabelData,
+ });
+
+ const transformedProps = transformProps(
+ chartProps as EchartsTimeseriesChartProps,
+ );
+
+ // Get the tooltip formatter function
+ const tooltipFormatter = (transformedProps.echartOptions as any).tooltip
+ .formatter;
+
+ // Simulate params from ECharts with axisValue containing full label
+ const mockParams = [
+ {
+ axisValue:
+ 'This is a very long category name that would normally be truncated',
+ value: [599616000000, 100],
+ seriesName:
+ 'This is a very long category name that would normally be truncated',
+ },
+ ];
+
+ // Call the formatter and check it uses the full label
+ const result = tooltipFormatter(mockParams);
+ expect(result).toContain(
+ 'This is a very long category name that would normally be truncated',
+ );
+ });
Review Comment:
Addressed in 5f4e772. The test now uses distinct values for `axisValue` (the full category label) and `seriesName` ('Series A') to properly verify that `axisValue` is used for the tooltip title. The assertion specifically checks for the `fullCategoryLabel` which only comes from `axisValue`, not from `seriesName`.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #34759:
URL: https://github.com/apache/superset/pull/34759#discussion_r2771981422
##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts:
##########
@@ -642,6 +642,116 @@ describe('Does transformProps transform series correctly', () => {
'foo2, bar2': ['foo2', 'bar2'],
});
});
+
+ describe('Tooltip with long labels', () => {
+ it('should use axisValue for tooltip when available (richTooltip)', () => {
+ const longLabelData = [
+ {
+ data: [
+ {
+ 'This is a very long category name that would normally be truncated': 100,
+ __timestamp: 599616000000,
+ },
+ {
+ 'Another extremely long category name for testing purposes': 200,
+ __timestamp: 599916000000,
+ },
+ ],
+ },
+ ];
+
+ const chartProps = new ChartProps({
+ ...chartPropsConfig,
+ formData: {
+ ...formData,
+ richTooltip: true,
+ },
+ queriesData: longLabelData,
+ });
+
+ const transformedProps = transformProps(
+ chartProps as EchartsTimeseriesChartProps,
+ );
+
+ // Get the tooltip formatter function
+ const tooltipFormatter = (transformedProps.echartOptions as any).tooltip
+ .formatter;
+
+ // Simulate params from ECharts with axisValue containing full label
+ const mockParams = [
+ {
+ axisValue:
+ 'This is a very long category name that would normally be truncated',
+ value: [599616000000, 100],
+ seriesName:
+ 'This is a very long category name that would normally be truncated',
+ },
+ ];
+
+ // Call the formatter and check it uses the full label
+ const result = tooltipFormatter(mockParams);
+ expect(result).toContain(
+ 'This is a very long category name that would normally be truncated',
+ );
+ });
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Incorrect Test Simulation</b></div>
<div id="fix">
The test 'should use axisValue for tooltip when available (richTooltip)' incorrectly simulates ECharts tooltip params by setting axisValue to the long label string, but axisValue should be the x-axis value (timestamp for timeseries). This misrepresents real tooltip behavior. The assertion only checks that the result contains the long label, which passes due to seriesName inclusion, not axisValue usage for the title. This violates the rule requiring tests to assert specific behavior logic directly.
</div>
</div>
<small><i>Code Review Run #8a25ec</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-3862859355
β οΈ **DEPRECATED WORKFLOW** β οΈ
@SBIN2010 This workflow is deprecated! Please use the new **Superset Showtime** system instead:
- Replace "testenv-up" label with "πͺ trigger-start"
- Better reliability and easier management
- See https://github.com/mistercrunch/superset-showtime for details
Processing your ephemeral environment request [here](https://github.com/apache/superset/actions/runs/21768208935). Action: **up**. More information on [how to use or configure ephemeral environments](https://superset.apache.org/docs/contributing/howtos/#github-ephemeral-environments)
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-3940275058
## **Sequence Diagram**
The PR changes the tooltip formatter to prefer ECharts' axisValue/axisValueLabel (which contain full, untruncated category names) when building axis (rich) tooltips, falling back to the original value extraction otherwise. This ensures hover tooltips show the complete label even when axis labels are visually truncated.
```mermaid
sequenceDiagram
participant User
participant ECharts
participant TransformProps
participant TooltipFormatter
participant UI
User->>ECharts: Hover over bar (trigger tooltip)
ECharts->>TransformProps: Call tooltip.formatter(params)
TransformProps->>TooltipFormatter: Invoke formatter with params
TooltipFormatter->>TooltipFormatter: Use axisValue / axisValueLabel if present, else fallback to value
TooltipFormatter-->>TransformProps: Return HTML tooltip content
TransformProps-->>ECharts: Provide formatted tooltip
ECharts-->>UI: Render tooltip with full label
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-3339113968
β οΈ **DEPRECATED WORKFLOW** β οΈ
@rusackas This workflow is deprecated! Please use the new **Superset Showtime** system instead:
- Replace "testenv-up" label with "πͺ trigger-start"
- Better reliability and easier management
- See https://github.com/mistercrunch/superset-showtime for details
Processing your ephemeral environment request [here](https://github.com/apache/superset/actions/runs/18041761818). Action: **up**. More information on [how to use or configure ephemeral environments](https://superset.apache.org/docs/contributing/howtos/#github-ephemeral-environments)
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-3862903445
@SBIN2010 Ephemeral environment spinning up at http://18.236.97.240:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-3857307017
πͺ [Showtime](https://github.com/mistercrunch/superset-showtime) is building environment on [GHA](https://github.com/apache/superset/actions/runs/21735141970) for [bd8d73d](https://github.com/apache/superset/commit/bd8d73d)
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-3857529380
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-3940274031
πͺ [Showtime](https://github.com/mistercrunch/superset-showtime) is building environment on [GHA](https://github.com/apache/superset/actions/runs/22271932302) for [33f8510](https://github.com/apache/superset/commit/33f8510)
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-3938758475
πͺ [Showtime](https://github.com/mistercrunch/superset-showtime) is building environment on [GHA](https://github.com/apache/superset/actions/runs/22257394683) for [98f14d3](https://github.com/apache/superset/commit/98f14d3)
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #34759:
URL: https://github.com/apache/superset/pull/34759
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #34759:
URL: https://github.com/apache/superset/pull/34759#discussion_r3358058003
##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts:
##########
@@ -1520,3 +1520,99 @@ test('should assign distinct dash patterns for multiple time offsets consistentl
// must be different patterns
expect(symbol1).not.toEqual(symbol2);
});
+
+describe('Tooltip with long labels', () => {
+ test('should use axisValue for tooltip when available (richTooltip)', () => {
+ const longLabelData: ChartDataResponseResult[] = [
+ createTestQueryData([
+ {
+ 'This is a very long category name that would normally be truncated': 100,
+ __timestamp: 599616000000,
+ },
+ {
+ 'Another extremely long category name for testing purposes': 200,
+ __timestamp: 599916000000,
+ },
+ ]),
+ ];
+
+ const chartProps = createTestChartProps({
+ formData: {
+ richTooltip: true,
+ },
+ queriesData: longLabelData,
+ });
+
+ const transformedProps = transformProps(chartProps);
+
+ // Get the tooltip formatter function
+ const tooltipFormatter = (transformedProps.echartOptions as any).tooltip
+ .formatter;
+
+ // Simulate params from ECharts with axisValue containing full label
+ // Use distinct values for axisValue and seriesName to verify axisValue is used
+ const mockParams = [
+ {
+ axisValue:
+ 'This is a very long category name that would normally be truncated',
+ value: [599616000000, 100],
+ seriesName: 'Some Series Name',
+ },
+ ];
+
+ // Call the formatter and check it uses the full label from axisValue
+ const result = tooltipFormatter(mockParams);
+ expect(result).toContain(
+ 'This is a very long category name that would normally be truncated',
+ );
+ });
+
+ test('should fallback to value when axisValue is not available', () => {
+ const chartProps = createTestChartProps({
+ formData: {
+ richTooltip: true,
+ },
+ });
+
+ const transformedProps = transformProps(chartProps);
+
+ const tooltipFormatter = (transformedProps.echartOptions as any).tooltip
+ .formatter;
+
+ // Simulate params without axisValue
+ const mockParams = [
+ {
+ value: [599616000000, 1],
+ seriesName: 'San Francisco',
+ },
+ ];
+
+ // Should still work with fallback to value
+ const result = tooltipFormatter(mockParams);
+ expect(result).toBeDefined();
+ expect(typeof result).toBe('string');
Review Comment:
Good catch β fixed in 9ff0ed8. Both fallback tests now assert that the x-value (`599616000000`) actually appears in the rendered tooltip title, so a regression in the fallback path would be caught rather than silently passing on the `typeof === 'string'` check alone.
##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts:
##########
@@ -1520,3 +1520,99 @@ test('should assign distinct dash patterns for multiple time offsets consistentl
// must be different patterns
expect(symbol1).not.toEqual(symbol2);
});
+
+describe('Tooltip with long labels', () => {
Review Comment:
I kept the `describe` block here intentionally for consistency β this test file already groups its suites with `describe` throughout (e.g. `EchartsTimeseries transformProps`, `legend sorting`, etc.), and the `Tooltip with long labels` group keeps these related cases together. Converting the whole file to flat `test()` calls would be a broader, file-wide refactor outside the scope of this tooltip fix, so I will leave it matching the surrounding convention.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-4298299210
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-3339154473
@rusackas Ephemeral environment spinning up at http://35.95.125.47:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #34759:
URL: https://github.com/apache/superset/pull/34759#discussion_r2772563449
##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts:
##########
@@ -642,6 +642,116 @@ describe('Does transformProps transform series correctly', () => {
'foo2, bar2': ['foo2', 'bar2'],
});
});
+
+ describe('Tooltip with long labels', () => {
+ it('should use axisValue for tooltip when available (richTooltip)', () => {
+ const longLabelData = [
+ {
+ data: [
+ {
+ 'This is a very long category name that would normally be truncated': 100,
+ __timestamp: 599616000000,
+ },
+ {
+ 'Another extremely long category name for testing purposes': 200,
+ __timestamp: 599916000000,
+ },
+ ],
+ },
+ ];
+
+ const chartProps = new ChartProps({
+ ...chartPropsConfig,
+ formData: {
+ ...formData,
+ richTooltip: true,
+ },
+ queriesData: longLabelData,
+ });
+
+ const transformedProps = transformProps(
+ chartProps as EchartsTimeseriesChartProps,
+ );
+
+ // Get the tooltip formatter function
+ const tooltipFormatter = (transformedProps.echartOptions as any).tooltip
+ .formatter;
+
+ // Simulate params from ECharts with axisValue containing full label
+ const mockParams = [
+ {
+ axisValue:
+ 'This is a very long category name that would normally be truncated',
+ value: [599616000000, 100],
+ seriesName:
+ 'This is a very long category name that would normally be truncated',
+ },
+ ];
+
+ // Call the formatter and check it uses the full label
+ const result = tooltipFormatter(mockParams);
+ expect(result).toContain(
+ 'This is a very long category name that would normally be truncated',
+ );
+ });
Review Comment:
<!-- Bito Reply -->
This question isnβt related to the pull request. I can only help with questions about the PRβs code or comments.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-3858536642
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "EnxDev (via GitHub)" <gi...@apache.org>.
EnxDev commented on code in PR #34759:
URL: https://github.com/apache/superset/pull/34759#discussion_r2836186182
##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts:
##########
@@ -808,6 +808,114 @@ describe('Does transformProps transform series correctly', () => {
'foo2, bar2': ['foo2', 'bar2'],
});
});
+
+ describe('Tooltip with long labels', () => {
Review Comment:
Would it make sense to avoid using describe 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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(echarts): Show full labels in bar chart tooltips [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #34759:
URL: https://github.com/apache/superset/pull/34759#issuecomment-4626198558
**Bito Automatic Review Skipped β PR Already Merged**<br/><br/>Bito scheduled an automatic review for this pull request, but the review was skipped because this PR was merged before the review could be run.<br/>No action is needed if you didn't intend to review it. To get a review, you can type `/review` in a comment and save it
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org