highcharts开发交易所的行情走势图

 1 var chart = null;
 2 $.getJSON('https://data.jianshukeji.com/jsonp?filename=json/usdeur.json&callback=?', function (data) {
 3 chart = Highcharts.chart('container', {
 4 chart: {
 5 zoomType: 'x'
 6 },
 7 title: {
 8 text: ''
 9 },
10 xAxis: {
11 lineWidth :0,//去掉x轴线
12 tickWidth:0,//去掉刻度
13 labels: {
14 enabled:false
15 },
16 type: 'datetime',
17 dateTimeLabelFormats: {
18 millisecond: '%H:%M:%S.%L',
19 second: '%H:%M:%S',
20 minute: '%H:%M',
21 hour: '%H:%M',
22 day: '%m-%d',
23 week: '%m-%d',
24 month: '%Y-%m',
25 year: '%Y'
26 }
27 },
28 yAxis: {
29 tickWidth:0,//去掉刻度
30 gridLineWidth: 0,//去掉y轴方向的横线
31 labels: {
32 enabled: false
33 },//去掉刻度数字
34 title: {
35 text: ''
36 }
37 },
38 legend: {
39 enabled: false
40 },
41 plotOptions: {
42 area: {
43 fillColor: {
44 linearGradient: {
45 x1: 0,
46 y1: 0,
47 x2: 0,
48 y2: 1
49 },
50 stops: [
51 [0, '#FF4465'],
52 [1, '#FFFFFF']
53 ]
54 },
55 marker: {
56 enabled: false
57 },
58 lineWidth: 1,
59 states: {
60 hover: {
61 lineWidth: 1
62 }
63 },
64 threshold: null
65 }
66 },
67 series: [{
68 type: 'area',
69 color: '#ff9853', // 改变线条颜色
70 name: '美元兑欧元',
71 data: [[ 0.7695],
72 [0.7648],
73 [ 0.7645],
74 [ 0.7638],
75 [ 0.7549],
76 [ 0.7562],
77 [ 0.7574],
78 [ 0.7543],
79 [ 0.751],]
80 }]
81 });
82 });
83 
84 
85 
86 
87  

 

posted @ 2020-08-08 13:50  Ricardo_front  阅读(265)  评论(0编辑  收藏  举报