1. {
    2. // 网格线
    3. grid: {
    4. show: true,
    5. // 网格水平线
    6. horizontal: {
    7. show: true,
    8. size: 1,
    9. color: '#393939',
    10. // 'solid'|'dash'
    11. style: 'dash',
    12. dashValue: [2, 2]
    13. },
    14. // 网格垂直线
    15. vertical: {
    16. show: false,
    17. size: 1,
    18. color: '#393939',
    19. // 'solid'|'dash'
    20. style: 'dash',
    21. dashValue: [2, 2]
    22. }
    23. },
    24. // 蜡烛图
    25. candle: {
    26. // 蜡烛图上下间距,大于1为绝对值,大于0小余1则为比例
    27. margin: {
    28. top: 0.2,
    29. bottom: 0.1
    30. },
    31. // 蜡烛图类型 'candle_solid'|'candle_stroke'|'candle_up_stroke'|'candle_down_stroke'|'ohlc'|'area'
    32. type: 'candle_solid',
    33. // 蜡烛柱
    34. bar: {
    35. upColor: '#26A69A',
    36. downColor: '#EF5350',
    37. noChangeColor: '#888888'
    38. },
    39. // 面积图
    40. area: {
    41. lineSize: 2,
    42. lineColor: '#2196F3',
    43. value: 'close',
    44. backgroundColor: [{
    45. offset: 0,
    46. color: 'rgba(33, 150, 243, 0.01)'
    47. }, {
    48. offset: 1,
    49. color: 'rgba(33, 150, 243, 0.2)'
    50. }]
    51. },
    52. priceMark: {
    53. show: true,
    54. // 最高价标记
    55. high: {
    56. show: true,
    57. color: '#D9D9D9',
    58. textMargin: 5,
    59. textSize: 10,
    60. textFamily: 'Helvetica Neue',
    61. textWeight: 'normal'
    62. },
    63. // 最低价标记
    64. low: {
    65. show: true,
    66. color: '#D9D9D9',
    67. textMargin: 5,
    68. textSize: 10,
    69. textFamily: 'Helvetica Neue',
    70. textWeight: 'normal',
    71. },
    72. // 最新价标记
    73. last: {
    74. show: true,
    75. upColor: '#26A69A',
    76. downColor: '#EF5350',
    77. noChangeColor: '#888888',
    78. line: {
    79. show: true,
    80. // 'solid'|'dash'
    81. style: 'dash',
    82. dashValue: [4, 4],
    83. size: 1
    84. },
    85. text: {
    86. show: true,
    87. size: 12,
    88. paddingLeft: 2,
    89. paddingTop: 2,
    90. paddingRight: 2,
    91. paddingBottom: 2,
    92. borderRadius: 2,
    93. color: '#FFFFFF',
    94. family: 'Helvetica Neue',
    95. weight: 'normal'
    96. }
    97. }
    98. },
    99. // 提示
    100. tooltip: {
    101. // 'always' | 'follow_cross' | 'none'
    102. showRule: 'always',
    103. // 'standard' | 'rect'
    104. showType: 'standard',
    105. labels: ['时间', '开', '收', '高', '低', '成交量'],
    106. // 可以是数组,也可以是方法,如果是方法则需要返回一个数组
    107. // 数组和方法返回的数组格式为:
    108. // [xxx, xxx, ......]或者[{ color: '#fff', value: xxx }, { color: '#000', value: xxx }, .......]
    109. values: null,
    110. defaultValue: 'n/a',
    111. rect: {
    112. paddingLeft: 0,
    113. paddingRight: 0,
    114. paddingTop: 0,
    115. paddingBottom: 6,
    116. offsetLeft: 8,
    117. offsetTop: 8,
    118. offsetRight: 8,
    119. borderRadius: 4,
    120. borderSize: 1,
    121. borderColor: '#3f4254',
    122. backgroundColor: 'rgba(17, 17, 17, .3)'
    123. },
    124. text: {
    125. size: 12,
    126. family: 'Helvetica Neue',
    127. weight: 'normal',
    128. color: '#D9D9D9',
    129. marginLeft: 8,
    130. marginTop: 6,
    131. marginRight: 8,
    132. marginBottom: 0
    133. }
    134. }
    135. },
    136. // 技术指标
    137. technicalIndicator: {
    138. margin: {
    139. top: 0.2,
    140. bottom: 0.1
    141. },
    142. bar: {
    143. upColor: '#26A69A',
    144. downColor: '#EF5350',
    145. noChangeColor: '#888888'
    146. },
    147. line: {
    148. size: 1,
    149. colors: ['#FF9600', '#9D65C9', '#2196F3', '#E11D74', '#01C5C4']
    150. },
    151. circle: {
    152. upColor: '#26A69A',
    153. downColor: '#EF5350',
    154. noChangeColor: '#888888'
    155. },
    156. // 最新值标记
    157. lastValueMark: {
    158. show: false,
    159. text: {
    160. show: false,
    161. color: '#ffffff',
    162. size: 12,
    163. family: 'Helvetica Neue',
    164. weight: 'normal',
    165. paddingLeft: 3,
    166. paddingTop: 2,
    167. paddingRight: 3,
    168. paddingBottom: 2,
    169. borderRadius: 2
    170. }
    171. },
    172. // 提示
    173. tooltip: {
    174. // 'always' | 'follow_cross' | 'none'
    175. showRule: 'always',
    176. // 'standard' | 'rect'
    177. showType: 'standard',
    178. showName: true,
    179. showParams: true,
    180. defaultValue: 'n/a',
    181. text: {
    182. size: 12,
    183. family: 'Helvetica Neue',
    184. weight: 'normal',
    185. color: '#D9D9D9',
    186. marginTop: 6,
    187. marginRight: 8,
    188. marginBottom: 0,
    189. marginLeft: 8
    190. }
    191. }
    192. },
    193. // x轴
    194. xAxis: {
    195. show: true,
    196. height: null,
    197. // x轴线
    198. axisLine: {
    199. show: true,
    200. color: '#888888',
    201. size: 1
    202. },
    203. // x轴分割文字
    204. tickText: {
    205. show: true,
    206. color: '#D9D9D9',
    207. family: 'Helvetica Neue',
    208. weight: 'normal',
    209. size: 12,
    210. paddingTop: 3,
    211. paddingBottom: 6
    212. },
    213. // x轴分割线
    214. tickLine: {
    215. show: true,
    216. size: 1,
    217. length: 3,
    218. color: '#888888'
    219. }
    220. },
    221. // y轴
    222. yAxis: {
    223. show: true,
    224. width: null,
    225. // 'left' | 'right'
    226. position: 'right',
    227. // 'normal' | 'percentage' | 'log'
    228. type: 'normal',
    229. inside: false,
    230. // y轴线
    231. axisLine: {
    232. show: true,
    233. color: '#888888',
    234. size: 1
    235. },
    236. // x轴分割文字
    237. tickText: {
    238. show: true,
    239. color: '#D9D9D9',
    240. family: 'Helvetica Neue',
    241. weight: 'normal',
    242. size: 12,
    243. paddingLeft: 3,
    244. paddingRight: 6
    245. },
    246. // x轴分割线
    247. tickLine: {
    248. show: true,
    249. size: 1,
    250. length: 3,
    251. color: '#888888'
    252. }
    253. },
    254. // 图表之间的分割线
    255. separator: {
    256. size: 1,
    257. color: '#888888',
    258. fill: true,
    259. activeBackgroundColor: 'rgba(230, 230, 230, .15)'
    260. },
    261. // 十字光标
    262. crosshair: {
    263. show: true,
    264. // 十字光标水平线及文字
    265. horizontal: {
    266. show: true,
    267. line: {
    268. show: true,
    269. // 'solid'|'dash'
    270. style: 'dash',
    271. dashValue: [4, 2],
    272. size: 1,
    273. color: '#888888'
    274. },
    275. text: {
    276. show: true,
    277. color: '#D9D9D9',
    278. size: 12,
    279. family: 'Helvetica Neue',
    280. weight: 'normal',
    281. paddingLeft: 2,
    282. paddingRight: 2,
    283. paddingTop: 2,
    284. paddingBottom: 2,
    285. borderSize: 1,
    286. borderColor: '#505050',
    287. borderRadius: 2,
    288. backgroundColor: '#505050'
    289. }
    290. },
    291. // 十字光标垂直线及文字
    292. vertical: {
    293. show: true,
    294. line: {
    295. show: true,
    296. // 'solid'|'dash'
    297. style: 'dash',
    298. dashValue: [4, 2],
    299. size: 1,
    300. color: '#888888'
    301. },
    302. text: {
    303. show: true,
    304. color: '#D9D9D9',
    305. size: 12,
    306. family: 'Helvetica Neue',
    307. weight: 'normal',
    308. paddingLeft: 2,
    309. paddingRight: 2,
    310. paddingTop: 2,
    311. paddingBottom: 2,
    312. borderSize: 1,
    313. borderColor: '#505050',
    314. borderRadius: 2,
    315. backgroundColor: '#505050'
    316. }
    317. }
    318. },
    319. // 图形
    320. shape: {
    321. point: {
    322. backgroundColor: '#2196F3',
    323. borderColor: '#2196F3',
    324. borderSize: 1,
    325. radius: 4,
    326. activeBackgroundColor: '#2196F3',
    327. activeBorderColor: '#2196F3',
    328. activeBorderSize: 1,
    329. activeRadius: 6
    330. },
    331. line: {
    332. // 'solid'|'dash'
    333. style: 'solid'
    334. color: '#2196F3',
    335. size: 1,
    336. dashValue: [2, 2]
    337. },
    338. polygon: {
    339. // 'stroke'|'fill'
    340. style: 'stroke',
    341. stroke: {
    342. // 'solid'|'dash'
    343. style: 'solid',
    344. size: 1,
    345. color: '#2196F3',
    346. dashValue: [2, 2]
    347. },
    348. fill: {
    349. color: 'rgba(33, 150, 243, 0.1)'
    350. }
    351. },
    352. arc: {
    353. // 'stroke'|'fill'
    354. style: 'stroke',
    355. stroke: {
    356. // 'solid'|'dash'
    357. style: 'solid',
    358. size: 1,
    359. color: '#2196F3',
    360. dashValue: [2, 2]
    361. },
    362. fill: {
    363. color: '#2196F3'
    364. }
    365. },
    366. text: {
    367. style: 'fill',
    368. color: '#2196F3',
    369. size: 12,
    370. family: 'Helvetica Neue',
    371. weight: 'normal',
    372. offset: [0, 0]
    373. }
    374. },
    375. // 注解
    376. annotation: {
    377. // 'top' | 'bottom' | 'point'
    378. position: 'top',
    379. offset: [20, 0],
    380. symbol: {
    381. // 'diamond' | 'circle' | 'rect' | 'triangle' | 'custom' | 'none'
    382. type: 'diamond',
    383. // 'top' | 'bottom' | 'point'
    384. position: 'top',
    385. size: 8,
    386. color: '#2196F3',
    387. activeSize: 10,
    388. activeColor: '#FF9600'
    389. }
    390. },
    391. // 标签
    392. tag: {
    393. // 'top' | 'bottom' | 'point'
    394. position: 'point',
    395. offset: 0,
    396. line: {
    397. show: true,
    398. style: LineStyle.DASH,
    399. dashValue: [4, 2],
    400. size: 1,
    401. color: '#2196F3'
    402. },
    403. text: {
    404. color: '#FFFFFF',
    405. backgroundColor: '#2196F3',
    406. size: 12,
    407. family: 'Helvetica Neue',
    408. weight: 'normal',
    409. paddingLeft: 2,
    410. paddingRight: 2,
    411. paddingTop: 2,
    412. paddingBottom: 2,
    413. borderRadius: 2,
    414. borderSize: 1,
    415. borderColor: '#2196F3'
    416. },
    417. mark: {
    418. offset: 0,
    419. color: '#FFFFFF',
    420. backgroundColor: '#2196F3',
    421. size: 12,
    422. family: 'Helvetica Neue',
    423. weight: 'normal',
    424. paddingLeft: 2,
    425. paddingRight: 2,
    426. paddingTop: 2,
    427. paddingBottom: 2,
    428. borderRadius: 2,
    429. borderSize: 1,
    430. borderColor: '#2196F3'
    431. }
    432. }
    433. }