| 1 | package opts |
| 2 | |
| 3 | // SingleAxis is the option set for single axis. |
| 4 | // https://echarts.apache.org/en/option.html#singleAxis |
| 5 | type SingleAxis struct { |
| 6 | // The minimum value of axis. |
| 7 | // It can be set to a special value 'dataMin' so that the minimum value on this axis is set to be the minimum label. |
| 8 | // It will be automatically computed to make sure axis tick is equally distributed when not set. |
| 9 | Min interface{} `json:"min,omitempty"` |
| 10 | |
| 11 | // The maximum value of axis. |
| 12 | // It can be set to a special value 'dataMax' so that the minimum value on this axis is set to be the maximum label. |
| 13 | // It will be automatically computed to make sure axis tick is equally distributed when not set. |
| 14 | Max interface{} `json:"max,omitempty"` |
| 15 | |
| 16 | // Type of axis. |
| 17 | // Option: |
| 18 | // * 'value': Numerical axis, suitable for continuous data. |
| 19 | // * 'category': Category axis, suitable for discrete category data. |
| 20 | // Category data can be auto retrieved from series.data or dataset.source, |
| 21 | // or can be specified via xAxis.data. |
| 22 | // * 'time' Time axis, suitable for continuous time series data. As compared to value axis, |
| 23 | // it has a better formatting for time and a different tick calculation method. For example, |
| 24 | // it decides to use month, week, day or hour for tick based on the range of span. |
| 25 | // * 'log' Log axis, suitable for log data. |
| 26 | Type string `json:"type,omitempty"` |
| 27 | |
| 28 | // Distance between grid component and the left side of the container. |
| 29 | // left value can be instant pixel value like 20; it can also be a percentage |
| 30 | // value relative to container width like '20%'; and it can also be 'left', 'center', or 'right'. |
| 31 | // If the left value is set to be 'left', 'center', or 'right', |
| 32 | // then the component will be aligned automatically based on position. |
| 33 | Left string `json:"left,omitempty"` |
| 34 | |
| 35 | // Distance between grid component and the right side of the container. |
| 36 | // right value can be instant pixel value like 20; it can also be a percentage |
| 37 | // value relative to container width like '20%'. |
| 38 | Right string `json:"right,omitempty"` |
| 39 | |
| 40 | // Distance between grid component and the top side of the container. |
| 41 | // top value can be instant pixel value like 20; it can also be a percentage |
| 42 | // value relative to container width like '20%'; and it can also be 'top', 'middle', or 'bottom'. |
| 43 | // If the left value is set to be 'top', 'middle', or 'bottom', |
| 44 | // then the component will be aligned automatically based on position. |
| 45 | Top string `json:"top,omitempty"` |
| 46 | |
| 47 | // Distance between grid component and the bottom side of the container. |
| 48 | // bottom value can be instant pixel value like 20; it can also be a percentage |
| 49 | // value relative to container width like '20%'. |
| 50 | Bottom string `json:"bottom,omitempty"` |
| 51 | } |