Commit cab1405
committed
[FIX] charts: truncate radar chart labels correctly
Before this commit:
- Radar chart point labels were truncated incorrectly because Chart.js
passes extra arguments (label, index, labels) to the callback.
- As a result, truncateLabel received the index as maxLen and applied
unnecessary truncation.
After this commit:
- The callback now wraps truncateLabel to pass only the label string.
- This ensures long labels are truncated with ellipsis and short labels
remain unchanged.
closes #7178
Task: 5078858
X-original-commit: b2aec82
Signed-off-by: Adrien Minne (adrm) <adrm@odoo.com>
Signed-off-by: Ronakkumar Mukeshbhai Bharadiya (rmbh) <rmbh@odoo.com>1 parent 17f44f0 commit cab1405
File tree
2 files changed
+12
-1
lines changed- src/helpers/figures/charts/runtime
- tests/figures/chart
2 files changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
151 | 162 | | |
152 | 163 | | |
153 | 164 | | |
| |||
0 commit comments