I have a javaScript sample: in this sample is used words and ":" before define function. what is it? please help me...
Jb.prototype = {clickButton: function (a, b, c) {
var d = this, e = d.selected, f = d.chart, g = d.buttons, h = f.xAxis[0], i = f.scroller && f.scroller.getUnionExtremes() || h || {}, k = i.dataMin,
j = i.dataMax, l, m = h && t(z(h.max, o(j, h.max))), p = new Date(m), n = b.type, r = b.count, i = b._range, w;
if (!(k === null || j === null || a === d.selected)) {
if (n === "month" || n === "year")l = {month: "Month", year: "FullYear"}[n], p["set" + l](p["get" + l]() - r), l = p.getTime(), k = o(k, Number.MIN_VALUE), isNaN(l) || l < k ? (l = k, m = z(l + i, j)) : i = m - l; else if (i)l = v(m - i, k), m = z(l + i, j); else if (n === "ytd")if (h) {
if (j === s)k = Number.MAX_VALUE, j = Number.MIN_VALUE, q(f.series, function (a) {
a = a.xData;
k = z(a[0], k);
j = v(a[a.length - 1], j)
}), c = !1;
m = new Date(j);
w = m.getFullYear();
l = w = v(k || 0, Date.UTC(w, 0, 1));
m = m.getTime();
m = z(j || m, m)
} else {
E(f, "beforeRender", function () {
d.clickButton(a, b)
});
return
} else n === "all" && h && (l = k, m = j);
g[e] && g[e].setState(0);
g[a] && g[a].setState(2);
f.fixedRange = i;
h ? h.setExtremes(l, m, o(c, 1), 0, {trigger: "rangeSelectorButton", rangeSelectorButton: b}) : (c = f.options.xAxis, c[0] = u(c[0], {range: i, min: w}));
d.selected = a
}
}, defaultButtons: [
{type: "day", count: 1, text: "1d"},
{type: "week", count: 1, text: "1w"},
{type: "month", count: 1, text: "1m"},
{type: "month", count: 6, text: "6m"},
{type: "year",
count: 1, text: "1y"},
{type: "all", text: "All"}
]
}
what means words "clickButton" , "defaultButtons" in code?
See Question&Answers more detail:os