macarons.js 8.0 KB

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