Debian Codegraph @

opts/charts.go

raw symbols SCIP
1 package opts
2
3 import "github.com/go-echarts/go-echarts/v2/types"
4
5 // SunburstChart
6 // https://echarts.apache.org/en/option.html#series-sunburst
7 type SunburstChart struct {
8 // The action of clicking a sector
9 NodeClick string `json:"nodeClick,omitempty"`
10 // Sorting method that sectors use based on value
11 Sort string `json:"sort,omitempty"`
12 // If there is no name, whether need to render it.
13 RenderLabelForZeroData types.Bool `json:"renderLabelForZeroData,omitempty"`
14 // Selected mode
15 SelectedMode types.Bool `json:"selectedMode,omitempty"`
16 // Whether to enable animation.
17 Animation types.Bool `json:"animation,omitempty"`
18 // Whether to set graphic number threshold to animation
19 AnimationThreshold int `json:"animationThreshold,omitempty"`
20 // Duration of the first animation
21 AnimationDuration int `json:"animationDuration,omitempty"`
22 // Easing method used for the first animation
23 AnimationEasing string `json:"animationEasing,omitempty"`
24 // Delay before updating the first animation
25 AnimationDelay int `json:"animationDelay,omitempty"`
26 // Time for animation to complete
27 AnimationDurationUpdate int `json:"animationDurationUpdate,omitempty"`
28 // Easing method used for animation.
29 AnimationEasingUpdate string `json:"animationEasingUpdate,omitempty"`
30 // Delay before updating animation
31 AnimationDelayUpdate int `json:"animationDelayUpdate,omitempty"`
32 }
33
34 // Bar3DChart is the option set for a 3D bar chart.
35 type Bar3DChart struct {
36 // Shading is the coloring effect of 3D graphics in 3D Bar.
37 // The following three coloring methods are supported in echarts-gl:
38 // Options:
39 //
40 // * "color": Only display colors, not affected by other factors such as lighting.
41 // * "lambert": Through the classic [lambert] coloring, can express the light and dark that the light shows.
42 // * "realistic": Realistic rendering, combined with light.ambientCubemap and postEffect,
43 // can improve the quality and texture of the display.
44 // [Physical Based Rendering (PBR)] (https://www.marmoset.co/posts/physically-based-rendering-and-you-can-too/)
45 // is used in ECharts GL to represent realistic materials.
46 Shading string
47 }
48
49 // BoxPlotData
50 // https://echarts.apache.org/en/option.html#series-boxplot.data
51 type BoxPlotData struct {
52 // Name of data item.
53 Name string `json:"name,omitempty"`
54
55 // Value of a single data item.
56 Value interface{} `json:"value,omitempty"`
57
58 // The style setting of the text label in a single bar.
59 Label *Label `json:"label,omitempty"`
60
61 // ItemStyle settings in this series data.
62 ItemStyle *ItemStyle `json:"itemStyle,omitempty"`
63
64 // Emphasis settings in this series data.
65 Emphasis *Emphasis `json:"emphasis,omitempty"`
66
67 // Tooltip settings in this series data.
68 Tooltip *Tooltip `json:"tooltip,omitempty"`
69 }
70
71 // FunnelData
72 // https://echarts.apache.org/en/option.html#series-funnel.data
73 type FunnelData struct {
74 // Name of data item.
75 Name string `json:"name,omitempty"`
76
77 // Value of a single data item.
78 Value interface{} `json:"value,omitempty"`
79 }
80
81 // GeoData
82 type GeoData struct {
83 // Name of data item.
84 Name string `json:"name,omitempty"`
85
86 // Value of a single data item.
87 Value interface{} `json:"value,omitempty"`
88 }
89
90 // GaugeData
91 // https://echarts.apache.org/en/option.html#series-gauge.data
92 type GaugeData struct {
93 // Name of data item.
94 Name string `json:"name,omitempty"`
95
96 // Value of a single data item.
97 Value interface{} `json:"value,omitempty"`
98 }
99
100 // GraphChart is the option set for graph chart.
101 // https://echarts.apache.org/en/option.html#series-graph
102 type GraphChart struct {
103 // Graph layout.
104 // * 'none' No layout, use x, y provided in node as the position of node.
105 // * 'circular' Adopt circular layout, see the example Les Miserables.
106 // * 'force' Adopt force-directed layout, see the example Force, the
107 // detail about layout configurations are in graph.force
108 Layout string
109
110 // Force is the option set for graph force layout.
111 Force *GraphForce
112
113 // Whether to enable mouse zooming and translating. false by default.
114 // If either zooming or translating is wanted, it can be set to 'scale' or 'move'.
115 // Otherwise, set it to be true to enable both.
116 Roam types.Bool
117
118 // EdgeSymbol is the symbols of two ends of edge line.
119 // * 'circle'
120 // * 'arrow'
121 // * 'none'
122 // example: ["circle", "arrow"] or "circle"
123 EdgeSymbol interface{}
124
125 // EdgeSymbolSize is size of symbol of two ends of edge line. Can be an array or a single number
126 // example: [5,10] or 5
127 EdgeSymbolSize interface{}
128
129 // Draggable allows you to move the nodes with the mouse if they are not fixed.
130 Draggable types.Bool
131
132 // Whether to focus/highlight the hover node and it's adjacencies.
133 FocusNodeAdjacency types.Bool
134
135 // The categories of node, which is optional. If there is a classification of nodes,
136 // the category of each node can be assigned through data[i].category.
137 // And the style of category will also be applied to the style of nodes. categories can also be used in legend.
138 Categories []*GraphCategory
139
140 // EdgeLabel is the properties of an label of edge.
141 EdgeLabel *EdgeLabel `json:"edgeLabel"`
142
143 // SymbolKeepAspect is whether to keep aspect for symbols in the form of path://.
144 SymbolKeepAspect types.Bool
145
146 // Animation determines whether to enable animation.
147 Animation types.Bool
148
149 // Emphasis contains configurations of emphasis state.
150 Emphasis *Emphasis
151
152 // LineStyle controls the style of edge line. lineStyle.color can be 'source' or 'target',
153 // which will use the color of source node or target node.
154 LineStyle *LineStyle
155 }
156
157 // GraphNode represents a data node in graph chart.
158 // https://echarts.apache.org/en/option.html#series-graph.data
159 type GraphNode struct {
160 // Name of data item.
161 Name string `json:"name,omitempty"`
162
163 // x value of node position.
164 X float32 `json:"x,omitempty"`
165
166 // y value of node position.
167 Y float32 `json:"y,omitempty"`
168
169 // Value of data item.
170 Value float32 `json:"value,omitempty"`
171
172 // If node are fixed when doing force directed layout.
173 Fixed types.Bool `json:"fixed,omitempty"`
174
175 // Index of category which the data item belongs to.
176 Category interface{} `json:"category,omitempty"`
177
178 // Symbol of node of this category.
179 // Icon types provided by ECharts includes
180 // 'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow', 'none'
181 // It can be set to an image with 'image://url' , in which URL is the link to an image, or dataURI of an image.
182 Symbol string `json:"symbol,omitempty"`
183
184 // node of this category symbol size. It can be set to single numbers like 10,
185 // or use an array to represent width and height. For example, [20, 10] means symbol width is 20, and height is10.
186 SymbolSize interface{} `json:"symbolSize,omitempty"`
187
188 // The style of this node.
189 ItemStyle *ItemStyle `json:"itemStyle,omitempty"`
190
191 // The tooltip of this node.
192 Tooltip *Tooltip `json:"tooltip,omitempty"`
193 }
194
195 // GraphLink represents relationship between two data nodes.
196 // https://echarts.apache.org/en/option.html#series-graph.links
197 type GraphLink struct {
198 // A string representing the name of source node on edge. Can also be a number representing the node index.
199 Source interface{} `json:"source,omitempty"`
200
201 // A string representing the name of target node on edge. Can also be a number representing node index.
202 Target interface{} `json:"target,omitempty"`
203
204 // value of edge, can be mapped to edge length in force graph.
205 Value float32 `json:"value,omitempty"`
206
207 // Label for this link.
208 Label *EdgeLabel `json:"label,omitempty"`
209
210 // LineStyle settings in this series data.
211 LineStyle *LineStyle `json:"lineStyle,omitempty"`
212 }
213
214 // GraphCategory represents a category for data nodes.
215 // The categories of node, which is optional. If there is a classification of nodes,
216 // the category of each node can be assigned through data[i].category.
217 // And the style of category will also be applied to the style of nodes. categories can also be used in legend.
218 // https://echarts.apache.org/en/option.html#series-graph.categories
219 type GraphCategory struct {
220 // Name of category, which is used to correspond with legend and the content of tooltip.
221 Name string `json:"name"`
222
223 // The style of this node.
224 ItemStyle *ItemStyle `json:"itemStyle,omitempty"`
225
226 // The label style of node in this category.
227 Label *Label `json:"label,omitempty"`
228 }
229
230 // HeatMapChart is the option set for a heatmap chart.
231 // https://echarts.apache.org/en/option.html#series-heatmap
232 type HeatMapChart struct {
233 // Index of x axis to combine with, which is useful for multiple x axes in one chart.
234 XAxisIndex int
235
236 // Index of y axis to combine with, which is useful for multiple y axes in one chart.
237 YAxisIndex int
238 }
239
240 // HeatMapData
241 // https://echarts.apache.org/en/option.html#series-heatmap.data
242 type HeatMapData struct {
243 // Name of data item.
244 Name string `json:"name,omitempty"`
245
246 // Value of a single data item.
247 Value interface{} `json:"value,omitempty"`
248 }
249
250 // KlineData
251 // https://echarts.apache.org/en/option.html#series-candlestick.data
252 type KlineData struct {
253 // Name of data item.
254 Name string `json:"name,omitempty"`
255
256 // Value of a single data item.
257 Value interface{} `json:"value,omitempty"`
258 }
259
260 // KlineChart is the options set for a chandlestick chart.
261 // https://echarts.apache.org/en/option.html#series-candlestick
262 type KlineChart struct {
263 // Specify bar width. Absolute value (like 10) or percentage (like '20%', according to band width) can be used. Auto adapt by default.
264 BarWidth string
265
266 // Specify bar min width. Absolute value (like 10) or percentage (like '20%', according to band width) can be used. Auto adapt by default.
267 BarMinWidth string
268
269 // Specify bar max width. Absolute value (like 10) or percentage (like '20%', according to band width) can be used. Auto adapt by default.
270 BarMaxWidth string
271 }
272
273 // LiquidChart
274 // reference https://github.com/ecomfe/echarts-liquidfill
275 type LiquidChart struct {
276 // Shape of single data.
277 // Icon types provided by ECharts includes 'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow', 'none'
278 // It can be set to an image with 'image://url' , in which URL is the link to an image, or dataURI of an image.
279 Shape string
280
281 // Whether to show outline
282 IsShowOutline types.Bool
283
284 // Whether to stop animation
285 IsWaveAnimation types.Bool
286 }
287
288 // LiquidData
289 // reference https://github.com/ecomfe/echarts-liquidfill
290 type LiquidData struct {
291 // Name of data item.
292 Name string `json:"name,omitempty"`
293
294 // Value of a single data item.
295 Value interface{} `json:"value,omitempty"`
296 }
297
298 // MapData
299 // https://echarts.apache.org/en/option.html#series-map.data
300 type MapData struct {
301 // Name of data item.
302 Name string `json:"name,omitempty"`
303
304 // Value of a single data item.
305 Value interface{} `json:"value,omitempty"`
306 }
307
308 // ParallelData
309 // https://echarts.apache.org/en/option.html#series-parallel.data
310 type ParallelData struct {
311 // Name of data item.
312 Name string `json:"name,omitempty"`
313
314 // Value of a single data item.
315 Value interface{} `json:"value,omitempty"`
316 }
317
318 // SankeyLink represents relationship between two data nodes.
319 // https://echarts.apache.org/en/option.html#series-sankey.links
320 type SankeyLink struct {
321 // The name of source node of edge
322 Source interface{} `json:"source,omitempty"`
323
324 // The name of target node of edge
325 Target interface{} `json:"target,omitempty"`
326
327 // The value of edge, which decides the width of edge.
328 Value float32 `json:"value,omitempty"`
329 }
330
331 // SankeyNode represents a data node.
332 // https://echarts.apache.org/en/option.html#series-sankey.nodes
333 type SankeyNode struct {
334 // Name of data item.
335 Name string `json:"name,omitempty"`
336
337 // Value of a single data item.
338 Value string `json:"value,omitempty"`
339
340 // Depth of the node within the chart
341 Depth *int `json:"depth,omitempty"`
342
343 // ItemStyle settings in this series data.
344 ItemStyle *ItemStyle `json:"itemStyle,omitempty"`
345 }
346
347 // ThemeRiverData
348 // https://echarts.apache.org/en/option.html#series-themeRiver
349 type ThemeRiverData struct {
350 // the time attribute of time and theme.
351 Date string `json:"date,omitempty"`
352
353 // the value of an event or theme at a time point.
354 Value float64 `json:"value,omitempty"`
355
356 // the name of an event or theme.
357 Name string `json:"name,omitempty"`
358 }
359
360 // ToList converts the themeriver data to a list
361 func (trd ThemeRiverData) ToList() [3]interface{} {
362 return [3]interface{}{trd.Date, trd.Value, trd.Name}
363 }
364
365 // WordCloudChart is the option set for a word cloud chart.
366 type WordCloudChart struct {
367 // Shape of WordCloud
368 // Optional: "circle", "rect", "roundRect", "triangle", "diamond", "pin", "arrow"
369 Shape string
370
371 // range of font size
372 SizeRange []float32
373
374 // range of font rotation angle
375 RotationRange []float32
376 }
377
378 type WordCloudData struct {
379 // Name of data item.
380 Name string `json:"name,omitempty"`
381
382 // Value of a single data item.
383 Value interface{} `json:"value,omitempty"`
384 }
385
386 type Chart3DData struct {
387 // Name of the data item.
388 Name string `json:"name,omitempty"`
389
390 // Value of the data item.
391 // []interface{}{1, 2, 3}
392 Value []interface{} `json:"value,omitempty"`
393
394 // ItemStyle settings in this series data.
395 ItemStyle *ItemStyle `json:"itemStyle,omitempty"`
396
397 // The style setting of the text label in a single bar.
398 Label *Label `json:"label,omitempty"`
399 }
400
401 type TreeChart struct {
402 // The layout of the tree, which can be orthogonal and radial.
403 // * 'orthogonal' refer to the horizontal and vertical direction.
404 // * 'radial' refers to the view that the root node as the center and each layer of nodes as the ring.
405 Layout string
406
407 // The direction of the orthogonal layout in the tree diagram.
408 // * 'from left to right' or 'LR'
409 // * 'from right to left' or 'RL'
410 // * 'from top to bottom' or 'TB'
411 // * 'from bottom to top' or 'BT'
412 Orient string `json:"orient,omitempty"`
413
414 // Whether to enable mouse zooming and translating. false by default.
415 // If either zooming or translating is wanted, it can be set to 'scale' or 'move'.
416 // Otherwise, set it to be true to enable both.
417 Roam types.Bool `json:"roam,omitempty"`
418
419 // Subtree collapses and expands interaction, default true.
420 ExpandAndCollapse types.Bool `json:"expandAndCollapse,omitempty"`
421
422 // The initial level (depth) of the tree. The root node is the 0th layer, then the first layer, the second layer, ... , until the leaf node.
423 // This configuration item is primarily used in conjunction with collapsing and expansion interactions.
424 // The purpose is to prevent the nodes from obscuring each other. If set as -1 or null or undefined, all nodes are expanded.
425 InitialTreeDepth int `json:"initialTreeDepth,omitempty"`
426
427 // The style setting of the text label in a single bar.
428 Label *Label `json:"label,omitempty"`
429
430 // Leaf node special configuration, the leaf node and non-leaf node label location is different.
431 Leaves *TreeLeaves `json:"leaves,omitempty"`
432
433 // Distance between tree component and the sides of the container.
434 // value can be instant pixel value like 20;
435 // It can also be a percentage value relative to container width like '20%';
436 Left string `json:"left,omitempty"`
437 Right string `json:"right,omitempty"`
438 Top string `json:"top,omitempty"`
439 Bottom string `json:"bottom,omitempty"`
440
441 // SymbolKeepAspect is whether to keep aspect for symbols in the form of path://.
442 SymbolKeepAspect types.Bool
443 }
444
445 type TreeData struct {
446 // Name of the data item.
447 Name string `json:"name,omitempty"`
448
449 // Value of the data item.
450 Value interface{} `json:"value,omitempty"`
451
452 Children []*TreeData `json:"children,omitempty"`
453
454 // Symbol of node of this category.
455 // Icon types provided by ECharts includes
456 // 'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow', 'none'
457 // It can be set to an image with 'image://url' , in which URL is the link to an image, or dataURI of an image.
458 Symbol string `json:"symbol,omitempty"`
459
460 // node of this category symbol size. It can be set to single numbers like 10,
461 // or use an array to represent width and height. For example, [20, 10] means symbol width is 20, and height is10.
462 SymbolSize interface{} `json:"symbolSize,omitempty"`
463
464 // If set as `true`, the node is collapsed in the initialization.
465 Collapsed types.Bool `json:"collapsed,omitempty"`
466
467 // LineStyle settings in this series data.
468 LineStyle *LineStyle `json:"lineStyle,omitempty"`
469
470 // ItemStyle settings in this series data.
471 ItemStyle *ItemStyle `json:"itemStyle,omitempty"`
472 }
473
474 type TreeMapChart struct {
475 // Whether to enable animation.
476 Animation types.Bool `json:"animation,omitempty"`
477
478 // leafDepth represents how many levels are shown at most. For example, when leafDepth is set to 1, only one level will be shown.
479 // leafDepth is null/undefined by default, which means that "drill down" is disabled.
480 LeafDepth int `json:"leafDeapth,omitempty"`
481
482 // Roam describes whether to enable mouse zooming and translating. false by default.
483 Roam types.Bool `json:"roam,omitempty"`
484
485 // Label decribes the style of the label in each node.
486 Label *Label `json:"label,omitempty"`
487
488 // UpperLabel is used to specify whether show label when the treemap node has children.
489 UpperLabel *UpperLabel `json:"upperLabel,omitempty"`
490
491 // ColorMappingBy specifies the rule according to which each node obtain color from color list.
492 ColorMappingBy string `json:"colorMappingBy,omitempty"`
493
494 // Levels provide configration for each node level
495 Levels *[]TreeMapLevel `json:"levels,omitempty"`
496
497 // Distance between treemap component and the sides of the container.
498 // value can be instant pixel value like 20;
499 // It can also be a percentage value relative to container width like '20%';
500 Left string `json:"left,omitempty"`
501 Right string `json:"right,omitempty"`
502 Top string `json:"top,omitempty"`
503 Bottom string `json:"bottom,omitempty"`
504 }
505
506 type TreeMapNode struct {
507 // Name of the tree node item.
508 Name string `json:"name"`
509
510 // Value of the tree node item.
511 Value int `json:"value,omitempty"`
512
513 Children []TreeMapNode `json:"children,omitempty"`
514 }
515
516 // SunBurstData holds the data structure of series-sunburst.data is like tree.
517 // https://echarts.apache.org/en/option.html#series-sunburst.data
518 type SunBurstData struct {
519 // Name displayed in each sector.
520 Name string `json:"name,omitempty"`
521 // Value for each item. If contains children, value can be left unset, and sum of children values will be used in this case.
522 Value float64 `json:"value,omitempty"`
523 // ItemStyle specifies the style of the sector of the sunburst chart.
524 // You can specify the style of all sectors with series.itemStyle, or specify the style of each level of sectors with
525 // series.levels.itemStyle, or specify a specific style for each sector with series.data.itemStyle. The priority is
526 // from low to high, that is, if series.data.itemStyle is defined, it will override series.itemStyle and series.levels.itemStyle.
527 ItemStyle *ItemStyle `json:"itemStyle,omitempty"`
528 // Tooltip configures the tool-tip settings in this series data.
529 Tooltip *Tooltip `json:"tooltip,omitempty"`
530 // Label configures the style of the label of the sector.
531 Label *Label `json:"label,omitempty"`
532 // Emphasis configures the emphasis state.
533 Emphasis *Emphasis `json:"emphasis,omitempty"`
534 // Children are the children nodes defined recursively.
535 Children []*SunBurstData `json:"children,omitempty"`
536 }
537
538 // CustomChart is the options set for a custom chart.
539 // https://echarts.apache.org/en/option.html#series-custom
540 type CustomChart struct {
541 // Index of x axis to combine with, which is useful for multiple x axes in one chart.
542 XAxisIndex int
543
544 // Index of y axis to combine with, which is useful for multiple y axes in one chart.
545 YAxisIndex int
546
547 // Custom series requires developers to write a render logic by themselves in JavaScript.
548 // This render logic is called RenderItem. Use opts.FuncOpts to embed JavaScript.
549 RenderItem types.FuncStr
550 }
551
552 // Progress is the options set for progress.
553 type Progress struct {
554 // Whether to show the progress, default is false.
555 Show types.Bool `json:"show,omitempty"`
556
557 // Whether the progress overlaps when there are multiple groups of data, default is true.
558 Overlap types.Bool `json:"overlap,omitempty"`
559
560 // Width of the progress in px
561 Width int `json:"width,omitempty"`
562
563 // Whether to add round caps at the end, default is false.
564 RoundCap types.Bool `json:"roundCap,omitempty"`
565
566 // Whether to clip overflow, default is false.
567 Clip types.Bool `json:"clip,omitempty"`
568
569 // The style of progress.
570 ItemStyle *ItemStyle `json:"itemStyle,omitempty"`
571 }
572
573 // Detail is the options set for detail (e.g. on a gauge).
574 type Detail struct {
575 // Whether to show the details, default is true.
576 Show types.Bool `json:"show,omitempty"`
577
578 // Font color
579 Color string `json:"color,omitempty"`
580
581 // Font style
582 // Options: 'normal', 'italic', 'oblique'
583 FontStyle string `json:"fontStyle,omitempty"`
584
585 // FontWeight main title font thick weight.
586 // Options are:
587 // 'normal'
588 // 'bold'
589 // 'bolder'
590 // 'lighter'
591 // 100 | 200 | 300 | 400...
592 FontWeight string `json:"fontWeight,omitempty"`
593
594 // Font family the main title font family.
595 // Options: "sans-serif", 'serif' , 'monospace', 'Arial', 'Courier New', 'Microsoft YaHei', ...
596 FontFamily string `json:"fontFamily,omitempty"`
597
598 // Font size of the value in px
599 FontSize int `json:"fontSize,omitempty"`
600
601 // Line height of the text fragment.
602 LineHeight int `json:"lineHeight,omitempty"`
603
604 // Background color of label, which is transparent by default.
605 BackgroundColor string `json:"backgroundColor,omitempty"`
606
607 // Border color of label.
608 BorderColor string `json:"borderColor,omitempty"`
609
610 // Border width of label.
611 BorderWidth int `json:"borderWidth,omitempty"`
612
613 // Border radius of label.
614 BorderRadius int `json:"borderRadius,omitempty"`
615
616 // Border type of label.
617 // Options: 'solid', 'dashed', 'dotted'
618 BorderType string `json:"borderType,omitempty"`
619
620 // Border dash offset of label.
621 BorderDashOffset int `json:"borderDashOffset,omitempty"`
622
623 // Shadow blur of text block.
624 ShadowBlur int `json:"shadowBlur,omitempty"`
625
626 // Shadow color of text block.
627 ShadowColor string `json:"shadowColor,omitempty"`
628
629 // Shadow X offset of text block.
630 ShadowOffsetX int `json:"shadowOffsetX,omitempty"`
631
632 // Shadow Y offset of text block.
633 ShadowOffsetY int `json:"shadowOffsetY,omitempty"`
634
635 // Padding title space around content. See legend.textStyle.padding
636 // The unit is px. Default values for each position are 5.
637 // And they can be set to different values with left, right, top, and bottom.
638 Padding interface{} `json:"padding,omitempty"`
639
640 // Width of text block.
641 Width int `json:"width,omitempty"`
642
643 // Height of text block.
644 Height int `json:"height,omitempty"`
645
646 // Text border color.
647 TextBorderColor string `json:"textBorderColor,omitempty"`
648
649 // Text border width.
650 TextBorderWidth int `json:"textBorderWidth,omitempty"`
651
652 // Text border type
653 // Options: 'solid', 'dashed', 'dotted'
654 TextBorderType string `json:"textBorderType,omitempty"`
655
656 // Text border dash offset.
657 TextBorderDashOffset int `json:"textBorderDashOffset,omitempty"`
658
659 // Text shadow color.
660 TextShadowColor string `json:"textShadowColor,omitempty"`
661
662 // Text shadow blur.
663 TextShadowBlur int `json:"textShadowBlur,omitempty"`
664
665 // Text shadow X offset.
666 TextShadowOffsetX int `json:"textShadowOffsetX,omitempty"`
667
668 // Text shadow Y offset.
669 TextShadowOffsetY int `json:"textShadowOffsetY,omitempty"`
670
671 // Determine how to display the text when it's overflow. Available when width is set.
672 //
673 // 'truncate' Truncate the text and trailing with ellipsis.
674 // 'break' Break by word
675 // 'breakAll' Break by character.
676 Overflow string `json:"overflow,omitempty"`
677
678 // Ellipsis
679 Ellipsis types.Bool `json:"ellipsis,omitempty"`
680
681 // The content formatter of value
682 //
683 // 1. String template
684 // The template variable is {value}.
685 //
686 // 2. Callback function
687 // The format of callback function:
688 // (value: number) => string
689 Formatter types.FuncStr `json:"formatter,omitempty"`
690
691 // Value position relative to the center of chart
692 // OffceCenter is provided as [x, y] where x and y are either a number (px, provided
693 // as string) or a percentage.
694 // Positive values move the chart value to [right, bottom], negative values vice
695 // versa.
696 OffsetCenter []string `json:"offsetCenter,omitempty"`
697 }
698
699 // Pointer is the options set for Pointer (e.g. on a gauge).
700 type Pointer struct {
701 // Whether to show the pointer, default true.
702 Show types.Bool `json:"show,omitempty"`
703
704 // Whether to show the pointer above detail and title, default true.
705 ShowAbove types.Bool `json:"ShowAbove,omitempty"`
706
707 // Icon of the legend items.
708 // Icon types provided by ECharts includes
709 // 'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow', 'none'
710 // It can be set to an image with 'image://url' , in which URL is the link to an image, or dataURI of an image.
711 // An image URL example:
712 // 'image://http://example.website/a/b.png'
713 // A dataURI example:
714 //
715 // 'image://data:image/gif;base64,KOY......'
716 // Icons can be set to arbitrary vector path via 'path://' in ECharts.
717 // As compared with a raster image, vector paths prevent jagging and blurring when scaled, and have better control over changing colors.
718 // For example:
719 //
720 // 'path://M30.9,53.2C16.8,...'
721 Icon string `json:"icon,omitempty"`
722
723 // Gauge
724 // Value position relative to the center of chart
725 // OffsetCenter is provided as [x, y] where x and y are either a number (px, provided
726 // as string) or a percentage.
727 // Positive values move the chart value to [right, bottom], negative values vice
728 // versa.
729 OffsetCenter []string `json:"offsetCenter,omitempty"`
730
731 // The length of pointer which could be absolute value and also the percentage relative to radius, e.g. '60' or '60%'.
732 Length string `json:"length,omitempty"`
733
734 // The style of pointer.
735 ItemStyle *ItemStyle `json:"itemStyle,omitempty"`
736 }
737
738 // CustomData
739 // https://echarts.apache.org/en/option.html#series-custom.data
740 type CustomData struct {
741 // Name of data item.
742 Name string `json:"name,omitempty"`
743
744 // Value of a single data item.
745 Value interface{} `json:"value,omitempty"`
746
747 // ItemStyle settings in this series data.
748 ItemStyle *ItemStyle `json:"itemStyle,omitempty"`
749
750 // Emphasis settings in this series data.
751 Emphasis *Emphasis `json:"emphasis,omitempty"`
752
753 // Tooltip settings in this series data.
754 Tooltip *Tooltip `json:"tooltip,omitempty"`
755 }