/
create_scatter_request.go
106 lines (103 loc) · 2.42 KB
/
create_scatter_request.go
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
package fixtures
import (
"google.golang.org/protobuf/types/known/wrapperspb"
"github.com/limpidchart/lc-integration-testing/internal/render/github.com/limpidchart/lc-proto/render/v0"
)
func CreateScatterRequest() *render.CreateChartRequest {
return &render.CreateChartRequest{
Sizes: &render.ChartSizes{
Width: &wrapperspb.Int32Value{Value: 800},
Height: &wrapperspb.Int32Value{Value: 600},
},
Axes: &render.ChartAxes{
AxisLeft: &render.ChartScale{
Kind: render.ChartScale_LINEAR,
RangeStart: &wrapperspb.Int32Value{Value: 0},
RangeEnd: &wrapperspb.Int32Value{Value: 460},
Domain: &render.ChartScale_DomainNumeric{
DomainNumeric: &render.DomainNumeric{
Start: 0,
End: 100.0,
},
},
},
AxisRight: &render.ChartScale{
Kind: render.ChartScale_LINEAR,
RangeStart: &wrapperspb.Int32Value{Value: 0},
RangeEnd: &wrapperspb.Int32Value{Value: 460},
Domain: &render.ChartScale_DomainNumeric{
DomainNumeric: &render.DomainNumeric{
Start: 0,
End: 100.0,
},
},
},
AxisTop: &render.ChartScale{
Kind: render.ChartScale_LINEAR,
RangeStart: &wrapperspb.Int32Value{Value: 0},
RangeEnd: &wrapperspb.Int32Value{Value: 700},
Domain: &render.ChartScale_DomainNumeric{
DomainNumeric: &render.DomainNumeric{
Start: 0,
End: 200,
},
},
},
AxisBottom: &render.ChartScale{
Kind: render.ChartScale_LINEAR,
RangeStart: &wrapperspb.Int32Value{Value: 0},
RangeEnd: &wrapperspb.Int32Value{Value: 700},
Domain: &render.ChartScale_DomainNumeric{
DomainNumeric: &render.DomainNumeric{
Start: 0,
End: 200,
},
},
},
},
Views: []*render.ChartView{
{
Kind: render.ChartView_SCATTER,
Values: &render.ChartView_PointsValues{
PointsValues: &render.ChartViewPointsValues{
Points: []*render.ChartViewPointsValues_Point{
{
X: 20.1,
Y: 54.11,
},
{
X: 70.2,
Y: 40.22,
},
{
X: 130.3,
Y: 50.33,
},
{
X: 170.4,
Y: 70.44,
},
{
X: 20.5,
Y: 90.55,
},
{
X: 95.6,
Y: 40.66,
},
{
X: 130.7,
Y: 12.77,
},
{
X: 170.8,
Y: 2.88,
},
},
},
},
PointLabelPosition: render.ChartView_BOTTOM_RIGHT,
},
},
}
}