hqchart 1.1.13921 → 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.NetworkFilterTest.vue.js +2 -2
- package/lib/umychart.vue.js +53 -37
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +166 -66
- package/src/jscommon/umychart.NetworkFilterTest.js +17 -0
- package/src/jscommon/umychart.js +144 -5
- 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.testdata/DayKLine/IFL8.cfe.day.kline.js +8 -0
- package/src/jscommon/umychart.testdata/DayKLine/IFL8.cfe.day.kline.json +1 -0
- package/src/jscommon/umychart.testdata/DayKLine/IML8.cfe.day.kline.js +7 -0
- package/src/jscommon/umychart.testdata/DayKLine/IML8.cfe.day.kline.json +1 -0
- package/src/jscommon/umychart.testdata/M1KLine/ICL8.cfe.minute.kline.js +7 -0
- package/src/jscommon/umychart.testdata/M1KLine/ICL8.cfe.minute.kline.json +1 -0
- package/src/jscommon/umychart.testdata/M1KLine/IFL8.cfe.minute.kline.js +7 -0
- package/src/jscommon/umychart.testdata/M1KLine/IFL8.cfe.minute.kline.json +1 -0
- package/src/jscommon/umychart.testdata/M1KLine/IML8.cfe.minute.kline.js +7 -0
- package/src/jscommon/umychart.testdata/M1KLine/IML8.cfe.minute.kline.json +1 -0
- package/src/jscommon/umychart.testdata.js +17 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +253 -7
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +17 -0
- package/src/jscommon/umychart.vue/umychart.vue.js +413 -67
|
@@ -5690,7 +5690,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5690
5690
|
if (option.EnableModifyDrawDialogV2===true) chart.InitalModifyDrawDialog();
|
|
5691
5691
|
|
|
5692
5692
|
//K线tooltip
|
|
5693
|
-
if (option.
|
|
5693
|
+
if (option.TooltipDialog && option.TooltipDialog.Enable)
|
|
5694
|
+
chart.InitalTooltipDialog(option.TooltipDialog);
|
|
5694
5695
|
|
|
5695
5696
|
//注册事件
|
|
5696
5697
|
if (option.EventCallback)
|
|
@@ -6596,6 +6597,8 @@ var JSCHART_EVENT_ID=
|
|
|
6596
6597
|
ON_CUSTOM_MINUTE_NIGHT_DAY_X_INDEX:156, //日盘夜盘的分界线
|
|
6597
6598
|
ON_CUSTOM_MINUTE_BG:157, //自定义分时图背景颜色
|
|
6598
6599
|
ON_CLICK_HORIZONTAL_LABEL:158, //点击Y轴刻度标签
|
|
6600
|
+
|
|
6601
|
+
ON_FORMAT_DIALOG_TOOLTIP_TEXT:159, //格式化Tooltip对话框显示文字
|
|
6599
6602
|
}
|
|
6600
6603
|
|
|
6601
6604
|
var JSCHART_OPERATOR_ID=
|
|
@@ -6770,6 +6773,8 @@ var JSCHART_MENU_ID=
|
|
|
6770
6773
|
CMD_REPORT_COLUMN_DEL_ID:62, //报价列表 删除列
|
|
6771
6774
|
CMD_REPORT_COLUMN_MOVE_ID:63, //报价列表 列移动
|
|
6772
6775
|
CMD_REPORT_COLUMN_FILTER_ID:64, //报价列表 筛选
|
|
6776
|
+
|
|
6777
|
+
CMD_DIALOG_TOOLTIP_ATTRIBUTE:65, //修改K线信息框属性 Ary:[{ Enable:, Style:}, ]
|
|
6773
6778
|
}
|
|
6774
6779
|
|
|
6775
6780
|
|
|
@@ -7018,12 +7023,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7018
7023
|
this.DialogDrawTool.Create();
|
|
7019
7024
|
}
|
|
7020
7025
|
|
|
7021
|
-
this.InitalTooltipDialog=function()
|
|
7026
|
+
this.InitalTooltipDialog=function(option)
|
|
7022
7027
|
{
|
|
7023
7028
|
if (this.DialogTooltip) return;
|
|
7024
7029
|
|
|
7025
7030
|
this.DialogTooltip=new JSDialogTooltip();
|
|
7026
|
-
this.DialogTooltip.Inital(this);
|
|
7031
|
+
this.DialogTooltip.Inital(this, option);
|
|
7027
7032
|
this.DialogTooltip.Create();
|
|
7028
7033
|
}
|
|
7029
7034
|
|
|
@@ -7097,6 +7102,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7097
7102
|
this.DialogTooltip.Close();
|
|
7098
7103
|
}
|
|
7099
7104
|
|
|
7105
|
+
this.DestroyTooltipDialog=function()
|
|
7106
|
+
{
|
|
7107
|
+
if (!this.DialogTooltip) return;
|
|
7108
|
+
|
|
7109
|
+
this.DialogTooltip.Destroy();
|
|
7110
|
+
this.DialogTooltip=null;
|
|
7111
|
+
}
|
|
7112
|
+
|
|
7100
7113
|
|
|
7101
7114
|
|
|
7102
7115
|
//obj={ Element:, Canvas: }
|
|
@@ -7148,6 +7161,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7148
7161
|
{
|
|
7149
7162
|
this.IsDestroy=true;
|
|
7150
7163
|
this.StopAutoUpdate();
|
|
7164
|
+
this.DestroyTooltipDialog();
|
|
7151
7165
|
}
|
|
7152
7166
|
|
|
7153
7167
|
this.ChartDestory=this.ChartDestroy; //老版本写错了,需要兼容下
|
|
@@ -13724,6 +13738,20 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
13724
13738
|
klineChart.InfoPosition=param;
|
|
13725
13739
|
this.Draw();
|
|
13726
13740
|
break;
|
|
13741
|
+
case JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE:
|
|
13742
|
+
if (!aryArgs[0]) return false;
|
|
13743
|
+
var option=aryArgs[0];
|
|
13744
|
+
if (!IFrameSplitOperator.IsBool(option.Enable)) return false;
|
|
13745
|
+
if (option.Enable===false)
|
|
13746
|
+
{
|
|
13747
|
+
this.DestroyTooltipDialog();
|
|
13748
|
+
}
|
|
13749
|
+
else
|
|
13750
|
+
{
|
|
13751
|
+
this.DestroyTooltipDialog();
|
|
13752
|
+
this.InitalTooltipDialog(option);
|
|
13753
|
+
}
|
|
13754
|
+
break;
|
|
13727
13755
|
}
|
|
13728
13756
|
}
|
|
13729
13757
|
|
|
@@ -14026,6 +14054,71 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
14026
14054
|
}
|
|
14027
14055
|
}
|
|
14028
14056
|
}
|
|
14057
|
+
|
|
14058
|
+
this.UpdateWindowIndexV2=function(aryIndex)
|
|
14059
|
+
{
|
|
14060
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(aryIndex)) return false;
|
|
14061
|
+
|
|
14062
|
+
var aryID=[];
|
|
14063
|
+
for(var i=0;i<this.WindowIndex.length;++i)
|
|
14064
|
+
{
|
|
14065
|
+
var item=this.WindowIndex[i];
|
|
14066
|
+
if (!item) continue;
|
|
14067
|
+
if (!item.ID) continue;
|
|
14068
|
+
|
|
14069
|
+
if (aryIndex.find((element)=>{ return element.ID==item.ID;} ))
|
|
14070
|
+
{
|
|
14071
|
+
aryID.push(i);
|
|
14072
|
+
}
|
|
14073
|
+
}
|
|
14074
|
+
|
|
14075
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(aryID)) return false;
|
|
14076
|
+
|
|
14077
|
+
if (this.IsKLineContainer()) //K线
|
|
14078
|
+
{
|
|
14079
|
+
var bindData=new ChartData();
|
|
14080
|
+
bindData.Data=this.SourceData.Data;
|
|
14081
|
+
bindData.Period=this.Period;
|
|
14082
|
+
bindData.Right=this.Right;
|
|
14083
|
+
|
|
14084
|
+
if (this.IsApiPeriod)
|
|
14085
|
+
{
|
|
14086
|
+
|
|
14087
|
+
}
|
|
14088
|
+
else
|
|
14089
|
+
{
|
|
14090
|
+
if (bindData.Right>0) //复权
|
|
14091
|
+
{
|
|
14092
|
+
var rightData=bindData.GetRightData(bindData.Right, { AlgorithmType: this.RightFormula });
|
|
14093
|
+
bindData.Data=rightData;
|
|
14094
|
+
}
|
|
14095
|
+
|
|
14096
|
+
if (ChartData.IsDayPeriod(bindData.Period,false) || ChartData.IsMinutePeriod(bindData.Period,false)) //周期数据
|
|
14097
|
+
{
|
|
14098
|
+
var periodData=bindData.GetPeriodData(bindData.Period);
|
|
14099
|
+
bindData.Data=periodData;
|
|
14100
|
+
}
|
|
14101
|
+
}
|
|
14102
|
+
}
|
|
14103
|
+
else if (this.IsMinuteContainer()) //分时图
|
|
14104
|
+
{
|
|
14105
|
+
var bindData=this.SourceData;
|
|
14106
|
+
}
|
|
14107
|
+
else
|
|
14108
|
+
{
|
|
14109
|
+
return;
|
|
14110
|
+
}
|
|
14111
|
+
|
|
14112
|
+
|
|
14113
|
+
for(var i=0;i<aryID.length;++i)
|
|
14114
|
+
{
|
|
14115
|
+
this.BindIndexData(aryID[i],bindData)
|
|
14116
|
+
}
|
|
14117
|
+
|
|
14118
|
+
this.UpdataDataoffset(); //更新数据偏移
|
|
14119
|
+
this.UpdateFrameMaxMin(); //调整坐标最大 最小值
|
|
14120
|
+
this.Draw();
|
|
14121
|
+
}
|
|
14029
14122
|
}
|
|
14030
14123
|
|
|
14031
14124
|
function GetDevicePixelRatio()
|
|
@@ -73410,7 +73503,8 @@ function JSChartResource()
|
|
|
73410
73503
|
Font:{ Size:15, Name:"微软雅黑"},
|
|
73411
73504
|
BarMergin:{ Top:2, Left:3, Right:3, Bottom:2 },//单元格字体
|
|
73412
73505
|
NameFont:{ Size:14, Name:"微软雅黑" },
|
|
73413
|
-
SymbolFont:{ Size:12, Name:"微软雅黑" }
|
|
73506
|
+
SymbolFont:{ Size:12, Name:"微软雅黑" },
|
|
73507
|
+
|
|
73414
73508
|
},
|
|
73415
73509
|
|
|
73416
73510
|
//固定行
|
|
@@ -73425,6 +73519,13 @@ function JSChartResource()
|
|
|
73425
73519
|
Mergin:{ Top:1, Bottom:1,Left:0, Right:0 },
|
|
73426
73520
|
},
|
|
73427
73521
|
|
|
73522
|
+
|
|
73523
|
+
NameSymbolV2:
|
|
73524
|
+
{
|
|
73525
|
+
Name:{ Size:14, Name:"微软雅黑", Color: "rgb(60,60,60)"},
|
|
73526
|
+
Symbol:{ Size:10, Name:"微软雅黑", Color: "rgb(105 105 105)"},
|
|
73527
|
+
},
|
|
73528
|
+
|
|
73428
73529
|
//涨停 跌停背景色
|
|
73429
73530
|
LimitColor:
|
|
73430
73531
|
{
|
|
@@ -74581,6 +74682,26 @@ function JSChartResource()
|
|
|
74581
74682
|
}
|
|
74582
74683
|
}
|
|
74583
74684
|
|
|
74685
|
+
if (item.NameSymbolV2)
|
|
74686
|
+
{
|
|
74687
|
+
var nameSymbol=item.NameSymbolV2;
|
|
74688
|
+
if (nameSymbol.Name)
|
|
74689
|
+
{
|
|
74690
|
+
var subItem=nameSymbol.Name;
|
|
74691
|
+
if (IFrameSplitOperator.IsNumber(subItem.Size)) this.Report.NameSymbolV2.Name.Size=subItem.Size;
|
|
74692
|
+
if (subItem.Name) this.Report.NameSymbolV2.Name.Name=subItem.Name;
|
|
74693
|
+
if (subItem.Color) this.Report.NameSymbolV2.Name.Color=subItem.Color;
|
|
74694
|
+
}
|
|
74695
|
+
|
|
74696
|
+
if (nameSymbol.Symbol)
|
|
74697
|
+
{
|
|
74698
|
+
var subItem=nameSymbol.Symbol;
|
|
74699
|
+
if (IFrameSplitOperator.IsNumber(subItem.Size)) this.Report.NameSymbolV2.Symbol.Size=subItem.Size;
|
|
74700
|
+
if (subItem.Name) this.Report.NameSymbolV2.Symbol.Name=subItem.Name;
|
|
74701
|
+
if (subItem.Color) this.Report.NameSymbolV2.Symbol.Color=subItem.Color;
|
|
74702
|
+
}
|
|
74703
|
+
}
|
|
74704
|
+
|
|
74584
74705
|
if (item.Tab)
|
|
74585
74706
|
{
|
|
74586
74707
|
var tab=item.Tab;
|
|
@@ -74938,7 +75059,7 @@ function JSChartLocalization()
|
|
|
74938
75059
|
['DialogTooltip-Exchange', {CN:'换手率', EN:'Exchange', TC:'換手'}],
|
|
74939
75060
|
['DialogTooltip-Position', {CN:'持仓量', EN:'Position', TC:'持倉'}],
|
|
74940
75061
|
['DialogTooltip-Price', {CN:'价格', EN:'Price', TC:'價格'}],
|
|
74941
|
-
['DialogTooltip-
|
|
75062
|
+
['DialogTooltip-FClose', {CN:"结算价", EN:'Settlement', TC:'結算價'}],
|
|
74942
75063
|
['DialogTooltip-Amplitude', {CN:'振幅', EN:'amplitude', TC:'價格'}],
|
|
74943
75064
|
['DialogTooltip-AC-Price', {CN:'匹配价', EN:'Price', TC:'匹配價'}],
|
|
74944
75065
|
['DialogTooltip-AC-AvPrice', {CN:'匹配均价', EN:'AVPrice', TC:'匹配均價'}],
|
|
@@ -81604,6 +81725,15 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81604
81725
|
{ Name:"样式2", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[1]}, Checked:1==this.ChartDragSelectRect.ShowMode },
|
|
81605
81726
|
{ Name:"样式3", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[2]}, Checked:2==this.ChartDragSelectRect.ShowMode },
|
|
81606
81727
|
]
|
|
81728
|
+
},
|
|
81729
|
+
{
|
|
81730
|
+
Name:"K线浮动框",
|
|
81731
|
+
SubMenu:
|
|
81732
|
+
[
|
|
81733
|
+
{ Name:"禁用", Data:{ ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE, Args:[{Enable:false}]}, Checked:!this.DialogTooltip },
|
|
81734
|
+
{ Name:"样式1", Data:{ ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE, Args:[{Enable:true, Style:0}]}, Checked:(this.DialogTooltip && this.DialogTooltip.Style===0) },
|
|
81735
|
+
{ Name:"样式2", Data:{ ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE, Args:[{Enable:true, Style:1}]}, Checked:(this.DialogTooltip && this.DialogTooltip.Style===1) },
|
|
81736
|
+
]
|
|
81607
81737
|
}
|
|
81608
81738
|
]
|
|
81609
81739
|
}
|
|
@@ -85276,6 +85406,15 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
85276
85406
|
]
|
|
85277
85407
|
},
|
|
85278
85408
|
|
|
85409
|
+
{
|
|
85410
|
+
Name:"K线浮动框",
|
|
85411
|
+
SubMenu:
|
|
85412
|
+
[
|
|
85413
|
+
{ Name:"禁用", Data:{ ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE, Args:[{Enable:false}]}, Checked:!this.DialogTooltip },
|
|
85414
|
+
{ Name:"样式1", Data:{ ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE, Args:[{Enable:true, Style:0}]}, Checked:(this.DialogTooltip && this.DialogTooltip.Style===0) },
|
|
85415
|
+
{ Name:"样式2", Data:{ ID:JSCHART_MENU_ID.CMD_DIALOG_TOOLTIP_ATTRIBUTE, Args:[{Enable:true, Style:1}]}, Checked:(this.DialogTooltip && this.DialogTooltip.Style===1) },
|
|
85416
|
+
]
|
|
85417
|
+
}
|
|
85279
85418
|
|
|
85280
85419
|
]
|
|
85281
85420
|
}
|
|
@@ -125581,6 +125720,12 @@ function GetBlackStyle()
|
|
|
125581
125720
|
Text:"rgb(245,245,245)", //默认文本
|
|
125582
125721
|
},
|
|
125583
125722
|
|
|
125723
|
+
NameSymbolV2:
|
|
125724
|
+
{
|
|
125725
|
+
Name:{ Size:14, Name:"微软雅黑", Color: "rgb(250,250,250)"},
|
|
125726
|
+
Symbol:{ Size:12, Name:"微软雅黑", Color: "rgb(190, 190, 190)"},
|
|
125727
|
+
},
|
|
125728
|
+
|
|
125584
125729
|
CloseLine:
|
|
125585
125730
|
{
|
|
125586
125731
|
CloseColor:"rgb(30,144,255)",
|
|
@@ -131217,7 +131362,8 @@ var REPORT_COLUMN_ID=
|
|
|
131217
131362
|
RISING_SPEED_10M_ID:63,
|
|
131218
131363
|
RISING_SPEED_15M_ID:64,
|
|
131219
131364
|
|
|
131220
|
-
|
|
131365
|
+
SYMBOL_NAME_V2_ID:98, //单行
|
|
131366
|
+
SYMBOL_NAME_ID:99, //两行
|
|
131221
131367
|
|
|
131222
131368
|
CUSTOM_STRING_TEXT_ID:100, //自定义字符串文本
|
|
131223
131369
|
CUSTOM_NUMBER_TEXT_ID:101, //自定义数值型
|
|
@@ -131418,6 +131564,9 @@ function ChartReport()
|
|
|
131418
131564
|
this.ItemSymbolFontConfig={Size:g_JSChartResource.Report.Item.SymbolFont.Size, Name:g_JSChartResource.Report.Item.SymbolFont.Name};
|
|
131419
131565
|
this.ItemNameFontConfg={Size:g_JSChartResource.Report.Item.NameFont.Size, Name:g_JSChartResource.Report.Item.NameFont.Name};
|
|
131420
131566
|
|
|
131567
|
+
//名称+代码
|
|
131568
|
+
this.NameSymbolV2Config=CloneData(g_JSChartResource.Report.NameSymbolV2);
|
|
131569
|
+
|
|
131421
131570
|
//缓存
|
|
131422
131571
|
this.HeaderFont=12*GetDevicePixelRatio() +"px 微软雅黑";
|
|
131423
131572
|
this.SortFont=null,
|
|
@@ -131426,6 +131575,7 @@ function ChartReport()
|
|
|
131426
131575
|
this.ItemSymbolFont=12*GetDevicePixelRatio() +"px 微软雅黑";
|
|
131427
131576
|
this.ItemNameFont=15*GetDevicePixelRatio() +"px 微软雅黑";
|
|
131428
131577
|
this.ItemNameHeight=0;
|
|
131578
|
+
this.NameSymbolFont={ Symbol:null, Name:null };
|
|
131429
131579
|
this.RowCount=0; //一屏显示行数
|
|
131430
131580
|
this.HeaderHeight=0; //表头高度
|
|
131431
131581
|
this.FixedRowHeight=0; //固定行高度
|
|
@@ -131570,6 +131720,8 @@ function ChartReport()
|
|
|
131570
131720
|
if (item.TextColor) colItem.TextColor=item.TextColor;
|
|
131571
131721
|
if (item.HeaderColor) colItem.HeaderColor=item.HeaderColor;
|
|
131572
131722
|
if (item.MaxText) colItem.MaxText=item.MaxText;
|
|
131723
|
+
if (item.MaxText2) colItem.MaxText=item.MaxText2;
|
|
131724
|
+
if (IFrameSplitOperator.IsNumber(item.Space)) colItem.Space=item.Space;
|
|
131573
131725
|
if (item.ID) colItem.ID=item.ID;
|
|
131574
131726
|
if (item.FullColBGColor) colItem.FullColBGColor=item.FullColBGColor; //整列背景色
|
|
131575
131727
|
if (item.HeaderBGColor) colItem.HeaderBGColor=item.HeaderBGColor; //表头背景色
|
|
@@ -131730,6 +131882,7 @@ function ChartReport()
|
|
|
131730
131882
|
{ Type:REPORT_COLUMN_ID.NAME_ID, Title:"名称", TextAlign:"left", Width:null, TextColor:g_JSChartResource.Report.FieldColor.Name, MaxText:"擎擎擎擎0" },
|
|
131731
131883
|
{ Type:REPORT_COLUMN_ID.NAME_EX_ID, Title:"名称", TextAlign:"left", Width:null, TextColor:g_JSChartResource.Report.FieldColor.Name, MaxText:"擎擎擎擎擎擎" },
|
|
131732
131884
|
{ Type:REPORT_COLUMN_ID.SYMBOL_NAME_ID, Title:"股票名称", TextAlign:"left", Width:null, TextColor:g_JSChartResource.Report.FieldColor.Name, MaxText:"擎擎擎擎0"},
|
|
131885
|
+
{ 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 },
|
|
131733
131886
|
|
|
131734
131887
|
{ Type:REPORT_COLUMN_ID.INCREASE_ID, Title:"涨幅%", TextAlign:"right", Width:null, MaxText:"-888.88" },
|
|
131735
131888
|
{ Type:REPORT_COLUMN_ID.PRICE_ID, Title:"现价", TextAlign:"right", Width:null, MaxText:"88888.88" },
|
|
@@ -131923,6 +132076,9 @@ function ChartReport()
|
|
|
131923
132076
|
this.ItemSymbolFont=`${this.ItemSymbolFontConfig.Size*pixelRatio}px ${ this.ItemSymbolFontConfig.Name}`;
|
|
131924
132077
|
this.ItemNameFont=`${this.ItemNameFontConfg.Size*pixelRatio}px ${ this.ItemNameFontConfg.Name}`;
|
|
131925
132078
|
|
|
132079
|
+
this.NameSymbolFont.Symbol=`${this.NameSymbolV2Config.Symbol.Size*pixelRatio}px ${this.NameSymbolV2Config.Symbol.Name}`;
|
|
132080
|
+
this.NameSymbolFont.Name=`${this.ItemSymbolFontConfig.Name.Size*pixelRatio}px ${this.NameSymbolV2Config.Name.Name}`;
|
|
132081
|
+
|
|
131926
132082
|
this.RowHeight=this.GetFontHeight(this.ItemFont,"擎")+ this.ItemMergin.Top+ this.ItemMergin.Bottom;
|
|
131927
132083
|
this.FixedRowHeight=this.GetFontHeight(this.ItemFixedFont,"擎")+ this.ItemMergin.Top+ this.ItemMergin.Bottom;
|
|
131928
132084
|
this.SortFont=`${this.SortConfig.Size*pixelRatio}px ${ this.SortConfig.Family}`;
|
|
@@ -131952,6 +132108,25 @@ function ChartReport()
|
|
|
131952
132108
|
if (rowHeight>this.RowHeight) this.RowHeight=rowHeight;
|
|
131953
132109
|
if (rowHeight>this.FixedRowHeight) this.FixedRowHeight=rowHeight;
|
|
131954
132110
|
}
|
|
132111
|
+
else if (item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID) //单行显示
|
|
132112
|
+
{
|
|
132113
|
+
this.Canvas.font==this.NameSymbolFont.Name;
|
|
132114
|
+
var nameWidth=this.Canvas.measureText(item.MaxText).width;
|
|
132115
|
+
var nameHeight=this.GetFontHeight(this.ItemNameFont,"擎");
|
|
132116
|
+
|
|
132117
|
+
|
|
132118
|
+
this.Canvas.font==this.NameSymbolFont.Symbol;
|
|
132119
|
+
var symbolWidth=this.Canvas.measureText(item.MaxText2).width;
|
|
132120
|
+
var symboHeight=this.GetFontHeight(this.ItemSymbolFont,"擎");
|
|
132121
|
+
|
|
132122
|
+
this.ItemNameHeight=Math.abs(nameHeight,symboHeight);
|
|
132123
|
+
|
|
132124
|
+
var space=2;
|
|
132125
|
+
if (IFrameSplitOperator.IsNumber(item.Space)) space=item.Space;
|
|
132126
|
+
itemWidth=nameWidth+symbolWidth+space;
|
|
132127
|
+
|
|
132128
|
+
item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;
|
|
132129
|
+
}
|
|
131955
132130
|
else
|
|
131956
132131
|
{
|
|
131957
132132
|
if (IFrameSplitOperator.IsNumber(item.FixedWidth)) itemWidth=item.FixedWidth;
|
|
@@ -132546,6 +132721,11 @@ function ChartReport()
|
|
|
132546
132721
|
|
|
132547
132722
|
this.FormatDrawInfo(column, stock, drawInfo, data);
|
|
132548
132723
|
}
|
|
132724
|
+
else if (column.Type==REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID)
|
|
132725
|
+
{
|
|
132726
|
+
this.DrawSymbolNameV2(data, column, left, top, rowType);
|
|
132727
|
+
this.FormatDrawInfo(column, stock, drawInfo, data);
|
|
132728
|
+
}
|
|
132549
132729
|
else if (column.Type==REPORT_COLUMN_ID.NAME_ID)
|
|
132550
132730
|
{
|
|
132551
132731
|
if (stock && stock.Name)
|
|
@@ -132996,6 +133176,72 @@ function ChartReport()
|
|
|
132996
133176
|
this.Canvas.font=this.ItemFont; //还原字体
|
|
132997
133177
|
}
|
|
132998
133178
|
|
|
133179
|
+
this.DrawSymbolNameV2=function(data, column, left, top, rowType)
|
|
133180
|
+
{
|
|
133181
|
+
var stock=data.Stock;
|
|
133182
|
+
var symbol=data.Symbol;
|
|
133183
|
+
var name;
|
|
133184
|
+
if (stock)
|
|
133185
|
+
{
|
|
133186
|
+
symbol=stock.Symbol;
|
|
133187
|
+
name=stock.Name;
|
|
133188
|
+
}
|
|
133189
|
+
|
|
133190
|
+
if (!symbol && !name) return;
|
|
133191
|
+
|
|
133192
|
+
var y=top+this.ItemMergin.Top+this.ItemNameHeight;
|
|
133193
|
+
var textLeft=left+this.ItemMergin.Left;
|
|
133194
|
+
var x=textLeft;
|
|
133195
|
+
var width=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;
|
|
133196
|
+
var textAlign=column.TextAlign;
|
|
133197
|
+
if (textAlign=='center')
|
|
133198
|
+
{
|
|
133199
|
+
x=textLeft+width/2;
|
|
133200
|
+
this.Canvas.textAlign="center";
|
|
133201
|
+
}
|
|
133202
|
+
else if (textAlign=='right')
|
|
133203
|
+
{
|
|
133204
|
+
x=textLeft+width-2;
|
|
133205
|
+
this.Canvas.textAlign="right";
|
|
133206
|
+
}
|
|
133207
|
+
else
|
|
133208
|
+
{
|
|
133209
|
+
x+=2;
|
|
133210
|
+
this.Canvas.textAlign="left";
|
|
133211
|
+
}
|
|
133212
|
+
|
|
133213
|
+
this.Canvas.textBaseline="bottom";
|
|
133214
|
+
|
|
133215
|
+
var textColor=column.TextColor;
|
|
133216
|
+
var text=name;
|
|
133217
|
+
if (text)
|
|
133218
|
+
{
|
|
133219
|
+
this.Canvas.fillStyle=textColor;
|
|
133220
|
+
this.Canvas.font=this.NameSymbolFont.Name;
|
|
133221
|
+
text=this.TextEllipsis(text, width, column.MaxText);
|
|
133222
|
+
if (text)
|
|
133223
|
+
{
|
|
133224
|
+
this.Canvas.fillText(text,x,y);
|
|
133225
|
+
var textWidth=this.Canvas.measureText(text).width;
|
|
133226
|
+
var space=2;
|
|
133227
|
+
if (IFrameSplitOperator.IsNumber(column.Space)) space=column.Space;
|
|
133228
|
+
x+=(textWidth+space);
|
|
133229
|
+
}
|
|
133230
|
+
|
|
133231
|
+
}
|
|
133232
|
+
|
|
133233
|
+
var textColor=column.TextColor2;
|
|
133234
|
+
text=symbol;
|
|
133235
|
+
if (text)
|
|
133236
|
+
{
|
|
133237
|
+
this.Canvas.font=this.NameSymbolFont.Symbol;
|
|
133238
|
+
this.Canvas.fillStyle=textColor;
|
|
133239
|
+
this.Canvas.fillText(text,x,y);
|
|
133240
|
+
}
|
|
133241
|
+
|
|
133242
|
+
this.Canvas.font=this.ItemFont; //还原字体
|
|
133243
|
+
}
|
|
133244
|
+
|
|
132999
133245
|
this.DrawLimitPriceBorder=function(value, stock, left, top, itemWidth)
|
|
133000
133246
|
{
|
|
133001
133247
|
if (!IFrameSplitOperator.IsNumber(value) || !stock) return;
|
|
@@ -143247,6 +143493,7 @@ function JSDialogTooltip()
|
|
|
143247
143493
|
this.DivDialog=null;
|
|
143248
143494
|
this.DragTitle=null;
|
|
143249
143495
|
this.TitleBox=null; //{ DivTitle, DivName, DivName }
|
|
143496
|
+
this.Style=0; //0=一行一个, 1=2行一个
|
|
143250
143497
|
|
|
143251
143498
|
this.HQChart=null;
|
|
143252
143499
|
|
|
@@ -143265,7 +143512,7 @@ function JSDialogTooltip()
|
|
|
143265
143512
|
this.PositionColor=g_JSChartResource.DialogTooltip.PositionColor;
|
|
143266
143513
|
this.DateTimeColor=g_JSChartResource.DialogTooltip.DateTimeColor;
|
|
143267
143514
|
this.LanguageID=JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;
|
|
143268
|
-
this.MaxRowCount=
|
|
143515
|
+
this.MaxRowCount=25;
|
|
143269
143516
|
|
|
143270
143517
|
this.AryData=[];
|
|
143271
143518
|
this.AryText=[];
|
|
@@ -143273,9 +143520,13 @@ function JSDialogTooltip()
|
|
|
143273
143520
|
this.KItemCache=null;
|
|
143274
143521
|
this.KItemCacheID=null;
|
|
143275
143522
|
|
|
143276
|
-
this.Inital=function(hqchart)
|
|
143523
|
+
this.Inital=function(hqchart, option)
|
|
143277
143524
|
{
|
|
143278
|
-
|
|
143525
|
+
this.HQChart=hqchart;
|
|
143526
|
+
if (option)
|
|
143527
|
+
{
|
|
143528
|
+
if (IFrameSplitOperator.IsNumber(option.Style)) this.Style=option.Style;
|
|
143529
|
+
}
|
|
143279
143530
|
}
|
|
143280
143531
|
|
|
143281
143532
|
this.Destroy=function()
|
|
@@ -143338,36 +143589,78 @@ function JSDialogTooltip()
|
|
|
143338
143589
|
table.appendChild(tbody);
|
|
143339
143590
|
|
|
143340
143591
|
this.AryData=[];
|
|
143341
|
-
|
|
143592
|
+
if (this.Style==1)
|
|
143342
143593
|
{
|
|
143343
|
-
var
|
|
143594
|
+
for(var i=0;i<this.MaxRowCount;++i)
|
|
143595
|
+
{
|
|
143596
|
+
var rowItem={ Tr:null, TitleSpan:null, TextSpan:null, Tr2:null };
|
|
143344
143597
|
|
|
143345
|
-
|
|
143346
|
-
|
|
143347
|
-
|
|
143348
|
-
|
|
143598
|
+
var trDom=document.createElement("tr");
|
|
143599
|
+
trDom.className='UMyChart_Tooltip_Group_Tr';
|
|
143600
|
+
tbody.appendChild(trDom);
|
|
143601
|
+
rowItem.Tr=trDom;
|
|
143349
143602
|
|
|
143350
|
-
|
|
143351
|
-
|
|
143352
|
-
|
|
143603
|
+
var tdDom=document.createElement("td");
|
|
143604
|
+
tdDom.className="UMyChart_Tooltip_Text_Sinlge_Td"; //标题
|
|
143605
|
+
trDom.appendChild(tdDom);
|
|
143353
143606
|
|
|
143354
|
-
|
|
143355
|
-
|
|
143356
|
-
|
|
143357
|
-
|
|
143358
|
-
|
|
143607
|
+
var spanDom=document.createElement("span");
|
|
143608
|
+
spanDom.className='UMyChart_Tooltip_Title_Left_Span';
|
|
143609
|
+
spanDom.innerText='标题';
|
|
143610
|
+
tdDom.appendChild(spanDom);
|
|
143611
|
+
rowItem.TitleSpan=spanDom;
|
|
143359
143612
|
|
|
143360
|
-
|
|
143361
|
-
|
|
143362
|
-
|
|
143613
|
+
var trDom=document.createElement("tr");
|
|
143614
|
+
trDom.className='UMyChart_Tooltip_Group_Tr';
|
|
143615
|
+
tbody.appendChild(trDom);
|
|
143616
|
+
rowItem.Tr2=trDom;
|
|
143617
|
+
|
|
143618
|
+
var tdDom=document.createElement("td");
|
|
143619
|
+
tdDom.className="UMyChart_Tooltip_Text_Sinlge_Td"; //数值
|
|
143620
|
+
trDom.appendChild(tdDom);
|
|
143363
143621
|
|
|
143364
|
-
|
|
143365
|
-
|
|
143366
|
-
|
|
143367
|
-
|
|
143368
|
-
|
|
143622
|
+
var spanDom=document.createElement("span");
|
|
143623
|
+
spanDom.className='UMyChart_Tooltip_Text_Span';
|
|
143624
|
+
spanDom.innerText='数值';
|
|
143625
|
+
tdDom.appendChild(spanDom);
|
|
143626
|
+
rowItem.TextSpan=spanDom;
|
|
143369
143627
|
|
|
143370
|
-
|
|
143628
|
+
this.AryData.push(rowItem);
|
|
143629
|
+
}
|
|
143630
|
+
}
|
|
143631
|
+
else
|
|
143632
|
+
{
|
|
143633
|
+
for(var i=0;i<this.MaxRowCount;++i)
|
|
143634
|
+
{
|
|
143635
|
+
var rowItem={ Tr:null, TitleSpan:null, TextSpan:null };
|
|
143636
|
+
|
|
143637
|
+
var trDom=document.createElement("tr");
|
|
143638
|
+
trDom.className='UMyChart_Tooltip_Group_Tr';
|
|
143639
|
+
tbody.appendChild(trDom);
|
|
143640
|
+
rowItem.Tr=trDom;
|
|
143641
|
+
|
|
143642
|
+
var tdDom=document.createElement("td");
|
|
143643
|
+
tdDom.className="UMyChart_Tooltip_Title_Td"; //标题
|
|
143644
|
+
trDom.appendChild(tdDom);
|
|
143645
|
+
|
|
143646
|
+
var spanDom=document.createElement("span");
|
|
143647
|
+
spanDom.className='UMyChart_Tooltip_Title_Span';
|
|
143648
|
+
spanDom.innerText='标题';
|
|
143649
|
+
tdDom.appendChild(spanDom);
|
|
143650
|
+
rowItem.TitleSpan=spanDom;
|
|
143651
|
+
|
|
143652
|
+
var tdDom=document.createElement("td");
|
|
143653
|
+
tdDom.className="UMyChart_Tooltip_Text_Td"; //数值
|
|
143654
|
+
trDom.appendChild(tdDom);
|
|
143655
|
+
|
|
143656
|
+
var spanDom=document.createElement("span");
|
|
143657
|
+
spanDom.className='UMyChart_Tooltip_Text_Span';
|
|
143658
|
+
spanDom.innerText='数值';
|
|
143659
|
+
tdDom.appendChild(spanDom);
|
|
143660
|
+
rowItem.TextSpan=spanDom;
|
|
143661
|
+
|
|
143662
|
+
this.AryData.push(rowItem);
|
|
143663
|
+
}
|
|
143371
143664
|
}
|
|
143372
143665
|
|
|
143373
143666
|
|
|
@@ -143427,7 +143720,7 @@ function JSDialogTooltip()
|
|
|
143427
143720
|
if (!this.KItemCache) return;
|
|
143428
143721
|
|
|
143429
143722
|
if (this.HQChart.ClassName=='KLineChartContainer')
|
|
143430
|
-
this.AryText=this.
|
|
143723
|
+
this.AryText=this.GetFormatKLineTooltipText(this.KItemCache);
|
|
143431
143724
|
else if (this.HQChart.ClassName=='MinuteChartContainer')
|
|
143432
143725
|
this.AryText=this.GetFormatMinuteTooltipText(this.KItemCache);
|
|
143433
143726
|
else
|
|
@@ -143444,12 +143737,14 @@ function JSDialogTooltip()
|
|
|
143444
143737
|
item.TextSpan.innerText=outItem.Text;
|
|
143445
143738
|
item.TextSpan.style.color=outItem.Color;
|
|
143446
143739
|
item.Tr.style.display="";
|
|
143740
|
+
if (item.Tr2) item.Tr2.style.display="";
|
|
143447
143741
|
}
|
|
143448
143742
|
|
|
143449
143743
|
for( ; index<this.MaxRowCount; ++index)
|
|
143450
143744
|
{
|
|
143451
143745
|
var item=this.AryData[index];
|
|
143452
143746
|
item.Tr.style.display="none";
|
|
143747
|
+
if (item.Tr2) item.Tr2.style.display="none";
|
|
143453
143748
|
}
|
|
143454
143749
|
}
|
|
143455
143750
|
|
|
@@ -143527,10 +143822,13 @@ function JSDialogTooltip()
|
|
|
143527
143822
|
}
|
|
143528
143823
|
|
|
143529
143824
|
|
|
143530
|
-
this.
|
|
143825
|
+
this.GetFormatKLineTooltipText=function(data)
|
|
143531
143826
|
{
|
|
143532
143827
|
var defaultfloatPrecision=GetfloatPrecision(this.HQChart.Symbol);//价格小数位数
|
|
143533
143828
|
var upperSymbol=this.HQChart.Symbol.toUpperCase();
|
|
143829
|
+
var priceFormat=0;
|
|
143830
|
+
if (this.Style==1) priceFormat=1;
|
|
143831
|
+
|
|
143534
143832
|
//日期
|
|
143535
143833
|
var dateItem=this.ForamtDate(data.Date,"YYYY/MM/DD/W",'DialogTooltip-Date' );
|
|
143536
143834
|
|
|
@@ -143541,18 +143839,29 @@ function JSDialogTooltip()
|
|
|
143541
143839
|
var yClose=data.YClose; //昨收价|昨结算价
|
|
143542
143840
|
var aryText=
|
|
143543
143841
|
[
|
|
143544
|
-
this.ForamtPrice(data.Open,yClose, defaultfloatPrecision,'DialogTooltip-Open'),
|
|
143545
|
-
this.ForamtPrice(data.High,yClose, defaultfloatPrecision,'DialogTooltip-High'),
|
|
143546
|
-
this.ForamtPrice(data.Low,yClose, defaultfloatPrecision,'DialogTooltip-Low'),
|
|
143547
|
-
this.ForamtPrice(data.Close,yClose, defaultfloatPrecision,'DialogTooltip-Close'),
|
|
143842
|
+
this.ForamtPrice(data.Open,yClose, defaultfloatPrecision,'DialogTooltip-Open',priceFormat),
|
|
143843
|
+
this.ForamtPrice(data.High,yClose, defaultfloatPrecision,'DialogTooltip-High',priceFormat),
|
|
143844
|
+
this.ForamtPrice(data.Low,yClose, defaultfloatPrecision,'DialogTooltip-Low',priceFormat),
|
|
143845
|
+
this.ForamtPrice(data.Close,yClose, defaultfloatPrecision,'DialogTooltip-Close',priceFormat),
|
|
143548
143846
|
this.FormatVol(data.Vol,'DialogTooltip-Vol' ),
|
|
143549
143847
|
this.FormatAmount(data.Amount,'DialogTooltip-Amount' ),
|
|
143550
|
-
this.FormatIncrease(data.Close,yClose,'DialogTooltip-Increase'),
|
|
143551
|
-
this.FormatAmplitude(data.High,data.Low,yClose,'DialogTooltip-Amplitude'),
|
|
143848
|
+
this.FormatIncrease(data.Close,yClose,defaultfloatPrecision,'DialogTooltip-Increase',priceFormat),
|
|
143849
|
+
this.FormatAmplitude(data.High,data.Low,yClose,defaultfloatPrecision,'DialogTooltip-Amplitude',priceFormat),
|
|
143552
143850
|
];
|
|
143553
143851
|
|
|
143554
|
-
if (
|
|
143555
|
-
|
|
143852
|
+
if (this.Style==1)
|
|
143853
|
+
{
|
|
143854
|
+
if (timeItem) aryText.unshift(timeItem);
|
|
143855
|
+
var dateItem=this.ForamtDate(data.Date,"YYYY/MM/DD",'DialogTooltip-Date' );
|
|
143856
|
+
aryText.unshift(dateItem);
|
|
143857
|
+
}
|
|
143858
|
+
else
|
|
143859
|
+
{
|
|
143860
|
+
if (timeItem) aryText.unshift(timeItem);
|
|
143861
|
+
aryText.unshift(dateItem);
|
|
143862
|
+
}
|
|
143863
|
+
|
|
143864
|
+
|
|
143556
143865
|
|
|
143557
143866
|
//换手率
|
|
143558
143867
|
if (MARKET_SUFFIX_NAME.IsSHSZStockA(upperSymbol) && data.FlowCapital>0)
|
|
@@ -143560,11 +143869,18 @@ function JSDialogTooltip()
|
|
|
143560
143869
|
aryText.push(this.FormatExchange(data.Vol,data.FlowCapital,'DialogTooltip-Exchange' ));
|
|
143561
143870
|
}
|
|
143562
143871
|
|
|
143563
|
-
//持仓量
|
|
143872
|
+
//持仓量 结算价
|
|
143564
143873
|
if (MARKET_SUFFIX_NAME.IsFutures(upperSymbol))
|
|
143565
143874
|
{
|
|
143566
143875
|
aryText.push(this.FormatPosition(data.Position,'DialogTooltip-Position'));
|
|
143567
|
-
aryText.push(this.
|
|
143876
|
+
aryText.push(this.ForamtFClose(data.FClose, defaultfloatPrecision, 'DialogTooltip-FClose'));
|
|
143877
|
+
}
|
|
143878
|
+
|
|
143879
|
+
var event=this.HQChart.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_DIALOG_TOOLTIP_TEXT);
|
|
143880
|
+
if (event && event.Callback)
|
|
143881
|
+
{
|
|
143882
|
+
var sendData={ AryText:aryText, Data:data, Symbol:this.HQChart.Symbol, HQChart:this.HQChart, IsKLine:true };
|
|
143883
|
+
event.Callback(event, sendData, this);
|
|
143568
143884
|
}
|
|
143569
143885
|
|
|
143570
143886
|
return aryText;
|
|
@@ -143573,24 +143889,22 @@ function JSDialogTooltip()
|
|
|
143573
143889
|
this.GetFormatMinuteTooltipText=function(data)
|
|
143574
143890
|
{
|
|
143575
143891
|
var defaultfloatPrecision=GetfloatPrecision(this.HQChart.Symbol);//价格小数位数
|
|
143576
|
-
|
|
143892
|
+
var aryText=[];
|
|
143577
143893
|
if (data.Type==0) //连续交易
|
|
143578
143894
|
{
|
|
143579
143895
|
var item=data.Data;
|
|
143580
143896
|
if (!item) item={ };
|
|
143581
143897
|
|
|
143582
|
-
|
|
143898
|
+
aryText=
|
|
143583
143899
|
[
|
|
143584
|
-
this.ForamtDate(item.Date,"YYYY/MM/DD/W",'DialogTooltip-Date' ),
|
|
143900
|
+
this.ForamtDate(item.Date,this.Style==1?"YYYY/MM/DD":"YYYY/MM/DD/W",'DialogTooltip-Date' ),
|
|
143585
143901
|
this.FormatTime(item.Time, null, "HH:MM", 'DialogTooltip-Time'),
|
|
143586
|
-
this.ForamtPrice(item.Close,item.YClose, defaultfloatPrecision,'DialogTooltip-Price'),
|
|
143902
|
+
this.ForamtPrice(item.Close,item.YClose, defaultfloatPrecision,'DialogTooltip-Price', 1),
|
|
143587
143903
|
this.FormatRisefall(item.Close,item.YClose, defaultfloatPrecision,'DialogTooltip-Risefall'),
|
|
143588
|
-
this.FormatIncrease(item.Close,item.YClose,'DialogTooltip-Increase'),
|
|
143904
|
+
this.FormatIncrease(item.Close,item.YClose,defaultfloatPrecision,'DialogTooltip-Increase', 1),
|
|
143589
143905
|
this.FormatVol(item.Vol,'DialogTooltip-Vol' ),
|
|
143590
143906
|
this.FormatAmount(item.Amount,'DialogTooltip-Amount' ),
|
|
143591
143907
|
];
|
|
143592
|
-
|
|
143593
|
-
return aryText;
|
|
143594
143908
|
}
|
|
143595
143909
|
else if (data.Type==1) //集合竞价
|
|
143596
143910
|
{
|
|
@@ -143599,19 +143913,28 @@ function JSDialogTooltip()
|
|
|
143599
143913
|
|
|
143600
143914
|
var timeForamt="HH:MM:SS";
|
|
143601
143915
|
if (item.Ver===1) timeForamt="HH:MM"
|
|
143602
|
-
|
|
143916
|
+
aryText=
|
|
143603
143917
|
[
|
|
143604
|
-
this.ForamtDate(item.Date,"YYYY/MM/DD/W",'DialogTooltip-Date' ),
|
|
143918
|
+
this.ForamtDate(item.Date,this.Style==1?"YYYY/MM/DD":"YYYY/MM/DD/W",'DialogTooltip-Date' ),
|
|
143605
143919
|
this.FormatTime(item.Time, null, timeForamt, 'DialogTooltip-Time'),
|
|
143606
|
-
this.ForamtPrice(item.Price,item.YClose, defaultfloatPrecision,'DialogTooltip-AC-Price'),
|
|
143607
|
-
this.FormatIncrease(item.Price,item.YClose,'DialogTooltip-AC-Increase'),
|
|
143920
|
+
this.ForamtPrice(item.Price,item.YClose, defaultfloatPrecision,'DialogTooltip-AC-Price',1),
|
|
143921
|
+
this.FormatIncrease(item.Price,item.YClose,defaultfloatPrecision,'DialogTooltip-AC-Increase',1),
|
|
143608
143922
|
this.FormatVol(item.Vol[0],'DialogTooltip-AC-Vol' ),
|
|
143609
143923
|
];
|
|
143924
|
+
}
|
|
143925
|
+
else
|
|
143926
|
+
{
|
|
143610
143927
|
|
|
143611
|
-
return aryText;
|
|
143612
143928
|
}
|
|
143613
143929
|
|
|
143614
|
-
|
|
143930
|
+
var event=this.HQChart.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_DIALOG_TOOLTIP_TEXT);
|
|
143931
|
+
if (event && event.Callback)
|
|
143932
|
+
{
|
|
143933
|
+
var sendData={ AryText:aryText, Data:data, Symbol:this.HQChart.Symbol, HQChart:this.HQChart, IsMinute:true };
|
|
143934
|
+
event.Callback(event, sendData, this);
|
|
143935
|
+
}
|
|
143936
|
+
|
|
143937
|
+
return aryText
|
|
143615
143938
|
}
|
|
143616
143939
|
|
|
143617
143940
|
this.GetColor=function(price,yClose)
|
|
@@ -143665,7 +143988,7 @@ function JSDialogTooltip()
|
|
|
143665
143988
|
|
|
143666
143989
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
143667
143990
|
//数据格式化
|
|
143668
|
-
this.ForamtPrice=function(price, yClose, defaultfloatPrecision, TitleID)
|
|
143991
|
+
this.ForamtPrice=function(price, yClose, defaultfloatPrecision, TitleID, format)
|
|
143669
143992
|
{
|
|
143670
143993
|
var item=
|
|
143671
143994
|
{
|
|
@@ -143676,7 +143999,17 @@ function JSDialogTooltip()
|
|
|
143676
143999
|
|
|
143677
144000
|
if (!IFrameSplitOperator.IsNumber(price)) return item;
|
|
143678
144001
|
|
|
143679
|
-
|
|
144002
|
+
if (IFrameSplitOperator.IsNumber(yClose) && format!=1)
|
|
144003
|
+
{
|
|
144004
|
+
var value=(price-yClose)/yClose*100;
|
|
144005
|
+
item.Text=`${price.toFixed(defaultfloatPrecision)}(${value.toFixed(2)}%)`;
|
|
144006
|
+
}
|
|
144007
|
+
else
|
|
144008
|
+
{
|
|
144009
|
+
item.Text=price.toFixed(defaultfloatPrecision);
|
|
144010
|
+
}
|
|
144011
|
+
|
|
144012
|
+
|
|
143680
144013
|
item.Color=this.GetColor(price, yClose);
|
|
143681
144014
|
|
|
143682
144015
|
return item;
|
|
@@ -143693,7 +144026,7 @@ function JSDialogTooltip()
|
|
|
143693
144026
|
|
|
143694
144027
|
if (!IFrameSplitOperator.IsNumber(vol)) return item;
|
|
143695
144028
|
|
|
143696
|
-
item.Text=IFrameSplitOperator.
|
|
144029
|
+
item.Text=IFrameSplitOperator.FormatValueStringV2(vol,0,2,this.LanguageID);
|
|
143697
144030
|
|
|
143698
144031
|
return item;
|
|
143699
144032
|
}
|
|
@@ -143714,7 +144047,7 @@ function JSDialogTooltip()
|
|
|
143714
144047
|
return item;
|
|
143715
144048
|
}
|
|
143716
144049
|
|
|
143717
|
-
this.FormatIncrease=function(price, yClose, TitleID)
|
|
144050
|
+
this.FormatIncrease=function(price, yClose, defaultfloatPrecision, TitleID, fromat)
|
|
143718
144051
|
{
|
|
143719
144052
|
//涨幅
|
|
143720
144053
|
var item=
|
|
@@ -143726,8 +144059,19 @@ function JSDialogTooltip()
|
|
|
143726
144059
|
|
|
143727
144060
|
if (!IFrameSplitOperator.IsNumber(price) || !IFrameSplitOperator.IsNumber(yClose)) return item;
|
|
143728
144061
|
|
|
144062
|
+
|
|
144063
|
+
|
|
144064
|
+
var diffValue=price-yClose;
|
|
143729
144065
|
var value=(price-yClose)/yClose;
|
|
143730
|
-
|
|
144066
|
+
if (fromat==1)
|
|
144067
|
+
{
|
|
144068
|
+
item.Text=`${(value*100).toFixed(2)}%`;
|
|
144069
|
+
}
|
|
144070
|
+
else
|
|
144071
|
+
{
|
|
144072
|
+
item.Text=`${diffValue.toFixed(defaultfloatPrecision)}(${(value*100).toFixed(2)}%)`;
|
|
144073
|
+
}
|
|
144074
|
+
|
|
143731
144075
|
item.Color=this.GetColor(value,0);
|
|
143732
144076
|
|
|
143733
144077
|
return item;
|
|
@@ -143752,9 +144096,9 @@ function JSDialogTooltip()
|
|
|
143752
144096
|
return item;
|
|
143753
144097
|
}
|
|
143754
144098
|
|
|
143755
|
-
this.FormatAmplitude=function(high, low, yClose, TitleID)
|
|
144099
|
+
this.FormatAmplitude=function(high, low, yClose, defaultfloatPrecision, TitleID, fromat)
|
|
143756
144100
|
{
|
|
143757
|
-
|
|
144101
|
+
//振幅
|
|
143758
144102
|
var item=
|
|
143759
144103
|
{
|
|
143760
144104
|
Title:g_JSChartLocalization.GetText(TitleID,this.LanguageID),
|
|
@@ -143765,8 +144109,10 @@ function JSDialogTooltip()
|
|
|
143765
144109
|
|
|
143766
144110
|
if (!IFrameSplitOperator.IsNumber(high) || !IFrameSplitOperator.IsNumber(low) || !IFrameSplitOperator.IsNumber(yClose)) return item;
|
|
143767
144111
|
|
|
144112
|
+
var diffValue=high-low;
|
|
143768
144113
|
var value=(high-low)/yClose;
|
|
143769
|
-
item.Text=`${(value*100).toFixed(2)}%`;
|
|
144114
|
+
if (fromat==1) item.Text=`${(value*100).toFixed(2)}%`;
|
|
144115
|
+
else item.Text=`${diffValue.toFixed(defaultfloatPrecision)}(${(value*100).toFixed(2)}%)`;
|
|
143770
144116
|
item.Color=this.GetColor(value,0);
|
|
143771
144117
|
|
|
143772
144118
|
return item;
|
|
@@ -143852,7 +144198,7 @@ function JSDialogTooltip()
|
|
|
143852
144198
|
}
|
|
143853
144199
|
|
|
143854
144200
|
//结算价
|
|
143855
|
-
this.
|
|
144201
|
+
this.ForamtFClose=function(value, defaultfloatPrecision, TitleID)
|
|
143856
144202
|
{
|
|
143857
144203
|
var item=
|
|
143858
144204
|
{
|
|
@@ -143990,7 +144336,7 @@ function HQChartScriptWorker()
|
|
|
143990
144336
|
|
|
143991
144337
|
|
|
143992
144338
|
|
|
143993
|
-
var HQCHART_VERSION="1.1.
|
|
144339
|
+
var HQCHART_VERSION="1.1.13932";
|
|
143994
144340
|
|
|
143995
144341
|
function PrintHQChartVersion()
|
|
143996
144342
|
{
|