0001-dataviz-keep-more-of-legend-labels-unless-narrow-cel.patch
combo/apps/dataviz/models.py | ||
---|---|---|
233 | 233 |
chart.x_labels = x_labels |
234 | 234 | |
235 | 235 |
chart.show_legend = bool(len(response['axis']) > 1) |
236 |
chart.truncate_legend = 30 |
|
236 | 237 |
# matplotlib tab10 palette |
237 | 238 |
chart.config.style.colors = ( |
238 | 239 |
'#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', |
... | ... | |
259 | 260 |
continue |
260 | 261 |
chart.add(label, value) |
261 | 262 |
chart.show_legend = True |
263 |
if width and width < 500: |
|
264 |
chart.truncate_legend = 15 |
|
262 | 265 | |
263 | 266 |
if response.get('unit') == 'seconds': |
264 | 267 |
def format_duration(value): |
265 |
- |