forked from alwayslove2013/ZChart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
barChartConfig.js
62 lines (61 loc) · 1.19 KB
/
barChartConfig.js
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
60
61
62
const barChartConfig = {
width: 1000,
height: 400,
// background: "rgba(0,0,0,0.1)",
border: "1px solid #999",
padding: [60, 140, 50, 65],
tooltip: {
hasTooltip: true,
content: ["test_no", "acc", "search_rps", "ef"],
fontSize: 16,
fontWeight: 500,
fontColor: "#43a2ca",
},
title: {
text: "Recall - Latency",
fontSize: 24,
fontWeight: 600,
fontColor: "#222",
},
x: {
key: "ef",
scaleType: "bin",
tickType: "bottom",
tickFontSize: 14,
tickColor: "#666",
label: "Recall Rate",
labelFontSize: 16,
labelWeight: 600,
labelColor: "#444",
inset: 8,
zoom: true,
},
y: {
key: "search_rps",
scaleType: "linear",
tickType: "left",
tickFontSize: 14,
tickColor: "#666",
label: "Latency / s",
labelFontSize: 16,
labelWeight: 600,
labelColor: "#444",
inset: 6,
zoom: false,
fromZero: true,
},
groupBy: {
isGroupBy: true,
key: "test_no",
sameXScale: false,
sameYScale: true,
},
bar: {
isColorMapping: true,
color: "test_no",
withLabels: true,
label: (item) => `ef=${item.ef}`,
labelFontSize: 14,
},
};
export default barChartConfig;