Debian Codegraph @

opts/y_axis.go

raw symbols SCIP
1 package opts
2
3 import "github.com/go-echarts/go-echarts/v2/types"
4
5 // YAxis is the option set for Y axis.
6 // https://echarts.apache.org/en/option.html#yAxis
7 type YAxis struct {
8 // Name of axis.
9 Name string `json:"name,omitempty"`
10
11 // AlignTicks turned on to automatically align ticks when multiple numeric y axes.
12 // Only available for axes of type 'value' and 'log'.
13 AlignTicks types.Bool `json:"alignTicks,omitempty"`
14
15 // Position the position of y-axis.
16 //options:
17 //'left' (default)
18 //'right'
19 Position string `json:"position,omitempty"`
20
21 // Location of axis name.
22 //
23 // Options:
24 // 'start'
25 // 'middle' or 'center'
26 // 'end'
27 NameLocation string `json:"nameLocation,omitempty"`
28
29 // Gap between axis name and axis line.
30 NameGap int `json:"nameGap,omitempty"`
31
32 // Type of axis.
33 // Option:
34 // * 'value': Numerical axis, suitable for continuous data.
35 // * 'category': Category axis, suitable for discrete category data.
36 // Category data can be auto retrieved from series.data or dataset.source,
37 // or can be specified via xAxis.data.
38 // * 'time' Time axis, suitable for continuous time series data. As compared to value axis,
39 // it has a better formatting for time and a different tick calculation method. For example,
40 // it decides to use month, week, day or hour for tick based on the range of span.
41 // * 'log' Log axis, suitable for log data.
42 Type string `json:"type,omitempty"`
43
44 // Set this to false to prevent the axis from showing.
45 Show types.Bool `json:"show,omitempty"`
46
47 // Inverse Set this to true to invert the axis.
48 // Default false
49 Inverse types.Bool `json:"inverse,omitempty"`
50
51 // Category data, available in type: 'category' axis.
52 Data interface{} `json:"data,omitempty"`
53
54 // Number of segments that the axis is split into. Note that this number serves only as a
55 // recommendation, and the true segments may be adjusted based on readability.
56 // This is unavailable for category axis.
57 SplitNumber int `json:"splitNumber,omitempty"`
58
59 // It is available only in numerical axis, i.e., type: 'value'.
60 // It specifies whether not to contain zero position of axis compulsively.
61 // When it is set to be true, the axis may not contain zero position,
62 // which is useful in the scatter chart for both value axes.
63 // This configuration item is unavailable when the min and max are set.
64 Scale types.Bool `json:"scale,omitempty"`
65
66 // The minimum value of axis.
67 // It can be set to a special value 'dataMin' so that the minimum value on this axis is set to be the minimum label.
68 // It will be automatically computed to make sure axis tick is equally distributed when not set.
69 Min interface{} `json:"min,omitempty"`
70
71 // The maximum value of axis.
72 // It can be set to a special value 'dataMax' so that the minimum value on this axis is set to be the maximum label.
73 // It will be automatically computed to make sure axis tick is equally distributed when not set.
74 Max interface{} `json:"max,omitempty"`
75
76 // Minimum gap between split lines.
77 //
78 // For example, it can be set to be 1 to make sure axis label is show as integer.
79 // {
80 // minInterval: 1
81 // }
82 // It is available only for axis of type 'value' or 'time'.
83 MinInterval float64 `json:"minInterval,omitempty"`
84
85 // Maximum gap between split lines.
86 // For example, in time axis (type is 'time'), it can be set to be 3600 * 24 * 1000 to make sure that the gap between axis labels is less than or equal to one day.
87 //{
88 // maxInterval: 3600 * 1000 * 24
89 //}
90 // It is available only for axis of type 'value' or 'time'.
91 MaxInterval float64 `json:"maxInterval,omitempty"`
92
93 // The index of grid which the Y axis belongs to. Defaults to be in the first grid.
94 // default 0
95 GridIndex int `json:"gridIndex,omitempty"`
96
97 // Split area of Y axis in grid area.
98 SplitArea *SplitArea `json:"splitArea,omitempty"`
99
100 // Split line of Y axis in grid area.
101 SplitLine *SplitLine `json:"splitLine,omitempty"`
102
103 // Settings related to axis label.
104 AxisLabel *AxisLabel `json:"axisLabel,omitempty"`
105
106 // Settings related to axis line.
107 AxisLine *AxisLine `json:"axisLine,omitempty"`
108
109 // Settings related to axis pointer.
110 AxisPointer *AxisPointer `json:"axisPointer,omitempty"`
111 }