theme.go 2.4 KB

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