]> git.ipfire.org Git - thirdparty/Chart.js.git/commit
Change legendTemplates to use separate spans for text and icon. 2218/head
authorEric Mikula <e.e.mikula@gmail.com>
Mon, 4 Apr 2016 22:22:25 +0000 (18:22 -0400)
committerEric Mikula <e.e.mikula@gmail.com>
Mon, 4 Apr 2016 22:22:25 +0000 (18:22 -0400)
commit1ccb10073950c75f069b42f01d1fc35cdb744cae
tree34e6060f931eec020917ff3636901e0f86d26ed0
parent31b883f815cd96ba07b21c375d8e19136bfe6b15
Change legendTemplates to use separate spans for text and icon.

This addresses the issue in #2192 without entirely reverting #886. Note that it still may cause confusing behavior for some legends: Specifically, the example on chartjs.org styles ".doughnut-legend li span" with a fixed width, and therefore both of the new spans will be impacted by this styling. However, now two spans are generated instead. %name%-legend-icon is used for the color icon, and %name%-legend-text can be used for styling the text. This should be described in release notes.
src/Chart.Bar.js
src/Chart.Doughnut.js
src/Chart.Line.js
src/Chart.PolarArea.js
src/Chart.Radar.js