dark.js 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. define(function() {
  2. var theme = {
  3. // 全图默认背景
  4. backgroundColor: '#1b1b1b',
  5. // 默认色板
  6. color: [
  7. '#FE8463','#9BCA63','#FAD860','#60C0DD','#0084C6',
  8. '#D7504B','#C6E579','#26C0C0','#F0805A','#F4E001',
  9. '#B5C334'
  10. ],
  11. // 图表标题
  12. title: {
  13. itemGap: 8,
  14. textStyle: {
  15. fontWeight: 'normal',
  16. color: '#fff' // 主标题文字颜色
  17. }
  18. },
  19. // 图例
  20. legend: {
  21. itemGap: 8,
  22. textStyle: {
  23. color: '#ccc' // 图例文字颜色
  24. }
  25. },
  26. // 值域
  27. dataRange: {
  28. itemWidth: 15,
  29. color: ['#FFF808','#21BCF9'],
  30. textStyle: {
  31. color: '#ccc' // 值域文字颜色
  32. }
  33. },
  34. toolbox: {
  35. color : ['#fff', '#fff', '#fff', '#fff'],
  36. effectiveColor : '#FE8463',
  37. disableColor: '#666',
  38. itemGap: 8
  39. },
  40. // 提示框
  41. tooltip: {
  42. backgroundColor: 'rgba(250,250,250,0.8)', // 提示背景颜色,默认为透明度为0.7的黑色
  43. axisPointer : { // 坐标轴指示器,坐标轴触发有效
  44. type : 'line', // 默认为直线,可选为:'line' | 'shadow'
  45. lineStyle : { // 直线指示器样式设置
  46. color: '#aaa'
  47. },
  48. crossStyle: {
  49. color: '#aaa'
  50. },
  51. shadowStyle : { // 阴影指示器样式设置
  52. color: 'rgba(200,200,200,0.2)'
  53. }
  54. },
  55. textStyle: {
  56. color: '#333'
  57. }
  58. },
  59. // 区域缩放控制器
  60. dataZoom: {
  61. dataBackgroundColor: '#555', // 数据背景颜色
  62. fillerColor: 'rgba(200,200,200,0.2)', // 填充颜色
  63. handleColor: '#eee' // 手柄颜色
  64. },
  65. // 网格
  66. grid: {
  67. borderWidth: 0
  68. },
  69. // 类目轴
  70. categoryAxis: {
  71. axisLine: { // 坐标轴线
  72. show: false
  73. },
  74. axisTick: { // 坐标轴小标记
  75. show: false
  76. },
  77. axisLabel: { // 坐标轴文本标签,详见axis.axisLabel
  78. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  79. color: '#ccc'
  80. }
  81. },
  82. splitLine: { // 分隔线
  83. show: false
  84. }
  85. },
  86. // 数值型坐标轴默认参数
  87. valueAxis: {
  88. axisLine: { // 坐标轴线
  89. show: false
  90. },
  91. axisTick: { // 坐标轴小标记
  92. show: false
  93. },
  94. axisLabel: { // 坐标轴文本标签,详见axis.axisLabel
  95. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  96. color: '#ccc'
  97. }
  98. },
  99. splitLine: { // 分隔线
  100. lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
  101. color: ['#aaa'],
  102. type: 'dashed'
  103. }
  104. },
  105. splitArea: { // 分隔区域
  106. show: false
  107. }
  108. },
  109. polar : {
  110. name : {
  111. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  112. color: '#ccc'
  113. }
  114. },
  115. axisLine: { // 坐标轴线
  116. lineStyle: { // 属性lineStyle控制线条样式
  117. color: '#ddd'
  118. }
  119. },
  120. splitArea : {
  121. show : true,
  122. areaStyle : {
  123. color: ['rgba(250,250,250,0.2)','rgba(200,200,200,0.2)']
  124. }
  125. },
  126. splitLine : {
  127. lineStyle : {
  128. color : '#ddd'
  129. }
  130. }
  131. },
  132. timeline : {
  133. label: {
  134. textStyle:{
  135. color: '#ccc'
  136. }
  137. },
  138. lineStyle : {
  139. color : '#aaa'
  140. },
  141. controlStyle : {
  142. normal : { color : '#fff'},
  143. emphasis : { color : '#FE8463'}
  144. },
  145. symbolSize : 3
  146. },
  147. // 折线图默认参数
  148. line: {
  149. smooth : true
  150. },
  151. // K线图默认参数
  152. k: {
  153. itemStyle: {
  154. normal: {
  155. color: '#FE8463', // 阳线填充颜色
  156. color0: '#9BCA63', // 阴线填充颜色
  157. lineStyle: {
  158. width: 1,
  159. color: '#FE8463', // 阳线边框颜色
  160. color0: '#9BCA63' // 阴线边框颜色
  161. }
  162. }
  163. }
  164. },
  165. // 雷达图默认参数
  166. radar : {
  167. symbol: 'emptyCircle', // 图形类型
  168. symbolSize:3
  169. //symbol: null, // 拐点图形类型
  170. //symbolRotate : null, // 图形旋转控制
  171. },
  172. pie: {
  173. itemStyle: {
  174. normal: {
  175. borderWidth: 1,
  176. borderColor : 'rgba(255, 255, 255, 0.5)'
  177. },
  178. emphasis: {
  179. borderWidth: 1,
  180. borderColor : 'rgba(255, 255, 255, 1)'
  181. }
  182. }
  183. },
  184. map: {
  185. itemStyle: {
  186. normal: {
  187. borderColor:'rgba(255, 255, 255, 0.5)',
  188. areaStyle: {
  189. color: '#ddd'
  190. },
  191. label: {
  192. textStyle: {
  193. color: '#ccc'
  194. }
  195. }
  196. },
  197. emphasis: { // 也是选中样式
  198. areaStyle: {
  199. color: '#FE8463'
  200. },
  201. label: {
  202. textStyle: {
  203. color: 'ccc'
  204. }
  205. }
  206. }
  207. }
  208. },
  209. force : {
  210. itemStyle: {
  211. normal: {
  212. linkStyle : {
  213. strokeColor : '#fff'
  214. }
  215. }
  216. }
  217. },
  218. chord : {
  219. padding : 4,
  220. itemStyle : {
  221. normal : {
  222. lineStyle : {
  223. width : 1,
  224. color : 'rgba(228, 228, 228, 0.2)'
  225. },
  226. chordStyle : {
  227. lineStyle : {
  228. width : 1,
  229. color : 'rgba(228, 228, 228, 0.2)'
  230. }
  231. }
  232. },
  233. emphasis : {
  234. lineStyle : {
  235. width : 1,
  236. color : 'rgba(228, 228, 228, 0.9)'
  237. },
  238. chordStyle : {
  239. lineStyle : {
  240. width : 1,
  241. color : 'rgba(228, 228, 228, 0.9)'
  242. }
  243. }
  244. }
  245. }
  246. },
  247. gauge : {
  248. startAngle: 225,
  249. endAngle : -45,
  250. axisLine: { // 坐标轴线
  251. show: true, // 默认显示,属性show控制显示与否
  252. lineStyle: { // 属性lineStyle控制线条样式
  253. color: [[0.2, '#9BCA63'],[0.8, '#60C0DD'],[1, '#D7504B']],
  254. width: 3,
  255. shadowColor : '#fff', //默认透明
  256. shadowBlur: 10
  257. }
  258. },
  259. axisTick: { // 坐标轴小标记
  260. length :15, // 属性length控制线长
  261. lineStyle: { // 属性lineStyle控制线条样式
  262. color: 'auto',
  263. shadowColor : '#fff', //默认透明
  264. shadowBlur: 10
  265. }
  266. },
  267. axisLabel: { // 坐标轴小标记
  268. textStyle: { // 属性lineStyle控制线条样式
  269. fontWeight: 'bolder',
  270. color: '#fff',
  271. shadowColor : '#fff', //默认透明
  272. shadowBlur: 10
  273. }
  274. },
  275. splitLine: { // 分隔线
  276. length :25, // 属性length控制线长
  277. lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
  278. width:3,
  279. color: '#fff',
  280. shadowColor : '#fff', //默认透明
  281. shadowBlur: 10
  282. }
  283. },
  284. pointer: { // 分隔线
  285. shadowColor : '#fff', //默认透明
  286. shadowBlur: 5
  287. },
  288. title : {
  289. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  290. fontWeight: 'bolder',
  291. fontSize: 20,
  292. fontStyle: 'italic',
  293. color: '#fff',
  294. shadowColor : '#fff', //默认透明
  295. shadowBlur: 10
  296. }
  297. },
  298. detail : {
  299. shadowColor : '#fff', //默认透明
  300. shadowBlur: 5,
  301. offsetCenter: [0, '50%'], // x, y,单位px
  302. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  303. fontWeight: 'bolder',
  304. color: '#fff'
  305. }
  306. },
  307. },
  308. funnel : {
  309. itemStyle: {
  310. normal: {
  311. borderColor : 'rgba(255, 255, 255, 0.5)',
  312. borderWidth: 1
  313. },
  314. emphasis: {
  315. borderColor : 'rgba(255, 255, 255, 1)',
  316. borderWidth: 1
  317. }
  318. }
  319. },
  320. textStyle: {
  321. fontFamily: '微软雅黑, Arial, Verdana, sans-serif'
  322. }
  323. }
  324. return theme;
  325. });