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
|
@@ -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)
|
|
@@ -6772,6 +6773,8 @@ var JSCHART_MENU_ID=
|
|
|
6772
6773
|
CMD_REPORT_COLUMN_DEL_ID:62, //报价列表 删除列
|
|
6773
6774
|
CMD_REPORT_COLUMN_MOVE_ID:63, //报价列表 列移动
|
|
6774
6775
|
CMD_REPORT_COLUMN_FILTER_ID:64, //报价列表 筛选
|
|
6776
|
+
|
|
6777
|
+
CMD_DIALOG_TOOLTIP_ATTRIBUTE:65, //修改K线信息框属性 Ary:[{ Enable:, Style:}, ]
|
|
6775
6778
|
}
|
|
6776
6779
|
|
|
6777
6780
|
|
|
@@ -7020,12 +7023,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7020
7023
|
this.DialogDrawTool.Create();
|
|
7021
7024
|
}
|
|
7022
7025
|
|
|
7023
|
-
this.InitalTooltipDialog=function()
|
|
7026
|
+
this.InitalTooltipDialog=function(option)
|
|
7024
7027
|
{
|
|
7025
7028
|
if (this.DialogTooltip) return;
|
|
7026
7029
|
|
|
7027
7030
|
this.DialogTooltip=new JSDialogTooltip();
|
|
7028
|
-
this.DialogTooltip.Inital(this);
|
|
7031
|
+
this.DialogTooltip.Inital(this, option);
|
|
7029
7032
|
this.DialogTooltip.Create();
|
|
7030
7033
|
}
|
|
7031
7034
|
|
|
@@ -7099,6 +7102,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7099
7102
|
this.DialogTooltip.Close();
|
|
7100
7103
|
}
|
|
7101
7104
|
|
|
7105
|
+
this.DestroyTooltipDialog=function()
|
|
7106
|
+
{
|
|
7107
|
+
if (!this.DialogTooltip) return;
|
|
7108
|
+
|
|
7109
|
+
this.DialogTooltip.Destroy();
|
|
7110
|
+
this.DialogTooltip=null;
|
|
7111
|
+
}
|
|
7112
|
+
|
|
7102
7113
|
|
|
7103
7114
|
|
|
7104
7115
|
//obj={ Element:, Canvas: }
|
|
@@ -7150,12 +7161,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7150
7161
|
{
|
|
7151
7162
|
this.IsDestroy=true;
|
|
7152
7163
|
this.StopAutoUpdate();
|
|
7153
|
-
|
|
7154
|
-
if (this.DialogTooltip)
|
|
7155
|
-
{
|
|
7156
|
-
this.DialogTooltip.Destroy();
|
|
7157
|
-
this.DialogTooltip=null;
|
|
7158
|
-
}
|
|
7164
|
+
this.DestroyTooltipDialog();
|
|
7159
7165
|
}
|
|
7160
7166
|
|
|
7161
7167
|
this.ChartDestory=this.ChartDestroy; //老版本写错了,需要兼容下
|
|
@@ -13732,6 +13738,20 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
13732
13738
|
klineChart.InfoPosition=param;
|
|
13733
13739
|
this.Draw();
|
|
13734
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;
|
|
13735
13755
|
}
|
|
13736
13756
|
}
|
|
13737
13757
|
|
|
@@ -73483,7 +73503,8 @@ function JSChartResource()
|
|
|
73483
73503
|
Font:{ Size:15, Name:"微软雅黑"},
|
|
73484
73504
|
BarMergin:{ Top:2, Left:3, Right:3, Bottom:2 },//单元格字体
|
|
73485
73505
|
NameFont:{ Size:14, Name:"微软雅黑" },
|
|
73486
|
-
SymbolFont:{ Size:12, Name:"微软雅黑" }
|
|
73506
|
+
SymbolFont:{ Size:12, Name:"微软雅黑" },
|
|
73507
|
+
|
|
73487
73508
|
},
|
|
73488
73509
|
|
|
73489
73510
|
//固定行
|
|
@@ -73498,6 +73519,13 @@ function JSChartResource()
|
|
|
73498
73519
|
Mergin:{ Top:1, Bottom:1,Left:0, Right:0 },
|
|
73499
73520
|
},
|
|
73500
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
|
+
|
|
73501
73529
|
//涨停 跌停背景色
|
|
73502
73530
|
LimitColor:
|
|
73503
73531
|
{
|
|
@@ -74654,6 +74682,26 @@ function JSChartResource()
|
|
|
74654
74682
|
}
|
|
74655
74683
|
}
|
|
74656
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
|
+
|
|
74657
74705
|
if (item.Tab)
|
|
74658
74706
|
{
|
|
74659
74707
|
var tab=item.Tab;
|
|
@@ -81677,6 +81725,15 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81677
81725
|
{ Name:"样式2", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[1]}, Checked:1==this.ChartDragSelectRect.ShowMode },
|
|
81678
81726
|
{ Name:"样式3", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[2]}, Checked:2==this.ChartDragSelectRect.ShowMode },
|
|
81679
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
|
+
]
|
|
81680
81737
|
}
|
|
81681
81738
|
]
|
|
81682
81739
|
}
|
|
@@ -85349,6 +85406,15 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
85349
85406
|
]
|
|
85350
85407
|
},
|
|
85351
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
|
+
}
|
|
85352
85418
|
|
|
85353
85419
|
]
|
|
85354
85420
|
}
|
|
@@ -125654,6 +125720,12 @@ function GetBlackStyle()
|
|
|
125654
125720
|
Text:"rgb(245,245,245)", //默认文本
|
|
125655
125721
|
},
|
|
125656
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
|
+
|
|
125657
125729
|
CloseLine:
|
|
125658
125730
|
{
|
|
125659
125731
|
CloseColor:"rgb(30,144,255)",
|
|
@@ -131290,7 +131362,8 @@ var REPORT_COLUMN_ID=
|
|
|
131290
131362
|
RISING_SPEED_10M_ID:63,
|
|
131291
131363
|
RISING_SPEED_15M_ID:64,
|
|
131292
131364
|
|
|
131293
|
-
|
|
131365
|
+
SYMBOL_NAME_V2_ID:98, //单行
|
|
131366
|
+
SYMBOL_NAME_ID:99, //两行
|
|
131294
131367
|
|
|
131295
131368
|
CUSTOM_STRING_TEXT_ID:100, //自定义字符串文本
|
|
131296
131369
|
CUSTOM_NUMBER_TEXT_ID:101, //自定义数值型
|
|
@@ -131491,6 +131564,9 @@ function ChartReport()
|
|
|
131491
131564
|
this.ItemSymbolFontConfig={Size:g_JSChartResource.Report.Item.SymbolFont.Size, Name:g_JSChartResource.Report.Item.SymbolFont.Name};
|
|
131492
131565
|
this.ItemNameFontConfg={Size:g_JSChartResource.Report.Item.NameFont.Size, Name:g_JSChartResource.Report.Item.NameFont.Name};
|
|
131493
131566
|
|
|
131567
|
+
//名称+代码
|
|
131568
|
+
this.NameSymbolV2Config=CloneData(g_JSChartResource.Report.NameSymbolV2);
|
|
131569
|
+
|
|
131494
131570
|
//缓存
|
|
131495
131571
|
this.HeaderFont=12*GetDevicePixelRatio() +"px 微软雅黑";
|
|
131496
131572
|
this.SortFont=null,
|
|
@@ -131499,6 +131575,7 @@ function ChartReport()
|
|
|
131499
131575
|
this.ItemSymbolFont=12*GetDevicePixelRatio() +"px 微软雅黑";
|
|
131500
131576
|
this.ItemNameFont=15*GetDevicePixelRatio() +"px 微软雅黑";
|
|
131501
131577
|
this.ItemNameHeight=0;
|
|
131578
|
+
this.NameSymbolFont={ Symbol:null, Name:null };
|
|
131502
131579
|
this.RowCount=0; //一屏显示行数
|
|
131503
131580
|
this.HeaderHeight=0; //表头高度
|
|
131504
131581
|
this.FixedRowHeight=0; //固定行高度
|
|
@@ -131643,6 +131720,8 @@ function ChartReport()
|
|
|
131643
131720
|
if (item.TextColor) colItem.TextColor=item.TextColor;
|
|
131644
131721
|
if (item.HeaderColor) colItem.HeaderColor=item.HeaderColor;
|
|
131645
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;
|
|
131646
131725
|
if (item.ID) colItem.ID=item.ID;
|
|
131647
131726
|
if (item.FullColBGColor) colItem.FullColBGColor=item.FullColBGColor; //整列背景色
|
|
131648
131727
|
if (item.HeaderBGColor) colItem.HeaderBGColor=item.HeaderBGColor; //表头背景色
|
|
@@ -131803,6 +131882,7 @@ function ChartReport()
|
|
|
131803
131882
|
{ Type:REPORT_COLUMN_ID.NAME_ID, Title:"名称", TextAlign:"left", Width:null, TextColor:g_JSChartResource.Report.FieldColor.Name, MaxText:"擎擎擎擎0" },
|
|
131804
131883
|
{ Type:REPORT_COLUMN_ID.NAME_EX_ID, Title:"名称", TextAlign:"left", Width:null, TextColor:g_JSChartResource.Report.FieldColor.Name, MaxText:"擎擎擎擎擎擎" },
|
|
131805
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 },
|
|
131806
131886
|
|
|
131807
131887
|
{ Type:REPORT_COLUMN_ID.INCREASE_ID, Title:"涨幅%", TextAlign:"right", Width:null, MaxText:"-888.88" },
|
|
131808
131888
|
{ Type:REPORT_COLUMN_ID.PRICE_ID, Title:"现价", TextAlign:"right", Width:null, MaxText:"88888.88" },
|
|
@@ -131996,6 +132076,9 @@ function ChartReport()
|
|
|
131996
132076
|
this.ItemSymbolFont=`${this.ItemSymbolFontConfig.Size*pixelRatio}px ${ this.ItemSymbolFontConfig.Name}`;
|
|
131997
132077
|
this.ItemNameFont=`${this.ItemNameFontConfg.Size*pixelRatio}px ${ this.ItemNameFontConfg.Name}`;
|
|
131998
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
|
+
|
|
131999
132082
|
this.RowHeight=this.GetFontHeight(this.ItemFont,"擎")+ this.ItemMergin.Top+ this.ItemMergin.Bottom;
|
|
132000
132083
|
this.FixedRowHeight=this.GetFontHeight(this.ItemFixedFont,"擎")+ this.ItemMergin.Top+ this.ItemMergin.Bottom;
|
|
132001
132084
|
this.SortFont=`${this.SortConfig.Size*pixelRatio}px ${ this.SortConfig.Family}`;
|
|
@@ -132025,6 +132108,25 @@ function ChartReport()
|
|
|
132025
132108
|
if (rowHeight>this.RowHeight) this.RowHeight=rowHeight;
|
|
132026
132109
|
if (rowHeight>this.FixedRowHeight) this.FixedRowHeight=rowHeight;
|
|
132027
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
|
+
}
|
|
132028
132130
|
else
|
|
132029
132131
|
{
|
|
132030
132132
|
if (IFrameSplitOperator.IsNumber(item.FixedWidth)) itemWidth=item.FixedWidth;
|
|
@@ -132619,6 +132721,11 @@ function ChartReport()
|
|
|
132619
132721
|
|
|
132620
132722
|
this.FormatDrawInfo(column, stock, drawInfo, data);
|
|
132621
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
|
+
}
|
|
132622
132729
|
else if (column.Type==REPORT_COLUMN_ID.NAME_ID)
|
|
132623
132730
|
{
|
|
132624
132731
|
if (stock && stock.Name)
|
|
@@ -133069,6 +133176,72 @@ function ChartReport()
|
|
|
133069
133176
|
this.Canvas.font=this.ItemFont; //还原字体
|
|
133070
133177
|
}
|
|
133071
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
|
+
|
|
133072
133245
|
this.DrawLimitPriceBorder=function(value, stock, left, top, itemWidth)
|
|
133073
133246
|
{
|
|
133074
133247
|
if (!IFrameSplitOperator.IsNumber(value) || !stock) return;
|
|
@@ -143320,6 +143493,7 @@ function JSDialogTooltip()
|
|
|
143320
143493
|
this.DivDialog=null;
|
|
143321
143494
|
this.DragTitle=null;
|
|
143322
143495
|
this.TitleBox=null; //{ DivTitle, DivName, DivName }
|
|
143496
|
+
this.Style=0; //0=一行一个, 1=2行一个
|
|
143323
143497
|
|
|
143324
143498
|
this.HQChart=null;
|
|
143325
143499
|
|
|
@@ -143346,9 +143520,13 @@ function JSDialogTooltip()
|
|
|
143346
143520
|
this.KItemCache=null;
|
|
143347
143521
|
this.KItemCacheID=null;
|
|
143348
143522
|
|
|
143349
|
-
this.Inital=function(hqchart)
|
|
143523
|
+
this.Inital=function(hqchart, option)
|
|
143350
143524
|
{
|
|
143351
|
-
|
|
143525
|
+
this.HQChart=hqchart;
|
|
143526
|
+
if (option)
|
|
143527
|
+
{
|
|
143528
|
+
if (IFrameSplitOperator.IsNumber(option.Style)) this.Style=option.Style;
|
|
143529
|
+
}
|
|
143352
143530
|
}
|
|
143353
143531
|
|
|
143354
143532
|
this.Destroy=function()
|
|
@@ -143411,36 +143589,78 @@ function JSDialogTooltip()
|
|
|
143411
143589
|
table.appendChild(tbody);
|
|
143412
143590
|
|
|
143413
143591
|
this.AryData=[];
|
|
143414
|
-
|
|
143592
|
+
if (this.Style==1)
|
|
143415
143593
|
{
|
|
143416
|
-
var
|
|
143594
|
+
for(var i=0;i<this.MaxRowCount;++i)
|
|
143595
|
+
{
|
|
143596
|
+
var rowItem={ Tr:null, TitleSpan:null, TextSpan:null, Tr2:null };
|
|
143417
143597
|
|
|
143418
|
-
|
|
143419
|
-
|
|
143420
|
-
|
|
143421
|
-
|
|
143598
|
+
var trDom=document.createElement("tr");
|
|
143599
|
+
trDom.className='UMyChart_Tooltip_Group_Tr';
|
|
143600
|
+
tbody.appendChild(trDom);
|
|
143601
|
+
rowItem.Tr=trDom;
|
|
143422
143602
|
|
|
143423
|
-
|
|
143424
|
-
|
|
143425
|
-
|
|
143603
|
+
var tdDom=document.createElement("td");
|
|
143604
|
+
tdDom.className="UMyChart_Tooltip_Text_Sinlge_Td"; //标题
|
|
143605
|
+
trDom.appendChild(tdDom);
|
|
143426
143606
|
|
|
143427
|
-
|
|
143428
|
-
|
|
143429
|
-
|
|
143430
|
-
|
|
143431
|
-
|
|
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;
|
|
143432
143612
|
|
|
143433
|
-
|
|
143434
|
-
|
|
143435
|
-
|
|
143613
|
+
var trDom=document.createElement("tr");
|
|
143614
|
+
trDom.className='UMyChart_Tooltip_Group_Tr';
|
|
143615
|
+
tbody.appendChild(trDom);
|
|
143616
|
+
rowItem.Tr2=trDom;
|
|
143436
143617
|
|
|
143437
|
-
|
|
143438
|
-
|
|
143439
|
-
|
|
143440
|
-
tdDom.appendChild(spanDom);
|
|
143441
|
-
rowItem.TextSpan=spanDom;
|
|
143618
|
+
var tdDom=document.createElement("td");
|
|
143619
|
+
tdDom.className="UMyChart_Tooltip_Text_Sinlge_Td"; //数值
|
|
143620
|
+
trDom.appendChild(tdDom);
|
|
143442
143621
|
|
|
143443
|
-
|
|
143622
|
+
var spanDom=document.createElement("span");
|
|
143623
|
+
spanDom.className='UMyChart_Tooltip_Text_Span';
|
|
143624
|
+
spanDom.innerText='数值';
|
|
143625
|
+
tdDom.appendChild(spanDom);
|
|
143626
|
+
rowItem.TextSpan=spanDom;
|
|
143627
|
+
|
|
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
|
+
}
|
|
143444
143664
|
}
|
|
143445
143665
|
|
|
143446
143666
|
|
|
@@ -143517,12 +143737,14 @@ function JSDialogTooltip()
|
|
|
143517
143737
|
item.TextSpan.innerText=outItem.Text;
|
|
143518
143738
|
item.TextSpan.style.color=outItem.Color;
|
|
143519
143739
|
item.Tr.style.display="";
|
|
143740
|
+
if (item.Tr2) item.Tr2.style.display="";
|
|
143520
143741
|
}
|
|
143521
143742
|
|
|
143522
143743
|
for( ; index<this.MaxRowCount; ++index)
|
|
143523
143744
|
{
|
|
143524
143745
|
var item=this.AryData[index];
|
|
143525
143746
|
item.Tr.style.display="none";
|
|
143747
|
+
if (item.Tr2) item.Tr2.style.display="none";
|
|
143526
143748
|
}
|
|
143527
143749
|
}
|
|
143528
143750
|
|
|
@@ -143604,6 +143826,9 @@ function JSDialogTooltip()
|
|
|
143604
143826
|
{
|
|
143605
143827
|
var defaultfloatPrecision=GetfloatPrecision(this.HQChart.Symbol);//价格小数位数
|
|
143606
143828
|
var upperSymbol=this.HQChart.Symbol.toUpperCase();
|
|
143829
|
+
var priceFormat=0;
|
|
143830
|
+
if (this.Style==1) priceFormat=1;
|
|
143831
|
+
|
|
143607
143832
|
//日期
|
|
143608
143833
|
var dateItem=this.ForamtDate(data.Date,"YYYY/MM/DD/W",'DialogTooltip-Date' );
|
|
143609
143834
|
|
|
@@ -143614,18 +143839,29 @@ function JSDialogTooltip()
|
|
|
143614
143839
|
var yClose=data.YClose; //昨收价|昨结算价
|
|
143615
143840
|
var aryText=
|
|
143616
143841
|
[
|
|
143617
|
-
this.ForamtPrice(data.Open,yClose, defaultfloatPrecision,'DialogTooltip-Open'),
|
|
143618
|
-
this.ForamtPrice(data.High,yClose, defaultfloatPrecision,'DialogTooltip-High'),
|
|
143619
|
-
this.ForamtPrice(data.Low,yClose, defaultfloatPrecision,'DialogTooltip-Low'),
|
|
143620
|
-
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),
|
|
143621
143846
|
this.FormatVol(data.Vol,'DialogTooltip-Vol' ),
|
|
143622
143847
|
this.FormatAmount(data.Amount,'DialogTooltip-Amount' ),
|
|
143623
|
-
this.FormatIncrease(data.Close,yClose,'DialogTooltip-Increase'),
|
|
143624
|
-
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),
|
|
143625
143850
|
];
|
|
143626
143851
|
|
|
143627
|
-
if (
|
|
143628
|
-
|
|
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
|
+
|
|
143629
143865
|
|
|
143630
143866
|
//换手率
|
|
143631
143867
|
if (MARKET_SUFFIX_NAME.IsSHSZStockA(upperSymbol) && data.FlowCapital>0)
|
|
@@ -143653,7 +143889,6 @@ function JSDialogTooltip()
|
|
|
143653
143889
|
this.GetFormatMinuteTooltipText=function(data)
|
|
143654
143890
|
{
|
|
143655
143891
|
var defaultfloatPrecision=GetfloatPrecision(this.HQChart.Symbol);//价格小数位数
|
|
143656
|
-
|
|
143657
143892
|
var aryText=[];
|
|
143658
143893
|
if (data.Type==0) //连续交易
|
|
143659
143894
|
{
|
|
@@ -143662,11 +143897,11 @@ function JSDialogTooltip()
|
|
|
143662
143897
|
|
|
143663
143898
|
aryText=
|
|
143664
143899
|
[
|
|
143665
|
-
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' ),
|
|
143666
143901
|
this.FormatTime(item.Time, null, "HH:MM", 'DialogTooltip-Time'),
|
|
143667
|
-
this.ForamtPrice(item.Close,item.YClose, defaultfloatPrecision,'DialogTooltip-Price'),
|
|
143902
|
+
this.ForamtPrice(item.Close,item.YClose, defaultfloatPrecision,'DialogTooltip-Price', 1),
|
|
143668
143903
|
this.FormatRisefall(item.Close,item.YClose, defaultfloatPrecision,'DialogTooltip-Risefall'),
|
|
143669
|
-
this.FormatIncrease(item.Close,item.YClose,'DialogTooltip-Increase'),
|
|
143904
|
+
this.FormatIncrease(item.Close,item.YClose,defaultfloatPrecision,'DialogTooltip-Increase', 1),
|
|
143670
143905
|
this.FormatVol(item.Vol,'DialogTooltip-Vol' ),
|
|
143671
143906
|
this.FormatAmount(item.Amount,'DialogTooltip-Amount' ),
|
|
143672
143907
|
];
|
|
@@ -143680,10 +143915,10 @@ function JSDialogTooltip()
|
|
|
143680
143915
|
if (item.Ver===1) timeForamt="HH:MM"
|
|
143681
143916
|
aryText=
|
|
143682
143917
|
[
|
|
143683
|
-
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' ),
|
|
143684
143919
|
this.FormatTime(item.Time, null, timeForamt, 'DialogTooltip-Time'),
|
|
143685
|
-
this.ForamtPrice(item.Price,item.YClose, defaultfloatPrecision,'DialogTooltip-AC-Price'),
|
|
143686
|
-
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),
|
|
143687
143922
|
this.FormatVol(item.Vol[0],'DialogTooltip-AC-Vol' ),
|
|
143688
143923
|
];
|
|
143689
143924
|
}
|
|
@@ -143753,7 +143988,7 @@ function JSDialogTooltip()
|
|
|
143753
143988
|
|
|
143754
143989
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
143755
143990
|
//数据格式化
|
|
143756
|
-
this.ForamtPrice=function(price, yClose, defaultfloatPrecision, TitleID)
|
|
143991
|
+
this.ForamtPrice=function(price, yClose, defaultfloatPrecision, TitleID, format)
|
|
143757
143992
|
{
|
|
143758
143993
|
var item=
|
|
143759
143994
|
{
|
|
@@ -143764,7 +143999,17 @@ function JSDialogTooltip()
|
|
|
143764
143999
|
|
|
143765
144000
|
if (!IFrameSplitOperator.IsNumber(price)) return item;
|
|
143766
144001
|
|
|
143767
|
-
|
|
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
|
+
|
|
143768
144013
|
item.Color=this.GetColor(price, yClose);
|
|
143769
144014
|
|
|
143770
144015
|
return item;
|
|
@@ -143802,7 +144047,7 @@ function JSDialogTooltip()
|
|
|
143802
144047
|
return item;
|
|
143803
144048
|
}
|
|
143804
144049
|
|
|
143805
|
-
this.FormatIncrease=function(price, yClose, TitleID)
|
|
144050
|
+
this.FormatIncrease=function(price, yClose, defaultfloatPrecision, TitleID, fromat)
|
|
143806
144051
|
{
|
|
143807
144052
|
//涨幅
|
|
143808
144053
|
var item=
|
|
@@ -143814,8 +144059,19 @@ function JSDialogTooltip()
|
|
|
143814
144059
|
|
|
143815
144060
|
if (!IFrameSplitOperator.IsNumber(price) || !IFrameSplitOperator.IsNumber(yClose)) return item;
|
|
143816
144061
|
|
|
144062
|
+
|
|
144063
|
+
|
|
144064
|
+
var diffValue=price-yClose;
|
|
143817
144065
|
var value=(price-yClose)/yClose;
|
|
143818
|
-
|
|
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
|
+
|
|
143819
144075
|
item.Color=this.GetColor(value,0);
|
|
143820
144076
|
|
|
143821
144077
|
return item;
|
|
@@ -143840,9 +144096,9 @@ function JSDialogTooltip()
|
|
|
143840
144096
|
return item;
|
|
143841
144097
|
}
|
|
143842
144098
|
|
|
143843
|
-
this.FormatAmplitude=function(high, low, yClose, TitleID)
|
|
144099
|
+
this.FormatAmplitude=function(high, low, yClose, defaultfloatPrecision, TitleID, fromat)
|
|
143844
144100
|
{
|
|
143845
|
-
|
|
144101
|
+
//振幅
|
|
143846
144102
|
var item=
|
|
143847
144103
|
{
|
|
143848
144104
|
Title:g_JSChartLocalization.GetText(TitleID,this.LanguageID),
|
|
@@ -143853,8 +144109,10 @@ function JSDialogTooltip()
|
|
|
143853
144109
|
|
|
143854
144110
|
if (!IFrameSplitOperator.IsNumber(high) || !IFrameSplitOperator.IsNumber(low) || !IFrameSplitOperator.IsNumber(yClose)) return item;
|
|
143855
144111
|
|
|
144112
|
+
var diffValue=high-low;
|
|
143856
144113
|
var value=(high-low)/yClose;
|
|
143857
|
-
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)}%)`;
|
|
143858
144116
|
item.Color=this.GetColor(value,0);
|
|
143859
144117
|
|
|
143860
144118
|
return item;
|
|
@@ -144078,7 +144336,7 @@ function HQChartScriptWorker()
|
|
|
144078
144336
|
|
|
144079
144337
|
|
|
144080
144338
|
|
|
144081
|
-
var HQCHART_VERSION="1.1.
|
|
144339
|
+
var HQCHART_VERSION="1.1.13932";
|
|
144082
144340
|
|
|
144083
144341
|
function PrintHQChartVersion()
|
|
144084
144342
|
{
|