theme.go 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. package request
  2. type AddThemeReq struct {
  3. ChartThemeName string `description:"主题名称"`
  4. ChartThemeTypeId int `description:"图表类型id"`
  5. }
  6. type EditThemeReq struct {
  7. ChartThemeId int `description:"主题id"`
  8. ChartThemeName string `description:"主题名称"`
  9. Config string `description:"配置的值"`
  10. ChartImage string `description:"缩略图"`
  11. }
  12. type DeleteThemeReq struct {
  13. ChartThemeId int `description:"配置id"`
  14. }
  15. type SetDefaultThemeReq struct {
  16. ChartThemeId int `description:"主题id"`
  17. ChartThemeTypeId int `description:"主题类型id"`
  18. }
  19. type ColorsOptions []string
  20. type LegendOptions struct {
  21. VerticalAlign string `json:"verticalAlign"`
  22. ItemStyle struct {
  23. Color string `json:"color"`
  24. FontSize int `json:"fontSize"`
  25. Cursor string `json:"cursor"`
  26. FontWeight string `json:"fontWeight"`
  27. TextOverflow string `json:"textOverflow"`
  28. } `json:"itemStyle"`
  29. }
  30. type TitleOptions struct {
  31. Align string `json:"align"`
  32. Style struct {
  33. Color string `json:"color"`
  34. FontSize int `json:"fontSize"`
  35. } `json:"style"`
  36. }
  37. type MarkerOptions struct {
  38. Style struct {
  39. Color string `json:"color"`
  40. FontSize int `json:"fontSize"`
  41. } `json:"style"`
  42. }
  43. type AxisOptions struct {
  44. Style struct {
  45. Color string `json:"color"`
  46. FontSize int `json:"fontSize"`
  47. } `json:"style"`
  48. }
  49. type DrawOption struct {
  50. PlotBackgroundColor string `json:"plotBackgroundColor"`
  51. }
  52. type LineOptions struct {
  53. DashStyle string `json:"dashStyle"`
  54. LineWidth float64 `json:"lineWidth"`
  55. LineType string `json:"lineType"`
  56. Radius float64 `json:"radius"`
  57. }
  58. type OldChartOptions struct {
  59. ColorsOptions []string `json:"colorsOptions"`
  60. LineOptions LineOptions `json:"lineOptions"`
  61. LegendOptions interface{} `json:"legendOptions"`
  62. TitleOptions interface{} `json:"titleOptions"`
  63. MarkerOptions interface{} `json:"markerOptions"`
  64. XAxisOptions interface{} `json:"xAxisOptions"`
  65. YAxisOptions interface{} `json:"yAxisOptions"`
  66. DrawOption interface{} `json:"drawOption"`
  67. LineOptionList []LineStyleOptions `json:"lineOptionList"`
  68. }
  69. type NewChartOptions struct {
  70. OldChartOptions
  71. LineOptionList []NewLineOptions `json:"lineOptionList"`
  72. }
  73. type NewLineOptions struct {
  74. LineOptions
  75. Color string `json:"color"`
  76. DataMark string `json:"dataMark"`
  77. MarkType string `json:"markType"`
  78. MarkSize int `json:"markSize"`
  79. MarkColor string `json:"markColor"`
  80. }
  81. type LineStyleOptions struct {
  82. DashStyle string `json:"dashStyle"`
  83. Color string `json:"color"`
  84. LineWidth float64 `json:"lineWidth"`
  85. LineType string `json:"lineType"`
  86. Radius int `json:"radius"`
  87. DataMark string `json:"dataMark"`
  88. MarkType string `json:"markType"`
  89. MarkSize int `json:"markSize"`
  90. MarkColor string `json:"markColor"`
  91. }