green.js 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. define(function() {
  2. var theme = {
  3. // 默认色板
  4. color: [
  5. '#408829','#68a54a','#a9cba2','#86b379',
  6. '#397b29','#8abb6f','#759c6a','#bfd3b7'
  7. ],
  8. // 图表标题
  9. title: {
  10. itemGap: 8,
  11. textStyle: {
  12. fontWeight: 'normal',
  13. color: '#408829'
  14. }
  15. },
  16. // 值域
  17. dataRange: {
  18. color:['#1f610a','#97b58d']
  19. },
  20. // 工具箱
  21. toolbox: {
  22. color : ['#408829','#408829','#408829','#408829']
  23. },
  24. // 提示框
  25. tooltip: {
  26. backgroundColor: 'rgba(0,0,0,0.5)',
  27. axisPointer : { // 坐标轴指示器,坐标轴触发有效
  28. type : 'line', // 默认为直线,可选为:'line' | 'shadow'
  29. lineStyle : { // 直线指示器样式设置
  30. color: '#408829',
  31. type: 'dashed'
  32. },
  33. crossStyle: {
  34. color: '#408829'
  35. },
  36. shadowStyle : { // 阴影指示器样式设置
  37. color: 'rgba(200,200,200,0.3)'
  38. }
  39. }
  40. },
  41. // 区域缩放控制器
  42. dataZoom: {
  43. dataBackgroundColor: '#eee', // 数据背景颜色
  44. fillerColor: 'rgba(64,136,41,0.2)', // 填充颜色
  45. handleColor: '#408829' // 手柄颜色
  46. },
  47. grid: {
  48. borderWidth: 0
  49. },
  50. // 类目轴
  51. categoryAxis: {
  52. axisLine: { // 坐标轴线
  53. lineStyle: { // 属性lineStyle控制线条样式
  54. color: '#408829'
  55. }
  56. },
  57. splitLine: { // 分隔线
  58. lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
  59. color: ['#eee']
  60. }
  61. }
  62. },
  63. // 数值型坐标轴默认参数
  64. valueAxis: {
  65. axisLine: { // 坐标轴线
  66. lineStyle: { // 属性lineStyle控制线条样式
  67. color: '#408829'
  68. }
  69. },
  70. splitArea : {
  71. show : true,
  72. areaStyle : {
  73. color: ['rgba(250,250,250,0.1)','rgba(200,200,200,0.1)']
  74. }
  75. },
  76. splitLine: { // 分隔线
  77. lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
  78. color: ['#eee']
  79. }
  80. }
  81. },
  82. timeline : {
  83. lineStyle : {
  84. color : '#408829'
  85. },
  86. controlStyle : {
  87. normal : { color : '#408829'},
  88. emphasis : { color : '#408829'}
  89. }
  90. },
  91. // K线图默认参数
  92. k: {
  93. itemStyle: {
  94. normal: {
  95. color: '#68a54a', // 阳线填充颜色
  96. color0: '#a9cba2', // 阴线填充颜色
  97. lineStyle: {
  98. width: 1,
  99. color: '#408829', // 阳线边框颜色
  100. color0: '#86b379' // 阴线边框颜色
  101. }
  102. }
  103. }
  104. },
  105. map: {
  106. itemStyle: {
  107. normal: {
  108. areaStyle: {
  109. color: '#ddd'
  110. },
  111. label: {
  112. textStyle: {
  113. color: '#c12e34'
  114. }
  115. }
  116. },
  117. emphasis: { // 也是选中样式
  118. areaStyle: {
  119. color: '#99d2dd'
  120. },
  121. label: {
  122. textStyle: {
  123. color: '#c12e34'
  124. }
  125. }
  126. }
  127. }
  128. },
  129. force : {
  130. itemStyle: {
  131. normal: {
  132. linkStyle : {
  133. strokeColor : '#408829'
  134. }
  135. }
  136. }
  137. },
  138. chord : {
  139. padding : 4,
  140. itemStyle : {
  141. normal : {
  142. lineStyle : {
  143. width : 1,
  144. color : 'rgba(128, 128, 128, 0.5)'
  145. },
  146. chordStyle : {
  147. lineStyle : {
  148. width : 1,
  149. color : 'rgba(128, 128, 128, 0.5)'
  150. }
  151. }
  152. },
  153. emphasis : {
  154. lineStyle : {
  155. width : 1,
  156. color : 'rgba(128, 128, 128, 0.5)'
  157. },
  158. chordStyle : {
  159. lineStyle : {
  160. width : 1,
  161. color : 'rgba(128, 128, 128, 0.5)'
  162. }
  163. }
  164. }
  165. }
  166. },
  167. gauge : {
  168. startAngle: 225,
  169. endAngle : -45,
  170. axisLine: { // 坐标轴线
  171. show: true, // 默认显示,属性show控制显示与否
  172. lineStyle: { // 属性lineStyle控制线条样式
  173. color: [[0.2, '#86b379'],[0.8, '#68a54a'],[1, '#408829']],
  174. width: 8
  175. }
  176. },
  177. axisTick: { // 坐标轴小标记
  178. splitNumber: 10, // 每份split细分多少段
  179. length :12, // 属性length控制线长
  180. lineStyle: { // 属性lineStyle控制线条样式
  181. color: 'auto'
  182. }
  183. },
  184. axisLabel: { // 坐标轴文本标签,详见axis.axisLabel
  185. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  186. color: 'auto'
  187. }
  188. },
  189. splitLine: { // 分隔线
  190. length : 18, // 属性length控制线长
  191. lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
  192. color: 'auto'
  193. }
  194. },
  195. pointer : {
  196. length : '90%',
  197. color : 'auto'
  198. },
  199. title : {
  200. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  201. color: '#333'
  202. }
  203. },
  204. detail : {
  205. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  206. color: 'auto'
  207. }
  208. }
  209. },
  210. textStyle: {
  211. fontFamily: '微软雅黑, Arial, Verdana, sans-serif'
  212. }
  213. }
  214. return theme;
  215. });