| 1 | package opts |
| 2 | |
| 3 | import "github.com/go-echarts/go-echarts/v2/types" |
| 4 | |
| 5 | // Aria options refer https: //echarts.apache.org/en/option.html#aria |
| 6 | type Aria struct { |
| 7 | Enabled types.Bool `json:"enabled,omitempty"` |
| 8 | // need to verify the functionalities |
| 9 | Label *AriaLabel `json:"label,omitempty"` |
| 10 | Decal *AriaDecal `json:"decal,omitempty"` |
| 11 | } |
| 12 | |
| 13 | type AriaLabel struct { |
| 14 | // Enabled Whether to enable label generation for accessibility. |
| 15 | Enabled types.Bool `json:"enabled,omitempty"` |
| 16 | |
| 17 | // Description By default, an algorithm is used to automatically generate a chart description. |
| 18 | // If you want to fully customize it, you can set this value to a description. |
| 19 | Description string `json:"description,omitempty"` |
| 20 | |
| 21 | // General For the overall description of the chart. |
| 22 | General *AriaGeneral `json:"general,omitempty"` |
| 23 | |
| 24 | // Series series-related configuration items. |
| 25 | Series *AriaSeries `json:"series,omitempty"` |
| 26 | } |
| 27 | type AriaData struct { |
| 28 | // MaxCount The maximum number of data occurrences per series in the description. |
| 29 | MaxCount types.Int `json:"maxCount,omitempty"` |
| 30 | |
| 31 | // AllData Description to be used when all data is displayed. |
| 32 | AllData string `json:"allData,omitempty"` |
| 33 | |
| 34 | // PartialData Descriptions used when only partial data is displayed. This includes template variables. |
| 35 | // {displayCnt}: the number of data that will be replaced with the number of displays. |
| 36 | PartialData string `json:"partialData,omitempty"` |
| 37 | |
| 38 | // WithName This description is used if the data has the name attribute. This includes the template variable. |
| 39 | // {name}: name that will be replaced with the data. |
| 40 | // {value}: the value that will be replaced with the data. |
| 41 | WithName string `json:"withName,omitempty"` |
| 42 | |
| 43 | // WithoutName This description is used if the data does not have the name attribute. This includes the template variable. |
| 44 | // {value}: the value that will be replaced with the data. |
| 45 | WithoutName string `json:"withoutName,omitempty"` |
| 46 | |
| 47 | // Separator The separator between data and data description. |
| 48 | Separator *AriaSeparator `json:"separator,omitempty"` |
| 49 | } |
| 50 | type AriaDecal struct { |
| 51 | // Show Whether to display the decal pattern is not shown by default. |
| 52 | Show types.Bool `json:"show,omitempty"` |
| 53 | // Decals The style of the decal pattern. |
| 54 | // An array, each item in the array will have one style and the data will be looped through the array in order. |
| 55 | Decals []AriaDecal `json:"decals,omitempty"` |
| 56 | } |
| 57 | |
| 58 | type AriaDecals struct { |
| 59 | // Symbol of node of this category. |
| 60 | // Icon types provided by ECharts includes |
| 61 | // 'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow', 'none' |
| 62 | // It can be set to an image with 'image://url' , in which URL is the link to an image, or dataURI of an image. |
| 63 | Symbol string `json:"symbol,omitempty"` |
| 64 | |
| 65 | // SymbolSize Range of values: 0 to 1, representing the size of symbol relative to decal. |
| 66 | SymbolSize types.Float `json:"symbolSize,omitempty"` |
| 67 | } |
| 68 | |
| 69 | type AriaGeneral struct { |
| 70 | // WithTitle If the chart exists title.text, then withTitle is used. This includes the template variable. |
| 71 | // {title}: will be replaced with title.text of the chart. |
| 72 | WithTitle string `json:"withTitle,omitempty"` |
| 73 | |
| 74 | // WithoutTitle If the chart does not have title.text, then withoutTitle is used. |
| 75 | WithoutTitle string `json:"withoutTitle,omitempty"` |
| 76 | } |
| 77 | |
| 78 | type AriaSeries struct { |
| 79 | // MaxCount The maximum number of series in the description. |
| 80 | MaxCount types.Int `json:"maxCount,omitempty"` |
| 81 | // SingleSeries The description used when the chart contains only one series. |
| 82 | SingleSeries *AriaSingle `json:"single,omitempty"` |
| 83 | // MultipleSeries The description used when the chart contains multiple series. |
| 84 | MultipleSeries *AriaMultiple `json:"multiple,omitempty"` |
| 85 | } |
| 86 | |
| 87 | type AriaSingle struct { |
| 88 | // Prefix Holistic descriptions for all series are shown before each series description. This includes template variables. |
| 89 | // {seriesCount}: will be replaced with the number of series, where it is always 1. |
| 90 | Prefix string `json:"prefix,omitempty"` |
| 91 | |
| 92 | // WithName This description is used if the series has the name attribute. This includes the template variable. |
| 93 | // {seriesName}: will be replaced with name of the series. |
| 94 | // {seriesType}: the name of the type that will be replaced with the series, e.g. 'Bar chart', 'Line chart', etc. |
| 95 | WithName string `json:"withName,omitempty"` |
| 96 | |
| 97 | // WithoutName This description is used if the series has no name attribute. This includes the template variable. |
| 98 | // {seriesType}: the name of the type that will be replaced with the series, e.g. 'Bar chart', 'Line chart', etc.v |
| 99 | WithoutName string `json:"withoutName,omitempty"` |
| 100 | } |
| 101 | |
| 102 | type AriaMultiple struct { |
| 103 | // Prefix Holistic descriptions for all series are shown before each series description. This includes template variables. |
| 104 | // {seriesCount}: will be replaced with the number of series, where it is always 1. |
| 105 | Prefix string `json:"prefix,omitempty"` |
| 106 | |
| 107 | // WithName This description is used if the series has the name attribute. This includes the template variable. |
| 108 | // {seriesName}: will be replaced with name of the series. |
| 109 | // {seriesType}: the name of the type that will be replaced with the series, e.g. 'Bar chart', 'Line chart', etc. |
| 110 | WithName string `json:"withName,omitempty"` |
| 111 | |
| 112 | // WithoutName This description is used if the series has no name attribute. This includes the template variable. |
| 113 | // {seriesType}: the name of the type that will be replaced with the series, e.g. 'Bar chart', 'Line chart', etc.v |
| 114 | WithoutName string `json:"withoutName,omitempty"` |
| 115 | } |
| 116 | |
| 117 | type AriaSeparator struct { |
| 118 | // Middle The delimiter of the data except the last one. |
| 119 | Middle string `json:"middle,omitempty"` |
| 120 | |
| 121 | // End The delimiter after the last data. |
| 122 | End string `json:"end,omitempty"` |
| 123 | } |