forked from alwayslove2013/ZChart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scatterPlotConfig.js
70 lines (69 loc) · 1.39 KB
/
scatterPlotConfig.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
63
64
65
66
67
68
69
70
const scatterPlotConfig = {
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 -12121212",
fontSize: 24,
fontWeight: 600,
fontColor: "#222",
},
circle: {
r: 5,
strokeColor: "#fff",
strokeWidth: 1,
isCircleColorMapping: true,
circleColor: "test_no",
withLabels: true,
label: (item) => `ef=${item.ef}`,
labelFontSize: 14,
withLinks: true,
isLinkColorMapping: true,
linkType: "curve",
linkWidth: 4,
linkColor: "test_no",
},
x: {
key: "acc",
scaleType: "linear",
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: true,
sameYScale: true,
},
};
export default scatterPlotConfig;