()
| 50 | } |
| 51 | |
| 52 | fill() { |
| 53 | let title; |
| 54 | if(this.index) { |
| 55 | this.container.setAttribute('data-point-index', this.index); |
| 56 | } |
| 57 | if(this.titleValueFirst) { |
| 58 | title = `<strong>${this.titleValue}</strong>${this.titleName}`; |
| 59 | } else { |
| 60 | title = `${this.titleName}<strong>${this.titleValue}</strong>`; |
| 61 | } |
| 62 | this.title.innerHTML = title; |
| 63 | this.dataPointList.innerHTML = ''; |
| 64 | |
| 65 | this.listValues.map((set, i) => { |
| 66 | const color = this.colors[i] || 'black'; |
| 67 | let value = set.formatted === 0 || set.formatted ? set.formatted : set.value; |
| 68 | |
| 69 | let li = $.create('li', { |
| 70 | styles: { |
| 71 | 'border-top': `3px solid ${color}` |
| 72 | }, |
| 73 | innerHTML: `<strong style="display: block;">${ value === 0 || value ? value : '' }</strong> |
| 74 | ${set.title ? set.title : '' }` |
| 75 | }); |
| 76 | |
| 77 | this.dataPointList.appendChild(li); |
| 78 | }); |
| 79 | } |
| 80 | |
| 81 | calcPosition() { |
| 82 | let width = this.container.offsetWidth; |
no outgoing calls
no test coverage detected