shine.js 5.7 KB

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