hqchart 1.1.13928 → 1.1.13933
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.vue.js +38 -29
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +138 -53
- package/src/jscommon/umychart.js +76 -10
- package/src/jscommon/umychart.report.js +102 -1
- package/src/jscommon/umychart.resource/css/tools.css +11 -1
- package/src/jscommon/umychart.style.js +6 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +185 -12
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +317 -59
package/package.json
CHANGED
|
@@ -16,6 +16,7 @@ function JSDialogTooltip()
|
|
|
16
16
|
this.DivDialog=null;
|
|
17
17
|
this.DragTitle=null;
|
|
18
18
|
this.TitleBox=null; //{ DivTitle, DivName, DivName }
|
|
19
|
+
this.Style=0; //0=一行一个, 1=2行一个
|
|
19
20
|
|
|
20
21
|
this.HQChart=null;
|
|
21
22
|
|
|
@@ -42,9 +43,13 @@ function JSDialogTooltip()
|
|
|
42
43
|
this.KItemCache=null;
|
|
43
44
|
this.KItemCacheID=null;
|
|
44
45
|
|
|
45
|
-
this.Inital=function(hqchart)
|
|
46
|
+
this.Inital=function(hqchart, option)
|
|
46
47
|
{
|
|
47
|
-
|
|
48
|
+
this.HQChart=hqchart;
|
|
49
|
+
if (option)
|
|
50
|
+
{
|
|
51
|
+
if (IFrameSplitOperator.IsNumber(option.Style)) this.Style=option.Style;
|
|
52
|
+
}
|
|
48
53
|
}
|
|
49
54
|
|
|
50
55
|
this.Destroy=function()
|
|
@@ -107,36 +112,78 @@ function JSDialogTooltip()
|
|
|
107
112
|
table.appendChild(tbody);
|
|
108
113
|
|
|
109
114
|
this.AryData=[];
|
|
110
|
-
|
|
115
|
+
if (this.Style==1)
|
|
111
116
|
{
|
|
112
|
-
var
|
|
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
|
-
|
|
117
|
+
for(var i=0;i<this.MaxRowCount;++i)
|
|
118
|
+
{
|
|
119
|
+
var rowItem={ Tr:null, TitleSpan:null, TextSpan:null, Tr2:null };
|
|
120
|
+
|
|
121
|
+
var trDom=document.createElement("tr");
|
|
122
|
+
trDom.className='UMyChart_Tooltip_Group_Tr';
|
|
123
|
+
tbody.appendChild(trDom);
|
|
124
|
+
rowItem.Tr=trDom;
|
|
125
|
+
|
|
126
|
+
var tdDom=document.createElement("td");
|
|
127
|
+
tdDom.className="UMyChart_Tooltip_Text_Sinlge_Td"; //标题
|
|
128
|
+
trDom.appendChild(tdDom);
|
|
129
|
+
|
|
130
|
+
var spanDom=document.createElement("span");
|
|
131
|
+
spanDom.className='UMyChart_Tooltip_Title_Left_Span';
|
|
132
|
+
spanDom.innerText='标题';
|
|
133
|
+
tdDom.appendChild(spanDom);
|
|
134
|
+
rowItem.TitleSpan=spanDom;
|
|
135
|
+
|
|
136
|
+
var trDom=document.createElement("tr");
|
|
137
|
+
trDom.className='UMyChart_Tooltip_Group_Tr';
|
|
138
|
+
tbody.appendChild(trDom);
|
|
139
|
+
rowItem.Tr2=trDom;
|
|
140
|
+
|
|
141
|
+
var tdDom=document.createElement("td");
|
|
142
|
+
tdDom.className="UMyChart_Tooltip_Text_Sinlge_Td"; //数值
|
|
143
|
+
trDom.appendChild(tdDom);
|
|
144
|
+
|
|
145
|
+
var spanDom=document.createElement("span");
|
|
146
|
+
spanDom.className='UMyChart_Tooltip_Text_Span';
|
|
147
|
+
spanDom.innerText='数值';
|
|
148
|
+
tdDom.appendChild(spanDom);
|
|
149
|
+
rowItem.TextSpan=spanDom;
|
|
150
|
+
|
|
151
|
+
this.AryData.push(rowItem);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
else
|
|
155
|
+
{
|
|
156
|
+
for(var i=0;i<this.MaxRowCount;++i)
|
|
157
|
+
{
|
|
158
|
+
var rowItem={ Tr:null, TitleSpan:null, TextSpan:null };
|
|
159
|
+
|
|
160
|
+
var trDom=document.createElement("tr");
|
|
161
|
+
trDom.className='UMyChart_Tooltip_Group_Tr';
|
|
162
|
+
tbody.appendChild(trDom);
|
|
163
|
+
rowItem.Tr=trDom;
|
|
164
|
+
|
|
165
|
+
var tdDom=document.createElement("td");
|
|
166
|
+
tdDom.className="UMyChart_Tooltip_Title_Td"; //标题
|
|
167
|
+
trDom.appendChild(tdDom);
|
|
168
|
+
|
|
169
|
+
var spanDom=document.createElement("span");
|
|
170
|
+
spanDom.className='UMyChart_Tooltip_Title_Span';
|
|
171
|
+
spanDom.innerText='标题';
|
|
172
|
+
tdDom.appendChild(spanDom);
|
|
173
|
+
rowItem.TitleSpan=spanDom;
|
|
174
|
+
|
|
175
|
+
var tdDom=document.createElement("td");
|
|
176
|
+
tdDom.className="UMyChart_Tooltip_Text_Td"; //数值
|
|
177
|
+
trDom.appendChild(tdDom);
|
|
178
|
+
|
|
179
|
+
var spanDom=document.createElement("span");
|
|
180
|
+
spanDom.className='UMyChart_Tooltip_Text_Span';
|
|
181
|
+
spanDom.innerText='数值';
|
|
182
|
+
tdDom.appendChild(spanDom);
|
|
183
|
+
rowItem.TextSpan=spanDom;
|
|
184
|
+
|
|
185
|
+
this.AryData.push(rowItem);
|
|
186
|
+
}
|
|
140
187
|
}
|
|
141
188
|
|
|
142
189
|
|
|
@@ -213,12 +260,14 @@ function JSDialogTooltip()
|
|
|
213
260
|
item.TextSpan.innerText=outItem.Text;
|
|
214
261
|
item.TextSpan.style.color=outItem.Color;
|
|
215
262
|
item.Tr.style.display="";
|
|
263
|
+
if (item.Tr2) item.Tr2.style.display="";
|
|
216
264
|
}
|
|
217
265
|
|
|
218
266
|
for( ; index<this.MaxRowCount; ++index)
|
|
219
267
|
{
|
|
220
268
|
var item=this.AryData[index];
|
|
221
269
|
item.Tr.style.display="none";
|
|
270
|
+
if (item.Tr2) item.Tr2.style.display="none";
|
|
222
271
|
}
|
|
223
272
|
}
|
|
224
273
|
|
|
@@ -300,6 +349,9 @@ function JSDialogTooltip()
|
|
|
300
349
|
{
|
|
301
350
|
var defaultfloatPrecision=GetfloatPrecision(this.HQChart.Symbol);//价格小数位数
|
|
302
351
|
var upperSymbol=this.HQChart.Symbol.toUpperCase();
|
|
352
|
+
var priceFormat=0;
|
|
353
|
+
if (this.Style==1) priceFormat=1;
|
|
354
|
+
|
|
303
355
|
//日期
|
|
304
356
|
var dateItem=this.ForamtDate(data.Date,"YYYY/MM/DD/W",'DialogTooltip-Date' );
|
|
305
357
|
|
|
@@ -310,18 +362,29 @@ function JSDialogTooltip()
|
|
|
310
362
|
var yClose=data.YClose; //昨收价|昨结算价
|
|
311
363
|
var aryText=
|
|
312
364
|
[
|
|
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'),
|
|
365
|
+
this.ForamtPrice(data.Open,yClose, defaultfloatPrecision,'DialogTooltip-Open',priceFormat),
|
|
366
|
+
this.ForamtPrice(data.High,yClose, defaultfloatPrecision,'DialogTooltip-High',priceFormat),
|
|
367
|
+
this.ForamtPrice(data.Low,yClose, defaultfloatPrecision,'DialogTooltip-Low',priceFormat),
|
|
368
|
+
this.ForamtPrice(data.Close,yClose, defaultfloatPrecision,'DialogTooltip-Close',priceFormat),
|
|
317
369
|
this.FormatVol(data.Vol,'DialogTooltip-Vol' ),
|
|
318
370
|
this.FormatAmount(data.Amount,'DialogTooltip-Amount' ),
|
|
319
|
-
this.FormatIncrease(data.Close,yClose,'DialogTooltip-Increase'),
|
|
320
|
-
this.FormatAmplitude(data.High,data.Low,yClose,'DialogTooltip-Amplitude'),
|
|
371
|
+
this.FormatIncrease(data.Close,yClose,defaultfloatPrecision,'DialogTooltip-Increase',priceFormat),
|
|
372
|
+
this.FormatAmplitude(data.High,data.Low,yClose,defaultfloatPrecision,'DialogTooltip-Amplitude',priceFormat),
|
|
321
373
|
];
|
|
322
374
|
|
|
323
|
-
if (
|
|
324
|
-
|
|
375
|
+
if (this.Style==1)
|
|
376
|
+
{
|
|
377
|
+
if (timeItem) aryText.unshift(timeItem);
|
|
378
|
+
var dateItem=this.ForamtDate(data.Date,"YYYY/MM/DD",'DialogTooltip-Date' );
|
|
379
|
+
aryText.unshift(dateItem);
|
|
380
|
+
}
|
|
381
|
+
else
|
|
382
|
+
{
|
|
383
|
+
if (timeItem) aryText.unshift(timeItem);
|
|
384
|
+
aryText.unshift(dateItem);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
|
|
325
388
|
|
|
326
389
|
//换手率
|
|
327
390
|
if (MARKET_SUFFIX_NAME.IsSHSZStockA(upperSymbol) && data.FlowCapital>0)
|
|
@@ -349,7 +412,6 @@ function JSDialogTooltip()
|
|
|
349
412
|
this.GetFormatMinuteTooltipText=function(data)
|
|
350
413
|
{
|
|
351
414
|
var defaultfloatPrecision=GetfloatPrecision(this.HQChart.Symbol);//价格小数位数
|
|
352
|
-
|
|
353
415
|
var aryText=[];
|
|
354
416
|
if (data.Type==0) //连续交易
|
|
355
417
|
{
|
|
@@ -358,11 +420,11 @@ function JSDialogTooltip()
|
|
|
358
420
|
|
|
359
421
|
aryText=
|
|
360
422
|
[
|
|
361
|
-
this.ForamtDate(item.Date,"YYYY/MM/DD/W",'DialogTooltip-Date' ),
|
|
423
|
+
this.ForamtDate(item.Date,this.Style==1?"YYYY/MM/DD":"YYYY/MM/DD/W",'DialogTooltip-Date' ),
|
|
362
424
|
this.FormatTime(item.Time, null, "HH:MM", 'DialogTooltip-Time'),
|
|
363
|
-
this.ForamtPrice(item.Close,item.YClose, defaultfloatPrecision,'DialogTooltip-Price'),
|
|
425
|
+
this.ForamtPrice(item.Close,item.YClose, defaultfloatPrecision,'DialogTooltip-Price', 1),
|
|
364
426
|
this.FormatRisefall(item.Close,item.YClose, defaultfloatPrecision,'DialogTooltip-Risefall'),
|
|
365
|
-
this.FormatIncrease(item.Close,item.YClose,'DialogTooltip-Increase'),
|
|
427
|
+
this.FormatIncrease(item.Close,item.YClose,defaultfloatPrecision,'DialogTooltip-Increase', 1),
|
|
366
428
|
this.FormatVol(item.Vol,'DialogTooltip-Vol' ),
|
|
367
429
|
this.FormatAmount(item.Amount,'DialogTooltip-Amount' ),
|
|
368
430
|
];
|
|
@@ -376,10 +438,10 @@ function JSDialogTooltip()
|
|
|
376
438
|
if (item.Ver===1) timeForamt="HH:MM"
|
|
377
439
|
aryText=
|
|
378
440
|
[
|
|
379
|
-
this.ForamtDate(item.Date,"YYYY/MM/DD/W",'DialogTooltip-Date' ),
|
|
441
|
+
this.ForamtDate(item.Date,this.Style==1?"YYYY/MM/DD":"YYYY/MM/DD/W",'DialogTooltip-Date' ),
|
|
380
442
|
this.FormatTime(item.Time, null, timeForamt, 'DialogTooltip-Time'),
|
|
381
|
-
this.ForamtPrice(item.Price,item.YClose, defaultfloatPrecision,'DialogTooltip-AC-Price'),
|
|
382
|
-
this.FormatIncrease(item.Price,item.YClose,'DialogTooltip-AC-Increase'),
|
|
443
|
+
this.ForamtPrice(item.Price,item.YClose, defaultfloatPrecision,'DialogTooltip-AC-Price',1),
|
|
444
|
+
this.FormatIncrease(item.Price,item.YClose,defaultfloatPrecision,'DialogTooltip-AC-Increase',1),
|
|
383
445
|
this.FormatVol(item.Vol[0],'DialogTooltip-AC-Vol' ),
|
|
384
446
|
];
|
|
385
447
|
}
|
|
@@ -449,7 +511,7 @@ function JSDialogTooltip()
|
|
|
449
511
|
|
|
450
512
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
451
513
|
//数据格式化
|
|
452
|
-
this.ForamtPrice=function(price, yClose, defaultfloatPrecision, TitleID)
|
|
514
|
+
this.ForamtPrice=function(price, yClose, defaultfloatPrecision, TitleID, format)
|
|
453
515
|
{
|
|
454
516
|
var item=
|
|
455
517
|
{
|
|
@@ -460,7 +522,17 @@ function JSDialogTooltip()
|
|
|
460
522
|
|
|
461
523
|
if (!IFrameSplitOperator.IsNumber(price)) return item;
|
|
462
524
|
|
|
463
|
-
|
|
525
|
+
if (IFrameSplitOperator.IsNumber(yClose) && format!=1)
|
|
526
|
+
{
|
|
527
|
+
var value=(price-yClose)/yClose*100;
|
|
528
|
+
item.Text=`${price.toFixed(defaultfloatPrecision)}(${value.toFixed(2)}%)`;
|
|
529
|
+
}
|
|
530
|
+
else
|
|
531
|
+
{
|
|
532
|
+
item.Text=price.toFixed(defaultfloatPrecision);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
|
|
464
536
|
item.Color=this.GetColor(price, yClose);
|
|
465
537
|
|
|
466
538
|
return item;
|
|
@@ -498,7 +570,7 @@ function JSDialogTooltip()
|
|
|
498
570
|
return item;
|
|
499
571
|
}
|
|
500
572
|
|
|
501
|
-
this.FormatIncrease=function(price, yClose, TitleID)
|
|
573
|
+
this.FormatIncrease=function(price, yClose, defaultfloatPrecision, TitleID, fromat)
|
|
502
574
|
{
|
|
503
575
|
//涨幅
|
|
504
576
|
var item=
|
|
@@ -510,8 +582,19 @@ function JSDialogTooltip()
|
|
|
510
582
|
|
|
511
583
|
if (!IFrameSplitOperator.IsNumber(price) || !IFrameSplitOperator.IsNumber(yClose)) return item;
|
|
512
584
|
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
var diffValue=price-yClose;
|
|
513
588
|
var value=(price-yClose)/yClose;
|
|
514
|
-
|
|
589
|
+
if (fromat==1)
|
|
590
|
+
{
|
|
591
|
+
item.Text=`${(value*100).toFixed(2)}%`;
|
|
592
|
+
}
|
|
593
|
+
else
|
|
594
|
+
{
|
|
595
|
+
item.Text=`${diffValue.toFixed(defaultfloatPrecision)}(${(value*100).toFixed(2)}%)`;
|
|
596
|
+
}
|
|
597
|
+
|
|
515
598
|
item.Color=this.GetColor(value,0);
|
|
516
599
|
|
|
517
600
|
return item;
|
|
@@ -536,9 +619,9 @@ function JSDialogTooltip()
|
|
|
536
619
|
return item;
|
|
537
620
|
}
|
|
538
621
|
|
|
539
|
-
this.FormatAmplitude=function(high, low, yClose, TitleID)
|
|
622
|
+
this.FormatAmplitude=function(high, low, yClose, defaultfloatPrecision, TitleID, fromat)
|
|
540
623
|
{
|
|
541
|
-
|
|
624
|
+
//振幅
|
|
542
625
|
var item=
|
|
543
626
|
{
|
|
544
627
|
Title:g_JSChartLocalization.GetText(TitleID,this.LanguageID),
|
|
@@ -549,8 +632,10 @@ function JSDialogTooltip()
|
|
|
549
632
|
|
|
550
633
|
if (!IFrameSplitOperator.IsNumber(high) || !IFrameSplitOperator.IsNumber(low) || !IFrameSplitOperator.IsNumber(yClose)) return item;
|
|
551
634
|
|
|
635
|
+
var diffValue=high-low;
|
|
552
636
|
var value=(high-low)/yClose;
|
|
553
|
-
item.Text=`${(value*100).toFixed(2)}%`;
|
|
637
|
+
if (fromat==1) item.Text=`${(value*100).toFixed(2)}%`;
|
|
638
|
+
else item.Text=`${diffValue.toFixed(defaultfloatPrecision)}(${(value*100).toFixed(2)}%)`;
|
|
554
639
|
item.Color=this.GetColor(value,0);
|
|
555
640
|
|
|
556
641
|
return item;
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -1721,7 +1721,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
1721
1721
|
if (option.EnableModifyDrawDialogV2===true) chart.InitalModifyDrawDialog();
|
|
1722
1722
|
|
|
1723
1723
|
//K线tooltip
|
|
1724
|
-
if (option.
|
|
1724
|
+
if (option.TooltipDialog && option.TooltipDialog.Enable)
|
|
1725
|
+
chart.InitalTooltipDialog(option.TooltipDialog);
|
|
1725
1726
|
|
|
1726
1727
|
//注册事件
|
|
1727
1728
|
if (option.EventCallback)
|
|
@@ -2803,6 +2804,8 @@ var JSCHART_MENU_ID=
|
|
|
2803
2804
|
CMD_REPORT_COLUMN_DEL_ID:62, //报价列表 删除列
|
|
2804
2805
|
CMD_REPORT_COLUMN_MOVE_ID:63, //报价列表 列移动
|
|
2805
2806
|
CMD_REPORT_COLUMN_FILTER_ID:64, //报价列表 筛选
|
|
2807
|
+
|
|
2808
|
+
CMD_DIALOG_TOOLTIP_ATTRIBUTE:65, //修改K线信息框属性 Ary:[{ Enable:, Style:}, ]
|
|
2806
2809
|
}
|
|
2807
2810
|
|
|
2808
2811
|
|
|
@@ -3051,12 +3054,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3051
3054
|
this.DialogDrawTool.Create();
|
|
3052
3055
|
}
|
|
3053
3056
|
|
|
3054
|
-
this.InitalTooltipDialog=function()
|
|
3057
|
+
this.InitalTooltipDialog=function(option)
|
|
3055
3058
|
{
|
|
3056
3059
|
if (this.DialogTooltip) return;
|
|
3057
3060
|
|
|
3058
3061
|
this.DialogTooltip=new JSDialogTooltip();
|
|
3059
|
-
this.DialogTooltip.Inital(this);
|
|
3062
|
+
this.DialogTooltip.Inital(this, option);
|
|
3060
3063
|
this.DialogTooltip.Create();
|
|
3061
3064
|
}
|
|
3062
3065
|
|
|
@@ -3130,6 +3133,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3130
3133
|
this.DialogTooltip.Close();
|
|
3131
3134
|
}
|
|
3132
3135
|
|
|
3136
|
+
this.DestroyTooltipDialog=function()
|
|
3137
|
+
{
|
|
3138
|
+
if (!this.DialogTooltip) return;
|
|
3139
|
+
|
|
3140
|
+
this.DialogTooltip.Destroy();
|
|
3141
|
+
this.DialogTooltip=null;
|
|
3142
|
+
}
|
|
3143
|
+
|
|
3133
3144
|
|
|
3134
3145
|
|
|
3135
3146
|
//obj={ Element:, Canvas: }
|
|
@@ -3181,12 +3192,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3181
3192
|
{
|
|
3182
3193
|
this.IsDestroy=true;
|
|
3183
3194
|
this.StopAutoUpdate();
|
|
3184
|
-
|
|
3185
|
-
if (this.DialogTooltip)
|
|
3186
|
-
{
|
|
3187
|
-
this.DialogTooltip.Destroy();
|
|
3188
|
-
this.DialogTooltip=null;
|
|
3189
|
-
}
|
|
3195
|
+
this.DestroyTooltipDialog();
|
|
3190
3196
|
}
|
|
3191
3197
|
|
|
3192
3198
|
this.ChartDestory=this.ChartDestroy; //老版本写错了,需要兼容下
|
|
@@ -9763,6 +9769,20 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9763
9769
|
klineChart.InfoPosition=param;
|
|
9764
9770
|
this.Draw();
|
|
9765
9771
|
break;
|
|
9772
|
+
case JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE:
|
|
9773
|
+
if (!aryArgs[0]) return false;
|
|
9774
|
+
var option=aryArgs[0];
|
|
9775
|
+
if (!IFrameSplitOperator.IsBool(option.Enable)) return false;
|
|
9776
|
+
if (option.Enable===false)
|
|
9777
|
+
{
|
|
9778
|
+
this.DestroyTooltipDialog();
|
|
9779
|
+
}
|
|
9780
|
+
else
|
|
9781
|
+
{
|
|
9782
|
+
this.DestroyTooltipDialog();
|
|
9783
|
+
this.InitalTooltipDialog(option);
|
|
9784
|
+
}
|
|
9785
|
+
break;
|
|
9766
9786
|
}
|
|
9767
9787
|
}
|
|
9768
9788
|
|
|
@@ -69514,7 +69534,8 @@ function JSChartResource()
|
|
|
69514
69534
|
Font:{ Size:15, Name:"微软雅黑"},
|
|
69515
69535
|
BarMergin:{ Top:2, Left:3, Right:3, Bottom:2 },//单元格字体
|
|
69516
69536
|
NameFont:{ Size:14, Name:"微软雅黑" },
|
|
69517
|
-
SymbolFont:{ Size:12, Name:"微软雅黑" }
|
|
69537
|
+
SymbolFont:{ Size:12, Name:"微软雅黑" },
|
|
69538
|
+
|
|
69518
69539
|
},
|
|
69519
69540
|
|
|
69520
69541
|
//固定行
|
|
@@ -69529,6 +69550,13 @@ function JSChartResource()
|
|
|
69529
69550
|
Mergin:{ Top:1, Bottom:1,Left:0, Right:0 },
|
|
69530
69551
|
},
|
|
69531
69552
|
|
|
69553
|
+
|
|
69554
|
+
NameSymbolV2:
|
|
69555
|
+
{
|
|
69556
|
+
Name:{ Size:14, Name:"微软雅黑", Color: "rgb(60,60,60)"},
|
|
69557
|
+
Symbol:{ Size:10, Name:"微软雅黑", Color: "rgb(105 105 105)"},
|
|
69558
|
+
},
|
|
69559
|
+
|
|
69532
69560
|
//涨停 跌停背景色
|
|
69533
69561
|
LimitColor:
|
|
69534
69562
|
{
|
|
@@ -70685,6 +70713,26 @@ function JSChartResource()
|
|
|
70685
70713
|
}
|
|
70686
70714
|
}
|
|
70687
70715
|
|
|
70716
|
+
if (item.NameSymbolV2)
|
|
70717
|
+
{
|
|
70718
|
+
var nameSymbol=item.NameSymbolV2;
|
|
70719
|
+
if (nameSymbol.Name)
|
|
70720
|
+
{
|
|
70721
|
+
var subItem=nameSymbol.Name;
|
|
70722
|
+
if (IFrameSplitOperator.IsNumber(subItem.Size)) this.Report.NameSymbolV2.Name.Size=subItem.Size;
|
|
70723
|
+
if (subItem.Name) this.Report.NameSymbolV2.Name.Name=subItem.Name;
|
|
70724
|
+
if (subItem.Color) this.Report.NameSymbolV2.Name.Color=subItem.Color;
|
|
70725
|
+
}
|
|
70726
|
+
|
|
70727
|
+
if (nameSymbol.Symbol)
|
|
70728
|
+
{
|
|
70729
|
+
var subItem=nameSymbol.Symbol;
|
|
70730
|
+
if (IFrameSplitOperator.IsNumber(subItem.Size)) this.Report.NameSymbolV2.Symbol.Size=subItem.Size;
|
|
70731
|
+
if (subItem.Name) this.Report.NameSymbolV2.Symbol.Name=subItem.Name;
|
|
70732
|
+
if (subItem.Color) this.Report.NameSymbolV2.Symbol.Color=subItem.Color;
|
|
70733
|
+
}
|
|
70734
|
+
}
|
|
70735
|
+
|
|
70688
70736
|
if (item.Tab)
|
|
70689
70737
|
{
|
|
70690
70738
|
var tab=item.Tab;
|
|
@@ -77708,6 +77756,15 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77708
77756
|
{ Name:"样式2", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[1]}, Checked:1==this.ChartDragSelectRect.ShowMode },
|
|
77709
77757
|
{ Name:"样式3", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[2]}, Checked:2==this.ChartDragSelectRect.ShowMode },
|
|
77710
77758
|
]
|
|
77759
|
+
},
|
|
77760
|
+
{
|
|
77761
|
+
Name:"K线浮动框",
|
|
77762
|
+
SubMenu:
|
|
77763
|
+
[
|
|
77764
|
+
{ Name:"禁用", Data:{ ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE, Args:[{Enable:false}]}, Checked:!this.DialogTooltip },
|
|
77765
|
+
{ Name:"样式1", Data:{ ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE, Args:[{Enable:true, Style:0}]}, Checked:(this.DialogTooltip && this.DialogTooltip.Style===0) },
|
|
77766
|
+
{ Name:"样式2", Data:{ ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE, Args:[{Enable:true, Style:1}]}, Checked:(this.DialogTooltip && this.DialogTooltip.Style===1) },
|
|
77767
|
+
]
|
|
77711
77768
|
}
|
|
77712
77769
|
]
|
|
77713
77770
|
}
|
|
@@ -81380,6 +81437,15 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
81380
81437
|
]
|
|
81381
81438
|
},
|
|
81382
81439
|
|
|
81440
|
+
{
|
|
81441
|
+
Name:"K线浮动框",
|
|
81442
|
+
SubMenu:
|
|
81443
|
+
[
|
|
81444
|
+
{ Name:"禁用", Data:{ ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE, Args:[{Enable:false}]}, Checked:!this.DialogTooltip },
|
|
81445
|
+
{ Name:"样式1", Data:{ ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE, Args:[{Enable:true, Style:0}]}, Checked:(this.DialogTooltip && this.DialogTooltip.Style===0) },
|
|
81446
|
+
{ Name:"样式2", Data:{ ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE, Args:[{Enable:true, Style:1}]}, Checked:(this.DialogTooltip && this.DialogTooltip.Style===1) },
|
|
81447
|
+
]
|
|
81448
|
+
}
|
|
81383
81449
|
|
|
81384
81450
|
]
|
|
81385
81451
|
}
|
|
@@ -3968,7 +3968,8 @@ var REPORT_COLUMN_ID=
|
|
|
3968
3968
|
RISING_SPEED_10M_ID:63,
|
|
3969
3969
|
RISING_SPEED_15M_ID:64,
|
|
3970
3970
|
|
|
3971
|
-
|
|
3971
|
+
SYMBOL_NAME_V2_ID:98, //单行
|
|
3972
|
+
SYMBOL_NAME_ID:99, //两行
|
|
3972
3973
|
|
|
3973
3974
|
CUSTOM_STRING_TEXT_ID:100, //自定义字符串文本
|
|
3974
3975
|
CUSTOM_NUMBER_TEXT_ID:101, //自定义数值型
|
|
@@ -4169,6 +4170,9 @@ function ChartReport()
|
|
|
4169
4170
|
this.ItemSymbolFontConfig={Size:g_JSChartResource.Report.Item.SymbolFont.Size, Name:g_JSChartResource.Report.Item.SymbolFont.Name};
|
|
4170
4171
|
this.ItemNameFontConfg={Size:g_JSChartResource.Report.Item.NameFont.Size, Name:g_JSChartResource.Report.Item.NameFont.Name};
|
|
4171
4172
|
|
|
4173
|
+
//名称+代码
|
|
4174
|
+
this.NameSymbolV2Config=CloneData(g_JSChartResource.Report.NameSymbolV2);
|
|
4175
|
+
|
|
4172
4176
|
//缓存
|
|
4173
4177
|
this.HeaderFont=12*GetDevicePixelRatio() +"px 微软雅黑";
|
|
4174
4178
|
this.SortFont=null,
|
|
@@ -4177,6 +4181,7 @@ function ChartReport()
|
|
|
4177
4181
|
this.ItemSymbolFont=12*GetDevicePixelRatio() +"px 微软雅黑";
|
|
4178
4182
|
this.ItemNameFont=15*GetDevicePixelRatio() +"px 微软雅黑";
|
|
4179
4183
|
this.ItemNameHeight=0;
|
|
4184
|
+
this.NameSymbolFont={ Symbol:null, Name:null };
|
|
4180
4185
|
this.RowCount=0; //一屏显示行数
|
|
4181
4186
|
this.HeaderHeight=0; //表头高度
|
|
4182
4187
|
this.FixedRowHeight=0; //固定行高度
|
|
@@ -4321,6 +4326,8 @@ function ChartReport()
|
|
|
4321
4326
|
if (item.TextColor) colItem.TextColor=item.TextColor;
|
|
4322
4327
|
if (item.HeaderColor) colItem.HeaderColor=item.HeaderColor;
|
|
4323
4328
|
if (item.MaxText) colItem.MaxText=item.MaxText;
|
|
4329
|
+
if (item.MaxText2) colItem.MaxText=item.MaxText2;
|
|
4330
|
+
if (IFrameSplitOperator.IsNumber(item.Space)) colItem.Space=item.Space;
|
|
4324
4331
|
if (item.ID) colItem.ID=item.ID;
|
|
4325
4332
|
if (item.FullColBGColor) colItem.FullColBGColor=item.FullColBGColor; //整列背景色
|
|
4326
4333
|
if (item.HeaderBGColor) colItem.HeaderBGColor=item.HeaderBGColor; //表头背景色
|
|
@@ -4481,6 +4488,7 @@ function ChartReport()
|
|
|
4481
4488
|
{ Type:REPORT_COLUMN_ID.NAME_ID, Title:"名称", TextAlign:"left", Width:null, TextColor:g_JSChartResource.Report.FieldColor.Name, MaxText:"擎擎擎擎0" },
|
|
4482
4489
|
{ Type:REPORT_COLUMN_ID.NAME_EX_ID, Title:"名称", TextAlign:"left", Width:null, TextColor:g_JSChartResource.Report.FieldColor.Name, MaxText:"擎擎擎擎擎擎" },
|
|
4483
4490
|
{ Type:REPORT_COLUMN_ID.SYMBOL_NAME_ID, Title:"股票名称", TextAlign:"left", Width:null, TextColor:g_JSChartResource.Report.FieldColor.Name, MaxText:"擎擎擎擎0"},
|
|
4491
|
+
{ Type:REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID, Title:"名称/代码", TextAlign:"left", Width:null, TextColor:g_JSChartResource.Report.NameSymbolV2.Name.Color, MaxText:"擎擎擎擎*", MaxText2:"999999", Space:5, TextColor2:g_JSChartResource.Report.NameSymbolV2.Symbol.Color },
|
|
4484
4492
|
|
|
4485
4493
|
{ Type:REPORT_COLUMN_ID.INCREASE_ID, Title:"涨幅%", TextAlign:"right", Width:null, MaxText:"-888.88" },
|
|
4486
4494
|
{ Type:REPORT_COLUMN_ID.PRICE_ID, Title:"现价", TextAlign:"right", Width:null, MaxText:"88888.88" },
|
|
@@ -4674,6 +4682,9 @@ function ChartReport()
|
|
|
4674
4682
|
this.ItemSymbolFont=`${this.ItemSymbolFontConfig.Size*pixelRatio}px ${ this.ItemSymbolFontConfig.Name}`;
|
|
4675
4683
|
this.ItemNameFont=`${this.ItemNameFontConfg.Size*pixelRatio}px ${ this.ItemNameFontConfg.Name}`;
|
|
4676
4684
|
|
|
4685
|
+
this.NameSymbolFont.Symbol=`${this.NameSymbolV2Config.Symbol.Size*pixelRatio}px ${this.NameSymbolV2Config.Symbol.Name}`;
|
|
4686
|
+
this.NameSymbolFont.Name=`${this.ItemSymbolFontConfig.Name.Size*pixelRatio}px ${this.NameSymbolV2Config.Name.Name}`;
|
|
4687
|
+
|
|
4677
4688
|
this.RowHeight=this.GetFontHeight(this.ItemFont,"擎")+ this.ItemMergin.Top+ this.ItemMergin.Bottom;
|
|
4678
4689
|
this.FixedRowHeight=this.GetFontHeight(this.ItemFixedFont,"擎")+ this.ItemMergin.Top+ this.ItemMergin.Bottom;
|
|
4679
4690
|
this.SortFont=`${this.SortConfig.Size*pixelRatio}px ${ this.SortConfig.Family}`;
|
|
@@ -4703,6 +4714,25 @@ function ChartReport()
|
|
|
4703
4714
|
if (rowHeight>this.RowHeight) this.RowHeight=rowHeight;
|
|
4704
4715
|
if (rowHeight>this.FixedRowHeight) this.FixedRowHeight=rowHeight;
|
|
4705
4716
|
}
|
|
4717
|
+
else if (item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID) //单行显示
|
|
4718
|
+
{
|
|
4719
|
+
this.Canvas.font==this.NameSymbolFont.Name;
|
|
4720
|
+
var nameWidth=this.Canvas.measureText(item.MaxText).width;
|
|
4721
|
+
var nameHeight=this.GetFontHeight(this.ItemNameFont,"擎");
|
|
4722
|
+
|
|
4723
|
+
|
|
4724
|
+
this.Canvas.font==this.NameSymbolFont.Symbol;
|
|
4725
|
+
var symbolWidth=this.Canvas.measureText(item.MaxText2).width;
|
|
4726
|
+
var symboHeight=this.GetFontHeight(this.ItemSymbolFont,"擎");
|
|
4727
|
+
|
|
4728
|
+
this.ItemNameHeight=Math.abs(nameHeight,symboHeight);
|
|
4729
|
+
|
|
4730
|
+
var space=2;
|
|
4731
|
+
if (IFrameSplitOperator.IsNumber(item.Space)) space=item.Space;
|
|
4732
|
+
itemWidth=nameWidth+symbolWidth+space;
|
|
4733
|
+
|
|
4734
|
+
item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;
|
|
4735
|
+
}
|
|
4706
4736
|
else
|
|
4707
4737
|
{
|
|
4708
4738
|
if (IFrameSplitOperator.IsNumber(item.FixedWidth)) itemWidth=item.FixedWidth;
|
|
@@ -5297,6 +5327,11 @@ function ChartReport()
|
|
|
5297
5327
|
|
|
5298
5328
|
this.FormatDrawInfo(column, stock, drawInfo, data);
|
|
5299
5329
|
}
|
|
5330
|
+
else if (column.Type==REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID)
|
|
5331
|
+
{
|
|
5332
|
+
this.DrawSymbolNameV2(data, column, left, top, rowType);
|
|
5333
|
+
this.FormatDrawInfo(column, stock, drawInfo, data);
|
|
5334
|
+
}
|
|
5300
5335
|
else if (column.Type==REPORT_COLUMN_ID.NAME_ID)
|
|
5301
5336
|
{
|
|
5302
5337
|
if (stock && stock.Name)
|
|
@@ -5747,6 +5782,72 @@ function ChartReport()
|
|
|
5747
5782
|
this.Canvas.font=this.ItemFont; //还原字体
|
|
5748
5783
|
}
|
|
5749
5784
|
|
|
5785
|
+
this.DrawSymbolNameV2=function(data, column, left, top, rowType)
|
|
5786
|
+
{
|
|
5787
|
+
var stock=data.Stock;
|
|
5788
|
+
var symbol=data.Symbol;
|
|
5789
|
+
var name;
|
|
5790
|
+
if (stock)
|
|
5791
|
+
{
|
|
5792
|
+
symbol=stock.Symbol;
|
|
5793
|
+
name=stock.Name;
|
|
5794
|
+
}
|
|
5795
|
+
|
|
5796
|
+
if (!symbol && !name) return;
|
|
5797
|
+
|
|
5798
|
+
var y=top+this.ItemMergin.Top+this.ItemNameHeight;
|
|
5799
|
+
var textLeft=left+this.ItemMergin.Left;
|
|
5800
|
+
var x=textLeft;
|
|
5801
|
+
var width=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;
|
|
5802
|
+
var textAlign=column.TextAlign;
|
|
5803
|
+
if (textAlign=='center')
|
|
5804
|
+
{
|
|
5805
|
+
x=textLeft+width/2;
|
|
5806
|
+
this.Canvas.textAlign="center";
|
|
5807
|
+
}
|
|
5808
|
+
else if (textAlign=='right')
|
|
5809
|
+
{
|
|
5810
|
+
x=textLeft+width-2;
|
|
5811
|
+
this.Canvas.textAlign="right";
|
|
5812
|
+
}
|
|
5813
|
+
else
|
|
5814
|
+
{
|
|
5815
|
+
x+=2;
|
|
5816
|
+
this.Canvas.textAlign="left";
|
|
5817
|
+
}
|
|
5818
|
+
|
|
5819
|
+
this.Canvas.textBaseline="bottom";
|
|
5820
|
+
|
|
5821
|
+
var textColor=column.TextColor;
|
|
5822
|
+
var text=name;
|
|
5823
|
+
if (text)
|
|
5824
|
+
{
|
|
5825
|
+
this.Canvas.fillStyle=textColor;
|
|
5826
|
+
this.Canvas.font=this.NameSymbolFont.Name;
|
|
5827
|
+
text=this.TextEllipsis(text, width, column.MaxText);
|
|
5828
|
+
if (text)
|
|
5829
|
+
{
|
|
5830
|
+
this.Canvas.fillText(text,x,y);
|
|
5831
|
+
var textWidth=this.Canvas.measureText(text).width;
|
|
5832
|
+
var space=2;
|
|
5833
|
+
if (IFrameSplitOperator.IsNumber(column.Space)) space=column.Space;
|
|
5834
|
+
x+=(textWidth+space);
|
|
5835
|
+
}
|
|
5836
|
+
|
|
5837
|
+
}
|
|
5838
|
+
|
|
5839
|
+
var textColor=column.TextColor2;
|
|
5840
|
+
text=symbol;
|
|
5841
|
+
if (text)
|
|
5842
|
+
{
|
|
5843
|
+
this.Canvas.font=this.NameSymbolFont.Symbol;
|
|
5844
|
+
this.Canvas.fillStyle=textColor;
|
|
5845
|
+
this.Canvas.fillText(text,x,y);
|
|
5846
|
+
}
|
|
5847
|
+
|
|
5848
|
+
this.Canvas.font=this.ItemFont; //还原字体
|
|
5849
|
+
}
|
|
5850
|
+
|
|
5750
5851
|
this.DrawLimitPriceBorder=function(value, stock, left, top, itemWidth)
|
|
5751
5852
|
{
|
|
5752
5853
|
if (!IFrameSplitOperator.IsNumber(value) || !stock) return;
|
|
@@ -1685,8 +1685,18 @@ input[type="color"] {
|
|
|
1685
1685
|
float: right;
|
|
1686
1686
|
}
|
|
1687
1687
|
|
|
1688
|
+
.UMyChart_Tooltip_Text_Sinlge_Td
|
|
1689
|
+
{
|
|
1690
|
+
min-width:80px;
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
.UMyChart_Tooltip_Title_Left_Span
|
|
1694
|
+
{
|
|
1695
|
+
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1688
1698
|
.UMyChart_Tooltip_Text_Span
|
|
1689
1699
|
{
|
|
1690
1700
|
float: right;
|
|
1691
|
-
margin-right:
|
|
1701
|
+
margin-right: 1px;
|
|
1692
1702
|
}
|