theme.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. "use strict";
  2. exports.__esModule = true;
  3. exports["default"] = void 0;
  4. var _common = require("./util/common");
  5. /**
  6. * @fileOverview default theme
  7. * @author dxq613@gail.com
  8. */
  9. var color1 = '#E8E8E8'; // color of axis-line and axis-grid
  10. var color2 = '#808080'; // color of axis label
  11. var defaultAxis = {
  12. label: {
  13. fill: color2,
  14. fontSize: 10
  15. },
  16. line: {
  17. stroke: color1,
  18. lineWidth: 1
  19. },
  20. grid: {
  21. type: 'line',
  22. stroke: color1,
  23. lineWidth: 1,
  24. lineDash: [2]
  25. },
  26. tickLine: null,
  27. labelOffset: 7.5
  28. };
  29. var Theme = {
  30. fontFamily: '"Helvetica Neue", "San Francisco", Helvetica, Tahoma, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", sans-serif',
  31. defaultColor: '#1890FF',
  32. pixelRatio: 1,
  33. padding: 'auto',
  34. appendPadding: 15,
  35. colors: ['#1890FF', '#2FC25B', '#FACC14', '#223273', '#8543E0', '#13C2C2', '#3436C7', '#F04864'],
  36. shapes: {
  37. line: ['line', 'dash'],
  38. point: ['circle', 'hollowCircle']
  39. },
  40. sizes: [4, 10],
  41. axis: {
  42. common: defaultAxis,
  43. // common axis configuration
  44. bottom: (0, _common.mix)({}, defaultAxis, {
  45. grid: null
  46. }),
  47. left: (0, _common.mix)({}, defaultAxis, {
  48. line: null
  49. }),
  50. right: (0, _common.mix)({}, defaultAxis, {
  51. line: null
  52. }),
  53. circle: (0, _common.mix)({}, defaultAxis, {
  54. line: null
  55. }),
  56. radius: (0, _common.mix)({}, defaultAxis, {
  57. labelOffset: 4
  58. })
  59. },
  60. shape: {
  61. line: {
  62. lineWidth: 2,
  63. lineJoin: 'round',
  64. lineCap: 'round'
  65. },
  66. point: {
  67. lineWidth: 0,
  68. size: 3
  69. },
  70. area: {
  71. fillOpacity: 0.1
  72. }
  73. },
  74. _defaultAxis: defaultAxis
  75. };
  76. var _default = Theme;
  77. exports["default"] = _default;