MCPcopy
hub / github.com/frappe/charts / fill

Method fill

src/js/objects/SvgTip.js:52–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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;

Callers 11

refreshMethod · 0.95
dataPrepFunction · 0.80
zeroDataPrepFunction · 0.80
fillArrayFunction · 0.80
calcYExtremesMethod · 0.80
getAllYValuesMethod · 0.80
setupComponentsMethod · 0.80
cFunction · 0.80
ztFunction · 0.80
HtFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected