jmchart 1.1.79 → 1.1.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -28
- package/build.js +35 -35
- package/dist/jmchart.amd.js +700 -444
- package/dist/jmchart.cjs.js +699 -443
- package/dist/jmchart.esm.js +699 -444
- package/dist/jmchart.iife.js +701 -443
- package/dist/jmchart.system.js +699 -443
- package/example/bar.html +180 -180
- package/example/candlestick.html +288 -0
- package/example/index.html +294 -0
- package/example/js/vconsole.js +10 -0
- package/example/line.html +300 -297
- package/example/pie.html +353 -353
- package/example/stackBar.html +142 -142
- package/example/stackLine.html +147 -147
- package/example/test.html +40 -40
- package/example/vue.html +322 -322
- package/example/wk/line.html +314 -312
- package/index.js +8 -8
- package/package.json +42 -42
- package/rollup.config.js +26 -26
- package/server.js +45 -45
- package/src/common/style.js +259 -242
- package/src/common/tooltip.js +165 -165
- package/src/common/utils.js +21 -21
- package/src/component/vchart.js +130 -130
- package/src/core/axis/axis.js +622 -622
- package/src/core/legend/legend.js +163 -163
- package/src/core/markLine/manager.js +152 -0
- package/src/core/{axis → markLine}/markLine.js +190 -190
- package/src/jmChart.js +416 -464
- package/src/series/barSeries.js +135 -135
- package/src/series/candlestickSeries.js +114 -0
- package/src/series/lineSeries.js +243 -243
- package/src/series/pieSeries.js +350 -350
- package/src/series/series.js +397 -396
- package/src/series/stackBarSeries.js +144 -144
- package/src/series/stackLineSeries.js +145 -145
package/example/line.html
CHANGED
|
@@ -1,298 +1,301 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
|
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
|
-
<!--<script type="text/javascript" src="../src/jmchart.debug.js" id="jmgraph" ></script>-->
|
|
7
|
-
|
|
8
|
-
<style>
|
|
9
|
-
html,body {
|
|
10
|
-
margin:0;
|
|
11
|
-
padding:10px;
|
|
12
|
-
width:100%;
|
|
13
|
-
height:100%;
|
|
14
|
-
}
|
|
15
|
-
#mycanvas canvas, #mycanvas div{
|
|
16
|
-
background-color:#fff;
|
|
17
|
-
margin:0 auto;
|
|
18
|
-
}
|
|
19
|
-
/*div.jm-tooltip {
|
|
20
|
-
background-color: rgba(255,255,255,0.8);
|
|
21
|
-
padding:4px;
|
|
22
|
-
border:1px solid #000;
|
|
23
|
-
box-shadow: 0 0 3px #000;
|
|
24
|
-
border-radius: 6px;
|
|
25
|
-
}*/
|
|
26
|
-
</style>
|
|
27
|
-
<script type="module">
|
|
28
|
-
//window.devicePixelRatio = 1;
|
|
29
|
-
import { jmChart } from '../dist/jmchart.esm.js';
|
|
30
|
-
|
|
31
|
-
(function load() {
|
|
32
|
-
var w = Math.max((window.innerWidth || window.document.body.clientWidth) * 0.9, 600);
|
|
33
|
-
var h = Math.max((window.innerHeight || window.document.body.clientHeight) * 0.6, 200);
|
|
34
|
-
inichart(w,h);
|
|
35
|
-
})();
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
function inichart(w, h) {
|
|
39
|
-
var chart = new jmChart('mycanvas', {
|
|
40
|
-
width: w,
|
|
41
|
-
height: h,
|
|
42
|
-
xField: 'x',
|
|
43
|
-
//baseY: 0,
|
|
44
|
-
// 最大和最小X值, 这里一般不用指定,除非硬是需要
|
|
45
|
-
minXValue : 0,
|
|
46
|
-
maxXValue : 10,
|
|
47
|
-
minYValue: -100,
|
|
48
|
-
maxYValue: 400,
|
|
49
|
-
enableAnimate: true,
|
|
50
|
-
autoRefresh: true,
|
|
51
|
-
yLabelFormat: (value, shape)=>{
|
|
52
|
-
return value + '%';
|
|
53
|
-
},
|
|
54
|
-
xLabelFormat: (value, data, index)=>{
|
|
55
|
-
if(index % 5 === 0) return value + 'x';
|
|
56
|
-
return '';
|
|
57
|
-
},
|
|
58
|
-
style: {
|
|
59
|
-
margin: {
|
|
60
|
-
left: 50
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
//
|
|
68
|
-
chart.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
rgba(${color.r},${color.g},${color.b}, 0
|
|
95
|
-
rgba(${color.r},${color.g},${color.b}, 0
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
return
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
rgba(${color.r},${color.g},${color.b}, 0
|
|
156
|
-
rgba(${color.r},${color.g},${color.b}, 0
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
chart.
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
const
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
const
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
|
+
<!--<script type="text/javascript" src="../src/jmchart.debug.js" id="jmgraph" ></script>-->
|
|
7
|
+
|
|
8
|
+
<style>
|
|
9
|
+
html,body {
|
|
10
|
+
margin:0;
|
|
11
|
+
padding:10px;
|
|
12
|
+
width:100%;
|
|
13
|
+
height:100%;
|
|
14
|
+
}
|
|
15
|
+
#mycanvas canvas, #mycanvas div{
|
|
16
|
+
background-color:#fff;
|
|
17
|
+
margin:0 auto;
|
|
18
|
+
}
|
|
19
|
+
/*div.jm-tooltip {
|
|
20
|
+
background-color: rgba(255,255,255,0.8);
|
|
21
|
+
padding:4px;
|
|
22
|
+
border:1px solid #000;
|
|
23
|
+
box-shadow: 0 0 3px #000;
|
|
24
|
+
border-radius: 6px;
|
|
25
|
+
}*/
|
|
26
|
+
</style>
|
|
27
|
+
<script type="module">
|
|
28
|
+
//window.devicePixelRatio = 1;
|
|
29
|
+
import { jmChart } from '../dist/jmchart.esm.js';
|
|
30
|
+
|
|
31
|
+
(function load() {
|
|
32
|
+
var w = Math.max((window.innerWidth || window.document.body.clientWidth) * 0.9, 600);
|
|
33
|
+
var h = Math.max((window.innerHeight || window.document.body.clientHeight) * 0.6, 200);
|
|
34
|
+
inichart(w,h);
|
|
35
|
+
})();
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
function inichart(w, h) {
|
|
39
|
+
var chart = new jmChart('mycanvas', {
|
|
40
|
+
width: w,
|
|
41
|
+
height: h,
|
|
42
|
+
xField: 'x',
|
|
43
|
+
//baseY: 0,
|
|
44
|
+
// 最大和最小X值, 这里一般不用指定,除非硬是需要
|
|
45
|
+
minXValue : 0,
|
|
46
|
+
maxXValue : 10,
|
|
47
|
+
minYValue: -100,
|
|
48
|
+
maxYValue: 400,
|
|
49
|
+
enableAnimate: true,
|
|
50
|
+
autoRefresh: true,
|
|
51
|
+
yLabelFormat: (value, shape)=>{
|
|
52
|
+
return value + '%';
|
|
53
|
+
},
|
|
54
|
+
xLabelFormat: (value, data, index)=>{
|
|
55
|
+
if(index % 5 === 0) return value + 'x';
|
|
56
|
+
return '';
|
|
57
|
+
},
|
|
58
|
+
style: {
|
|
59
|
+
margin: {
|
|
60
|
+
left: 50
|
|
61
|
+
},
|
|
62
|
+
legend: {
|
|
63
|
+
legendPosition: 'top'
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
//chart.legend.legendPosition = 'top';
|
|
68
|
+
chart.legend.visible = true;
|
|
69
|
+
|
|
70
|
+
// touch改变数据点事件
|
|
71
|
+
chart.on('touchPointChange', function(args) {
|
|
72
|
+
console.log(args);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
var line1 = chart.createSeries('line', {
|
|
76
|
+
field: 'y1',
|
|
77
|
+
//index: 2, // 指定Y轴索引,如是档指定就会共用左边的Y轴,
|
|
78
|
+
// 最大值和最小值,如果不指定会自动计算,
|
|
79
|
+
// 如果指定了也只是指定了最大或最小边界,如果有数值超过它,依然以事实数值为准
|
|
80
|
+
minYValue: 0,
|
|
81
|
+
maxYValue: 200 ,
|
|
82
|
+
style: {
|
|
83
|
+
// 画圆滑的曲线
|
|
84
|
+
curve: true,// 填充图形
|
|
85
|
+
label: {
|
|
86
|
+
show: true
|
|
87
|
+
},
|
|
88
|
+
area: {
|
|
89
|
+
// 自定义填充颜色处理
|
|
90
|
+
fill: function(style) {
|
|
91
|
+
// 根据颜色生成渐变效果
|
|
92
|
+
const color = this.graph.utils.hexToRGBA(this.style.stroke);
|
|
93
|
+
return `linear-gradient(50% 0 50% 100%,
|
|
94
|
+
rgba(${color.r},${color.g},${color.b}, 0) 1,
|
|
95
|
+
rgba(${color.r},${color.g},${color.b}, 0) 0.8,
|
|
96
|
+
rgba(${color.r},${color.g},${color.b}, 0.3) 0.5,
|
|
97
|
+
rgba(${color.r},${color.g},${color.b}, 0.5) 0.2,
|
|
98
|
+
rgba(${color.r},${color.g},${color.b}, 0.8) 0)`;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
itemLabelFormat: function(p) {
|
|
103
|
+
return p.yValue.toFixed(0);
|
|
104
|
+
},
|
|
105
|
+
legendFormat: function(options) {
|
|
106
|
+
return '图例2';
|
|
107
|
+
},
|
|
108
|
+
// 生成点的回调
|
|
109
|
+
onPointCreated(point) {
|
|
110
|
+
//console.log('onPointCreated', point);
|
|
111
|
+
if(point.data.x === 10) {
|
|
112
|
+
addPointMarkLabel.call(this, point);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
var line2 = chart.createSeries('line', {
|
|
120
|
+
field: 'y2',
|
|
121
|
+
legendLabel: '图例3',
|
|
122
|
+
style: {
|
|
123
|
+
showItem: false
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
var line3 = chart.createSeries('line', {
|
|
128
|
+
field: 'y8',
|
|
129
|
+
legendLabel: '图例8',
|
|
130
|
+
style: {
|
|
131
|
+
showItem: false,
|
|
132
|
+
lineWidth: 3,
|
|
133
|
+
//curve: true,
|
|
134
|
+
lineType: 'dotted', // 虚线
|
|
135
|
+
shadow: function() {
|
|
136
|
+
return `2, 2, 10, ${this.style.stroke}`;
|
|
137
|
+
},
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
var line4 = chart.createSeries('line', {
|
|
141
|
+
field: 'y9',
|
|
142
|
+
legendLabel: '图例9',
|
|
143
|
+
style: {
|
|
144
|
+
showItem: false,
|
|
145
|
+
lineWidth: 3,
|
|
146
|
+
shadow: function() {
|
|
147
|
+
return `2, 2, 10, ${this.style.stroke}`;
|
|
148
|
+
},
|
|
149
|
+
area: {
|
|
150
|
+
// 自定义填充颜色处理
|
|
151
|
+
fill: function(style) {
|
|
152
|
+
// 根据颜色生成渐变效果
|
|
153
|
+
const color = this.graph.utils.hexToRGBA(this.style.stroke);
|
|
154
|
+
return `linear-gradient(50% 0 50% 100%,
|
|
155
|
+
rgba(${color.r},${color.g},${color.b}, 0) 1,
|
|
156
|
+
rgba(${color.r},${color.g},${color.b}, 0) 0.8,
|
|
157
|
+
rgba(${color.r},${color.g},${color.b}, 0.3) 0.5,
|
|
158
|
+
rgba(${color.r},${color.g},${color.b}, 0.5) 0.2,
|
|
159
|
+
rgba(${color.r},${color.g},${color.b}, 0.8) 0)`;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
var line5 = chart.createSeries('line', {
|
|
165
|
+
field: 'y10',
|
|
166
|
+
legendLabel: '图例10',
|
|
167
|
+
style: {
|
|
168
|
+
showItem: false,
|
|
169
|
+
lineWidth: 3,
|
|
170
|
+
lineType: 'dotted', // 虚线
|
|
171
|
+
shadow: function() {
|
|
172
|
+
return `2, 2, 10, ${this.style.stroke}`;
|
|
173
|
+
},
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
const datacount = 50;
|
|
178
|
+
function animate() {
|
|
179
|
+
if(true) {
|
|
180
|
+
chart.data = [];
|
|
181
|
+
for(var i = 0;i<datacount;i++) {
|
|
182
|
+
var data = {
|
|
183
|
+
x : i,
|
|
184
|
+
y1 : Math.random() * 200 - 100,
|
|
185
|
+
y2: Math.random() * 200 + 50,
|
|
186
|
+
y3: Math.random() * 200 + 50,
|
|
187
|
+
y4:Math.random() * 200 + 50,
|
|
188
|
+
y5:Math.random() * 200 + 50,
|
|
189
|
+
y6:Math.random() * 200 + 50,
|
|
190
|
+
y7:i,
|
|
191
|
+
y8: i * 6 + Math.random(),
|
|
192
|
+
y9: i * 3 + Math.random(),
|
|
193
|
+
y10: -i + Math.random()
|
|
194
|
+
};
|
|
195
|
+
if(i == 3) {
|
|
196
|
+
data.y = null;
|
|
197
|
+
}
|
|
198
|
+
chart.data.push(data);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
for(var i=datacount-1;i>0;i--) {
|
|
203
|
+
var x = chart.data[i].x;
|
|
204
|
+
chart.data[i] = chart.utils.clone(chart.data[i - 1]);
|
|
205
|
+
chart.data[i].x = x;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
chart.source[0] = {
|
|
209
|
+
x : chart.data[0].x,
|
|
210
|
+
y : Math.random() * 200 - 100
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
//setTimeout(animate,500);
|
|
216
|
+
chart.refresh();
|
|
217
|
+
console.log(chart.data);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
animate();
|
|
221
|
+
chart.utils.bindEvent(document.getElementById('btnRedraw'),'click',animate);
|
|
222
|
+
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// 创建点的标注
|
|
226
|
+
function addPointMarkLabel(point) {
|
|
227
|
+
const w = 40 * this.graph.devicePixelRatio;
|
|
228
|
+
const h = 20 * this.graph.devicePixelRatio;
|
|
229
|
+
const bottom = 20 * this.graph.devicePixelRatio;
|
|
230
|
+
const arrowOffset = 10 * this.graph.devicePixelRatio;
|
|
231
|
+
|
|
232
|
+
// 标注图形左上角
|
|
233
|
+
const p1 = {
|
|
234
|
+
x: point.x - w / 2,
|
|
235
|
+
y: point.y - bottom - h
|
|
236
|
+
};
|
|
237
|
+
const p2 = {
|
|
238
|
+
x: p1.x,
|
|
239
|
+
y: p1.y + h
|
|
240
|
+
};
|
|
241
|
+
const p3 = {
|
|
242
|
+
x: p2.x + w,
|
|
243
|
+
y: p2.y
|
|
244
|
+
};
|
|
245
|
+
const p4 = {
|
|
246
|
+
x: p3.x,
|
|
247
|
+
y: p1.y
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
const labelPath = this.graph.createShape('path', {
|
|
251
|
+
style: {
|
|
252
|
+
stroke: 'red',
|
|
253
|
+
fill: '#55cccccc',
|
|
254
|
+
zIndex: 18,
|
|
255
|
+
close: true
|
|
256
|
+
},
|
|
257
|
+
points: [
|
|
258
|
+
p1,
|
|
259
|
+
p2,
|
|
260
|
+
{
|
|
261
|
+
x: point.x - arrowOffset / 2,
|
|
262
|
+
y: p2.y
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
x: point.x,
|
|
266
|
+
y: p2.y + arrowOffset
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
x: point.x + arrowOffset / 2,
|
|
270
|
+
y: p2.y
|
|
271
|
+
},
|
|
272
|
+
p3,
|
|
273
|
+
p4
|
|
274
|
+
]
|
|
275
|
+
});
|
|
276
|
+
const label = this.graph.createShape('label', {
|
|
277
|
+
style: {
|
|
278
|
+
textAlign: 'center',
|
|
279
|
+
textBaseline: 'middle',
|
|
280
|
+
fill: 'red'
|
|
281
|
+
},
|
|
282
|
+
center: {
|
|
283
|
+
x: w / 2,
|
|
284
|
+
y: h / 2 + 2
|
|
285
|
+
},
|
|
286
|
+
text: '买入'
|
|
287
|
+
});
|
|
288
|
+
labelPath.children.add(label);
|
|
289
|
+
this.addShape(labelPath);
|
|
290
|
+
}
|
|
291
|
+
</script>
|
|
292
|
+
</head>
|
|
293
|
+
<body>
|
|
294
|
+
<div id="mycanvas">
|
|
295
|
+
</div>
|
|
296
|
+
<button id="btnRedraw">重绘</button>
|
|
297
|
+
|
|
298
|
+
<br />
|
|
299
|
+
<iframe src="wk/line.html" style="width: 90%;height: 600px;"></iframe>
|
|
300
|
+
</body>
|
|
298
301
|
</html>
|