const.go 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright 2019 Yunion
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package excelutils // import "yunion.io/x/onecloud/pkg/util/excelutils"
  15. type ExcelChartType string
  16. const (
  17. CHART_TYPE_LINE ExcelChartType = "line" // 折线图
  18. CHART_TYPE_PIE ExcelChartType = "pie" // 饼图
  19. CHART_TYPE_RADAR ExcelChartType = "radar" // 雷达图
  20. CHART_TYPE_SCATTER ExcelChartType = "scatter" // 散点图
  21. CHART_TYPE_COL ExcelChartType = "col" // 柱状图
  22. )
  23. const (
  24. DEFAULT_SHEET = "Sheet1"
  25. )
  26. var ChartMap = map[ExcelChartType]string{
  27. CHART_TYPE_LINE: "折线图",
  28. CHART_TYPE_PIE: "饼图",
  29. CHART_TYPE_RADAR: "雷达图",
  30. CHART_TYPE_SCATTER: "散点图",
  31. CHART_TYPE_COL: "柱状图",
  32. }
  33. const (
  34. // 千位分隔
  35. CELL_STYLE_THOUSANDS_SEPARATOR string = `#,##0.00_)`
  36. )