Billboard.js: Allow max-width for default chart legend

Created on 18 Apr 2018  路  4Comments  路  Source: naver/billboard.js

Description

Currently it is not possible to give the legend a max-width for the text. This is a problem when you make a donut chart with a fixed size and use very long label names.
It would be nice if we could specify a fixed width for the default legends without creating custom legends and content.

Steps to check or reproduce

Here is a codepen to see the issue:
https://codepen.io/anon/pen/OZLONg?editors=1111

bildschirmfoto 2018-04-18 um 12 46 33

question request

Most helpful comment

@netil thanks for your response.
I could try to come up with a solution.

All 4 comments

@matthiaskomarek I agree to have this kind of option.
Handling svg's text's dimension and line break is kind of headache. :o

@netil thanks for your response.
I could try to come up with a solution.

@matthiaskomarek did you found any solution?

@harispepic we are currently using this feature as a workaround: https://naver.github.io/billboard.js/demo/#Legend.LegendTemplate1

Was this page helpful?
0 / 5 - 0 ratings