Projet

Général

Profil

0001-dataviz-adjust-graph-height-if-to-more-legends-62282.patch

Thomas Jund, 02 mai 2022 17:13

Télécharger (1017 octets)

Voir les différences:

Subject: [PATCH] dataviz: adjust graph height if to more legends (#62282)

 combo/apps/dataviz/models.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
combo/apps/dataviz/models.py
361 361

  
362 362
            chart.x_labels = data['x_labels']
363 363
            chart.axis_count = min(len(data['series']), 2)
364
            self.prepare_chart(chart, width, height)
364
            legends_height = 12 + (pygal.style.DefaultStyle.legend_font_size * 1.5 * len(data['series']))
365
            self.prepare_chart(chart, width, max(height, legends_height))
365 366

  
366 367
            if chart.axis_count == 1:
367 368
                data['series'][0]['data'] = self.process_one_dimensional_data(
368
-