Commit eaeea54e authored by Mikael Salson's avatar Mikael Salson

stats_decorator: Better see small graphs

parent 66f976e5
Pipeline #42594 failed with stages
in 9 minutes and 45 seconds
......@@ -48,7 +48,9 @@ class LabeledBarChartDecorator(BarChartDecorator):
def decorate(self, data):
bars = []
for t in data:
style = "height: %f%%; width: %f%%" % (t[1], (1.0/len(data))*100)
percentage_per_item = (1.0/len(data))*100
# We want larger bars to better see them. However we may not want that with wide labeled bar charts
style = "height: %f%%; width: %f%%; margin-right: -%f%" % (t[1], percentage_per_item * 2, percentage_per_item)
if t[1]:
style += ";min-height: 1px"
bar_span = SPAN(_style=style, _title="%s" % t[0], _class="bar")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment