mirror of
https://github.com/portainer/portainer.git
synced 2025-07-30 10:49:40 +02:00
Add missing files
This commit is contained in:
parent
9eaa75a572
commit
d17adc0f9d
6 changed files with 54 additions and 26 deletions
15
lib/legend.js
Normal file
15
lib/legend.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
function legend(parent, data) {
|
||||
parent.className = 'legend';
|
||||
var datas = data.hasOwnProperty('datasets') ? data.datasets : data;
|
||||
|
||||
datas.forEach(function(d) {
|
||||
var title = document.createElement('span');
|
||||
title.className = 'title';
|
||||
title.style.borderColor = d.hasOwnProperty('strokeColor') ? d.strokeColor : d.color;
|
||||
title.style.borderStyle = 'solid';
|
||||
parent.appendChild(title);
|
||||
|
||||
var text = document.createTextNode(d.title);
|
||||
title.appendChild(text);
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue