apache / apache/superset

"Truncate Metric" has no effect in Mixed Chart

Open
#38,190 1 comment 0 reactions 0 assignees View on GitHub
viz:charts:mixed
Dominant language
Python
Stars
74.8k
Forks
18.3k
Avg merge
2d 5h
Merged PRs (30d)
685

Description

### Bug description

If I used a mixed chart with query A and B, the "Truncate Metric" checkbox is not working.

I activated both, but the metric is still shown on all data lines.

If I used area chart e.g., the checkbox works as intended and hides the metric in front of the data linen description in the tooltips and in the legend.

### Superset version

6.0.0

### Browser

Firefox

### Additional context

I`m using a superset container....

Here my compose yaml
```yaml
services:
superset:
build: .
container_name: superset
ports:
- "8088:8088"
environment:
SUPERSET_ENV: production
SUPERSET_CONFIG_PATH: /app/superset_home/superset_config.py
volumes:
- ./superset_home:/app/superset_home
depends_on:
- db

db:
image: postgres:16
container_name: superset-db
environment:
POSTGRES_DB: superset
POSTGRES_USER: superset
POSTGRES_PASSWORD: superset
volumes:
- superset_db:/var/lib/postgresql/data

volumes:
superset_db:
```

### Checklist

- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in a mixed chart on Superset 6.0.0, then compare its behavior with an area chart using the same queries. The work is done when enabling "Truncate Metric" removes the metric from the mixed chart's tooltips and legend as it does for the area chart.

Written by the indexing model from the issue text.

Assessment

Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.