hqchart 1.1.13911 → 1.1.13921
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/lib/umychart.NetworkFilterTest.vue.js +3 -3
- package/lib/umychart.vue.js +61 -34
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +309 -90
- package/src/jscommon/umychart.NetworkFilterTest.js +13 -1
- package/src/jscommon/umychart.complier.js +19 -3
- package/src/jscommon/umychart.js +102 -13
- package/src/jscommon/umychart.resource/css/tools.css +2 -2
- package/src/jscommon/umychart.style.js +1 -1
- package/src/jscommon/umychart.testdata/DayKLine/ICL8.cfe.day.kline.js +7 -0
- package/src/jscommon/umychart.testdata/DayKLine/ICL8.cfe.day.kline.json +1 -0
- package/src/jscommon/umychart.testdata.js +13 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +123 -18
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +13 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +431 -107
|
@@ -34,7 +34,7 @@ function JSDialogTooltip()
|
|
|
34
34
|
this.PositionColor=g_JSChartResource.DialogTooltip.PositionColor;
|
|
35
35
|
this.DateTimeColor=g_JSChartResource.DialogTooltip.DateTimeColor;
|
|
36
36
|
this.LanguageID=JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;
|
|
37
|
-
this.MaxRowCount=
|
|
37
|
+
this.MaxRowCount=18;
|
|
38
38
|
|
|
39
39
|
this.AryData=[];
|
|
40
40
|
this.AryText=[];
|
|
@@ -152,22 +152,41 @@ function JSDialogTooltip()
|
|
|
152
152
|
this.Update=function(data)
|
|
153
153
|
{
|
|
154
154
|
if (!this.DivDialog || !this.TitleBox) return;
|
|
155
|
-
if (!data.KItem || !data.IsShowCorss || data.ClientPos<0) return;
|
|
155
|
+
if ((!data.KItem && !data.MinItem) || !data.IsShowCorss || data.ClientPos<0) return;
|
|
156
156
|
|
|
157
157
|
this.LanguageID=this.HQChart.LanguageID;
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
var strKItem=JSON.stringify(data.KItem);
|
|
161
|
-
if (this.KItemCacheID!=strKItem) //数据变动的才更新
|
|
158
|
+
|
|
159
|
+
if (this.HQChart.ClassName=='KLineChartContainer')
|
|
162
160
|
{
|
|
163
|
-
|
|
164
|
-
this.KItemCacheID
|
|
165
|
-
|
|
161
|
+
var strKItem=JSON.stringify(data.KItem);
|
|
162
|
+
if (this.KItemCacheID!=strKItem) //数据变动的才更新
|
|
163
|
+
{
|
|
164
|
+
this.KItemCache= JSON.parse(strKItem);
|
|
165
|
+
this.KItemCacheID=strKItem;
|
|
166
|
+
this.UpdateTableDOM();
|
|
167
|
+
}
|
|
168
|
+
else
|
|
169
|
+
{
|
|
170
|
+
//JSConsole.Chart.Log(`[JSDialogTooltip::Update] save as KItemCache and KItem`);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
else if (this.HQChart.ClassName=='MinuteChartContainer')
|
|
174
|
+
{
|
|
175
|
+
var strKItem=JSON.stringify(data.MinItem);
|
|
176
|
+
if (this.KItemCacheID!=strKItem) //数据变动的才更新
|
|
177
|
+
{
|
|
178
|
+
this.KItemCache= JSON.parse(strKItem);
|
|
179
|
+
this.KItemCacheID=strKItem;
|
|
180
|
+
this.UpdateTableDOM();
|
|
181
|
+
}
|
|
166
182
|
}
|
|
167
183
|
else
|
|
168
184
|
{
|
|
169
|
-
|
|
185
|
+
return;
|
|
170
186
|
}
|
|
187
|
+
|
|
188
|
+
this.TitleBox.DivName.innerText=data.Name;
|
|
189
|
+
|
|
171
190
|
|
|
172
191
|
if (!this.IsShow()) this.Show();
|
|
173
192
|
}
|
|
@@ -176,7 +195,12 @@ function JSDialogTooltip()
|
|
|
176
195
|
{
|
|
177
196
|
if (!this.KItemCache) return;
|
|
178
197
|
|
|
179
|
-
this.
|
|
198
|
+
if (this.HQChart.ClassName=='KLineChartContainer')
|
|
199
|
+
this.AryText=this.GetFormatKlineTooltipText(this.KItemCache);
|
|
200
|
+
else if (this.HQChart.ClassName=='MinuteChartContainer')
|
|
201
|
+
this.AryText=this.GetFormatMinuteTooltipText(this.KItemCache);
|
|
202
|
+
else
|
|
203
|
+
return;
|
|
180
204
|
|
|
181
205
|
var index=0;
|
|
182
206
|
for(index=0;index<this.AryText.length && index<this.MaxRowCount;++index)
|
|
@@ -275,101 +299,89 @@ function JSDialogTooltip()
|
|
|
275
299
|
this.GetFormatKlineTooltipText=function(data)
|
|
276
300
|
{
|
|
277
301
|
var defaultfloatPrecision=GetfloatPrecision(this.HQChart.Symbol);//价格小数位数
|
|
278
|
-
|
|
302
|
+
var upperSymbol=this.HQChart.Symbol.toUpperCase();
|
|
279
303
|
//日期
|
|
280
|
-
var dateItem=
|
|
281
|
-
{
|
|
282
|
-
Title:g_JSChartLocalization.GetText('DialogTooltip-Date',this.LanguageID),
|
|
283
|
-
Text:IFrameSplitOperator.FormatDateString(data.Date,"YYYY/MM/DD/W"),
|
|
284
|
-
Color:this.DateTimeColor
|
|
285
|
-
}
|
|
304
|
+
var dateItem=this.ForamtDate(data.Date,"YYYY/MM/DD/W",'DialogTooltip-Date' );
|
|
286
305
|
|
|
287
306
|
//时间
|
|
288
307
|
var timeItem=null;
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
308
|
+
if (IFrameSplitOperator.IsNumber(data.Time)) timeItem=this.FormatTime(data.Time, this.HQChart.Period, null, 'DialogTooltip-Time');
|
|
309
|
+
|
|
310
|
+
var yClose=data.YClose; //昨收价|昨结算价
|
|
311
|
+
var aryText=
|
|
312
|
+
[
|
|
313
|
+
this.ForamtPrice(data.Open,yClose, defaultfloatPrecision,'DialogTooltip-Open'),
|
|
314
|
+
this.ForamtPrice(data.High,yClose, defaultfloatPrecision,'DialogTooltip-High'),
|
|
315
|
+
this.ForamtPrice(data.Low,yClose, defaultfloatPrecision,'DialogTooltip-Low'),
|
|
316
|
+
this.ForamtPrice(data.Close,yClose, defaultfloatPrecision,'DialogTooltip-Close'),
|
|
317
|
+
this.FormatVol(data.Vol,'DialogTooltip-Vol' ),
|
|
318
|
+
this.FormatAmount(data.Amount,'DialogTooltip-Amount' ),
|
|
319
|
+
this.FormatIncrease(data.Close,yClose,'DialogTooltip-Increase'),
|
|
320
|
+
this.FormatAmplitude(data.High,data.Low,yClose,'DialogTooltip-Amplitude'),
|
|
321
|
+
];
|
|
322
|
+
|
|
323
|
+
if (timeItem) aryText.unshift(timeItem);
|
|
324
|
+
aryText.unshift(dateItem);
|
|
293
325
|
|
|
294
|
-
|
|
326
|
+
//换手率
|
|
327
|
+
if (MARKET_SUFFIX_NAME.IsSHSZStockA(upperSymbol) && data.FlowCapital>0)
|
|
295
328
|
{
|
|
296
|
-
|
|
297
|
-
{
|
|
298
|
-
Title:g_JSChartLocalization.GetText('DialogTooltip-Time',this.LanguageID),
|
|
299
|
-
Text:IFrameSplitOperator.FormatTimeString(data.Time,timeFormat),
|
|
300
|
-
Color:this.DateTimeColor
|
|
301
|
-
}
|
|
329
|
+
aryText.push(this.FormatExchange(data.Vol,data.FlowCapital,'DialogTooltip-Exchange' ));
|
|
302
330
|
}
|
|
303
331
|
|
|
304
|
-
|
|
305
|
-
|
|
332
|
+
//持仓量
|
|
333
|
+
if (MARKET_SUFFIX_NAME.IsFutures(upperSymbol))
|
|
306
334
|
{
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
Color:this.TitleColor
|
|
310
|
-
};
|
|
311
|
-
if (IFrameSplitOperator.IsNumber(data.YClose) && IFrameSplitOperator.IsNumber(data.Close))
|
|
312
|
-
{
|
|
313
|
-
var value=(data.Close-data.YClose)/data.YClose;
|
|
314
|
-
increaseItem.Text=`${(value*100).toFixed(2)}%`;
|
|
315
|
-
increaseItem.Color=this.GetColor(value,0);
|
|
335
|
+
aryText.push(this.FormatPosition(data.Position,'DialogTooltip-Position'));
|
|
336
|
+
aryText.push(this.ForamtYClose(data.YClose, defaultfloatPrecision, 'DialogTooltip-YClose'));
|
|
316
337
|
}
|
|
317
338
|
|
|
318
|
-
|
|
319
|
-
|
|
339
|
+
return aryText;
|
|
340
|
+
},
|
|
341
|
+
|
|
342
|
+
this.GetFormatMinuteTooltipText=function(data)
|
|
343
|
+
{
|
|
344
|
+
var defaultfloatPrecision=GetfloatPrecision(this.HQChart.Symbol);//价格小数位数
|
|
345
|
+
|
|
346
|
+
if (data.Type==0) //连续交易
|
|
320
347
|
{
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
348
|
+
var item=data.Data;
|
|
349
|
+
if (!item) item={ };
|
|
350
|
+
|
|
351
|
+
var aryText=
|
|
352
|
+
[
|
|
353
|
+
this.ForamtDate(item.Date,"YYYY/MM/DD/W",'DialogTooltip-Date' ),
|
|
354
|
+
this.FormatTime(item.Time, null, "HH:MM", 'DialogTooltip-Time'),
|
|
355
|
+
this.ForamtPrice(item.Close,item.YClose, defaultfloatPrecision,'DialogTooltip-Price'),
|
|
356
|
+
this.FormatRisefall(item.Close,item.YClose, defaultfloatPrecision,'DialogTooltip-Risefall'),
|
|
357
|
+
this.FormatIncrease(item.Close,item.YClose,'DialogTooltip-Increase'),
|
|
358
|
+
this.FormatVol(item.Vol,'DialogTooltip-Vol' ),
|
|
359
|
+
this.FormatAmount(item.Amount,'DialogTooltip-Amount' ),
|
|
360
|
+
];
|
|
361
|
+
|
|
362
|
+
return aryText;
|
|
324
363
|
}
|
|
325
|
-
if (
|
|
364
|
+
else if (data.Type==1) //集合竞价
|
|
326
365
|
{
|
|
327
|
-
var
|
|
328
|
-
|
|
329
|
-
|
|
366
|
+
var item=data.Data.Data;
|
|
367
|
+
if (!item) item={ Vol:[] };
|
|
368
|
+
|
|
369
|
+
var timeForamt="HH:MM:SS";
|
|
370
|
+
if (item.Ver===1) timeForamt="HH:MM"
|
|
371
|
+
var aryText=
|
|
372
|
+
[
|
|
373
|
+
this.ForamtDate(item.Date,"YYYY/MM/DD/W",'DialogTooltip-Date' ),
|
|
374
|
+
this.FormatTime(item.Time, null, timeForamt, 'DialogTooltip-Time'),
|
|
375
|
+
this.ForamtPrice(item.Price,item.YClose, defaultfloatPrecision,'DialogTooltip-AC-Price'),
|
|
376
|
+
this.FormatIncrease(item.Price,item.YClose,'DialogTooltip-AC-Increase'),
|
|
377
|
+
this.FormatVol(item.Vol[0],'DialogTooltip-AC-Vol' ),
|
|
378
|
+
];
|
|
379
|
+
|
|
380
|
+
return aryText;
|
|
330
381
|
}
|
|
331
382
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
{
|
|
335
|
-
Title:g_JSChartLocalization.GetText('DialogTooltip-Open',this.LanguageID),
|
|
336
|
-
Text:IFrameSplitOperator.IsNumber(data.Open)? data.Open.toFixed(defaultfloatPrecision):'--',
|
|
337
|
-
Color:this.GetPriceColor(data.Open,data.YClose),
|
|
338
|
-
},
|
|
339
|
-
{
|
|
340
|
-
Title:g_JSChartLocalization.GetText('DialogTooltip-High',this.LanguageID),
|
|
341
|
-
Text:IFrameSplitOperator.IsNumber(data.High)? data.High.toFixed(defaultfloatPrecision):'--',
|
|
342
|
-
Color:this.GetPriceColor(data.High,data.YClose)
|
|
343
|
-
},
|
|
344
|
-
{
|
|
345
|
-
Title:g_JSChartLocalization.GetText('DialogTooltip-Low',this.LanguageID),
|
|
346
|
-
Text:IFrameSplitOperator.IsNumber(data.Low)? data.Low.toFixed(defaultfloatPrecision):'--',
|
|
347
|
-
Color:this.GetPriceColor(data.Low,data.YClose)
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
Title:g_JSChartLocalization.GetText('DialogTooltip-Close',this.LanguageID),
|
|
351
|
-
Text:IFrameSplitOperator.IsNumber(data.Close)? data.Close.toFixed(defaultfloatPrecision):'--',
|
|
352
|
-
Color:this.GetPriceColor(data.Close,data.YClose)
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
Title:g_JSChartLocalization.GetText('DialogTooltip-Vol',this.LanguageID),
|
|
356
|
-
Text:IFrameSplitOperator.IsNumber(data.Vol)? IFrameSplitOperator.FormatValueString(data.Vol,2,this.LanguageID):'--',
|
|
357
|
-
Color:this.VolColor
|
|
358
|
-
},
|
|
359
|
-
{
|
|
360
|
-
Title:g_JSChartLocalization.GetText('DialogTooltip-Amount',this.LanguageID),
|
|
361
|
-
Text:IFrameSplitOperator.IsNumber(data.Amount)? IFrameSplitOperator.FormatValueString(data.Amount,2,this.LanguageID):'--',
|
|
362
|
-
Color:this.AmountColor
|
|
363
|
-
},
|
|
364
|
-
increaseItem,
|
|
365
|
-
amplitudeItem
|
|
366
|
-
];
|
|
367
|
-
|
|
368
|
-
if (timeItem) aryText.unshift(timeItem);
|
|
369
|
-
aryText.unshift(dateItem);
|
|
370
|
-
|
|
371
|
-
return aryText;
|
|
372
|
-
},
|
|
383
|
+
return [];
|
|
384
|
+
}
|
|
373
385
|
|
|
374
386
|
this.GetColor=function(price,yClose)
|
|
375
387
|
{
|
|
@@ -417,6 +429,213 @@ function JSDialogTooltip()
|
|
|
417
429
|
if (this.TitleBGColor) this.TitleBox.DivTitle.style['background-color']=this.TitleBGColor;
|
|
418
430
|
|
|
419
431
|
this.UpdateTableDOM();
|
|
432
|
+
},
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
436
|
+
//数据格式化
|
|
437
|
+
this.ForamtPrice=function(price, yClose, defaultfloatPrecision, TitleID)
|
|
438
|
+
{
|
|
439
|
+
var item=
|
|
440
|
+
{
|
|
441
|
+
Title:g_JSChartLocalization.GetText(TitleID, this.LanguageID),
|
|
442
|
+
Text:"--.--",
|
|
443
|
+
Color:this.TitleColor
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
if (!IFrameSplitOperator.IsNumber(price)) return item;
|
|
447
|
+
|
|
448
|
+
item.Text=price.toFixed(defaultfloatPrecision);
|
|
449
|
+
item.Color=this.GetColor(price, yClose);
|
|
450
|
+
|
|
451
|
+
return item;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
this.FormatVol=function(vol, TitleID)
|
|
455
|
+
{
|
|
456
|
+
var item=
|
|
457
|
+
{
|
|
458
|
+
Title:g_JSChartLocalization.GetText(TitleID,this.LanguageID),
|
|
459
|
+
Text:'--',
|
|
460
|
+
Color:this.VolColor
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
if (!IFrameSplitOperator.IsNumber(vol)) return item;
|
|
464
|
+
|
|
465
|
+
item.Text=IFrameSplitOperator.FormatValueString(vol,2,this.LanguageID);
|
|
466
|
+
|
|
467
|
+
return item;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
this.FormatAmount=function(amount, TitleID)
|
|
471
|
+
{
|
|
472
|
+
var item=
|
|
473
|
+
{
|
|
474
|
+
Title:g_JSChartLocalization.GetText(TitleID,this.LanguageID),
|
|
475
|
+
Text:'--',
|
|
476
|
+
Color:this.AmountColor
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
if (!IFrameSplitOperator.IsNumber(amount)) return item;
|
|
480
|
+
|
|
481
|
+
item.Text=IFrameSplitOperator.FormatValueString(amount,2,this.LanguageID);
|
|
482
|
+
|
|
483
|
+
return item;
|
|
420
484
|
}
|
|
421
485
|
|
|
486
|
+
this.FormatIncrease=function(price, yClose, TitleID)
|
|
487
|
+
{
|
|
488
|
+
//涨幅
|
|
489
|
+
var item=
|
|
490
|
+
{
|
|
491
|
+
Title:g_JSChartLocalization.GetText(TitleID,this.LanguageID),
|
|
492
|
+
Text:"--.--",
|
|
493
|
+
Color:this.TitleColor
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
if (!IFrameSplitOperator.IsNumber(price) || !IFrameSplitOperator.IsNumber(yClose)) return item;
|
|
497
|
+
|
|
498
|
+
var value=(price-yClose)/yClose;
|
|
499
|
+
item.Text=`${(value*100).toFixed(2)}%`;
|
|
500
|
+
item.Color=this.GetColor(value,0);
|
|
501
|
+
|
|
502
|
+
return item;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
this.FormatRisefall=function(price, yClose, defaultfloatPrecision, TitleID)
|
|
506
|
+
{
|
|
507
|
+
//涨跌
|
|
508
|
+
var item=
|
|
509
|
+
{
|
|
510
|
+
Title:g_JSChartLocalization.GetText(TitleID,this.LanguageID),
|
|
511
|
+
Text:"--.--",
|
|
512
|
+
Color:this.TitleColor
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
if (!IFrameSplitOperator.IsNumber(price) || !IFrameSplitOperator.IsNumber(yClose)) return item;
|
|
516
|
+
|
|
517
|
+
var value=price-yClose;
|
|
518
|
+
item.Text=`${value.toFixed(defaultfloatPrecision)}`;
|
|
519
|
+
item.Color=this.GetColor(value,0);
|
|
520
|
+
|
|
521
|
+
return item;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
this.FormatAmplitude=function(high, low, yClose, TitleID)
|
|
525
|
+
{
|
|
526
|
+
//涨幅
|
|
527
|
+
var item=
|
|
528
|
+
{
|
|
529
|
+
Title:g_JSChartLocalization.GetText(TitleID,this.LanguageID),
|
|
530
|
+
Text:"--.--",
|
|
531
|
+
Color:this.TitleColor
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
if (!IFrameSplitOperator.IsNumber(high) || !IFrameSplitOperator.IsNumber(low) || !IFrameSplitOperator.IsNumber(yClose)) return item;
|
|
536
|
+
|
|
537
|
+
var value=(high-low)/yClose;
|
|
538
|
+
item.Text=`${(value*100).toFixed(2)}%`;
|
|
539
|
+
item.Color=this.GetColor(value,0);
|
|
540
|
+
|
|
541
|
+
return item;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
this.ForamtDate=function(date, format, TitleID)
|
|
545
|
+
{
|
|
546
|
+
//日期
|
|
547
|
+
var item=
|
|
548
|
+
{
|
|
549
|
+
Title:g_JSChartLocalization.GetText('DialogTooltip-Date',this.LanguageID),
|
|
550
|
+
Text:"----/--/--",
|
|
551
|
+
Color:this.DateTimeColor
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
if (!IFrameSplitOperator.IsNumber(date)) return item;
|
|
555
|
+
|
|
556
|
+
item.Text=IFrameSplitOperator.FormatDateString(date,format);
|
|
557
|
+
|
|
558
|
+
return item;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
this.FormatTime=function(time, period, format, TitleID)
|
|
562
|
+
{
|
|
563
|
+
//时间
|
|
564
|
+
var item=
|
|
565
|
+
{
|
|
566
|
+
Title:g_JSChartLocalization.GetText(TitleID,this.LanguageID),
|
|
567
|
+
Text:'--:--',
|
|
568
|
+
Color:this.DateTimeColor
|
|
569
|
+
};
|
|
570
|
+
|
|
571
|
+
if (!IFrameSplitOperator.IsNumber(time)) return item;
|
|
572
|
+
if (!format)
|
|
573
|
+
{
|
|
574
|
+
format="HH:MM";
|
|
575
|
+
if (ChartData.IsMinutePeriod(period,true)) timeFormat='HH:MM'; // 分钟周期
|
|
576
|
+
else if (ChartData.IsSecondPeriod(period)) timeFormat='HH:MM:SS';
|
|
577
|
+
else if (ChartData.IsMilliSecondPeriod(period)) timeFormat='HH:MM:SS.fff';
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
item.Text=IFrameSplitOperator.FormatTimeString(time,format);
|
|
581
|
+
|
|
582
|
+
return item;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
//换手率 成交量/流通股本
|
|
586
|
+
this.FormatExchange=function(vol, flowCapital, TitleID)
|
|
587
|
+
{
|
|
588
|
+
//换手率
|
|
589
|
+
var item=
|
|
590
|
+
{
|
|
591
|
+
Title:g_JSChartLocalization.GetText(TitleID,this.LanguageID),
|
|
592
|
+
Text:'--.--',
|
|
593
|
+
Color:this.DateTimeColor
|
|
594
|
+
};
|
|
595
|
+
|
|
596
|
+
if (!IFrameSplitOperator.IsNumber(vol) || !IFrameSplitOperator.IsNumber(flowCapital) || flowCapital==0) return item;
|
|
597
|
+
|
|
598
|
+
var value=vol/flowCapital*100;
|
|
599
|
+
item.Text=value.toFixed(2)+'%';
|
|
600
|
+
|
|
601
|
+
return item;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
//持仓
|
|
606
|
+
this.FormatPosition=function(position, TitleID)
|
|
607
|
+
{
|
|
608
|
+
//持仓
|
|
609
|
+
var item=
|
|
610
|
+
{
|
|
611
|
+
Title:g_JSChartLocalization.GetText(TitleID,this.LanguageID),
|
|
612
|
+
Text:'--.--',
|
|
613
|
+
Color:this.PositionColor
|
|
614
|
+
};
|
|
615
|
+
|
|
616
|
+
if (!IFrameSplitOperator.IsNumber(position)) return item;
|
|
617
|
+
|
|
618
|
+
item.Text=position.toFixed(0);
|
|
619
|
+
|
|
620
|
+
return item;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
//结算价
|
|
624
|
+
this.ForamtYClose=function(value, defaultfloatPrecision, TitleID)
|
|
625
|
+
{
|
|
626
|
+
var item=
|
|
627
|
+
{
|
|
628
|
+
Title:g_JSChartLocalization.GetText(TitleID,this.LanguageID),
|
|
629
|
+
Text:'--.--',
|
|
630
|
+
Color:this.DateTimeColor
|
|
631
|
+
};
|
|
632
|
+
|
|
633
|
+
if (!IFrameSplitOperator.IsNumber(value)) return item;
|
|
634
|
+
|
|
635
|
+
item.Text=value.toFixed(defaultfloatPrecision);
|
|
636
|
+
|
|
637
|
+
return item;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
|
|
422
641
|
}
|
|
@@ -55982,7 +55982,7 @@ HQData.RequestMinuteRealtimeData=function(data,callback)
|
|
|
55982
55982
|
|
|
55983
55983
|
//生成随机测试数据
|
|
55984
55984
|
var price=kItem[5];
|
|
55985
|
-
var value=Math.ceil(Math.random()*10)/
|
|
55985
|
+
var value=Math.ceil(Math.random()*10)/5000*price;
|
|
55986
55986
|
var bUp=Math.ceil(Math.random()*10)>=5;
|
|
55987
55987
|
|
|
55988
55988
|
if (bUp) price+=value;
|
|
@@ -56845,6 +56845,8 @@ HQData.Keyboard_RequestSymbolList=function(data, callback)
|
|
|
56845
56845
|
arySymbol.push(symbolItem);
|
|
56846
56846
|
}
|
|
56847
56847
|
|
|
56848
|
+
arySymbol.push( { Symbol:"ICL8.cfe", Name:"中证主连", ShortSymbol:"ICL8", Spell:"ICL8", Type:"期货", TypeName:"期货", Data:{ Symbol:"ICL8.cfe", Type:0 } } );
|
|
56849
|
+
|
|
56848
56850
|
arySymbol.push( { Symbol:"01", Name:"分时成交明细", TypeName:"功能键", Priority:1, Color:"rgb(220,20,60)" , Data:{ PageName:"分时成交明细", Type:2 }} );
|
|
56849
56851
|
arySymbol.push( { Symbol:"02", Name:"分价表", TypeName:"功能键", Priority:1, Color:"rgb(220,20,60)" ,Data:{ PageName:"分价表", Type:2 }} );
|
|
56850
56852
|
arySymbol.push( { Symbol:"06", Name:"自选股", TypeName:"功能键", Priority:1 , Color:"rgb(220,20,60)", Data:{ PageName:"自选股", Type:2 }} );
|
|
@@ -56853,6 +56855,13 @@ HQData.Keyboard_RequestSymbolList=function(data, callback)
|
|
|
56853
56855
|
arySymbol.push( { Symbol:"RSI", Name:"相对强弱指标", TypeName:"指标", Priority:2, Color:"rgb(0,0,255)",Data:{ Index:"RSI", Type:1 }} );
|
|
56854
56856
|
arySymbol.push( { Symbol:"MA", Name:"均线", TypeName:"指标", Priority:2, Color:"rgb(0,0,255)" ,Data:{ Index:"MA", Type:1 } } );
|
|
56855
56857
|
arySymbol.push( { Symbol:"BOLL", Name:"布林线", TypeName:"指标", Priority:2, Color:"rgb(0,0,255)" ,Data:{ Index:"BOLL", Type:1 } } );
|
|
56858
|
+
arySymbol.push( { Symbol:"KDJ", Name:"随机指标", TypeName:"指标", Priority:2, Color:"rgb(0,0,255)" ,Data:{ Index:"KDJ", Type:1 } } );
|
|
56859
|
+
arySymbol.push( { Symbol:"SKDJ", Name:"慢速随机指标", TypeName:"指标", Priority:2, Color:"rgb(0,0,255)" ,Data:{ Index:"SKDJ", Type:1 } } );
|
|
56860
|
+
arySymbol.push( { Symbol:"KD", Name:"随机指标KD", TypeName:"指标", Priority:2, Color:"rgb(0,0,255)" ,Data:{ Index:"KD", Type:1 } } );
|
|
56861
|
+
arySymbol.push( { Symbol:"MARSI", Name:"相对强弱平均线", TypeName:"指标", Priority:2, Color:"rgb(0,0,255)" ,Data:{ Index:"MARSI", Type:1 } } );
|
|
56862
|
+
arySymbol.push( { Symbol:"VMACD", Name:"量平滑异同平均", TypeName:"指标", Priority:2, Color:"rgb(0,0,255)" ,Data:{ Index:"VMACD", Type:1 } } );
|
|
56863
|
+
arySymbol.push( { Symbol:"AMO", Name:"成交金额", TypeName:"指标", Priority:2, Color:"rgb(0,0,255)" ,Data:{ Index:"AMO", Type:1 } } );
|
|
56864
|
+
arySymbol.push( { Symbol:"SQJZ", Name:"神奇九转", TypeName:"指标", Priority:2, Color:"rgb(0,0,255)" ,Data:{ Index:"SQJZ", Type:1 } } );
|
|
56856
56865
|
|
|
56857
56866
|
callback(arySymbol);
|
|
56858
56867
|
}
|
|
@@ -56935,6 +56944,9 @@ HQData.GetDayKLineDataBySymbol=function(symbol)
|
|
|
56935
56944
|
case "399006.sz":
|
|
56936
56945
|
data=SZ_399006_DAY_KLINE;
|
|
56937
56946
|
break;
|
|
56947
|
+
case "ICL8.cfe":
|
|
56948
|
+
data=CFE_ICL8_DAY_KLINE;
|
|
56949
|
+
break;
|
|
56938
56950
|
default:
|
|
56939
56951
|
data=SZ_000001_DAY_KLINE;
|
|
56940
56952
|
break;
|
|
@@ -20889,6 +20889,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
20889
20889
|
if (varItem.UpColor) chart.UpColor=varItem.UpColor;
|
|
20890
20890
|
if (varItem.DownColor) chart.DownColor=varItem.DownColor;
|
|
20891
20891
|
if (IFrameSplitOperator.IsNumber(varItem.StickType)) chart.BarType=varItem.StickType;
|
|
20892
|
+
if (IFrameSplitOperator.IsNumber(varItem.BarColorType)) chart.BarColorType=varItem.BarColorType;
|
|
20892
20893
|
if (varItem.LineWidth)
|
|
20893
20894
|
{
|
|
20894
20895
|
let width=parseInt(varItem.LineWidth.replace("LINETHICK",""));
|
|
@@ -20900,9 +20901,21 @@ function ScriptIndex(name,script,args,option)
|
|
|
20900
20901
|
chart.HistoryData=hisData;
|
|
20901
20902
|
this.ReloadChartResource(hqChart,windowIndex,chart);
|
|
20902
20903
|
|
|
20903
|
-
|
|
20904
|
-
|
|
20905
|
-
|
|
20904
|
+
if (varItem.IsShowTitle===false) //NOTEXT 不绘制标题
|
|
20905
|
+
{
|
|
20906
|
+
|
|
20907
|
+
}
|
|
20908
|
+
else if (IFrameSplitOperator.IsString(varItem.Name) && varItem.Name.indexOf("NOTEXT")==0) //标题中包含NOTEXT不绘制标题
|
|
20909
|
+
{
|
|
20910
|
+
|
|
20911
|
+
}
|
|
20912
|
+
else
|
|
20913
|
+
{
|
|
20914
|
+
var titleData=new DynamicTitleData(chart.Data,varItem.Name,chart.Color);
|
|
20915
|
+
hqChart.TitlePaint[titleIndex].Data[id]=titleData;
|
|
20916
|
+
this.SetTitleData(titleData,chart);
|
|
20917
|
+
}
|
|
20918
|
+
|
|
20906
20919
|
this.SetChartIndexName(chart);
|
|
20907
20920
|
hqChart.ChartPaint.push(chart);
|
|
20908
20921
|
}
|
|
@@ -22848,6 +22861,7 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
22848
22861
|
if (varItem.UpColor) chart.UpColor=varItem.UpColor;
|
|
22849
22862
|
if (varItem.DownColor) chart.DownColor=varItem.DownColor;
|
|
22850
22863
|
if (IFrameSplitOperator.IsNumber(varItem.StickType)) chart.BarType=varItem.StickType;
|
|
22864
|
+
if (IFrameSplitOperator.IsNumber(varItem.BarColorType)) chart.BarColorType=varItem.BarColorType;
|
|
22851
22865
|
if (varItem.LineWidth)
|
|
22852
22866
|
{
|
|
22853
22867
|
let width=parseInt(varItem.LineWidth.replace("LINETHICK",""));
|
|
@@ -24276,6 +24290,8 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
24276
24290
|
if (IFrameSplitOperator.IsBool(item.isDotLine)) outVarItem.IsDotLine = item.isDotLine;
|
|
24277
24291
|
if (IFrameSplitOperator.IsNonEmptyArray(item.lineDash)) outVarItem.LineDash=item.lineDash;
|
|
24278
24292
|
if (IFrameSplitOperator.IsBool(item.isSingleLine)) outVarItem.IsSingleLine=item.isSingleLine;
|
|
24293
|
+
if (IFrameSplitOperator.IsNumber(item.StickType)) outVarItem.StickType=item.StickType;
|
|
24294
|
+
if (IFrameSplitOperator.IsNumber(item.BarColorType)) outVarItem.BarColorType=item.BarColorType;
|
|
24279
24295
|
|
|
24280
24296
|
result.push(outVarItem);
|
|
24281
24297
|
}
|