helianthus.js 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. define(function() {
  2. var theme = {
  3. backgroundColor: '#F2F2E6',
  4. // 默认色板
  5. color: [
  6. '#44B7D3','#E42B6D','#F4E24E','#FE9616','#8AED35',
  7. '#ff69b4','#ba55d3','#cd5c5c','#ffa500','#40e0d0',
  8. '#E95569','#ff6347','#7b68ee','#00fa9a','#ffd700',
  9. '#6699FF','#ff6666','#3cb371','#b8860b','#30e0e0'
  10. ],
  11. // 图表标题
  12. title: {
  13. backgroundColor: '#F2F2E6',
  14. itemGap: 10, // 主副标题纵向间隔,单位px,默认为10,
  15. textStyle: {
  16. color: '#8A826D' // 主标题文字颜色
  17. },
  18. subtextStyle: {
  19. color: '#E877A3' // 副标题文字颜色
  20. }
  21. },
  22. // 值域
  23. dataRange: {
  24. x:'right',
  25. y:'center',
  26. itemWidth: 5,
  27. itemHeight:25,
  28. color:['#E42B6D','#F9AD96'],
  29. text:['高','低'], // 文本,默认为数值文本
  30. textStyle: {
  31. color: '#8A826D' // 值域文字颜色
  32. }
  33. },
  34. toolbox: {
  35. color : ['#E95569','#E95569','#E95569','#E95569'],
  36. effectiveColor : '#ff4500',
  37. itemGap: 8
  38. },
  39. // 提示框
  40. tooltip: {
  41. backgroundColor: 'rgba(138,130,109,0.7)', // 提示背景颜色,默认为透明度为0.7的黑色
  42. axisPointer : { // 坐标轴指示器,坐标轴触发有效
  43. type : 'line', // 默认为直线,可选为:'line' | 'shadow'
  44. lineStyle : { // 直线指示器样式设置
  45. color: '#6B6455',
  46. type: 'dashed'
  47. },
  48. crossStyle: { //十字准星指示器
  49. color: '#A6A299'
  50. },
  51. shadowStyle : { // 阴影指示器样式设置
  52. color: 'rgba(200,200,200,0.3)'
  53. }
  54. }
  55. },
  56. // 区域缩放控制器
  57. dataZoom: {
  58. dataBackgroundColor: 'rgba(130,197,209,0.6)', // 数据背景颜色
  59. fillerColor: 'rgba(233,84,105,0.1)', // 填充颜色
  60. handleColor: 'rgba(107,99,84,0.8)' // 手柄颜色
  61. },
  62. // 网格
  63. grid: {
  64. borderWidth:0
  65. },
  66. // 类目轴
  67. categoryAxis: {
  68. axisLine: { // 坐标轴线
  69. lineStyle: { // 属性lineStyle控制线条样式
  70. color: '#6B6455'
  71. }
  72. },
  73. splitLine: { // 分隔线
  74. show: false
  75. }
  76. },
  77. // 数值型坐标轴默认参数
  78. valueAxis: {
  79. axisLine: { // 坐标轴线
  80. show: false
  81. },
  82. splitArea : {
  83. show: false
  84. },
  85. splitLine: { // 分隔线
  86. lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
  87. color: ['#FFF'],
  88. type: 'dashed'
  89. }
  90. }
  91. },
  92. polar : {
  93. axisLine: { // 坐标轴线
  94. lineStyle: { // 属性lineStyle控制线条样式
  95. color: '#ddd'
  96. }
  97. },
  98. splitArea : {
  99. show : true,
  100. areaStyle : {
  101. color: ['rgba(250,250,250,0.2)','rgba(200,200,200,0.2)']
  102. }
  103. },
  104. splitLine : {
  105. lineStyle : {
  106. color : '#ddd'
  107. }
  108. }
  109. },
  110. timeline : {
  111. lineStyle : {
  112. color : '#6B6455'
  113. },
  114. controlStyle : {
  115. normal : { color : '#6B6455'},
  116. emphasis : { color : '#6B6455'}
  117. },
  118. symbol : 'emptyCircle',
  119. symbolSize : 3
  120. },
  121. // 柱形图默认参数
  122. bar: {
  123. itemStyle: {
  124. normal: {
  125. barBorderRadius: 0
  126. },
  127. emphasis: {
  128. barBorderRadius: 0
  129. }
  130. }
  131. },
  132. // 折线图默认参数
  133. line: {
  134. smooth : true,
  135. symbol: 'emptyCircle', // 拐点图形类型
  136. symbolSize: 3 // 拐点图形大小
  137. },
  138. // K线图默认参数
  139. k: {
  140. itemStyle: {
  141. normal: {
  142. color: '#E42B6D', // 阳线填充颜色
  143. color0: '#44B7D3', // 阴线填充颜色
  144. lineStyle: {
  145. width: 1,
  146. color: '#E42B6D', // 阳线边框颜色
  147. color0: '#44B7D3' // 阴线边框颜色
  148. }
  149. }
  150. }
  151. },
  152. // 散点图默认参数
  153. scatter: {
  154. itemStyle: {
  155. normal: {
  156. borderWidth:1,
  157. borderColor:'rgba(200,200,200,0.5)'
  158. },
  159. emphasis: {
  160. borderWidth:0
  161. }
  162. },
  163. symbol: 'circle', // 图形类型
  164. symbolSize: 4 // 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2
  165. },
  166. // 雷达图默认参数
  167. radar : {
  168. symbol: 'emptyCircle', // 图形类型
  169. symbolSize:3
  170. //symbol: null, // 拐点图形类型
  171. //symbolRotate : null, // 图形旋转控制
  172. },
  173. map: {
  174. itemStyle: {
  175. normal: {
  176. areaStyle: {
  177. color: '#ddd'
  178. },
  179. label: {
  180. textStyle: {
  181. color: '#E42B6D'
  182. }
  183. }
  184. },
  185. emphasis: { // 也是选中样式
  186. areaStyle: {
  187. color: '#fe994e'
  188. },
  189. label: {
  190. textStyle: {
  191. color: 'rgb(100,0,0)'
  192. }
  193. }
  194. }
  195. }
  196. },
  197. force : {
  198. itemStyle: {
  199. normal: {
  200. nodeStyle : {
  201. borderColor : 'rgba(0,0,0,0)'
  202. },
  203. linkStyle : {
  204. color : '#6B6455'
  205. }
  206. }
  207. }
  208. },
  209. chord : {
  210. itemStyle : {
  211. normal : {
  212. chordStyle : {
  213. lineStyle : {
  214. width : 0,
  215. color : 'rgba(128, 128, 128, 0.5)'
  216. }
  217. }
  218. },
  219. emphasis : {
  220. chordStyle : {
  221. lineStyle : {
  222. width : 1,
  223. color : 'rgba(128, 128, 128, 0.5)'
  224. }
  225. }
  226. }
  227. }
  228. },
  229. gauge : { // 仪表盘
  230. center:['50%','80%'],
  231. radius:'100%',
  232. startAngle: 180,
  233. endAngle : 0,
  234. axisLine: { // 坐标轴线
  235. show: true, // 默认显示,属性show控制显示与否
  236. lineStyle: { // 属性lineStyle控制线条样式
  237. color: [[0.2, '#44B7D3'],[0.8, '#6B6455'],[1, '#E42B6D']],
  238. width: '40%'
  239. }
  240. },
  241. axisTick: { // 坐标轴小标记
  242. splitNumber: 2, // 每份split细分多少段
  243. length: 5, // 属性length控制线长
  244. lineStyle: { // 属性lineStyle控制线条样式
  245. color: '#fff'
  246. }
  247. },
  248. axisLabel: { // 坐标轴文本标签,详见axis.axisLabel
  249. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  250. color: '#fff',
  251. fontWeight:'bolder'
  252. }
  253. },
  254. splitLine: { // 分隔线
  255. length: '5%', // 属性length控制线长
  256. lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
  257. color: '#fff'
  258. }
  259. },
  260. pointer : {
  261. width : '40%',
  262. length: '80%',
  263. color: '#fff'
  264. },
  265. title : {
  266. offsetCenter: [0, -20], // x, y,单位px
  267. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  268. color: 'auto',
  269. fontSize: 20
  270. }
  271. },
  272. detail : {
  273. offsetCenter: [0, 0], // x, y,单位px
  274. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  275. color: 'auto',
  276. fontSize: 40
  277. }
  278. }
  279. },
  280. textStyle: {
  281. fontFamily: '微软雅黑, Arial, Verdana, sans-serif'
  282. }
  283. };
  284. return theme;
  285. });