@hpcc-js/html 3.3.15 → 3.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +43 -43
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +9 -7
- package/src/BreakdownTable.ts +218 -218
- package/src/HTMLTooltip.ts +384 -384
- package/src/JSXWidget.ts +13 -13
- package/src/SimpleTable.ts +63 -63
- package/src/StatsTable.ts +103 -103
- package/src/StyledTable.ts +68 -68
- package/src/TitleBar.css +94 -94
- package/src/TitleBar.ts +136 -136
- package/src/VizComponent.tsx +39 -39
- package/src/VizInstance.tsx +39 -39
- package/src/__package__.ts +3 -3
- package/src/index.ts +11 -11
- package/src/reactD3.ts +127 -127
package/src/BreakdownTable.ts
CHANGED
|
@@ -1,218 +1,218 @@
|
|
|
1
|
-
import { HTMLTooltip } from "./HTMLTooltip.ts";
|
|
2
|
-
import { StyledTable } from "./StyledTable.ts";
|
|
3
|
-
|
|
4
|
-
export class BreakdownTable extends StyledTable {
|
|
5
|
-
// protected _table;
|
|
6
|
-
// protected _tbody;
|
|
7
|
-
protected _tooltip: HTMLTooltip;
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
protected transformData() {
|
|
13
|
-
const rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();
|
|
14
|
-
return this.breakdownData(rowCount);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
protected breakdownData(limit: number): any[] {
|
|
18
|
-
const len = this.data().length;
|
|
19
|
-
const sum = this.data().reduce((acc, row) => acc + row[1], 0);
|
|
20
|
-
const data = [];
|
|
21
|
-
let percSum = 0;
|
|
22
|
-
this.data().sort((a, b) => a[1] > b[1] ? -1 : 1);
|
|
23
|
-
const hiddenRowCount = len - limit;
|
|
24
|
-
const showOther = hiddenRowCount > 0;
|
|
25
|
-
this.data()
|
|
26
|
-
.filter((_, i) => showOther ? i < limit - 1 : true)
|
|
27
|
-
.forEach(row => {
|
|
28
|
-
const perc = Math.round((row[1] / sum) * 100);
|
|
29
|
-
percSum += perc;
|
|
30
|
-
data.push([row[0], perc + "%"]);
|
|
31
|
-
});
|
|
32
|
-
if (showOther) {
|
|
33
|
-
const otherLabel = `${this.otherLabel()} (${len - limit + 1})`;
|
|
34
|
-
const otherPercentage = "~" + (100 - percSum) + "%";
|
|
35
|
-
data.push([otherLabel, otherPercentage]);
|
|
36
|
-
}
|
|
37
|
-
return data;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
protected calculateRowCount(): number {
|
|
41
|
-
const theadRowHeight = this.columns().length > 0 ? this.thFontSize() + 5 : 0;
|
|
42
|
-
const tbodyRowHeight = this.fontSize() + 5;
|
|
43
|
-
const tbodyAvailableHeight = this.height() - theadRowHeight;
|
|
44
|
-
const rowCount = Math.floor(tbodyAvailableHeight / tbodyRowHeight);
|
|
45
|
-
return rowCount;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
enter(domNode, element) {
|
|
49
|
-
super.enter(domNode, element);
|
|
50
|
-
this._tooltip = new HTMLTooltip()
|
|
51
|
-
.target(domNode)
|
|
52
|
-
;
|
|
53
|
-
this._tooltip
|
|
54
|
-
.tooltipHTML(data => {
|
|
55
|
-
const rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();
|
|
56
|
-
const rowHeight = Math.max(...data.map(row => this.textSize(row[0], this.fontFamily(), this.fontSize()).height)) ?? this.fontSize();
|
|
57
|
-
const widestLabel = Math.max(...data.map(row => this.textSize(row[0], this.fontFamily(), this.fontSize()).width));
|
|
58
|
-
const widestPerc = 30;
|
|
59
|
-
const colCount = 2;
|
|
60
|
-
const w = colCount * (widestLabel + widestPerc) + (this._tooltip.padding() * 2);
|
|
61
|
-
const h = rowHeight * Math.ceil((data.length - rowCount) / colCount) + (this._tooltip.padding() * 2);
|
|
62
|
-
this._tooltip.tooltipWidth(w);
|
|
63
|
-
this._tooltip.tooltipHeight(h);
|
|
64
|
-
const otherData = this.breakdownData(this.data().length).slice(rowCount - 1);
|
|
65
|
-
return `<div style="
|
|
66
|
-
width: 100%;
|
|
67
|
-
height: 100%;
|
|
68
|
-
font-size: ${this.fontSize()}px;
|
|
69
|
-
">${otherData.map(row =>
|
|
70
|
-
`<div style="
|
|
71
|
-
float:left;
|
|
72
|
-
width:${Math.floor(99 / colCount)}%;
|
|
73
|
-
">${row[0]}: ${row[1]}</div>`
|
|
74
|
-
).join("")
|
|
75
|
-
}</div>`;
|
|
76
|
-
})
|
|
77
|
-
;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
update(domNode, element) {
|
|
81
|
-
this.theadColumnStyles_default([
|
|
82
|
-
{
|
|
83
|
-
"color": this.thFirstColor(),
|
|
84
|
-
"font-size": this.thFontSize() + "px",
|
|
85
|
-
"font-weight": this.thFontWeight(),
|
|
86
|
-
"text-align": this.labelAlignment(),
|
|
87
|
-
"width": "auto",
|
|
88
|
-
"padding": "0px"
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"width": "1%",
|
|
92
|
-
"font-size": this.thFontSize() + "px",
|
|
93
|
-
"font-weight": this.thFontWeight(),
|
|
94
|
-
"text-align": this.percentageAlignment(),
|
|
95
|
-
"padding": "0px"
|
|
96
|
-
}
|
|
97
|
-
]);
|
|
98
|
-
this.tbodyColumnStyles_default([
|
|
99
|
-
{
|
|
100
|
-
"color": this.topLabelColor(),
|
|
101
|
-
"font-size": this.fontSize() + "px",
|
|
102
|
-
"font-weight": "normal",
|
|
103
|
-
"text-align": this.labelAlignment(),
|
|
104
|
-
"width": "auto",
|
|
105
|
-
"padding": "0px"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"color": this.topPercentageColor(),
|
|
109
|
-
"font-size": this.fontSize() + "px",
|
|
110
|
-
"font-weight": "normal",
|
|
111
|
-
"text-align": this.percentageAlignment(),
|
|
112
|
-
"width": "1%",
|
|
113
|
-
"padding": "0px"
|
|
114
|
-
}
|
|
115
|
-
]);
|
|
116
|
-
this.lastRowStyles_default([
|
|
117
|
-
{
|
|
118
|
-
"color": this.otherLabelColor(),
|
|
119
|
-
"font-size": this.fontSize() + "px",
|
|
120
|
-
"font-weight": this.otherLabelBold() ? "bold" : "normal",
|
|
121
|
-
"text-align": this.labelAlignment(),
|
|
122
|
-
"width": "auto",
|
|
123
|
-
"padding": "0px"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"color": this.otherLabelColor(),
|
|
127
|
-
"font-size": this.fontSize() + "px",
|
|
128
|
-
"font-weight": this.otherPercentageBold() ? "bold" : "normal",
|
|
129
|
-
"text-align": this.percentageAlignment(),
|
|
130
|
-
"width": "1%",
|
|
131
|
-
"padding": "0px"
|
|
132
|
-
}
|
|
133
|
-
]);
|
|
134
|
-
|
|
135
|
-
super.update(domNode, element);
|
|
136
|
-
|
|
137
|
-
const rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();
|
|
138
|
-
if (rowCount < this.data().length) {
|
|
139
|
-
const lastRow = element.select("tbody > tr:last-child");
|
|
140
|
-
const context = this;
|
|
141
|
-
lastRow
|
|
142
|
-
.on("mouseout.tooltip", d => {
|
|
143
|
-
context._tooltip._triggerElement = lastRow;
|
|
144
|
-
context._tooltip
|
|
145
|
-
.visible(false)
|
|
146
|
-
.render()
|
|
147
|
-
;
|
|
148
|
-
})
|
|
149
|
-
.on("mouseenter.tooltip", d => {
|
|
150
|
-
context._tooltip._triggerElement = lastRow;
|
|
151
|
-
context._tooltip
|
|
152
|
-
.direction("n")
|
|
153
|
-
.data(context.data())
|
|
154
|
-
.visible(true)
|
|
155
|
-
.render()
|
|
156
|
-
;
|
|
157
|
-
})
|
|
158
|
-
;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
}
|
|
163
|
-
BreakdownTable.prototype._class += " html_BreakdownTable";
|
|
164
|
-
|
|
165
|
-
export interface BreakdownTable {
|
|
166
|
-
useCalculatedRowCount(): boolean;
|
|
167
|
-
useCalculatedRowCount(_: boolean): this;
|
|
168
|
-
rowCount(): number;
|
|
169
|
-
rowCount(_: number): this;
|
|
170
|
-
fontSize(): number;
|
|
171
|
-
fontSize(_: number): this;
|
|
172
|
-
thFirstColor(): string;
|
|
173
|
-
thFirstColor(_: string): this;
|
|
174
|
-
thLastColor(): string;
|
|
175
|
-
thLastColor(_: string): this;
|
|
176
|
-
thFontSize(): number;
|
|
177
|
-
thFontSize(_: number): this;
|
|
178
|
-
thFontWeight(): string;
|
|
179
|
-
thFontWeight(_: string): this;
|
|
180
|
-
labelAlignment(): "left" | "center" | "right";
|
|
181
|
-
labelAlignment(_: "left" | "center" | "right"): this;
|
|
182
|
-
percentageAlignment(): "left" | "center" | "right";
|
|
183
|
-
percentageAlignment(_: "left" | "center" | "right"): this;
|
|
184
|
-
topLabelColor(): string;
|
|
185
|
-
topLabelColor(_: string): this;
|
|
186
|
-
topPercentageColor(): string;
|
|
187
|
-
topPercentageColor(_: string): this;
|
|
188
|
-
topPercentageBold(): boolean;
|
|
189
|
-
topPercentageBold(_: boolean): this;
|
|
190
|
-
otherLabel(): string;
|
|
191
|
-
otherLabel(_: string): this;
|
|
192
|
-
otherLabelColor(): string;
|
|
193
|
-
otherLabelColor(_: string): this;
|
|
194
|
-
otherLabelBold(): boolean;
|
|
195
|
-
otherLabelBold(_: boolean): this;
|
|
196
|
-
otherPercentageColor(): string;
|
|
197
|
-
otherPercentageColor(_: string): this;
|
|
198
|
-
otherPercentageBold(): boolean;
|
|
199
|
-
otherPercentageBold(_: boolean): this;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
BreakdownTable.prototype.publish("useCalculatedRowCount", true, "boolean", "If true, rowCount will be calculated and its default will be overwritten");
|
|
203
|
-
BreakdownTable.prototype.publish("rowCount", 5, "number", "Number of total rows to display (including the 'other' row)", undefined, { disable: w => w.useCalculatedRowCount() });
|
|
204
|
-
BreakdownTable.prototype.publish("fontSize", 14, "number", "Font size (pixels)");
|
|
205
|
-
BreakdownTable.prototype.publish("labelAlignment", "left", "set", "Alignment of the label column text", ["left", "center", "right"]);
|
|
206
|
-
BreakdownTable.prototype.publish("percentageAlignment", "center", "set", "Alignment of the percentage column text", ["left", "center", "right"]);
|
|
207
|
-
BreakdownTable.prototype.publish("topLabelColor", "#333", "html-color", "Color of displayed 'top' labels");
|
|
208
|
-
BreakdownTable.prototype.publish("topPercentageColor", "#1A99D5", "html-color", "Color of displayed 'top' percentages");
|
|
209
|
-
BreakdownTable.prototype.publish("topPercentageBold", true, "html-color", "If true, the 'top' percentages will be bold");
|
|
210
|
-
BreakdownTable.prototype.publish("otherLabel", "Other", "string", "Label text for the 'other' row");
|
|
211
|
-
BreakdownTable.prototype.publish("otherLabelColor", "#AAA", "html-color", "Color of the 'other' label");
|
|
212
|
-
BreakdownTable.prototype.publish("otherLabelBold", false, "html-color", "If true, the 'other' label will be bold");
|
|
213
|
-
BreakdownTable.prototype.publish("otherPercentageColor", "#AAA", "html-color", "Color of the 'other' percentage");
|
|
214
|
-
BreakdownTable.prototype.publish("otherPercentageBold", false, "html-color", "If true, the 'other' percentage will be bold");
|
|
215
|
-
BreakdownTable.prototype.publish("thFontWeight", "bold", "string", "Font weight for th elements");
|
|
216
|
-
BreakdownTable.prototype.publish("thFontSize", 26, "number", "Font size for th elements");
|
|
217
|
-
BreakdownTable.prototype.publish("thFirstColor", "#333", "html-color", "Text color of the first th element");
|
|
218
|
-
BreakdownTable.prototype.publish("thLastColor", "#333", "html-color", "Text color of the last th element");
|
|
1
|
+
import { HTMLTooltip } from "./HTMLTooltip.ts";
|
|
2
|
+
import { StyledTable } from "./StyledTable.ts";
|
|
3
|
+
|
|
4
|
+
export class BreakdownTable extends StyledTable {
|
|
5
|
+
// protected _table;
|
|
6
|
+
// protected _tbody;
|
|
7
|
+
protected _tooltip: HTMLTooltip;
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
protected transformData() {
|
|
13
|
+
const rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();
|
|
14
|
+
return this.breakdownData(rowCount);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
protected breakdownData(limit: number): any[] {
|
|
18
|
+
const len = this.data().length;
|
|
19
|
+
const sum = this.data().reduce((acc, row) => acc + row[1], 0);
|
|
20
|
+
const data = [];
|
|
21
|
+
let percSum = 0;
|
|
22
|
+
this.data().sort((a, b) => a[1] > b[1] ? -1 : 1);
|
|
23
|
+
const hiddenRowCount = len - limit;
|
|
24
|
+
const showOther = hiddenRowCount > 0;
|
|
25
|
+
this.data()
|
|
26
|
+
.filter((_, i) => showOther ? i < limit - 1 : true)
|
|
27
|
+
.forEach(row => {
|
|
28
|
+
const perc = Math.round((row[1] / sum) * 100);
|
|
29
|
+
percSum += perc;
|
|
30
|
+
data.push([row[0], perc + "%"]);
|
|
31
|
+
});
|
|
32
|
+
if (showOther) {
|
|
33
|
+
const otherLabel = `${this.otherLabel()} (${len - limit + 1})`;
|
|
34
|
+
const otherPercentage = "~" + (100 - percSum) + "%";
|
|
35
|
+
data.push([otherLabel, otherPercentage]);
|
|
36
|
+
}
|
|
37
|
+
return data;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
protected calculateRowCount(): number {
|
|
41
|
+
const theadRowHeight = this.columns().length > 0 ? this.thFontSize() + 5 : 0;
|
|
42
|
+
const tbodyRowHeight = this.fontSize() + 5;
|
|
43
|
+
const tbodyAvailableHeight = this.height() - theadRowHeight;
|
|
44
|
+
const rowCount = Math.floor(tbodyAvailableHeight / tbodyRowHeight);
|
|
45
|
+
return rowCount;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
enter(domNode, element) {
|
|
49
|
+
super.enter(domNode, element);
|
|
50
|
+
this._tooltip = new HTMLTooltip()
|
|
51
|
+
.target(domNode)
|
|
52
|
+
;
|
|
53
|
+
this._tooltip
|
|
54
|
+
.tooltipHTML(data => {
|
|
55
|
+
const rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();
|
|
56
|
+
const rowHeight = Math.max(...data.map(row => this.textSize(row[0], this.fontFamily(), this.fontSize()).height)) ?? this.fontSize();
|
|
57
|
+
const widestLabel = Math.max(...data.map(row => this.textSize(row[0], this.fontFamily(), this.fontSize()).width));
|
|
58
|
+
const widestPerc = 30;
|
|
59
|
+
const colCount = 2;
|
|
60
|
+
const w = colCount * (widestLabel + widestPerc) + (this._tooltip.padding() * 2);
|
|
61
|
+
const h = rowHeight * Math.ceil((data.length - rowCount) / colCount) + (this._tooltip.padding() * 2);
|
|
62
|
+
this._tooltip.tooltipWidth(w);
|
|
63
|
+
this._tooltip.tooltipHeight(h);
|
|
64
|
+
const otherData = this.breakdownData(this.data().length).slice(rowCount - 1);
|
|
65
|
+
return `<div style="
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: 100%;
|
|
68
|
+
font-size: ${this.fontSize()}px;
|
|
69
|
+
">${otherData.map(row =>
|
|
70
|
+
`<div style="
|
|
71
|
+
float:left;
|
|
72
|
+
width:${Math.floor(99 / colCount)}%;
|
|
73
|
+
">${row[0]}: ${row[1]}</div>`
|
|
74
|
+
).join("")
|
|
75
|
+
}</div>`;
|
|
76
|
+
})
|
|
77
|
+
;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
update(domNode, element) {
|
|
81
|
+
this.theadColumnStyles_default([
|
|
82
|
+
{
|
|
83
|
+
"color": this.thFirstColor(),
|
|
84
|
+
"font-size": this.thFontSize() + "px",
|
|
85
|
+
"font-weight": this.thFontWeight(),
|
|
86
|
+
"text-align": this.labelAlignment(),
|
|
87
|
+
"width": "auto",
|
|
88
|
+
"padding": "0px"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"width": "1%",
|
|
92
|
+
"font-size": this.thFontSize() + "px",
|
|
93
|
+
"font-weight": this.thFontWeight(),
|
|
94
|
+
"text-align": this.percentageAlignment(),
|
|
95
|
+
"padding": "0px"
|
|
96
|
+
}
|
|
97
|
+
]);
|
|
98
|
+
this.tbodyColumnStyles_default([
|
|
99
|
+
{
|
|
100
|
+
"color": this.topLabelColor(),
|
|
101
|
+
"font-size": this.fontSize() + "px",
|
|
102
|
+
"font-weight": "normal",
|
|
103
|
+
"text-align": this.labelAlignment(),
|
|
104
|
+
"width": "auto",
|
|
105
|
+
"padding": "0px"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"color": this.topPercentageColor(),
|
|
109
|
+
"font-size": this.fontSize() + "px",
|
|
110
|
+
"font-weight": "normal",
|
|
111
|
+
"text-align": this.percentageAlignment(),
|
|
112
|
+
"width": "1%",
|
|
113
|
+
"padding": "0px"
|
|
114
|
+
}
|
|
115
|
+
]);
|
|
116
|
+
this.lastRowStyles_default([
|
|
117
|
+
{
|
|
118
|
+
"color": this.otherLabelColor(),
|
|
119
|
+
"font-size": this.fontSize() + "px",
|
|
120
|
+
"font-weight": this.otherLabelBold() ? "bold" : "normal",
|
|
121
|
+
"text-align": this.labelAlignment(),
|
|
122
|
+
"width": "auto",
|
|
123
|
+
"padding": "0px"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"color": this.otherLabelColor(),
|
|
127
|
+
"font-size": this.fontSize() + "px",
|
|
128
|
+
"font-weight": this.otherPercentageBold() ? "bold" : "normal",
|
|
129
|
+
"text-align": this.percentageAlignment(),
|
|
130
|
+
"width": "1%",
|
|
131
|
+
"padding": "0px"
|
|
132
|
+
}
|
|
133
|
+
]);
|
|
134
|
+
|
|
135
|
+
super.update(domNode, element);
|
|
136
|
+
|
|
137
|
+
const rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();
|
|
138
|
+
if (rowCount < this.data().length) {
|
|
139
|
+
const lastRow = element.select("tbody > tr:last-child");
|
|
140
|
+
const context = this;
|
|
141
|
+
lastRow
|
|
142
|
+
.on("mouseout.tooltip", d => {
|
|
143
|
+
context._tooltip._triggerElement = lastRow;
|
|
144
|
+
context._tooltip
|
|
145
|
+
.visible(false)
|
|
146
|
+
.render()
|
|
147
|
+
;
|
|
148
|
+
})
|
|
149
|
+
.on("mouseenter.tooltip", d => {
|
|
150
|
+
context._tooltip._triggerElement = lastRow;
|
|
151
|
+
context._tooltip
|
|
152
|
+
.direction("n")
|
|
153
|
+
.data(context.data())
|
|
154
|
+
.visible(true)
|
|
155
|
+
.render()
|
|
156
|
+
;
|
|
157
|
+
})
|
|
158
|
+
;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
}
|
|
163
|
+
BreakdownTable.prototype._class += " html_BreakdownTable";
|
|
164
|
+
|
|
165
|
+
export interface BreakdownTable {
|
|
166
|
+
useCalculatedRowCount(): boolean;
|
|
167
|
+
useCalculatedRowCount(_: boolean): this;
|
|
168
|
+
rowCount(): number;
|
|
169
|
+
rowCount(_: number): this;
|
|
170
|
+
fontSize(): number;
|
|
171
|
+
fontSize(_: number): this;
|
|
172
|
+
thFirstColor(): string;
|
|
173
|
+
thFirstColor(_: string): this;
|
|
174
|
+
thLastColor(): string;
|
|
175
|
+
thLastColor(_: string): this;
|
|
176
|
+
thFontSize(): number;
|
|
177
|
+
thFontSize(_: number): this;
|
|
178
|
+
thFontWeight(): string;
|
|
179
|
+
thFontWeight(_: string): this;
|
|
180
|
+
labelAlignment(): "left" | "center" | "right";
|
|
181
|
+
labelAlignment(_: "left" | "center" | "right"): this;
|
|
182
|
+
percentageAlignment(): "left" | "center" | "right";
|
|
183
|
+
percentageAlignment(_: "left" | "center" | "right"): this;
|
|
184
|
+
topLabelColor(): string;
|
|
185
|
+
topLabelColor(_: string): this;
|
|
186
|
+
topPercentageColor(): string;
|
|
187
|
+
topPercentageColor(_: string): this;
|
|
188
|
+
topPercentageBold(): boolean;
|
|
189
|
+
topPercentageBold(_: boolean): this;
|
|
190
|
+
otherLabel(): string;
|
|
191
|
+
otherLabel(_: string): this;
|
|
192
|
+
otherLabelColor(): string;
|
|
193
|
+
otherLabelColor(_: string): this;
|
|
194
|
+
otherLabelBold(): boolean;
|
|
195
|
+
otherLabelBold(_: boolean): this;
|
|
196
|
+
otherPercentageColor(): string;
|
|
197
|
+
otherPercentageColor(_: string): this;
|
|
198
|
+
otherPercentageBold(): boolean;
|
|
199
|
+
otherPercentageBold(_: boolean): this;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
BreakdownTable.prototype.publish("useCalculatedRowCount", true, "boolean", "If true, rowCount will be calculated and its default will be overwritten");
|
|
203
|
+
BreakdownTable.prototype.publish("rowCount", 5, "number", "Number of total rows to display (including the 'other' row)", undefined, { disable: w => w.useCalculatedRowCount() });
|
|
204
|
+
BreakdownTable.prototype.publish("fontSize", 14, "number", "Font size (pixels)");
|
|
205
|
+
BreakdownTable.prototype.publish("labelAlignment", "left", "set", "Alignment of the label column text", ["left", "center", "right"]);
|
|
206
|
+
BreakdownTable.prototype.publish("percentageAlignment", "center", "set", "Alignment of the percentage column text", ["left", "center", "right"]);
|
|
207
|
+
BreakdownTable.prototype.publish("topLabelColor", "#333", "html-color", "Color of displayed 'top' labels");
|
|
208
|
+
BreakdownTable.prototype.publish("topPercentageColor", "#1A99D5", "html-color", "Color of displayed 'top' percentages");
|
|
209
|
+
BreakdownTable.prototype.publish("topPercentageBold", true, "html-color", "If true, the 'top' percentages will be bold");
|
|
210
|
+
BreakdownTable.prototype.publish("otherLabel", "Other", "string", "Label text for the 'other' row");
|
|
211
|
+
BreakdownTable.prototype.publish("otherLabelColor", "#AAA", "html-color", "Color of the 'other' label");
|
|
212
|
+
BreakdownTable.prototype.publish("otherLabelBold", false, "html-color", "If true, the 'other' label will be bold");
|
|
213
|
+
BreakdownTable.prototype.publish("otherPercentageColor", "#AAA", "html-color", "Color of the 'other' percentage");
|
|
214
|
+
BreakdownTable.prototype.publish("otherPercentageBold", false, "html-color", "If true, the 'other' percentage will be bold");
|
|
215
|
+
BreakdownTable.prototype.publish("thFontWeight", "bold", "string", "Font weight for th elements");
|
|
216
|
+
BreakdownTable.prototype.publish("thFontSize", 26, "number", "Font size for th elements");
|
|
217
|
+
BreakdownTable.prototype.publish("thFirstColor", "#333", "html-color", "Text color of the first th element");
|
|
218
|
+
BreakdownTable.prototype.publish("thLastColor", "#333", "html-color", "Text color of the last th element");
|