pivot.jp.coffee
3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
callWithJQuery = (pivotModule) ->
if typeof exports is "object" and typeof module is "object" # CommonJS
pivotModule require("jquery")
else if typeof define is "function" and define.amd # AMD
define ["jquery"], pivotModule
# Plain browser env
else
pivotModule jQuery
callWithJQuery ($) ->
nf = $.pivotUtilities.numberFormat
tpl = $.pivotUtilities.aggregatorTemplates
jpFmt = nf(thousandsSep: ",", decimalSep: ".")
jpFmtInt = nf(digitsAfterDecimal: 0, thousandsSep: ",", decimalSep: ".")
jpFmtPct = nf(digitsAfterDecimal: 1, scaler: 100, suffix: "%", thousandsSep: ",", decimalSep: ".")
$.pivotUtilities.locales.ja =
localeStrings:
renderError: "描画処理でエラーが発生しました。"
computeError: "処理中にエラーが発生しました。"
uiRenderError: "表示処理中にエラーが発生しました。"
selectAll: "全選択"
selectNone: "選択解除"
tooMany: "項目が多すぎます"
filterResults: "項目を検索する"
totals: "合計"
vs: "vs"
by: "per"
apply: "適用する"
cancel: "キャンセル"
aggregators:
"件数": tpl.count(jpFmtInt)
"件数(ユニーク)": tpl.countUnique(jpFmtInt)
"ユニーク値を表示 (CSV)": tpl.listUnique(", ")
"合計": tpl.sum(jpFmt)
"合計(整数)": tpl.sum(jpFmtInt)
"平均": tpl.average(jpFmt)
"最小": tpl.min(jpFmt)
"最大": tpl.max(jpFmt)
"選択2項目の比率": tpl.sumOverSum(jpFmt)
"選択2項目の比率(上限80%)": tpl.sumOverSumBound80(true, jpFmt)
"選択2項目の比率(下限80%)": tpl.sumOverSumBound80(false, jpFmt)
"合計割合": tpl.fractionOf(tpl.sum(), "total", jpFmtPct)
"合計割合(行)": tpl.fractionOf(tpl.sum(), "row", jpFmtPct)
"合計割合(列)": tpl.fractionOf(tpl.sum(), "col", jpFmtPct)
"件数割合": tpl.fractionOf(tpl.count(), "total", jpFmtPct)
"件数割合(行)": tpl.fractionOf(tpl.count(), "row", jpFmtPct)
"件数割合(列)": tpl.fractionOf(tpl.count(), "col", jpFmtPct)
renderers:
"表": $.pivotUtilities.renderers["Table"]
"表(棒グラフ)": $.pivotUtilities.renderers["Table Barchart"]
"ヒートマップ": $.pivotUtilities.renderers["Heatmap"]
"ヒートマップ(行)": $.pivotUtilities.renderers["Row Heatmap"]
"ヒートマップ(列)": $.pivotUtilities.renderers["Col Heatmap"]