hqchart 1.1.14523 → 1.1.14533
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 +126 -94
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogDrawTool.js +156 -4
- package/src/jscommon/umychart.DialogSearchIndex.js +10 -2
- package/src/jscommon/umychart.NetworkFilterTest.js +69 -1
- package/src/jscommon/umychart.PopKLineChart.js +272 -0
- package/src/jscommon/umychart.js +98 -288
- package/src/jscommon/umychart.report.js +79 -28
- package/src/jscommon/umychart.resource/css/tools.css +35 -0
- package/src/jscommon/umychart.resource/font/drawtool/demo_index.html +95 -3
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.css +19 -3
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.js +1 -1
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.json +28 -0
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.ttf +0 -0
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.woff +0 -0
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.woff2 +0 -0
- package/src/jscommon/umychart.style.js +6 -1
- package/src/jscommon/umychart.testdata.js +69 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +184 -318
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +69 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +622 -324
|
@@ -8131,7 +8131,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8131
8131
|
|
|
8132
8132
|
var yMove=e.clientY-drag.LastMove.Y;
|
|
8133
8133
|
|
|
8134
|
-
this.OnMoveFromeBorder(this.BorderDrag.Index, yMove);
|
|
8134
|
+
if (!this.OnMoveFromeBorder(this.BorderDrag.Index, yMove)) return;
|
|
8135
8135
|
|
|
8136
8136
|
drag.LastMove.X=e.clientX;
|
|
8137
8137
|
drag.LastMove.Y=e.clientY;
|
|
@@ -11032,7 +11032,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11032
11032
|
this.SelectChartDrawPicture=null;
|
|
11033
11033
|
if (this.ChartPictureMenu) this.ChartPictureMenu.Hide();
|
|
11034
11034
|
this.ClearChartDrawPicture(drawPicture); //删除选中的画图工具
|
|
11035
|
-
this.CloseModifyDrawDialog();
|
|
11036
11035
|
}
|
|
11037
11036
|
else if (this.SelectedChart && this.SelectedChart.Selected.Identify)
|
|
11038
11037
|
{
|
|
@@ -11256,14 +11255,16 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11256
11255
|
|
|
11257
11256
|
this.OnMoveFromeBorder=function(index, yMove)
|
|
11258
11257
|
{
|
|
11259
|
-
if (!this.Frame) return;
|
|
11258
|
+
if (!this.Frame) return false;
|
|
11260
11259
|
|
|
11261
|
-
if (!this.Frame.OnMoveFromeBorder(index,yMove)) return ;
|
|
11260
|
+
if (!this.Frame.OnMoveFromeBorder(index,yMove)) return false;
|
|
11262
11261
|
|
|
11263
11262
|
//this.Frame.SetSizeChage(true);
|
|
11264
11263
|
this.Frame.SetFrameBorderSizeChange();
|
|
11265
11264
|
this.Frame.ReDrawToolbar();
|
|
11266
11265
|
this.Draw();
|
|
11266
|
+
|
|
11267
|
+
return true;
|
|
11267
11268
|
}
|
|
11268
11269
|
|
|
11269
11270
|
this.OnZoomUpDownFrameY=function(obj, yMove)
|
|
@@ -12850,20 +12851,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12850
12851
|
|
|
12851
12852
|
if (!this.DialogModifyDraw) return;
|
|
12852
12853
|
|
|
12853
|
-
|
|
12854
|
-
{
|
|
12855
|
-
this.CloseModifyDrawDialog();
|
|
12856
|
-
|
|
12857
|
-
if (!this.ChartPictureMenu) this.ChartPictureMenu=g_DialogFactory.Create('ChartPictureSettingMenu', this.UIElement.parentNode);
|
|
12858
|
-
if (!this.ChartPictureMenu) return;
|
|
12859
|
-
|
|
12860
|
-
var event={ data: { ChartPicture:chart, HQChart:this}};
|
|
12861
|
-
this.ChartPictureMenu.DoModal(event);
|
|
12862
|
-
}
|
|
12863
|
-
else
|
|
12864
|
-
{
|
|
12865
|
-
this.ShowModifyDrawDialog(chart);
|
|
12866
|
-
}
|
|
12854
|
+
this.ShowModifyDrawDialog(chart);
|
|
12867
12855
|
}
|
|
12868
12856
|
|
|
12869
12857
|
this.FinishMoveChartDrawPicture=function()
|
|
@@ -12915,6 +12903,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12915
12903
|
|
|
12916
12904
|
if (option && option.Draw==false) bDraw=false;
|
|
12917
12905
|
if (bDraw) this.Draw();
|
|
12906
|
+
if (this.DialogModifyDraw) this.DialogModifyDraw.OnClearChartDrawPicture(null);
|
|
12918
12907
|
}
|
|
12919
12908
|
else
|
|
12920
12909
|
{
|
|
@@ -12934,6 +12923,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12934
12923
|
|
|
12935
12924
|
if (option && option.Draw==false) bDraw=false;
|
|
12936
12925
|
if (bDraw) this.Draw();
|
|
12926
|
+
if (this.DialogModifyDraw) this.DialogModifyDraw.OnClearChartDrawPicture(drawPicture);
|
|
12927
|
+
break;
|
|
12937
12928
|
}
|
|
12938
12929
|
}
|
|
12939
12930
|
}
|
|
@@ -23874,11 +23865,37 @@ function HQTradeFrame()
|
|
|
23874
23865
|
{
|
|
23875
23866
|
if (this.SubFrame.length<=0) return false;
|
|
23876
23867
|
|
|
23877
|
-
var topFrame=
|
|
23868
|
+
var topFrame=null;
|
|
23869
|
+
var aryTopTitleFrame=[];
|
|
23870
|
+
for(var i=index;i>=0;--i)
|
|
23871
|
+
{
|
|
23872
|
+
var item=this.SubFrame[i];
|
|
23873
|
+
|
|
23874
|
+
if (item.Frame && item.Frame.ChartBorder && item.Frame.ChartBorder.IsShowTitleOnly) //标题模式
|
|
23875
|
+
{
|
|
23876
|
+
aryTopTitleFrame.push(item);
|
|
23877
|
+
continue;
|
|
23878
|
+
}
|
|
23879
|
+
|
|
23880
|
+
if (item.Height>0)
|
|
23881
|
+
{
|
|
23882
|
+
topFrame=item;
|
|
23883
|
+
break;
|
|
23884
|
+
}
|
|
23885
|
+
}
|
|
23886
|
+
|
|
23878
23887
|
var bottomFrame=null;
|
|
23888
|
+
var aryBottomTitleFrame=[];
|
|
23879
23889
|
for(var i=index+1;i<this.SubFrame.length;++i)
|
|
23880
23890
|
{
|
|
23881
23891
|
var item=this.SubFrame[i];
|
|
23892
|
+
|
|
23893
|
+
if (item.Frame && item.Frame.ChartBorder && item.Frame.ChartBorder.IsShowTitleOnly) //标题模式
|
|
23894
|
+
{
|
|
23895
|
+
aryBottomTitleFrame.push(item);
|
|
23896
|
+
continue;
|
|
23897
|
+
}
|
|
23898
|
+
|
|
23882
23899
|
if (item.Height>0)
|
|
23883
23900
|
{
|
|
23884
23901
|
bottomFrame=item;
|
|
@@ -23896,6 +23913,20 @@ function HQTradeFrame()
|
|
|
23896
23913
|
|
|
23897
23914
|
var height=topFrame.Frame.ChartBorder.GetHeightEx();
|
|
23898
23915
|
var height2=bottomFrame.Frame.ChartBorder.GetHeightEx();
|
|
23916
|
+
|
|
23917
|
+
for(var i=0;i<aryBottomTitleFrame.length;++i)
|
|
23918
|
+
{
|
|
23919
|
+
var item=aryBottomTitleFrame[i];
|
|
23920
|
+
item.Frame.ChartBorder.Bottom+=yMove;
|
|
23921
|
+
item.Frame.ChartBorder.Top+=yMove;
|
|
23922
|
+
}
|
|
23923
|
+
|
|
23924
|
+
for(var i=0;i<aryTopTitleFrame.length;++i)
|
|
23925
|
+
{
|
|
23926
|
+
var item=aryTopTitleFrame[i];
|
|
23927
|
+
item.Frame.ChartBorder.Bottom+=yMove;
|
|
23928
|
+
item.Frame.ChartBorder.Top+=yMove;
|
|
23929
|
+
}
|
|
23899
23930
|
|
|
23900
23931
|
//缩小的时候 小于最小高度 不处理
|
|
23901
23932
|
if ((height<this.MinSubFrameHeight && yMove<0) || (height2<this.MinSubFrameHeight && yMove>0))
|
|
@@ -24189,11 +24220,25 @@ function HQTradeFrame()
|
|
|
24189
24220
|
this.SaveSubFrameHeightRate=function()
|
|
24190
24221
|
{
|
|
24191
24222
|
var height=this.ChartBorder.GetHeight();
|
|
24223
|
+
var totalTitleHeight=0;
|
|
24224
|
+
for(var i=0;i<this.SubFrame.length;++i)
|
|
24225
|
+
{
|
|
24226
|
+
var item=this.SubFrame[i];
|
|
24227
|
+
var frame=item.Frame;
|
|
24228
|
+
if (frame && frame.ChartBorder && frame.ChartBorder.IsShowTitleOnly && item.Height>0)
|
|
24229
|
+
totalTitleHeight+=frame.ChartBorder.TitleHeight;
|
|
24230
|
+
}
|
|
24231
|
+
height-=totalTitleHeight;
|
|
24192
24232
|
|
|
24193
24233
|
for(var i=0; i<this.SubFrame.length; ++i)
|
|
24194
24234
|
{
|
|
24195
24235
|
var item=this.SubFrame[i];
|
|
24236
|
+
var frame=item.Frame;
|
|
24237
|
+
if (item.Height<=0) continue;
|
|
24238
|
+
if (frame && frame.ChartBorder && frame.ChartBorder.IsShowTitleOnly && item.Height>0) continue;
|
|
24239
|
+
|
|
24196
24240
|
var subHeight=item.Frame.ChartBorder.GetHeight();
|
|
24241
|
+
|
|
24197
24242
|
var rate=(subHeight/height)*100;
|
|
24198
24243
|
item.Height=rate;
|
|
24199
24244
|
}
|
|
@@ -25325,9 +25370,13 @@ function HQTradeFrame()
|
|
|
25325
25370
|
var left=item.Frame.ChartBorder.GetLeft();
|
|
25326
25371
|
var right=item.Frame.ChartBorder.GetRight();
|
|
25327
25372
|
|
|
25328
|
-
|
|
25329
|
-
|
|
25330
|
-
|
|
25373
|
+
var rtBorder={ Left:left, Right:right, Top:bottom-height/2, Height:height };
|
|
25374
|
+
rtBorder.Bottom=rtBorder.Top+rtBorder.Height;
|
|
25375
|
+
rtBorder.Width=rtBorder.Right-rtBorder.Left;
|
|
25376
|
+
if (x>=rtBorder.Left && x<=rtBorder.Right && y>=rtBorder.Top && y<rtBorder.Bottom)
|
|
25377
|
+
//item.Frame.Canvas.beginPath();
|
|
25378
|
+
//item.Frame.Canvas.rect(left,bottom-height/2,(right-left),height);
|
|
25379
|
+
//if (item.Frame.Canvas.isPointInPath(x,y))
|
|
25331
25380
|
{
|
|
25332
25381
|
return { Index:i, Bottom:true };
|
|
25333
25382
|
}
|
|
@@ -68765,15 +68814,13 @@ function ChartDrawPictureText()
|
|
|
68765
68814
|
delete this.newMethod;
|
|
68766
68815
|
|
|
68767
68816
|
this.ClassName='ChartDrawPictureText';
|
|
68768
|
-
this.Text='
|
|
68817
|
+
this.Text='输入文字';
|
|
68769
68818
|
this.PointCount=1;
|
|
68770
68819
|
this.FontOption={ Family:'微软雅黑', Size:20, Weight:null, Style:null }; //Weight(bold 粗体), Style(italic)
|
|
68771
68820
|
//矢量图片
|
|
68772
68821
|
//this.Text="\ue606";
|
|
68773
68822
|
//this.FontOption={ Family:'iconfont', Size:20, Weight:null, Style:null }; //Weight(bold 粗体), Style(italic)
|
|
68774
68823
|
this.TextRect=null; //文字区域
|
|
68775
|
-
this.IsInitialized=false; //是否初始化了
|
|
68776
|
-
this.SettingMenu;
|
|
68777
68824
|
this.HQChart;
|
|
68778
68825
|
|
|
68779
68826
|
this.SetOption=function(option)
|
|
@@ -68811,12 +68858,6 @@ function ChartDrawPictureText()
|
|
|
68811
68858
|
this.TextRect.Height=textHeight
|
|
68812
68859
|
//this.Canvas.strokeRect(this.TextRect.Left,this.TextRect.Top,this.TextRect.Width,this.TextRect.Height);
|
|
68813
68860
|
this.Canvas.restore();
|
|
68814
|
-
|
|
68815
|
-
if (this.IsInitialized===false)
|
|
68816
|
-
{
|
|
68817
|
-
this.SetTextOption();
|
|
68818
|
-
this.IsInitialized=true;
|
|
68819
|
-
}
|
|
68820
68861
|
}
|
|
68821
68862
|
|
|
68822
68863
|
//根据设置动态生成字体
|
|
@@ -68835,18 +68876,6 @@ function ChartDrawPictureText()
|
|
|
68835
68876
|
return font;
|
|
68836
68877
|
}
|
|
68837
68878
|
|
|
68838
|
-
this.SetTextOption=function()
|
|
68839
|
-
{
|
|
68840
|
-
JSConsole.Chart.Log('[ChartDrawPictureText::SetTextOption]');
|
|
68841
|
-
//创建div设置窗口
|
|
68842
|
-
if (!this.SettingMenu) this.SettingMenu=new ChartPictureTextSettingMenu(this.Frame.ChartBorder.UIElement.parentNode);
|
|
68843
|
-
|
|
68844
|
-
this.SettingMenu.ChartPicture=this;
|
|
68845
|
-
this.SettingMenu.HQChart=this.HQChart;
|
|
68846
|
-
this.SettingMenu.Position={Left:this.TextRect.Left+this.TextRect.Width,Top:this.TextRect.Top};
|
|
68847
|
-
this.SettingMenu.DoModal();
|
|
68848
|
-
}
|
|
68849
|
-
|
|
68850
68879
|
this.IsPointIn=function(x,y)
|
|
68851
68880
|
{
|
|
68852
68881
|
if (!this.Frame || this.Status!=10) return -1;
|
|
@@ -73729,6 +73758,7 @@ function ChartDrawPriceNote()
|
|
|
73729
73758
|
|
|
73730
73759
|
var price=this.Frame.GetYData(ptStart.Y, false);
|
|
73731
73760
|
var text=price.toFixed(floatPrecision);
|
|
73761
|
+
this.Canvas.font=font;
|
|
73732
73762
|
var textHeight=this.Canvas.measureText("擎").width;
|
|
73733
73763
|
var textWidth=this.Canvas.measureText(text).width;
|
|
73734
73764
|
var angle=this.CalculateAngle(ptStart.X, ptStart.Y, ptEnd.X, ptEnd.Y);
|
|
@@ -75814,6 +75844,15 @@ function JSChartResource()
|
|
|
75814
75844
|
TitleBGColor:"rgb(200, 66, 69)", //标题背景颜色
|
|
75815
75845
|
}
|
|
75816
75846
|
|
|
75847
|
+
this.PopKLineChart=
|
|
75848
|
+
{
|
|
75849
|
+
BGColor:"rgba(250,250,250,0.95)",
|
|
75850
|
+
BorderColor:"rgb(0,0,0)",
|
|
75851
|
+
|
|
75852
|
+
TitleColor:'rgb(250,250,250)', //标题颜色
|
|
75853
|
+
TitleBGColor:"rgb(200, 66, 69)", //标题背景颜色
|
|
75854
|
+
}
|
|
75855
|
+
|
|
75817
75856
|
this.SelectRectBGColor="rgba(1,130,212,0.06)"; //背景色
|
|
75818
75857
|
// this.SelectRectAlpha=0.06; //透明度
|
|
75819
75858
|
|
|
@@ -77386,10 +77425,21 @@ function JSChartResource()
|
|
|
77386
77425
|
if (style.PopMinuteChart)
|
|
77387
77426
|
{
|
|
77388
77427
|
var item=style.PopMinuteChart;
|
|
77389
|
-
|
|
77390
|
-
if (item.
|
|
77391
|
-
if (item.
|
|
77392
|
-
if (item.
|
|
77428
|
+
var dest=this.PopMinuteChart;
|
|
77429
|
+
if (item.BGColor) dest.BGColor=item.BGColor;
|
|
77430
|
+
if (item.BorderColor) dest.BorderColor=item.BorderColor;
|
|
77431
|
+
if (item.TitleColor) dest.TitleColor=item.TitleColor;
|
|
77432
|
+
if (item.TitleBGColor) dest.TitleBGColor=item.TitleBGColor;
|
|
77433
|
+
}
|
|
77434
|
+
|
|
77435
|
+
if (style.PopKLineChart)
|
|
77436
|
+
{
|
|
77437
|
+
var item=style.PopKLineChart;
|
|
77438
|
+
var dest=this.PopKLineChart;
|
|
77439
|
+
if (item.BGColor) dest.BGColor=item.BGColor;
|
|
77440
|
+
if (item.BorderColor) dest.BorderColor=item.BorderColor;
|
|
77441
|
+
if (item.TitleColor) dest.TitleColor=item.TitleColor;
|
|
77442
|
+
if (item.TitleBGColor) dest.TitleBGColor=item.TitleBGColor;
|
|
77393
77443
|
}
|
|
77394
77444
|
|
|
77395
77445
|
if (style.DefaultTextColor) this.DefaultTextColor = style.DefaultTextColor;
|
|
@@ -84655,7 +84705,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
84655
84705
|
bindData.Period=this.Period;
|
|
84656
84706
|
bindData.Right=this.Right;
|
|
84657
84707
|
|
|
84658
|
-
if (bindData.Right>0 && MARKET_SUFFIX_NAME.
|
|
84708
|
+
if (bindData.Right>0 && MARKET_SUFFIX_NAME.IsEnableRight(item.Symbol)) //复权数据
|
|
84659
84709
|
{
|
|
84660
84710
|
var rightData=bindData.GetRightData(bindData.Right,{ AlgorithmType: this.RightFormula });
|
|
84661
84711
|
bindData.Data=rightData;
|
|
@@ -85995,8 +86045,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
85995
86045
|
var self=this;
|
|
85996
86046
|
drawPicture.GetActiveDrawPicture=function() { return self.GetActiveDrawPicture(); }
|
|
85997
86047
|
|
|
85998
|
-
if (drawPicture.ClassName==='ChartDrawPictureText') drawPicture.IsInitialized=true;
|
|
85999
|
-
|
|
86000
86048
|
this.ChartDrawPicture.push(drawPicture);
|
|
86001
86049
|
}
|
|
86002
86050
|
|
|
@@ -93313,7 +93361,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
93313
93361
|
if (item)
|
|
93314
93362
|
{
|
|
93315
93363
|
drawPicture=item.Create();
|
|
93316
|
-
if (drawPicture.ClassName=='ChartDrawPictureText') drawPicture.HQChart=this;
|
|
93317
93364
|
}
|
|
93318
93365
|
|
|
93319
93366
|
if (!drawPicture) //iconfont图标
|
|
@@ -93376,7 +93423,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
93376
93423
|
|
|
93377
93424
|
drawPicture.GetActiveDrawPicture=function() { return self.GetActiveDrawPicture(); }
|
|
93378
93425
|
|
|
93379
|
-
if (drawPicture.ClassName==='ChartDrawPictureText') drawPicture.IsInitialized=true;
|
|
93380
93426
|
this.ChartDrawPicture.push(drawPicture);
|
|
93381
93427
|
|
|
93382
93428
|
if (obj.Draw==true) this.DrawDynamicInfo();
|
|
@@ -93420,8 +93466,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
93420
93466
|
drawPicture.ValueToPoint();
|
|
93421
93467
|
drawPicture.GetActiveDrawPicture=()=>{ return this.GetActiveDrawPicture(); }
|
|
93422
93468
|
|
|
93423
|
-
if (drawPicture.ClassName==='ChartDrawPictureText') drawPicture.IsInitialized=true;
|
|
93424
|
-
|
|
93425
93469
|
this.ChartDrawPicture.push(drawPicture);
|
|
93426
93470
|
}
|
|
93427
93471
|
|
|
@@ -98299,7 +98343,6 @@ function DialogFactory()
|
|
|
98299
98343
|
this.DataMap=new Map(
|
|
98300
98344
|
[
|
|
98301
98345
|
["ChartPictureSettingMenu", { Create:function(divElement) { return new ChartPictureSettingMenu(divElement); } }],
|
|
98302
|
-
["ChartPictureTextSettingMenu", { Create:function(divElement) { return new ChartPictureTextSettingMenu(divElement); } }]
|
|
98303
98346
|
]);
|
|
98304
98347
|
|
|
98305
98348
|
this.Create=function(name, option)
|
|
@@ -98525,239 +98568,6 @@ function ChartPictureSettingMenu(divElement)
|
|
|
98525
98568
|
}
|
|
98526
98569
|
}
|
|
98527
98570
|
|
|
98528
|
-
//画图工具 文本设置窗口
|
|
98529
|
-
function ChartPictureTextSettingMenu(divElement)
|
|
98530
|
-
{
|
|
98531
|
-
this.newMethod=IDivDialog; //派生
|
|
98532
|
-
this.newMethod(divElement);
|
|
98533
|
-
delete this.newMethod;
|
|
98534
|
-
|
|
98535
|
-
this.ChartPicture;
|
|
98536
|
-
this.SettingDiv;
|
|
98537
|
-
this.Position;
|
|
98538
|
-
|
|
98539
|
-
this.BackupData; //画图工具备份数据
|
|
98540
|
-
|
|
98541
|
-
this.Close=function()
|
|
98542
|
-
{
|
|
98543
|
-
if (this.SettingDiv) this.DivElement.removeChild(this.SettingDiv); //直接删除
|
|
98544
|
-
}
|
|
98545
|
-
|
|
98546
|
-
this.DoModal=function()
|
|
98547
|
-
{
|
|
98548
|
-
var text=this.ChartPicture.Text; //显示的文本
|
|
98549
|
-
var fontOption=this.ChartPicture.FontOption; //字体设置
|
|
98550
|
-
var lineColor=this.ChartPicture.LineColor;
|
|
98551
|
-
//数据备份, 点取消的时候把备份数据设置回去
|
|
98552
|
-
this.BackupData=
|
|
98553
|
-
{
|
|
98554
|
-
Text:text,
|
|
98555
|
-
LineColor:lineColor,
|
|
98556
|
-
FontOption:{Family: fontOption.Family, Size: fontOption.Size, Weight: fontOption.Weight, Style: fontOption.Style }
|
|
98557
|
-
};
|
|
98558
|
-
JSConsole.Chart.Log('[ChartPictureTextSettingMenu::DoModal] picture info',this.BackupData);
|
|
98559
|
-
|
|
98560
|
-
var self=this;
|
|
98561
|
-
var div=this.DivElement.getElementsByClassName('chartpicture-text-setting')[0];
|
|
98562
|
-
if (!div)
|
|
98563
|
-
{
|
|
98564
|
-
div=document.createElement("div");
|
|
98565
|
-
div.className='chartpicture-text-setting';
|
|
98566
|
-
this.DivElement.appendChild(div);
|
|
98567
|
-
this.SettingDiv=div;
|
|
98568
|
-
}
|
|
98569
|
-
else
|
|
98570
|
-
{
|
|
98571
|
-
this.SettingDiv=div;
|
|
98572
|
-
}
|
|
98573
|
-
|
|
98574
|
-
var titleContainerStr = '<div class="titleWrap">'+
|
|
98575
|
-
'<span class="titleName">样式设置</span>'+
|
|
98576
|
-
'<i class="closeBtn iconfont icon-close"></i>'+
|
|
98577
|
-
'</div>';
|
|
98578
|
-
|
|
98579
|
-
var fontSizeArray = [10,11,12,14,16,20,24,28,32,40];
|
|
98580
|
-
var fontArray = ['微软雅黑','宋体','Arial','仿宋'];
|
|
98581
|
-
var sizeListStr = "";
|
|
98582
|
-
var fontListStr = "";
|
|
98583
|
-
fontArray.forEach(function(item,index){
|
|
98584
|
-
fontListStr += index !== 0 ? '<p>'+item+'</P>' : '<p class="active">'+item+'</P>';
|
|
98585
|
-
});
|
|
98586
|
-
fontSizeArray.forEach(function(item,index){
|
|
98587
|
-
sizeListStr += index !== 5 ? '<p>'+item+'</P>' : '<p class="active">'+item+'</P>';
|
|
98588
|
-
});
|
|
98589
|
-
var contentContainerStr = '<div class="contentWrap">'+
|
|
98590
|
-
'<div class="styleOptions">'+
|
|
98591
|
-
'<span class="colorPicker"><input type="color" id="fontColor" value="#1e90ff"></span>'+
|
|
98592
|
-
'<div class="likeSelect fontSelect"><span class="choicedText">微软雅黑</span><div class="selectList">'+fontListStr+'</div><i class="iconfont icon-xia"></i></div>'+
|
|
98593
|
-
'<div class="likeSelect fontSizeSelect"><span class="choicedText">20</span><div class="selectList">'+sizeListStr+'</div><i class="iconfont icon-xia"></i></div>'+
|
|
98594
|
-
'<span class="strongFont likeBtn"><i class="iconfont icon-jiacu"></i></span>'+
|
|
98595
|
-
'<span class="italicsFont likeBtn"><i class="iconfont icon-qingxieL"></i></span>'+
|
|
98596
|
-
'</div>'+
|
|
98597
|
-
'<textarea class="tArea" id="tArea" placeholder="Text"></textarea>'+
|
|
98598
|
-
'</div>';
|
|
98599
|
-
var btnContainer = '<div class="btnsContainer">'+
|
|
98600
|
-
'<span class="okBtn btn">确认</span>'+
|
|
98601
|
-
'<span class="cancelBtn btn">取消</span>'+
|
|
98602
|
-
'</div>';
|
|
98603
|
-
|
|
98604
|
-
var pixelTatio = GetDevicePixelRatio();
|
|
98605
|
-
var DoModalStr = titleContainerStr+contentContainerStr+btnContainer;
|
|
98606
|
-
this.SettingDiv.style.left = this.Position.Left/pixelTatio + "px";
|
|
98607
|
-
this.SettingDiv.style.top = this.Position.Top/pixelTatio + "px";
|
|
98608
|
-
this.SettingDiv.innerHTML=DoModalStr;
|
|
98609
|
-
this.SettingDiv.style.position = "absolute";
|
|
98610
|
-
this.SettingDiv.style.display = "block";
|
|
98611
|
-
$(".chartpicture-text-setting .colorPicker").css({ //初始设置
|
|
98612
|
-
"borderColor":self.ChartPicture.LineColor,
|
|
98613
|
-
"background-color":self.ChartPicture.LineColor
|
|
98614
|
-
});
|
|
98615
|
-
|
|
98616
|
-
var family = this.ChartPicture.FontOption.Family;
|
|
98617
|
-
$('.chartpicture-text-setting .fontSelect .choicedText').html(family);
|
|
98618
|
-
fontArray.forEach(function(item,index){
|
|
98619
|
-
if(item == family){
|
|
98620
|
-
$('.chartpicture-text-setting .fontSelect p').removeClass('active');
|
|
98621
|
-
$('.chartpicture-text-setting .fontSelect p').eq(index).addClass('active');
|
|
98622
|
-
}
|
|
98623
|
-
});
|
|
98624
|
-
|
|
98625
|
-
var size = this.ChartPicture.FontOption.Size;
|
|
98626
|
-
$('.chartpicture-text-setting .fontSizeSelect .choicedText').html(size);
|
|
98627
|
-
fontSizeArray.forEach(function(item,index){
|
|
98628
|
-
if(item == size){
|
|
98629
|
-
$('.chartpicture-text-setting .fontSizeSelect p').removeClass('active');
|
|
98630
|
-
$('.chartpicture-text-setting .fontSizeSelect p').eq(index).addClass('active');
|
|
98631
|
-
}
|
|
98632
|
-
});
|
|
98633
|
-
|
|
98634
|
-
var weight = this.ChartPicture.FontOption.Weight;
|
|
98635
|
-
if( weight != null && weight == 'bold'){
|
|
98636
|
-
$('.chartpicture-text-setting .strongFont').addClass('hot');
|
|
98637
|
-
}
|
|
98638
|
-
|
|
98639
|
-
var style = this.ChartPicture.FontOption.Style;
|
|
98640
|
-
if( style != null && style == 'italic'){
|
|
98641
|
-
$('.chartpicture-text-setting .italicsFont').addClass('hot');
|
|
98642
|
-
}
|
|
98643
|
-
|
|
98644
|
-
var text = this.ChartPicture.Text;
|
|
98645
|
-
$('.chartpicture-text-setting .tArea').val(text); //结束初始设置
|
|
98646
|
-
|
|
98647
|
-
var defaultTextOption = { Family:'微软雅黑', Size:20, Weight:null, Style:null };
|
|
98648
|
-
$(".chartpicture-text-setting #fontColor").change(
|
|
98649
|
-
{
|
|
98650
|
-
Picture:this.ChartPicture
|
|
98651
|
-
},
|
|
98652
|
-
function(event)
|
|
98653
|
-
{ //颜色选择
|
|
98654
|
-
var value = $(this).val();
|
|
98655
|
-
$(this).parent().css({
|
|
98656
|
-
"borderColor":value,
|
|
98657
|
-
"background-color":value
|
|
98658
|
-
});
|
|
98659
|
-
var chart=event.data.Picture;
|
|
98660
|
-
chart.LineColor = value;
|
|
98661
|
-
if (chart.Update) chart.Update(); //更新界面
|
|
98662
|
-
}
|
|
98663
|
-
);
|
|
98664
|
-
$(".chartpicture-text-setting .fontSelect,.chartpicture-text-setting .fontSizeSelect").click(function(){
|
|
98665
|
-
$(this).find('.selectList').toggle();
|
|
98666
|
-
$(this).toggleClass('hot');
|
|
98667
|
-
});
|
|
98668
|
-
$(".chartpicture-text-setting .fontSelect p").click(
|
|
98669
|
-
{
|
|
98670
|
-
Picture:this.ChartPicture
|
|
98671
|
-
},
|
|
98672
|
-
function(event){ //字体选择
|
|
98673
|
-
var choicedText = $(this).closest(".fontSelect").find('.choicedText').html();
|
|
98674
|
-
var currentSelect = event.currentTarget.innerHTML;
|
|
98675
|
-
if(choicedText !== currentSelect){
|
|
98676
|
-
$(this).closest(".fontSelect").find('.choicedText').html(currentSelect);
|
|
98677
|
-
$(this).siblings().removeClass('active');
|
|
98678
|
-
$(this).addClass('active');
|
|
98679
|
-
var chart = event.data.Picture;
|
|
98680
|
-
chart.FontOption.Family = currentSelect;
|
|
98681
|
-
if (chart.Update) chart.Update(); //更新界面
|
|
98682
|
-
}
|
|
98683
|
-
});
|
|
98684
|
-
$(".chartpicture-text-setting .fontSizeSelect p").click(
|
|
98685
|
-
{
|
|
98686
|
-
Picture:this.ChartPicture
|
|
98687
|
-
},
|
|
98688
|
-
function(event){ //字号选择
|
|
98689
|
-
var choicedText = $(this).closest(".fontSizeSelect").find('.choicedText').html();
|
|
98690
|
-
var currentSelect = event.currentTarget.innerHTML;
|
|
98691
|
-
if(choicedText !== currentSelect){
|
|
98692
|
-
$(this).closest(".fontSizeSelect").find('.choicedText').html(currentSelect);
|
|
98693
|
-
$(this).siblings().removeClass('active');
|
|
98694
|
-
$(this).addClass('active');
|
|
98695
|
-
var chart = event.data.Picture;
|
|
98696
|
-
chart.FontOption.Size = Number(currentSelect);
|
|
98697
|
-
if (chart.Update) chart.Update(); //更新界面
|
|
98698
|
-
}
|
|
98699
|
-
});
|
|
98700
|
-
$(".chartpicture-text-setting .strongFont").click(
|
|
98701
|
-
{
|
|
98702
|
-
Picture:this.ChartPicture
|
|
98703
|
-
},
|
|
98704
|
-
function(event){
|
|
98705
|
-
$(this).toggleClass('hot');
|
|
98706
|
-
var classnames = $(this).attr('class');
|
|
98707
|
-
if(classnames.indexOf('hot') > 0){
|
|
98708
|
-
var chart = event.data.Picture;
|
|
98709
|
-
chart.FontOption.Weight = 'bold';
|
|
98710
|
-
if (chart.Update) chart.Update(); //更新界面
|
|
98711
|
-
}
|
|
98712
|
-
});
|
|
98713
|
-
$(".chartpicture-text-setting .italicsFont").click(
|
|
98714
|
-
{
|
|
98715
|
-
Picture:this.ChartPicture
|
|
98716
|
-
},
|
|
98717
|
-
function(event){
|
|
98718
|
-
$(this).toggleClass('hot')
|
|
98719
|
-
var classnames = $(this).attr('class');
|
|
98720
|
-
if(classnames.indexOf('hot') > 0){
|
|
98721
|
-
var chart = event.data.Picture;
|
|
98722
|
-
chart.FontOption.Style = 'italic';
|
|
98723
|
-
if (chart.Update) chart.Update(); //更新界面
|
|
98724
|
-
}
|
|
98725
|
-
});
|
|
98726
|
-
$(".chartpicture-text-setting .titleWrap .closeBtn,.chartpicture-text-setting .btnsContainer .cancelBtn").click( //取消
|
|
98727
|
-
{
|
|
98728
|
-
Picture:this.ChartPicture
|
|
98729
|
-
},
|
|
98730
|
-
function(event){
|
|
98731
|
-
var picture = event.data.Picture;
|
|
98732
|
-
picture.Text = self.BackupData.Text;
|
|
98733
|
-
picture.LineColor = self.BackupData.LineColor;
|
|
98734
|
-
picture.FontOption = self.BackupData.FontOption;
|
|
98735
|
-
if (picture.Update) picture.Update();
|
|
98736
|
-
self.Close();
|
|
98737
|
-
});
|
|
98738
|
-
$(".chartpicture-text-setting .tArea").keyup( //文本内容
|
|
98739
|
-
{
|
|
98740
|
-
Picture:this.ChartPicture
|
|
98741
|
-
},
|
|
98742
|
-
function(event){
|
|
98743
|
-
JSConsole.Chart.Log('[ChartPictureTextSettingMenu::DoModal] $(".chartpicture-text-setting .tArea").keyup()');
|
|
98744
|
-
var content = $(this).val();
|
|
98745
|
-
var chart = event.data.Picture;
|
|
98746
|
-
chart.Text = content;
|
|
98747
|
-
if (chart.Update) chart.Update(); //更新界面
|
|
98748
|
-
});
|
|
98749
|
-
|
|
98750
|
-
//确定按钮
|
|
98751
|
-
$(".chartpicture-text-setting .btnsContainer .okBtn").click(
|
|
98752
|
-
function()
|
|
98753
|
-
{
|
|
98754
|
-
self.Close();
|
|
98755
|
-
if (self.HQChart && self.HQChart.ChartDrawStorage) self.HQChart.ChartDrawStorage.SaveDrawData(self.ChartPicture); //保存下
|
|
98756
|
-
}
|
|
98757
|
-
);
|
|
98758
|
-
}
|
|
98759
|
-
}
|
|
98760
|
-
|
|
98761
98571
|
|
|
98762
98572
|
function ChartPictureVolProfileSettingMenu(divElement)
|
|
98763
98573
|
{
|
|
@@ -129430,7 +129240,12 @@ function GetBlackStyle()
|
|
|
129430
129240
|
BGColor:"rgba(0,0,0,0.85)",
|
|
129431
129241
|
BorderColor:"rgb(230,230,230)",
|
|
129432
129242
|
},
|
|
129433
|
-
|
|
129243
|
+
|
|
129244
|
+
PopKLineChart:
|
|
129245
|
+
{
|
|
129246
|
+
BGColor:"rgba(0,0,0,0.85)",
|
|
129247
|
+
BorderColor:"rgb(230,230,230)",
|
|
129248
|
+
},
|
|
129434
129249
|
|
|
129435
129250
|
DefaultTextColor: "rgb(101,104,112)",
|
|
129436
129251
|
DefaultTextFont: 14*GetDevicePixelRatio() +'px 微软雅黑',
|
|
@@ -132064,6 +131879,7 @@ function JSReportChart(divElement)
|
|
|
132064
131879
|
if (option.EnablePopMenuV2===true) chart.InitalPopMenu();
|
|
132065
131880
|
if (option.FloatTooltip && option.FloatTooltip.Enable) chart.InitalFloatTooltip(option.FloatTooltip); //提示信息
|
|
132066
131881
|
if (option.MinuteChartTooltip && option.MinuteChartTooltip.Enable) chart.InitalMinuteChartTooltip(option.MinuteChartTooltip);
|
|
131882
|
+
if (option.KLineChartTooltip && option.KLineChartTooltip.Enable) chart.InitalKLineChartTooltip(option.KLineChartTooltip);
|
|
132067
131883
|
|
|
132068
131884
|
if (option.Symbol) chart.Symbol=option.Symbol;
|
|
132069
131885
|
if (option.Name) chart.Name=option.Name;
|
|
@@ -132384,6 +132200,7 @@ function JSReportChartContainer(uielement)
|
|
|
132384
132200
|
|
|
132385
132201
|
//
|
|
132386
132202
|
this.TooltipMinuteChart; //分时图
|
|
132203
|
+
this.TooltipKLineChart; //分时图
|
|
132387
132204
|
|
|
132388
132205
|
//MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
|
|
132389
132206
|
this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
|
|
@@ -132394,6 +132211,7 @@ function JSReportChartContainer(uielement)
|
|
|
132394
132211
|
this.StopAutoUpdate();
|
|
132395
132212
|
|
|
132396
132213
|
this.DestroyMinuteChartTooltip();
|
|
132214
|
+
this.DestroyKLineChartTooltip();
|
|
132397
132215
|
this.DestroyFloatTooltip();
|
|
132398
132216
|
}
|
|
132399
132217
|
|
|
@@ -132433,6 +132251,24 @@ function JSReportChartContainer(uielement)
|
|
|
132433
132251
|
this.TooltipMinuteChart=null;
|
|
132434
132252
|
}
|
|
132435
132253
|
|
|
132254
|
+
this.InitalKLineChartTooltip=function(option)
|
|
132255
|
+
{
|
|
132256
|
+
if (this.TooltipKLineChart) return;
|
|
132257
|
+
|
|
132258
|
+
this.TooltipKLineChart=new JSTooltipKLineChart();
|
|
132259
|
+
this.TooltipKLineChart.Inital(this, option);
|
|
132260
|
+
this.TooltipKLineChart.Create();
|
|
132261
|
+
}
|
|
132262
|
+
|
|
132263
|
+
this.DestroyKLineChartTooltip=function()
|
|
132264
|
+
{
|
|
132265
|
+
if (!this.TooltipKLineChart) return;
|
|
132266
|
+
|
|
132267
|
+
this.TooltipKLineChart.Destroy();
|
|
132268
|
+
this.TooltipKLineChart=null;
|
|
132269
|
+
}
|
|
132270
|
+
|
|
132271
|
+
|
|
132436
132272
|
this.InitalFloatTooltip=function(option)
|
|
132437
132273
|
{
|
|
132438
132274
|
if (this.FloatTooltip) return;
|
|
@@ -132502,6 +132338,35 @@ function JSReportChartContainer(uielement)
|
|
|
132502
132338
|
}
|
|
132503
132339
|
|
|
132504
132340
|
|
|
132341
|
+
this.ShowKLineChartTooltip=function(x,y, data)
|
|
132342
|
+
{
|
|
132343
|
+
if (!this.TooltipKLineChart) return;
|
|
132344
|
+
|
|
132345
|
+
var rtClient=this.UIElement.getBoundingClientRect();
|
|
132346
|
+
var rtScroll=GetScrollPosition();
|
|
132347
|
+
|
|
132348
|
+
var offsetLeft=rtClient.left+rtScroll.Left;
|
|
132349
|
+
var offsetTop=rtClient.top+rtScroll.Top;
|
|
132350
|
+
|
|
132351
|
+
data.Offset={ Left:offsetLeft, Top:offsetTop };
|
|
132352
|
+
|
|
132353
|
+
this.TooltipKLineChart.Show(data, x,y);
|
|
132354
|
+
}
|
|
132355
|
+
|
|
132356
|
+
this.HideKLineChartTooltip=function()
|
|
132357
|
+
{
|
|
132358
|
+
if (!this.TooltipKLineChart) return;
|
|
132359
|
+
|
|
132360
|
+
this.TooltipKLineChart.Hide();
|
|
132361
|
+
}
|
|
132362
|
+
|
|
132363
|
+
this.HideAllTooltip=function()
|
|
132364
|
+
{
|
|
132365
|
+
this.HideKLineChartTooltip();
|
|
132366
|
+
this.HideMinuteChartTooltip();
|
|
132367
|
+
this.HideFloatTooltip();
|
|
132368
|
+
}
|
|
132369
|
+
|
|
132505
132370
|
|
|
132506
132371
|
this.AutoScrollPage=function(step)
|
|
132507
132372
|
{
|
|
@@ -133671,8 +133536,7 @@ function JSReportChartContainer(uielement)
|
|
|
133671
133536
|
if (wheelValue<0) //下
|
|
133672
133537
|
{
|
|
133673
133538
|
this.LastMouseStatus.TooltipStatus=null;
|
|
133674
|
-
this.
|
|
133675
|
-
this.HideFloatTooltip();
|
|
133539
|
+
this.HideAllTooltip();
|
|
133676
133540
|
if (this.GotoNextItem(1))
|
|
133677
133541
|
{
|
|
133678
133542
|
this.Draw();
|
|
@@ -133682,8 +133546,7 @@ function JSReportChartContainer(uielement)
|
|
|
133682
133546
|
else if (wheelValue>0) //上
|
|
133683
133547
|
{
|
|
133684
133548
|
this.LastMouseStatus.TooltipStatus=null;
|
|
133685
|
-
this.
|
|
133686
|
-
this.HideFloatTooltip();
|
|
133549
|
+
this.HideAllTooltip();
|
|
133687
133550
|
if (this.GotoNextItem(-1))
|
|
133688
133551
|
{
|
|
133689
133552
|
this.Draw();
|
|
@@ -133696,8 +133559,7 @@ function JSReportChartContainer(uielement)
|
|
|
133696
133559
|
if (wheelValue<0) //下一页
|
|
133697
133560
|
{
|
|
133698
133561
|
this.LastMouseStatus.TooltipStatus=null;
|
|
133699
|
-
this.
|
|
133700
|
-
this.HideFloatTooltip();
|
|
133562
|
+
this.HideAllTooltip();
|
|
133701
133563
|
if (this.GotoNextPage(this.PageUpDownCycle))
|
|
133702
133564
|
{
|
|
133703
133565
|
this.Draw();
|
|
@@ -133707,8 +133569,7 @@ function JSReportChartContainer(uielement)
|
|
|
133707
133569
|
else if (wheelValue>0) //上一页
|
|
133708
133570
|
{
|
|
133709
133571
|
this.LastMouseStatus.TooltipStatus=null;
|
|
133710
|
-
this.
|
|
133711
|
-
this.HideFloatTooltip();
|
|
133572
|
+
this.HideAllTooltip();
|
|
133712
133573
|
if (this.GotoPreviousPage(this.PageUpDownCycle))
|
|
133713
133574
|
{
|
|
133714
133575
|
this.Draw();
|
|
@@ -133730,8 +133591,7 @@ function JSReportChartContainer(uielement)
|
|
|
133730
133591
|
var keyID = e.keyCode ? e.keyCode :e.which;
|
|
133731
133592
|
if (keyID==116) return; //F15刷新不处理
|
|
133732
133593
|
|
|
133733
|
-
this.
|
|
133734
|
-
this.HideFloatTooltip();
|
|
133594
|
+
this.HideAllTooltip();
|
|
133735
133595
|
switch(keyID)
|
|
133736
133596
|
{
|
|
133737
133597
|
case 33: //page up
|
|
@@ -134020,7 +133880,8 @@ function JSReportChartContainer(uielement)
|
|
|
134020
133880
|
if (this.LastMouseStatus.TooltipStatus) bDrawTooltip=true;
|
|
134021
133881
|
this.LastMouseStatus.TooltipStatus=null;
|
|
134022
133882
|
|
|
134023
|
-
var
|
|
133883
|
+
var bShowKLineTooltip=false;
|
|
133884
|
+
var bShowMinuteTooltip=false;
|
|
134024
133885
|
var chartTooltipData=null;
|
|
134025
133886
|
|
|
134026
133887
|
if (this.DragRow) return;
|
|
@@ -134096,7 +133957,15 @@ function JSReportChartContainer(uielement)
|
|
|
134096
133957
|
{
|
|
134097
133958
|
if (tooltipData.Stock && tooltipData.Stock.Symbol)
|
|
134098
133959
|
{
|
|
134099
|
-
|
|
133960
|
+
bShowMinuteTooltip=true;
|
|
133961
|
+
chartTooltipData={ Symbol:tooltipData.Stock.OriginalSymbol, Rect:tooltipData.Rect };
|
|
133962
|
+
}
|
|
133963
|
+
}
|
|
133964
|
+
else if (tooltipData.Type==21)
|
|
133965
|
+
{
|
|
133966
|
+
if (tooltipData.Stock && tooltipData.Stock.Symbol)
|
|
133967
|
+
{
|
|
133968
|
+
bShowKLineTooltip=true;
|
|
134100
133969
|
chartTooltipData={ Symbol:tooltipData.Stock.OriginalSymbol, Rect:tooltipData.Rect };
|
|
134101
133970
|
}
|
|
134102
133971
|
}
|
|
@@ -134146,20 +134015,17 @@ function JSReportChartContainer(uielement)
|
|
|
134146
134015
|
this.HideFloatTooltip();
|
|
134147
134016
|
}
|
|
134148
134017
|
|
|
134149
|
-
if (
|
|
134150
|
-
|
|
134151
|
-
|
|
134152
|
-
|
|
134153
|
-
|
|
134154
|
-
|
|
134155
|
-
this.HideMinuteChartTooltip();
|
|
134156
|
-
}
|
|
134018
|
+
if (!bShowKLineTooltip) this.HideKLineChartTooltip();
|
|
134019
|
+
if (!bShowMinuteTooltip) this.HideMinuteChartTooltip();
|
|
134020
|
+
|
|
134021
|
+
if (bShowMinuteTooltip) this.ShowMinuteChartTooltip(null, null, chartTooltipData);
|
|
134022
|
+
if (bShowKLineTooltip) this.ShowKLineChartTooltip(null, null, chartTooltipData);
|
|
134023
|
+
|
|
134157
134024
|
}
|
|
134158
134025
|
|
|
134159
134026
|
this.UIOnMounseOut=function(e)
|
|
134160
134027
|
{
|
|
134161
|
-
this.
|
|
134162
|
-
this.HideFloatTooltip();
|
|
134028
|
+
this.HideAllTooltip();
|
|
134163
134029
|
|
|
134164
134030
|
var bDraw=false;
|
|
134165
134031
|
var tabChart=this.GetTabChart();
|
|
@@ -134185,8 +134051,7 @@ function JSReportChartContainer(uielement)
|
|
|
134185
134051
|
|
|
134186
134052
|
this.UIOnMouseleave=function(e)
|
|
134187
134053
|
{
|
|
134188
|
-
this.
|
|
134189
|
-
this.HideFloatTooltip();
|
|
134054
|
+
this.HideAllTooltip();
|
|
134190
134055
|
|
|
134191
134056
|
var tabChart=this.GetTabChart();
|
|
134192
134057
|
if (tabChart && tabChart.MoveOnTabIndex>=0)
|
|
@@ -134412,7 +134277,7 @@ function JSReportChartContainer(uielement)
|
|
|
134412
134277
|
document.onmouseup=null;
|
|
134413
134278
|
|
|
134414
134279
|
this.StopAutoDragScrollTimer();
|
|
134415
|
-
this.
|
|
134280
|
+
this.HideAllTooltip();
|
|
134416
134281
|
var reportChart=this.GetReportChart();
|
|
134417
134282
|
|
|
134418
134283
|
var mouseStatus={ Cursor:"default", Name:"Default"};; //鼠标状态
|
|
@@ -136804,7 +136669,8 @@ function ChartReport()
|
|
|
136804
136669
|
if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) colItem.FloatPrecision=item.FloatPrecision; //小数位数
|
|
136805
136670
|
if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
|
|
136806
136671
|
if (item.Icon) colItem.Icon=item.Icon;
|
|
136807
|
-
if (IFrameSplitOperator.IsBool(item.EnableChartTooltip)) colItem.
|
|
136672
|
+
if (IFrameSplitOperator.IsBool(item.EnableChartTooltip)) colItem.ChartTooltip={ Enable:item.EnableChartTooltip, Type:20 };
|
|
136673
|
+
if (item.ChartTooltip) colItem.ChartTooltip={ Enable:item.ChartTooltip.Enable, Type:item.ChartTooltip.Type };
|
|
136808
136674
|
|
|
136809
136675
|
//点击表头弹出菜单
|
|
136810
136676
|
if (IFrameSplitOperator.IsBool(item.EnablePopupHeaderMenu)) colItem.EnablePopupHeaderMenu=item.EnablePopupHeaderMenu;
|
|
@@ -138373,9 +138239,9 @@ function ChartReport()
|
|
|
138373
138239
|
var tooltipData={ Rect:rtItem, Stock:stock, Index:index, Column:column, RowType:rowType, Type:drawInfo.Tooltip.Type, Data:drawInfo.Tooltip.Data };
|
|
138374
138240
|
this.TooltipRect.push(tooltipData);
|
|
138375
138241
|
}
|
|
138376
|
-
else if (column.
|
|
138242
|
+
else if (column.ChartTooltip && column.ChartTooltip.Enable && IFrameSplitOperator.IsNumber(column.ChartTooltip.Type)) //Type 20分时图 21K线图
|
|
138377
138243
|
{
|
|
138378
|
-
var tooltipData={ Rect:rtItem, Stock:stock, Index:index, Column:column, RowType:rowType, Type:
|
|
138244
|
+
var tooltipData={ Rect:rtItem, Stock:stock, Index:index, Column:column, RowType:rowType, Type:column.ChartTooltip.Type };
|
|
138379
138245
|
this.TooltipRect.push(tooltipData);
|
|
138380
138246
|
}
|
|
138381
138247
|
|
|
@@ -148264,6 +148130,11 @@ var JS_DRAWTOOL_MENU_ID=
|
|
|
148264
148130
|
CMD_CHANGE_BORDER_COLOR_ID:9, //边框颜色
|
|
148265
148131
|
|
|
148266
148132
|
CMD_LOCK_DRAW_CHART_ID:10, //上锁
|
|
148133
|
+
|
|
148134
|
+
CMD_ZOOM_FONT_ID:11, //字体放大
|
|
148135
|
+
CMD_ZOOM_OUT_FONT_ID:12, //字体缩小
|
|
148136
|
+
CMD_MODIFY_TEXT_ID:13, //随机生成文字内容
|
|
148137
|
+
CMD_ADVANCED_SETTING_ID:14, //高级设置
|
|
148267
148138
|
};
|
|
148268
148139
|
|
|
148269
148140
|
function JSDialogDrawTool()
|
|
@@ -148356,6 +148227,7 @@ function JSDialogDrawTool()
|
|
|
148356
148227
|
{ Title: '时间范围', ClassName: 'hqchart_drawtool icon-jiagefanwei', Type:0, Data:{ ID:"DateRange" } },
|
|
148357
148228
|
{ Title: "价格和时间范围", ClassName:"hqchart_drawtool icon-jiagefanwei", Type:0, Data:{ ID:"DatePriceRange" } },
|
|
148358
148229
|
{ Title: "监测线", ClassName:"hqchart_drawtool icon-jiance", Type:0, Data:{ ID:"MonitorLine"} },
|
|
148230
|
+
{ Title: "固定范围成交量分布图", ClassName:"hqchart_drawtool icon-tubiao_gudingfanweichengjiaoliangfenbutu", Type:0, Data:{ ID:"固定范围成交量分布图"}}
|
|
148359
148231
|
]
|
|
148360
148232
|
},
|
|
148361
148233
|
{
|
|
@@ -148865,6 +148737,10 @@ function JSDialogModifyDraw()
|
|
|
148865
148737
|
this.FontColorButton=null;
|
|
148866
148738
|
this.BorderColorButton=null;
|
|
148867
148739
|
this.LockButton=null;
|
|
148740
|
+
this.FontZoomButton=null;
|
|
148741
|
+
this.FontZoomOutButton=null;
|
|
148742
|
+
this.ModifyTextButton=null;
|
|
148743
|
+
this.AdvancedButton=null;
|
|
148868
148744
|
|
|
148869
148745
|
this.RandomLineColor=["rgb(255,69,0)", "rgb(173,255,47)", "rgb(238,154,73)", "rgb(255,105,180)"]; //线段颜色
|
|
148870
148746
|
this.RandomBGColor=["rgba(210,251,209,0.8)", "rgb(217,217,253)", "rgb(255,208,204)", "rgb(252,249,206)"]; //背景颜色
|
|
@@ -148877,9 +148753,13 @@ function JSDialogModifyDraw()
|
|
|
148877
148753
|
{ Title:"修改字体颜色", ClassName: 'hqchart_drawtool icon-zitiyanse', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_CHANGE_FONT_COLOR_ID }},
|
|
148878
148754
|
{ Title:"修改背景颜色", ClassName: 'hqchart_drawtool icon-zitibeijingse', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_CHANGE_BG_COLOR_ID }},
|
|
148879
148755
|
{ Title:"修改边框颜色", ClassName: 'hqchart_drawtool icon-biankuang', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_CHANGE_BORDER_COLOR_ID }},
|
|
148756
|
+
{ Title:"字体放大", ClassName: 'hqchart_drawtool icon-zoomin', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_ZOOM_FONT_ID }},
|
|
148757
|
+
{ Title:"字体缩小", ClassName: 'hqchart_drawtool icon-zoomout', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_ZOOM_OUT_FONT_ID }},
|
|
148758
|
+
{ Title:"随机生成文字内容", ClassName: 'hqchart_drawtool icon-bianji', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_MODIFY_TEXT_ID }},
|
|
148759
|
+
{ Title:"高级设置", ClassName: 'hqchart_drawtool icon-setting', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_ADVANCED_SETTING_ID }},
|
|
148760
|
+
|
|
148880
148761
|
{ Title:"上锁", ClassName: 'hqchart_drawtool icon-lock', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_LOCK_DRAW_CHART_ID }},
|
|
148881
148762
|
{ Title:"删除图形", ClassName: 'hqchart_drawtool icon-recycle_bin', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_DELETE_DRAW_CHART_ID }},
|
|
148882
|
-
|
|
148883
148763
|
];
|
|
148884
148764
|
|
|
148885
148765
|
this.RestoreFocusDelay=800;
|
|
@@ -148969,7 +148849,22 @@ function JSDialogModifyDraw()
|
|
|
148969
148849
|
this.LockButton=data;
|
|
148970
148850
|
this.LockButton.Span.style['color']="rgb(220,220,220)";
|
|
148971
148851
|
break;
|
|
148972
|
-
|
|
148852
|
+
case JS_DRAWTOOL_MENU_ID.CMD_ZOOM_FONT_ID:
|
|
148853
|
+
this.FontZoomButton=data;
|
|
148854
|
+
divItem.style.display="none";
|
|
148855
|
+
break;
|
|
148856
|
+
case JS_DRAWTOOL_MENU_ID.CMD_ZOOM_OUT_FONT_ID:
|
|
148857
|
+
this.FontZoomOutButton=data;
|
|
148858
|
+
divItem.style.display="none";
|
|
148859
|
+
break;
|
|
148860
|
+
case JS_DRAWTOOL_MENU_ID.CMD_MODIFY_TEXT_ID:
|
|
148861
|
+
this.ModifyTextButton=data;
|
|
148862
|
+
divItem.style.display="none";
|
|
148863
|
+
break;
|
|
148864
|
+
case JS_DRAWTOOL_MENU_ID.CMD_ADVANCED_SETTING_ID:
|
|
148865
|
+
this.AdvancedButton=data;
|
|
148866
|
+
divItem.style.display="none";
|
|
148867
|
+
break;
|
|
148973
148868
|
}
|
|
148974
148869
|
|
|
148975
148870
|
parentDivDom.appendChild(divItem);
|
|
@@ -149001,6 +148896,18 @@ function JSDialogModifyDraw()
|
|
|
149001
148896
|
case JS_DRAWTOOL_MENU_ID.CMD_LOCK_DRAW_CHART_ID:
|
|
149002
148897
|
this.ModifyLockChart();
|
|
149003
148898
|
break;
|
|
148899
|
+
case JS_DRAWTOOL_MENU_ID.CMD_ZOOM_FONT_ID:
|
|
148900
|
+
this.ModifyFontZoom(1);
|
|
148901
|
+
break;
|
|
148902
|
+
case JS_DRAWTOOL_MENU_ID.CMD_ZOOM_OUT_FONT_ID:
|
|
148903
|
+
this.ModifyFontZoom(-1);
|
|
148904
|
+
break;
|
|
148905
|
+
case JS_DRAWTOOL_MENU_ID.CMD_MODIFY_TEXT_ID:
|
|
148906
|
+
this.ModifyText();
|
|
148907
|
+
break;
|
|
148908
|
+
case JS_DRAWTOOL_MENU_ID.CMD_ADVANCED_SETTING_ID:
|
|
148909
|
+
this.AdvancedSetting();
|
|
148910
|
+
break;
|
|
149004
148911
|
}
|
|
149005
148912
|
}
|
|
149006
148913
|
|
|
@@ -149042,6 +148949,19 @@ function JSDialogModifyDraw()
|
|
|
149042
148949
|
this.Close();
|
|
149043
148950
|
}
|
|
149044
148951
|
|
|
148952
|
+
this.OnClearChartDrawPicture=function(drawPicture)
|
|
148953
|
+
{
|
|
148954
|
+
if (!this.IsShow()) return;
|
|
148955
|
+
|
|
148956
|
+
if (!drawPicture)
|
|
148957
|
+
{
|
|
148958
|
+
this.Close();
|
|
148959
|
+
return;
|
|
148960
|
+
}
|
|
148961
|
+
|
|
148962
|
+
if (this.ChartPicture && drawPicture.Guid==this.ChartPicture.Guid) this.Close();
|
|
148963
|
+
}
|
|
148964
|
+
|
|
149045
148965
|
this.ShowButton=function(dom, diaplay)
|
|
149046
148966
|
{
|
|
149047
148967
|
if (dom.style.display==diaplay) return;
|
|
@@ -149157,6 +149077,65 @@ function JSDialogModifyDraw()
|
|
|
149157
149077
|
this.HQChart.Draw();
|
|
149158
149078
|
}
|
|
149159
149079
|
|
|
149080
|
+
this.ModifyFontZoom=function(step)
|
|
149081
|
+
{
|
|
149082
|
+
if (!this.ChartPicture || !this.HQChart) return;
|
|
149083
|
+
if (this.ChartPicture.FontOption.Size+step<=2) return;
|
|
149084
|
+
|
|
149085
|
+
var chart=this.ChartPicture;
|
|
149086
|
+
chart.FontOption.Size+=step;
|
|
149087
|
+
|
|
149088
|
+
if (chart.ClassName=="ChartDrawNote") chart.NoteFontOption.Size+=step;
|
|
149089
|
+
|
|
149090
|
+
this.HQChart.Draw();
|
|
149091
|
+
}
|
|
149092
|
+
|
|
149093
|
+
this.ModifyText=function()
|
|
149094
|
+
{
|
|
149095
|
+
if (!this.ChartPicture || !this.HQChart) return;
|
|
149096
|
+
|
|
149097
|
+
var chart=this.ChartPicture;
|
|
149098
|
+
switch(chart.ClassName)
|
|
149099
|
+
{
|
|
149100
|
+
case "ChartDrawPictureText":
|
|
149101
|
+
chart.Text=this.GetRandomText(chart.Text);
|
|
149102
|
+
break;
|
|
149103
|
+
case "ChartDrawAnchoredText":
|
|
149104
|
+
var text=null;
|
|
149105
|
+
if (IFrameSplitOperator.IsNonEmptyArray(chart.AryText)) text=chart.AryText[0].Text;
|
|
149106
|
+
chart.AryText=[ {Text:this.GetRandomText(text)}, {Text:this.GetRandomText(null)}];
|
|
149107
|
+
break;
|
|
149108
|
+
case "ChartDrawNote":
|
|
149109
|
+
var text=null;
|
|
149110
|
+
if (IFrameSplitOperator.IsNonEmptyArray(chart.AryNoteText)) text=chart.AryNoteText[0].Text;
|
|
149111
|
+
chart.AryNoteText=[ {Text:this.GetRandomText(text)}, {Text:this.GetRandomText(null)}];
|
|
149112
|
+
break;
|
|
149113
|
+
default:
|
|
149114
|
+
return;
|
|
149115
|
+
}
|
|
149116
|
+
|
|
149117
|
+
this.HQChart.Draw();
|
|
149118
|
+
}
|
|
149119
|
+
|
|
149120
|
+
this.GetRandomText=function(text)
|
|
149121
|
+
{
|
|
149122
|
+
var ARY_TEXT=["下跌形态","反转十字星","低位档五阳线","倒V型反转","双顶","持续整理形态"];
|
|
149123
|
+
|
|
149124
|
+
var index=this.GetRandomTestData(0, ARY_TEXT.length-1);
|
|
149125
|
+
for(var i=index;i<10;++i)
|
|
149126
|
+
{
|
|
149127
|
+
var value=ARY_TEXT[i%ARY_TEXT.length];
|
|
149128
|
+
if (value!=text) return value;
|
|
149129
|
+
}
|
|
149130
|
+
}
|
|
149131
|
+
|
|
149132
|
+
this.GetRandomTestData=function(min, max) //测试数据
|
|
149133
|
+
{
|
|
149134
|
+
min = Math.ceil(min);
|
|
149135
|
+
max = Math.floor(max);
|
|
149136
|
+
return Math.floor(Math.random() * (max - min + 1)) + min; //含最大值,含最小值
|
|
149137
|
+
}
|
|
149138
|
+
|
|
149160
149139
|
this.Show=function(x, y)
|
|
149161
149140
|
{
|
|
149162
149141
|
if (!this.DivDialog) this.Create();
|
|
@@ -149170,27 +149149,42 @@ function JSDialogModifyDraw()
|
|
|
149170
149149
|
{
|
|
149171
149150
|
this.ChartPicture=chart;
|
|
149172
149151
|
|
|
149173
|
-
var bShowLineColor=true, bShowBGColor=false, bShowFontColor=false, bShowBorderColor=false
|
|
149152
|
+
var bShowLineColor=true, bShowBGColor=false, bShowFontColor=false, bShowBorderColor=false, bShowFontZoom=false, bModifyText=false, bAdvanced=false;;
|
|
149174
149153
|
var bgColor=null, fontColor=null,borderColor=null;
|
|
149175
|
-
var ARRAY_TEXT_CHART=['ChartDrawPriceLabel', "ChartDrawAnchoredText","ChartDrawPriceNote"];
|
|
149154
|
+
var ARRAY_TEXT_CHART=['ChartDrawPriceLabel', "ChartDrawAnchoredText","ChartDrawPriceNote", ];
|
|
149176
149155
|
if (ARRAY_TEXT_CHART.includes(chart.ClassName))
|
|
149177
149156
|
{
|
|
149178
149157
|
bShowBGColor=true;
|
|
149179
149158
|
bShowFontColor=true;
|
|
149180
149159
|
bShowBorderColor=true;
|
|
149160
|
+
bShowFontZoom=true;
|
|
149161
|
+
if (chart.ClassName=="ChartDrawAnchoredText") bModifyText=true;
|
|
149181
149162
|
bgColor=chart.BGColor;
|
|
149182
149163
|
fontColor=chart.TextColor;
|
|
149183
149164
|
borderColor=chart.BorderColor;
|
|
149184
149165
|
}
|
|
149166
|
+
else if (chart.ClassName=="ChartDrawPictureText")
|
|
149167
|
+
{
|
|
149168
|
+
bModifyText=true;
|
|
149169
|
+
bShowFontZoom=true;
|
|
149170
|
+
bShowLineColor=true;
|
|
149171
|
+
}
|
|
149185
149172
|
else if (chart.ClassName=="ChartDrawNote")
|
|
149186
149173
|
{
|
|
149187
149174
|
bShowBGColor=true;
|
|
149188
149175
|
bShowFontColor=true;
|
|
149189
149176
|
bShowBorderColor=true;
|
|
149177
|
+
bModifyText=true;
|
|
149178
|
+
bShowFontZoom=true;
|
|
149190
149179
|
bgColor=chart.NoteBGColor;
|
|
149191
149180
|
fontColor=chart.NoteTextColor;
|
|
149192
149181
|
borderColor=chart.NoteBorderColor;
|
|
149193
149182
|
}
|
|
149183
|
+
else if (chart.ClassName=="ChartDrawVolProfile")
|
|
149184
|
+
{
|
|
149185
|
+
bShowLineColor=false;
|
|
149186
|
+
bAdvanced=true;
|
|
149187
|
+
}
|
|
149194
149188
|
|
|
149195
149189
|
if (this.ColorButton)
|
|
149196
149190
|
{
|
|
@@ -149237,6 +149231,30 @@ function JSDialogModifyDraw()
|
|
|
149237
149231
|
var item=this.LockButton;
|
|
149238
149232
|
item.Span.style['color']=this.ChartPicture.EnableMove?"rgb(220,220,220)":"rgb(0,0,0)";
|
|
149239
149233
|
}
|
|
149234
|
+
|
|
149235
|
+
if (this.FontZoomButton)
|
|
149236
|
+
{
|
|
149237
|
+
var item=this.FontZoomButton;
|
|
149238
|
+
this.ShowButton(item.Div, bShowFontZoom?"inline":"none");
|
|
149239
|
+
}
|
|
149240
|
+
|
|
149241
|
+
if (this.FontZoomOutButton)
|
|
149242
|
+
{
|
|
149243
|
+
var item=this.FontZoomOutButton;
|
|
149244
|
+
this.ShowButton(item.Div, bShowFontZoom?"inline":"none");
|
|
149245
|
+
}
|
|
149246
|
+
|
|
149247
|
+
if (this.ModifyTextButton)
|
|
149248
|
+
{
|
|
149249
|
+
var item=this.ModifyTextButton;
|
|
149250
|
+
this.ShowButton(item.Div, bModifyText?"inline":"none");
|
|
149251
|
+
}
|
|
149252
|
+
|
|
149253
|
+
if (this.AdvancedButton)
|
|
149254
|
+
{
|
|
149255
|
+
var item=this.AdvancedButton;
|
|
149256
|
+
this.ShowButton(item.Div, bAdvanced?"inline":"none");
|
|
149257
|
+
}
|
|
149240
149258
|
}
|
|
149241
149259
|
|
|
149242
149260
|
this.OnMouseDownTitle=function(e)
|
|
@@ -149857,6 +149875,278 @@ JSTooltipMinuteChart.GetMinuteOption=function()
|
|
|
149857
149875
|
|
|
149858
149876
|
|
|
149859
149877
|
|
|
149878
|
+
|
|
149879
|
+
|
|
149880
|
+
/*
|
|
149881
|
+
Copyright (c) 2018 jones
|
|
149882
|
+
|
|
149883
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
149884
|
+
|
|
149885
|
+
开源项目 https://github.com/jones2000/HQChart
|
|
149886
|
+
|
|
149887
|
+
jones_2000@163.com
|
|
149888
|
+
*/
|
|
149889
|
+
|
|
149890
|
+
|
|
149891
|
+
///////////////////////////////////////////////////////
|
|
149892
|
+
// K线图提示信息
|
|
149893
|
+
//
|
|
149894
|
+
//////////////////////////////////////////////////////
|
|
149895
|
+
|
|
149896
|
+
function JSTooltipKLineChart()
|
|
149897
|
+
{
|
|
149898
|
+
this.DivDialog=null;
|
|
149899
|
+
this.HQChart=null;
|
|
149900
|
+
this.ID=Guid();
|
|
149901
|
+
|
|
149902
|
+
this.BGColor=g_JSChartResource.PopMinuteChart.BGColor;
|
|
149903
|
+
this.BorderColor=g_JSChartResource.PopMinuteChart.BorderColor;
|
|
149904
|
+
this.OnCreateCallback;
|
|
149905
|
+
|
|
149906
|
+
this.KLine=
|
|
149907
|
+
{
|
|
149908
|
+
Option:JSTooltipKLineChart.GetKLineOption(),
|
|
149909
|
+
JSChart:null,
|
|
149910
|
+
Symbol:null,
|
|
149911
|
+
}
|
|
149912
|
+
|
|
149913
|
+
this.Inital=function(hqchart, option)
|
|
149914
|
+
{
|
|
149915
|
+
this.HQChart=hqchart;
|
|
149916
|
+
|
|
149917
|
+
if (option)
|
|
149918
|
+
{
|
|
149919
|
+
if (IFrameSplitOperator.IsObject(option.Option))
|
|
149920
|
+
{
|
|
149921
|
+
var item=CloneData(option.Option); //复制一份出来
|
|
149922
|
+
this.KLine.Option=Object.assign(this.KLine.Option,item);
|
|
149923
|
+
}
|
|
149924
|
+
if (option.OnCreateCallback) this.OnCreateCallback=option.OnCreateCallback;
|
|
149925
|
+
}
|
|
149926
|
+
}
|
|
149927
|
+
|
|
149928
|
+
this.Create=function()
|
|
149929
|
+
{
|
|
149930
|
+
var divDom=document.createElement('div');
|
|
149931
|
+
divDom.className='UMyChart_Tooltip_KLine_Div';
|
|
149932
|
+
divDom.id=this.ID;
|
|
149933
|
+
|
|
149934
|
+
var divChart=document.createElement('div');
|
|
149935
|
+
divChart.className='UMyChart_Tooltip_KLine_Chart_Div';
|
|
149936
|
+
divDom.appendChild(divChart);
|
|
149937
|
+
|
|
149938
|
+
this.DivDialog=divDom;
|
|
149939
|
+
|
|
149940
|
+
var chart=JSChart.Init(divChart);
|
|
149941
|
+
this.KLine.JSChart=chart;
|
|
149942
|
+
|
|
149943
|
+
//语言跟主图保持一致
|
|
149944
|
+
if (this.HQChart) this.KLine.Option.Language=g_JSChartLocalization.GetLanguageName(this.HQChart.LanguageID);
|
|
149945
|
+
this.KLine.Option.OnCreatedCallback=(chart)=>{ this.OnCreateHQChart(chart); }
|
|
149946
|
+
this.KLine.Option.NetworkFilter=(data, callback)=>{ this.NetworkFilter(data, callback); }
|
|
149947
|
+
chart.SetOption(this.KLine.Option); //设置K线配置
|
|
149948
|
+
|
|
149949
|
+
document.body.appendChild(divDom);
|
|
149950
|
+
|
|
149951
|
+
this.UpdateStyle();
|
|
149952
|
+
}
|
|
149953
|
+
|
|
149954
|
+
this.UpdateStyle=function()
|
|
149955
|
+
{
|
|
149956
|
+
if (!this.DivDialog) return;
|
|
149957
|
+
|
|
149958
|
+
if (this.BGColor) this.DivDialog.style['background-color']=this.BGColor;
|
|
149959
|
+
if (this.BorderColor) this.DivDialog.style['border-color']=this.BorderColor;
|
|
149960
|
+
}
|
|
149961
|
+
|
|
149962
|
+
this.NetworkFilter=function(data, callback)
|
|
149963
|
+
{
|
|
149964
|
+
if (!this.HQChart || !this.HQChart.NetworkFilter) return;
|
|
149965
|
+
|
|
149966
|
+
this.HQChart.NetworkFilter(data, callback);
|
|
149967
|
+
}
|
|
149968
|
+
|
|
149969
|
+
this.OnCreateHQChart=function(chart)
|
|
149970
|
+
{
|
|
149971
|
+
if (this.OnCreateCallback) this.OnCreateCallback(chart);
|
|
149972
|
+
}
|
|
149973
|
+
|
|
149974
|
+
this.Destroy=function()
|
|
149975
|
+
{
|
|
149976
|
+
if (this.DivDialog) document.body.removeChild(this.DivDialog);
|
|
149977
|
+
this.DivDialog=null;
|
|
149978
|
+
this.TitleBox=null;
|
|
149979
|
+
if (!this.KLine.JSChart) this.KLine.JSChart.ChartDestory();
|
|
149980
|
+
this.KLine.JSChart=null;
|
|
149981
|
+
}
|
|
149982
|
+
|
|
149983
|
+
this.IsShow=function()
|
|
149984
|
+
{
|
|
149985
|
+
if (!this.DivDialog) return false;
|
|
149986
|
+
|
|
149987
|
+
return this.DivDialog.style.visibility==='visible';
|
|
149988
|
+
}
|
|
149989
|
+
|
|
149990
|
+
this.Show=function(data, x, y)
|
|
149991
|
+
{
|
|
149992
|
+
if (!this.DivDialog) this.Create();
|
|
149993
|
+
if (!data || !data.Symbol) return;
|
|
149994
|
+
|
|
149995
|
+
var symbol=data.Symbol;
|
|
149996
|
+
if (this.KLine.JSChart)
|
|
149997
|
+
{
|
|
149998
|
+
if (this.KLine.Symbol!=symbol)
|
|
149999
|
+
{
|
|
150000
|
+
this.KLine.Symbol=symbol;
|
|
150001
|
+
this.KLine.JSChart.ChangeSymbol(symbol);
|
|
150002
|
+
}
|
|
150003
|
+
}
|
|
150004
|
+
|
|
150005
|
+
if (!this.KLine.Option.EnableResize)
|
|
150006
|
+
{
|
|
150007
|
+
if (this.KLine.JSChart) this.KLine.JSChart.OnSize({ Type:1 });
|
|
150008
|
+
}
|
|
150009
|
+
|
|
150010
|
+
if (IFrameSplitOperator.IsNumberV2(x,y))
|
|
150011
|
+
{
|
|
150012
|
+
|
|
150013
|
+
}
|
|
150014
|
+
else if (data.Rect)
|
|
150015
|
+
{
|
|
150016
|
+
var rtCell=data.Rect;
|
|
150017
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
150018
|
+
var rtItem={ Left:rtCell.Left/pixelRatio, Right:rtCell.Right/pixelRatio, Bottom:rtCell.Bottom/pixelRatio, Top:rtCell.Top/pixelRatio };
|
|
150019
|
+
rtItem.Width=rtItem.Right-rtItem.Left;
|
|
150020
|
+
rtItem.Height=rtItem.Bottom-rtItem.Top;
|
|
150021
|
+
|
|
150022
|
+
//超出窗口调整位置
|
|
150023
|
+
var height=this.DivDialog.offsetHeight;
|
|
150024
|
+
var width=this.DivDialog.offsetWidth;
|
|
150025
|
+
var x=rtItem.Right+data.Offset.Left;
|
|
150026
|
+
var y=rtItem.Bottom+data.Offset.Top;
|
|
150027
|
+
|
|
150028
|
+
var xRight=window.innerWidth-5;
|
|
150029
|
+
var ybottom=window.innerHeight-5;
|
|
150030
|
+
if (x+width>xRight) x=(rtItem.Left+data.Offset.Left)-width;
|
|
150031
|
+
if (y+height>ybottom) y=(rtItem.Top+data.Offset.Top)-height;
|
|
150032
|
+
|
|
150033
|
+
this.DivDialog.style.visibility='visible';
|
|
150034
|
+
this.DivDialog.style.top = y + "px";
|
|
150035
|
+
this.DivDialog.style.left = x + "px";
|
|
150036
|
+
}
|
|
150037
|
+
}
|
|
150038
|
+
|
|
150039
|
+
this.Hide=function()
|
|
150040
|
+
{
|
|
150041
|
+
if (!this.DivDialog) return;
|
|
150042
|
+
if (this.DivDialog.style.visibility!='hidden')
|
|
150043
|
+
this.DivDialog.style.visibility='hidden';
|
|
150044
|
+
}
|
|
150045
|
+
|
|
150046
|
+
|
|
150047
|
+
this.ReloadResource=function(option)
|
|
150048
|
+
{
|
|
150049
|
+
this.BGColor=g_JSChartResource.PopMinuteChart.BGColor;
|
|
150050
|
+
this.BorderColor=g_JSChartResource.PopMinuteChart.BorderColor;
|
|
150051
|
+
|
|
150052
|
+
if (!this.DivDialog) return;
|
|
150053
|
+
|
|
150054
|
+
this.UpdateStyle();
|
|
150055
|
+
|
|
150056
|
+
if (this.KLine.JSChart) this.KLine.JSChart.ReloadResource(option);
|
|
150057
|
+
}
|
|
150058
|
+
|
|
150059
|
+
}
|
|
150060
|
+
|
|
150061
|
+
JSTooltipKLineChart.GetKLineOption=function()
|
|
150062
|
+
{
|
|
150063
|
+
var option=
|
|
150064
|
+
{
|
|
150065
|
+
Type:'历史K线图', //创建图形类型
|
|
150066
|
+
Windows: //窗口指标
|
|
150067
|
+
[
|
|
150068
|
+
{ Index:"MA",Change:false, Modify:false },
|
|
150069
|
+
{ Index:"MACD", Close:false, Change:false, Modify:false,MaxMin:false,TitleWindow:false },
|
|
150070
|
+
],
|
|
150071
|
+
|
|
150072
|
+
//Language:'EN',
|
|
150073
|
+
|
|
150074
|
+
Symbol:null,
|
|
150075
|
+
IsAutoUpdate:false, //是自动更新数据
|
|
150076
|
+
AutoUpdateFrequency:3000, //数据更新频率
|
|
150077
|
+
|
|
150078
|
+
|
|
150079
|
+
SplashTitle:'加载数据中......',
|
|
150080
|
+
IsShowRightMenu:false, //右键菜单
|
|
150081
|
+
CtrlMoveStep:10,
|
|
150082
|
+
|
|
150083
|
+
KLine: //K线设置
|
|
150084
|
+
{
|
|
150085
|
+
DragMode:1, //拖拽模式 0=禁止拖拽 1=数据拖拽 2=区间选择
|
|
150086
|
+
Right:1, //复权 0 不复权 1 前复权 2 后复权
|
|
150087
|
+
Period:0, //周期 0 日线 1 周线 2 月线 3 年线
|
|
150088
|
+
MaxRequestDataCount:3000, //数据个数
|
|
150089
|
+
MaxRequestMinuteDayCount:5, //分钟数据获取几天数据 默认取5天数据
|
|
150090
|
+
IsShowTooltip:false, //是否显示K线提示信息
|
|
150091
|
+
DrawType:0, //K线类型 0=实心K线柱子 1=收盘价线 2=美国线 3=空心K线柱子 4=收盘价面积图
|
|
150092
|
+
KLineDoubleClick:false, //禁止双击弹框
|
|
150093
|
+
RightSpaceCount:0,
|
|
150094
|
+
ZoomType:0,
|
|
150095
|
+
DataWidth:2,
|
|
150096
|
+
},
|
|
150097
|
+
|
|
150098
|
+
StepPixel:0,
|
|
150099
|
+
|
|
150100
|
+
Listener:
|
|
150101
|
+
{
|
|
150102
|
+
KeyDown:false,
|
|
150103
|
+
Wheel:false
|
|
150104
|
+
},
|
|
150105
|
+
|
|
150106
|
+
|
|
150107
|
+
|
|
150108
|
+
KLineTitle: //标题设置
|
|
150109
|
+
{
|
|
150110
|
+
IsShowName:true, //不显示股票名称
|
|
150111
|
+
IsShowSettingInfo:true, //不显示周期/复权
|
|
150112
|
+
//IsTitleShowLatestData:true,
|
|
150113
|
+
},
|
|
150114
|
+
|
|
150115
|
+
Border: //边框
|
|
150116
|
+
{
|
|
150117
|
+
|
|
150118
|
+
Left:1, //左边间距
|
|
150119
|
+
Right:20, //右边间距
|
|
150120
|
+
Bottom:25, //底部间距
|
|
150121
|
+
Top:25, //顶部间距
|
|
150122
|
+
|
|
150123
|
+
AutoLeft:{ Blank:10, MinWidth:30 },
|
|
150124
|
+
AutoRight:{ Blank:5, MinWidth:30 },
|
|
150125
|
+
},
|
|
150126
|
+
|
|
150127
|
+
Frame: //子框架设置
|
|
150128
|
+
[
|
|
150129
|
+
{
|
|
150130
|
+
SplitCount:4,
|
|
150131
|
+
IsShowLeftText:false,
|
|
150132
|
+
},
|
|
150133
|
+
|
|
150134
|
+
{ SplitCount:3,IsShowLeftText:false, },
|
|
150135
|
+
{ SplitCount:3, IsShowLeftText:false,}
|
|
150136
|
+
],
|
|
150137
|
+
}
|
|
150138
|
+
return option;
|
|
150139
|
+
}
|
|
150140
|
+
|
|
150141
|
+
|
|
150142
|
+
|
|
150143
|
+
|
|
150144
|
+
|
|
150145
|
+
|
|
150146
|
+
|
|
150147
|
+
|
|
150148
|
+
|
|
150149
|
+
|
|
149860
150150
|
/*
|
|
149861
150151
|
Copyright (c) 2018 jones
|
|
149862
150152
|
|
|
@@ -154346,8 +154636,16 @@ function JSDialogModifyIndexParam()
|
|
|
154346
154636
|
|
|
154347
154637
|
item.Value=value;
|
|
154348
154638
|
|
|
154349
|
-
|
|
154350
|
-
|
|
154639
|
+
|
|
154640
|
+
|
|
154641
|
+
if (this.IndexData.Type==1)
|
|
154642
|
+
{
|
|
154643
|
+
this.HQChart.UpdateWindowIndex(this.IndexData.WindowIndex);
|
|
154644
|
+
}
|
|
154645
|
+
else if (this.IndexData.Type==2)
|
|
154646
|
+
{
|
|
154647
|
+
this.HQChart.UpdateOverlayIndex(this.IndexData.Identify);
|
|
154648
|
+
}
|
|
154351
154649
|
}
|
|
154352
154650
|
}
|
|
154353
154651
|
|
|
@@ -154475,7 +154773,7 @@ function HQChartScriptWorker()
|
|
|
154475
154773
|
|
|
154476
154774
|
|
|
154477
154775
|
|
|
154478
|
-
var HQCHART_VERSION="1.1.
|
|
154776
|
+
var HQCHART_VERSION="1.1.14532";
|
|
154479
154777
|
|
|
154480
154778
|
function PrintHQChartVersion()
|
|
154481
154779
|
{
|