mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[vislib] properly render legend values
This commit is contained in:
parent
dc07a456cd
commit
2c7a72c910
3 changed files with 11 additions and 5 deletions
|
@ -21,7 +21,7 @@ define(function (require) {
|
|||
|
||||
this.el = el;
|
||||
this.tooltip = new Tooltip('chart-title', el, function (d) {
|
||||
return '<p>' + d.label + '</p>';
|
||||
return '<p>' + _.escape(d.label) + '</p>';
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -78,9 +78,15 @@ define(function (require) {
|
|||
.enter()
|
||||
.append('li')
|
||||
.attr('class', 'color')
|
||||
.each(self._addIdentifier)
|
||||
.html(function (d) {
|
||||
return '<i class="fa fa-circle dots" style="color:' + args.color(d) + '"></i>' + d;
|
||||
.each(function (label) {
|
||||
var li = d3.select(this);
|
||||
self._addIdentifier.call(this, label);
|
||||
|
||||
li.append('i')
|
||||
.attr('class', 'fa fa-circle dots')
|
||||
.attr('style', 'color:' + args.color(label));
|
||||
|
||||
li.append('span').text(label);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -655,7 +655,7 @@ define(function (require) {
|
|||
return this._div;
|
||||
};
|
||||
label.update = function () {
|
||||
this._div.innerHTML = '<h2>' + mapLabel + '</h2>';
|
||||
this._div.innerHTML = '<h2>' + _.escape(mapLabel) + '</h2>';
|
||||
};
|
||||
label.addTo(map);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue