hqchart 1.1.13403 → 1.1.13436
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/umychart.NetworkFilterTest.vue.js +3 -2
- package/lib/umychart.vue.js +72 -43
- package/package.json +1 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +34 -0
- package/src/jscommon/umychart.complier.js +54 -0
- package/src/jscommon/umychart.index.data.js +16 -0
- package/src/jscommon/umychart.js +451 -72
- package/src/jscommon/umychart.style.js +7 -0
- package/src/jscommon/umychart.testdata/000001.sh.day.kline.js +79866 -0
- package/src/jscommon/umychart.testdata/399001.sz.day.kline.js +78515 -0
- package/src/jscommon/umychart.testdata.js +34 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +539 -76
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +34 -0
- package/src/jscommon/umychart.vue/umychart.vue.js +529 -73
|
@@ -169,6 +169,8 @@ function JSIndexScript()
|
|
|
169
169
|
["ICHIMOKU",this.ICHIMOKU],["CDP-STD", this.CDP_STD],["TBP-STD",this.TBP_STD],
|
|
170
170
|
["ADX", this.ADX],
|
|
171
171
|
|
|
172
|
+
["持仓量", this.VOL_POSITION], //成交量+持仓量
|
|
173
|
+
|
|
172
174
|
//通达信特色指标
|
|
173
175
|
["散户线", this.ShareholderCount],["NXTS", this.NXTS],["FKX", this.FKX],["两融资金", this.Margin4],
|
|
174
176
|
["ZSDB",this.ZSDB],
|
|
@@ -3407,6 +3409,20 @@ JSIndexScript.prototype.CJL = function ()
|
|
|
3407
3409
|
return data;
|
|
3408
3410
|
}
|
|
3409
3411
|
|
|
3412
|
+
JSIndexScript.prototype.VOL_POSITION=function()
|
|
3413
|
+
{
|
|
3414
|
+
let data =
|
|
3415
|
+
{
|
|
3416
|
+
Name: '持仓量', Description: '持仓量', IsMainIndex: false,
|
|
3417
|
+
Args: [],
|
|
3418
|
+
Script: //脚本
|
|
3419
|
+
"成交量:VOL,VOLSTICK;\n\
|
|
3420
|
+
持仓量:VOLINSTK,SINGLELINE;"
|
|
3421
|
+
};
|
|
3422
|
+
|
|
3423
|
+
return data;
|
|
3424
|
+
}
|
|
3425
|
+
|
|
3410
3426
|
JSIndexScript.prototype.ASI = function ()
|
|
3411
3427
|
{
|
|
3412
3428
|
let data =
|
|
@@ -4040,6 +4056,17 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4040
4056
|
if (IFrameSplitOperator.IsNumber(option.ZIndex)) element.style["z-index"]=option.ZIndex;
|
|
4041
4057
|
}
|
|
4042
4058
|
|
|
4059
|
+
if (this.CanvasElement)
|
|
4060
|
+
{
|
|
4061
|
+
element.height=this.CanvasElement.height;
|
|
4062
|
+
element.width=this.CanvasElement.width;
|
|
4063
|
+
if (element.style)
|
|
4064
|
+
{
|
|
4065
|
+
element.style.width=this.CanvasElement.style.width;
|
|
4066
|
+
element.style.height=this.CanvasElement.style.height
|
|
4067
|
+
}
|
|
4068
|
+
}
|
|
4069
|
+
|
|
4043
4070
|
divElement.appendChild(element);
|
|
4044
4071
|
|
|
4045
4072
|
var item={ Element:element, Canvas:null };
|
|
@@ -4376,6 +4403,22 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4376
4403
|
}
|
|
4377
4404
|
}
|
|
4378
4405
|
|
|
4406
|
+
if (chart.ClassName=="KLineChartContainer")
|
|
4407
|
+
{
|
|
4408
|
+
if (!option.DragSelectRect)
|
|
4409
|
+
{
|
|
4410
|
+
option.DragSelectRect={ Enable:true }; //默认开启区间选中画布
|
|
4411
|
+
}
|
|
4412
|
+
|
|
4413
|
+
if (option.DragSelectRect)
|
|
4414
|
+
{
|
|
4415
|
+
var zindex=10;
|
|
4416
|
+
var item=option.DragSelectRect;
|
|
4417
|
+
if (IFrameSplitOperator.IsNumber(item.ZIndex)) zindex=item.ZIndex;
|
|
4418
|
+
if (item.Enable) this.CreateExtraCanvasElement(JSChart.RectDragCanvasKey, { ZIndex:zindex }); //创建独立的区间选择画布
|
|
4419
|
+
}
|
|
4420
|
+
}
|
|
4421
|
+
|
|
4379
4422
|
//创建子窗口
|
|
4380
4423
|
chart.Create(option.Windows.length, option);
|
|
4381
4424
|
|
|
@@ -4383,6 +4426,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4383
4426
|
|
|
4384
4427
|
this.AdjustChartBorder(chart);
|
|
4385
4428
|
|
|
4429
|
+
|
|
4386
4430
|
if (option.KLine)
|
|
4387
4431
|
{
|
|
4388
4432
|
if (option.KLine.PageSize > 0) //一屏显示的数据个数
|
|
@@ -4855,6 +4899,22 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4855
4899
|
if (IFrameSplitOperator.IsBool(item.EnableMoveOn)) chart.SelectedChart.EnableMoveOn=item.EnableMoveOn;
|
|
4856
4900
|
}
|
|
4857
4901
|
|
|
4902
|
+
if (chart.ClassName=="MinuteChartContainer")
|
|
4903
|
+
{
|
|
4904
|
+
if (!option.DragSelectRect)
|
|
4905
|
+
{
|
|
4906
|
+
option.DragSelectRect={ Enable:true }; //默认开启区间选中画布
|
|
4907
|
+
}
|
|
4908
|
+
|
|
4909
|
+
if (option.DragSelectRect)
|
|
4910
|
+
{
|
|
4911
|
+
var item=option.DragSelectRect;
|
|
4912
|
+
var zindex=10;
|
|
4913
|
+
if (IFrameSplitOperator.IsNumber(item.ZIndex)) zindex=item.ZIndex;
|
|
4914
|
+
if (item.Enable) this.CreateExtraCanvasElement(JSChart.RectDragCanvasKey, { ZIndex:zindex }); //创建独立的区间选择画布
|
|
4915
|
+
}
|
|
4916
|
+
}
|
|
4917
|
+
|
|
4858
4918
|
//分页
|
|
4859
4919
|
if (option.PageInfo) chart.SetPageInfo(option.PageInfo);
|
|
4860
4920
|
|
|
@@ -6108,6 +6168,7 @@ JSChart.LastVersion=null; //最新的版本号
|
|
|
6108
6168
|
JSChart.EnableCanvasWillReadFrequently=false; //https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently
|
|
6109
6169
|
JSChart.CorssCursorCanvasKey="hqchart_corsscursor";
|
|
6110
6170
|
JSChart.TooltipCursorCanvasKey="hqchart_tooltip";
|
|
6171
|
+
JSChart.RectDragCanvasKey="hqchart_drag_rect";
|
|
6111
6172
|
|
|
6112
6173
|
//初始化
|
|
6113
6174
|
JSChart.Init=function(divElement,bScreen,bCacheCanvas)
|
|
@@ -6487,7 +6548,7 @@ var JSCHART_EVENT_ID=
|
|
|
6487
6548
|
|
|
6488
6549
|
|
|
6489
6550
|
ON_CHANGE_INDEX:150, //切换指标
|
|
6490
|
-
ON_MENU_COMMAND:151,
|
|
6551
|
+
ON_MENU_COMMAND:151, //菜单事件回调
|
|
6491
6552
|
ON_CREATE_RIGHT_MENU:152, //创建右键菜单
|
|
6492
6553
|
|
|
6493
6554
|
ON_FORMAT_CALL_AUCTION_INDEX_TITLE:153, //集合竞价指标窗口标题内容
|
|
@@ -6651,6 +6712,8 @@ var JSCHART_MENU_ID=
|
|
|
6651
6712
|
CMD_ADD_OVERLAY_INDEX_ID:36, //添加叠加指标
|
|
6652
6713
|
|
|
6653
6714
|
CMD_CHANGE_LANGUAGE_ID:37, //语言切换
|
|
6715
|
+
|
|
6716
|
+
CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID:38,
|
|
6654
6717
|
}
|
|
6655
6718
|
|
|
6656
6719
|
|
|
@@ -6734,6 +6797,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6734
6797
|
this.EnableShowCorssCursor={ DrawPicture:true }; //DrawPicture=画图是否显示十字光标
|
|
6735
6798
|
this.ChartPictureMenu; //画图工具 单个图形设置菜单
|
|
6736
6799
|
this.ChartCorssCursor; //十字光标
|
|
6800
|
+
this.ChartDragSelectRect; //选择区间选中
|
|
6737
6801
|
this.IsClickShowCorssCursor=false; //手势点击显示十字光标
|
|
6738
6802
|
this.ChartSplashPaint=null; //等待提示
|
|
6739
6803
|
this.LoadDataSplashTitle="数据加载中"; //下载数据提示信息
|
|
@@ -6807,16 +6871,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6807
6871
|
this.IsShowTooltip=true; //是否显示K线tooltip
|
|
6808
6872
|
this.TooltipCache={ Type:null, IsShow:false, X:null, Y:null, Data:null, InnerHTML:null }; //缓存tooltip数据
|
|
6809
6873
|
|
|
6810
|
-
//区间选择
|
|
6811
|
-
this.SelectRect=document.createElement("div");
|
|
6812
|
-
this.SelectRect.className="jschart-selectrect";
|
|
6813
|
-
this.SelectRect.style.background=g_JSChartResource.SelectRectBGColor;
|
|
6814
|
-
this.SelectRect.style["pointer-events"]="none";
|
|
6815
|
-
//this.SelectRect.style.opacity=g_JSChartResource.SelectRectAlpha;
|
|
6816
|
-
this.SelectRect.id=Guid();
|
|
6817
|
-
this.SelectRect.oncontextmenu=function() { return false; }; //屏蔽选中区域系统右键菜单
|
|
6818
|
-
uielement.parentNode.appendChild(this.SelectRect);
|
|
6819
|
-
|
|
6820
6874
|
//坐标轴风格方法 double-更加数值型分割 price-更加股票价格分割
|
|
6821
6875
|
this.FrameSplitData=new Map();
|
|
6822
6876
|
this.FrameSplitData.set("double",new SplitData());
|
|
@@ -7374,6 +7428,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7374
7428
|
}
|
|
7375
7429
|
|
|
7376
7430
|
this.HideSelectRect();
|
|
7431
|
+
this.ClearDragSelectRect();
|
|
7377
7432
|
if (this.ChartPictureMenu) this.ChartPictureMenu.Hide();
|
|
7378
7433
|
|
|
7379
7434
|
var paint=this.GetRectSelectPaint();
|
|
@@ -7777,13 +7832,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7777
7832
|
|
|
7778
7833
|
if (moveSetp<5 && yMoveSetp<5) return;
|
|
7779
7834
|
|
|
7780
|
-
//this.UIElement.style.cursor="default";
|
|
7781
7835
|
this.SetCursor({Cursor:"default"});
|
|
7782
|
-
var
|
|
7783
|
-
var
|
|
7784
|
-
|
|
7785
|
-
|
|
7786
|
-
this.ShowSelectRect(x,y,x2,y2);
|
|
7836
|
+
var ptStart=this.PointAbsoluteToRelative(drag.Click.X, drag.Click.Y);
|
|
7837
|
+
var ptEnd=this.PointAbsoluteToRelative(e.clientX, e.clientY);
|
|
7838
|
+
|
|
7839
|
+
this.ShowDragSelectRect(ptStart, ptEnd);
|
|
7787
7840
|
|
|
7788
7841
|
drag.LastMove.X=e.clientX;
|
|
7789
7842
|
drag.LastMove.Y=e.clientY;
|
|
@@ -7995,7 +8048,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7995
8048
|
selectData.JSChartContainer=this;
|
|
7996
8049
|
selectData.Stock={Symbol:this.Symbol, Name:this.Name};
|
|
7997
8050
|
|
|
7998
|
-
if (!this.BorderDrag && this.GetSelectRectData(selectData))
|
|
8051
|
+
if (this.ChartDragSelectRect.Enable && !this.BorderDrag && this.GetSelectRectData(selectData))
|
|
7999
8052
|
{
|
|
8000
8053
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_SELECT_RECT);
|
|
8001
8054
|
var paint=this.GetRectSelectPaint();
|
|
@@ -8006,7 +8059,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8006
8059
|
{
|
|
8007
8060
|
X:drag.LastMove.X-uielement.getBoundingClientRect().left,
|
|
8008
8061
|
Y:drag.LastMove.Y-uielement.getBoundingClientRect().top,
|
|
8009
|
-
SelectData:selectData,
|
|
8062
|
+
SelectData:selectData, //区间选择的数据
|
|
8010
8063
|
RectSelectPaint:paint, //区间选择背景
|
|
8011
8064
|
IsShowMenu:true,
|
|
8012
8065
|
e,e
|
|
@@ -9085,6 +9138,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9085
9138
|
}
|
|
9086
9139
|
}
|
|
9087
9140
|
|
|
9141
|
+
//清空画布
|
|
9142
|
+
this.ClearCanvas=function(canvas)
|
|
9143
|
+
{
|
|
9144
|
+
if (!canvas) return;
|
|
9145
|
+
if (!this.UIElement) return;
|
|
9146
|
+
|
|
9147
|
+
canvas.clearRect(0,0,this.UIElement.width,this.UIElement.height);
|
|
9148
|
+
}
|
|
9149
|
+
|
|
9088
9150
|
this.Draw=function()
|
|
9089
9151
|
{
|
|
9090
9152
|
if (this.ChartCorssCursor) this.ChartCorssCursor.Status=0;
|
|
@@ -10923,36 +10985,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10923
10985
|
if (this.Tooltip.style.display!="none") this.Tooltip.style.display = "none";
|
|
10924
10986
|
}
|
|
10925
10987
|
|
|
10926
|
-
this.ShowSelectRect=function(x,y,x2,y2)
|
|
10927
|
-
{
|
|
10928
|
-
var left = x;
|
|
10929
|
-
var top = y;
|
|
10930
|
-
|
|
10931
|
-
var border=this.Frame.ChartBorder.GetBorder();
|
|
10932
|
-
|
|
10933
|
-
var borderRight=border.Right;
|
|
10934
|
-
var borderLeft=border.Left;
|
|
10935
|
-
|
|
10936
|
-
if (x>borderRight) x=borderRight;
|
|
10937
|
-
if (x2>borderRight) x2=borderRight;
|
|
10938
|
-
|
|
10939
|
-
if (x<borderLeft) x=borderLeft;
|
|
10940
|
-
if (x2<borderLeft) x2=borderLeft;
|
|
10941
|
-
|
|
10942
|
-
if (x>x2) left=x2;
|
|
10943
|
-
if (y>y2) top=y2;
|
|
10944
|
-
|
|
10945
|
-
var width=Math.abs(x-x2);
|
|
10946
|
-
var height=Math.abs(y-y2);
|
|
10947
|
-
|
|
10948
|
-
this.SelectRect.style.width = width+"px";
|
|
10949
|
-
this.SelectRect.style.height =height+"px";
|
|
10950
|
-
this.SelectRect.style.position = "absolute";
|
|
10951
|
-
this.SelectRect.style.left = left +"px";
|
|
10952
|
-
this.SelectRect.style.top = top +"px";
|
|
10953
|
-
this.SelectRect.style.display = "block";
|
|
10954
|
-
}
|
|
10955
|
-
|
|
10956
10988
|
this.UpdateSelectRect=function(start,end)
|
|
10957
10989
|
{
|
|
10958
10990
|
if (!this.ChartPaint[0].Data) return;
|
|
@@ -10972,7 +11004,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10972
11004
|
|
|
10973
11005
|
this.HideSelectRect=function()
|
|
10974
11006
|
{
|
|
10975
|
-
this.
|
|
11007
|
+
this.ClearDragSelectRect();
|
|
10976
11008
|
}
|
|
10977
11009
|
|
|
10978
11010
|
this.ResetFrameXYSplit=function()
|
|
@@ -11767,11 +11799,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11767
11799
|
|
|
11768
11800
|
this.ReloadExtendChartPaintResource=function(resource) //扩展画法重新加载配置
|
|
11769
11801
|
{
|
|
11770
|
-
for(var i
|
|
11802
|
+
for(var i=0;i<this.ExtendChartPaint.length; ++i)
|
|
11771
11803
|
{
|
|
11772
11804
|
var item=this.ExtendChartPaint[i];
|
|
11773
11805
|
if (item.ReloadResource) item.ReloadResource(resource);
|
|
11774
11806
|
}
|
|
11807
|
+
|
|
11808
|
+
if (this.ChartDragSelectRect && this.ChartDragSelectRect.ReloadResource) this.ChartDragSelectRect.ReloadResource(resource);
|
|
11775
11809
|
}
|
|
11776
11810
|
|
|
11777
11811
|
this.ReloadChartDrawPictureResource=function(resource)
|
|
@@ -12472,14 +12506,19 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12472
12506
|
//区间选择
|
|
12473
12507
|
this.GetRectSelectPaint=function()
|
|
12474
12508
|
{
|
|
12475
|
-
|
|
12476
|
-
|
|
12477
|
-
var item=this.ExtendChartPaint[i];
|
|
12478
|
-
if (item.ClassName=="RectSelectPaint")
|
|
12479
|
-
return item;
|
|
12480
|
-
}
|
|
12509
|
+
var finder=this.GetExtendChartByClassName("RectSelectPaint");
|
|
12510
|
+
if (!finder) return null;
|
|
12481
12511
|
|
|
12482
|
-
return
|
|
12512
|
+
return finder.Chart;
|
|
12513
|
+
}
|
|
12514
|
+
|
|
12515
|
+
//鼠标拖动区域
|
|
12516
|
+
this.GetRectDragPaint=function()
|
|
12517
|
+
{
|
|
12518
|
+
var finder=this.GetExtendChartByClassName("RectDragPaint");
|
|
12519
|
+
if (!finder) return null;
|
|
12520
|
+
|
|
12521
|
+
return finder.Chart;
|
|
12483
12522
|
}
|
|
12484
12523
|
|
|
12485
12524
|
this.SetRectSelectData=function(kItem, index)
|
|
@@ -13445,6 +13484,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
13445
13484
|
case JSCHART_MENU_ID.CMD_CHANGE_LANGUAGE_ID:
|
|
13446
13485
|
if (srcParam) this.SetLanguage(srcParam);
|
|
13447
13486
|
break;
|
|
13487
|
+
|
|
13488
|
+
case JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID:
|
|
13489
|
+
if (param!=null)
|
|
13490
|
+
{
|
|
13491
|
+
if (this.ChartDragSelectRect) this.ChartDragSelectRect.ShowMode=param;
|
|
13492
|
+
}
|
|
13493
|
+
break;
|
|
13448
13494
|
}
|
|
13449
13495
|
}
|
|
13450
13496
|
|
|
@@ -13588,6 +13634,37 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
13588
13634
|
{
|
|
13589
13635
|
this.CurrentChartDrawPicture=null;
|
|
13590
13636
|
}
|
|
13637
|
+
|
|
13638
|
+
|
|
13639
|
+
this.CreateDragSelectRect=function(option)
|
|
13640
|
+
{
|
|
13641
|
+
var chart=g_ExtendChartPaintFactory.Create("RectDragPaint",option);
|
|
13642
|
+
if (!chart) return null;
|
|
13643
|
+
|
|
13644
|
+
if (option && option.Enable===true) chart.Enable=true;
|
|
13645
|
+
chart.ChartBorder=this.Frame.ChartBorder;
|
|
13646
|
+
chart.ChartFrame=this.Frame;
|
|
13647
|
+
chart.HQChart=this;
|
|
13648
|
+
chart.SetOption(option);
|
|
13649
|
+
|
|
13650
|
+
this.ChartDragSelectRect=chart;
|
|
13651
|
+
}
|
|
13652
|
+
|
|
13653
|
+
this.ClearDragSelectRect=function()
|
|
13654
|
+
{
|
|
13655
|
+
if (!this.ChartDragSelectRect) return;
|
|
13656
|
+
|
|
13657
|
+
this.ChartDragSelectRect.ClearPoint();
|
|
13658
|
+
}
|
|
13659
|
+
|
|
13660
|
+
this.ShowDragSelectRect=function(ptStart, ptEnd)
|
|
13661
|
+
{
|
|
13662
|
+
if (!this.ChartDragSelectRect) return;
|
|
13663
|
+
|
|
13664
|
+
this.ChartDragSelectRect.SetFirstPoint(ptStart.X, ptStart.Y);
|
|
13665
|
+
this.ChartDragSelectRect.SetSecondPoint(ptEnd.X, ptEnd.Y);
|
|
13666
|
+
this.ChartDragSelectRect.Draw();
|
|
13667
|
+
}
|
|
13591
13668
|
}
|
|
13592
13669
|
|
|
13593
13670
|
function GetDevicePixelRatio()
|
|
@@ -23644,6 +23721,8 @@ function HistoryData()
|
|
|
23644
23721
|
this.BFactor; //前复权
|
|
23645
23722
|
this.AFactor; //后复权
|
|
23646
23723
|
|
|
23724
|
+
this.RightSeed; //本地计算的复权系数
|
|
23725
|
+
|
|
23647
23726
|
/*
|
|
23648
23727
|
{
|
|
23649
23728
|
PriceOffset: 每个单元的价格间距,
|
|
@@ -24645,11 +24724,15 @@ function ChartData()
|
|
|
24645
24724
|
var yClose=this.Data[index].YClose;
|
|
24646
24725
|
|
|
24647
24726
|
result[index]=HistoryData.Copy(this.Data[index]);
|
|
24727
|
+
result[index].RightSeed=seed;
|
|
24648
24728
|
|
|
24649
24729
|
for(--index; index>=0; --index)
|
|
24650
24730
|
{
|
|
24651
24731
|
if (yClose!=this.Data[index].Close) break;
|
|
24652
|
-
|
|
24732
|
+
var newItem=HistoryData.Copy(this.Data[index]);
|
|
24733
|
+
newItem.RightSeed=seed;
|
|
24734
|
+
result[index]=newItem;
|
|
24735
|
+
|
|
24653
24736
|
yClose=this.Data[index].YClose;
|
|
24654
24737
|
}
|
|
24655
24738
|
|
|
@@ -24659,7 +24742,9 @@ function ChartData()
|
|
|
24659
24742
|
if(yClose!=value && value!=0)
|
|
24660
24743
|
seed *= yClose/value;
|
|
24661
24744
|
|
|
24662
|
-
|
|
24745
|
+
var newItem=HistoryData.CopyRight(this.Data[index],seed);
|
|
24746
|
+
newItem.RightSeed=seed;
|
|
24747
|
+
result[index]=newItem
|
|
24663
24748
|
|
|
24664
24749
|
yClose=this.Data[index].YClose;
|
|
24665
24750
|
}
|
|
@@ -24670,11 +24755,14 @@ function ChartData()
|
|
|
24670
24755
|
var seed=1;
|
|
24671
24756
|
var close=this.Data[index].Close;
|
|
24672
24757
|
result[index]=HistoryData.Copy(this.Data[index]);
|
|
24758
|
+
result[index].RightSeed=seed;
|
|
24673
24759
|
|
|
24674
24760
|
for(++index;index<this.Data.length;++index)
|
|
24675
24761
|
{
|
|
24676
24762
|
if (close!=this.Data[index].YClose) break;
|
|
24677
|
-
|
|
24763
|
+
var newItem=HistoryData.Copy(this.Data[index]);
|
|
24764
|
+
newItem.RightSeed=seed;
|
|
24765
|
+
result[index]=newItem;
|
|
24678
24766
|
close=this.Data[index].Close;
|
|
24679
24767
|
}
|
|
24680
24768
|
|
|
@@ -24683,7 +24771,9 @@ function ChartData()
|
|
|
24683
24771
|
if(close!=this.Data[index].YClose)
|
|
24684
24772
|
seed *= close/this.Data[index].YClose;
|
|
24685
24773
|
|
|
24686
|
-
|
|
24774
|
+
var newItem=HistoryData.CopyRight(this.Data[index],seed);
|
|
24775
|
+
newItem.RightSeed=seed;
|
|
24776
|
+
result[index]=newItem;
|
|
24687
24777
|
|
|
24688
24778
|
close=this.Data[index].Close;
|
|
24689
24779
|
}
|
|
@@ -34995,6 +35085,86 @@ function ChartOverlayLine()
|
|
|
34995
35085
|
}
|
|
34996
35086
|
}
|
|
34997
35087
|
|
|
35088
|
+
//独立线段
|
|
35089
|
+
function ChartSingleLine()
|
|
35090
|
+
{
|
|
35091
|
+
this.newMethod=ChartLine; //派生
|
|
35092
|
+
this.newMethod();
|
|
35093
|
+
delete this.newMethod;
|
|
35094
|
+
|
|
35095
|
+
this.ClassName='ChartSingleLine'; //类名
|
|
35096
|
+
this.MaxMin=null; //当前的显示范围
|
|
35097
|
+
|
|
35098
|
+
this.Draw=function()
|
|
35099
|
+
{
|
|
35100
|
+
this.MaxMin=null;
|
|
35101
|
+
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
35102
|
+
if (this.IsShowIndexTitleOnly()) return;
|
|
35103
|
+
if (this.IsHideScriptIndex()) return;
|
|
35104
|
+
|
|
35105
|
+
if (!this.Data || !this.Data.Data) return;
|
|
35106
|
+
|
|
35107
|
+
this.MaxMin=this.GetCurrentMaxMin();
|
|
35108
|
+
if (!this.MaxMin) return;
|
|
35109
|
+
if (!IFrameSplitOperator.IsNumber(this.MaxMin.Max) || !IFrameSplitOperator.IsNumber(this.MaxMin.Min)) return;
|
|
35110
|
+
|
|
35111
|
+
switch(this.DrawType)
|
|
35112
|
+
{
|
|
35113
|
+
|
|
35114
|
+
default:
|
|
35115
|
+
return this.DrawStraightLine();
|
|
35116
|
+
}
|
|
35117
|
+
}
|
|
35118
|
+
|
|
35119
|
+
//获取当前页的最大最小值
|
|
35120
|
+
this.GetCurrentMaxMin=function()
|
|
35121
|
+
{
|
|
35122
|
+
var xPointCount=this.ChartFrame.XPointCount;
|
|
35123
|
+
var range={ Max:null, Min:null };
|
|
35124
|
+
|
|
35125
|
+
for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j)
|
|
35126
|
+
{
|
|
35127
|
+
var value=this.Data.Data[i];
|
|
35128
|
+
if (!IFrameSplitOperator.IsNumber(value)) continue;
|
|
35129
|
+
|
|
35130
|
+
if (range.Max==null) range.Max=value;
|
|
35131
|
+
if (range.Min==null) range.Min=value;
|
|
35132
|
+
|
|
35133
|
+
if (range.Max<value) range.Max=value;
|
|
35134
|
+
if (range.Min>value) range.Min=value;
|
|
35135
|
+
}
|
|
35136
|
+
|
|
35137
|
+
return range;
|
|
35138
|
+
}
|
|
35139
|
+
|
|
35140
|
+
this.GetMaxMin=function()
|
|
35141
|
+
{
|
|
35142
|
+
return { Max:null, Min:null };
|
|
35143
|
+
}
|
|
35144
|
+
|
|
35145
|
+
this.GetYFromData=function(value)
|
|
35146
|
+
{
|
|
35147
|
+
var bHScreen = (this.ChartFrame.IsHScreen === true);
|
|
35148
|
+
|
|
35149
|
+
if (bHScreen)
|
|
35150
|
+
{
|
|
35151
|
+
if (value <= this.MaxMin.Min) return this.ChartBorder.GetLeftEx();
|
|
35152
|
+
if (value >= this.MaxMin.Max) return this.ChartBorder.GetRightEx();
|
|
35153
|
+
|
|
35154
|
+
var width = this.ChartBorder.GetWidthEx() * (value - this.MaxMin.Min) / (this.MaxMin.Max - this.MaxMin.Min);
|
|
35155
|
+
return this.ChartBorder.GetLeftEx() + width;
|
|
35156
|
+
}
|
|
35157
|
+
else
|
|
35158
|
+
{
|
|
35159
|
+
if(value<=this.MaxMin.Min) return this.ChartBorder.GetBottomEx();
|
|
35160
|
+
if(value>=this.MaxMin.Max) return this.ChartBorder.GetTopEx();
|
|
35161
|
+
|
|
35162
|
+
var height=this.ChartBorder.GetHeightEx()*(value-this.MaxMin.Min)/(this.MaxMin.Max-this.MaxMin.Min);
|
|
35163
|
+
return this.ChartBorder.GetBottomEx()-height;
|
|
35164
|
+
}
|
|
35165
|
+
}
|
|
35166
|
+
}
|
|
35167
|
+
|
|
34998
35168
|
//彩色线段
|
|
34999
35169
|
function ChartPartLine()
|
|
35000
35170
|
{
|
|
@@ -37915,8 +38085,8 @@ function ChartMinutePriceLine()
|
|
|
37915
38085
|
if (isHScreen===true) chartright=this.ChartBorder.GetBottom();
|
|
37916
38086
|
var xPointCount=this.ChartFrame.XPointCount;
|
|
37917
38087
|
var minuteCount=this.ChartFrame.MinuteCount;
|
|
37918
|
-
var bottom=this.ChartBorder.
|
|
37919
|
-
var left=this.ChartBorder.
|
|
38088
|
+
var bottom=this.ChartBorder.GetBottom();
|
|
38089
|
+
var left=this.ChartBorder.GetLeft();
|
|
37920
38090
|
var data=this.Data;
|
|
37921
38091
|
|
|
37922
38092
|
this.DrawBeforeOpen(); //盘前
|
|
@@ -44274,6 +44444,7 @@ function ExtendChartPaintFactory()
|
|
|
44274
44444
|
[
|
|
44275
44445
|
["FrameSplitPaint", { Create:function() { return new FrameSplitPaint(); } }],
|
|
44276
44446
|
["RectSelectPaint", { Create:function() { return new RectSelectPaint(); } }],
|
|
44447
|
+
["RectDragPaint", { Create:function() { return new RectDragPaint(); } }],
|
|
44277
44448
|
["DragMovePaint", { Create:function() { return new DragMovePaint(); } }],
|
|
44278
44449
|
["SessionBreaksPaint", { Create:function() { return new SessionBreaksPaint(); }}],
|
|
44279
44450
|
["FrameButtomToolbarPaint", {Create:function() { return new FrameButtomToolbarPaint(); }}]
|
|
@@ -47260,6 +47431,189 @@ function RectSelectPaint()
|
|
|
47260
47431
|
}
|
|
47261
47432
|
}
|
|
47262
47433
|
}
|
|
47434
|
+
|
|
47435
|
+
//鼠标拖动选中区域
|
|
47436
|
+
function RectDragPaint()
|
|
47437
|
+
{
|
|
47438
|
+
this.newMethod=IExtendChartPainting; //派生
|
|
47439
|
+
this.newMethod();
|
|
47440
|
+
delete this.newMethod;
|
|
47441
|
+
|
|
47442
|
+
this.ClassName='RectDragPaint';
|
|
47443
|
+
this.LineColor=g_JSChartResource.RectDrag.LineColor; //竖线
|
|
47444
|
+
this.LineWidth=g_JSChartResource.RectDrag.LineWidth;
|
|
47445
|
+
this.BGColor=g_JSChartResource.RectDrag.BGColor;
|
|
47446
|
+
this.ShowMode=0; //0=只画边框 1=遮挡未选中区域 2=整体全选
|
|
47447
|
+
this.Enable=false;
|
|
47448
|
+
|
|
47449
|
+
this.FirstPoint;
|
|
47450
|
+
this.SecondPoint;
|
|
47451
|
+
|
|
47452
|
+
this.IsClearCanvas=true; //画布是否是清空状态
|
|
47453
|
+
|
|
47454
|
+
//设置参数接口
|
|
47455
|
+
this.SetOption=function(option)
|
|
47456
|
+
{
|
|
47457
|
+
if (option)
|
|
47458
|
+
{
|
|
47459
|
+
if (option.LineColor) this.LineColor=option.LineColor;
|
|
47460
|
+
if (option.BGColor) this.BGColor=option.BGColor;
|
|
47461
|
+
if (IFrameSplitOperator.IsNumber(option.ShowMode)) this.ShowMode=option.ShowMode;
|
|
47462
|
+
}
|
|
47463
|
+
}
|
|
47464
|
+
|
|
47465
|
+
this.ReloadResource=function(resource)
|
|
47466
|
+
{
|
|
47467
|
+
this.LineColor=g_JSChartResource.RectDrag.LineColor; //竖线
|
|
47468
|
+
this.LineWidth=g_JSChartResource.RectDrag.LineWidth;
|
|
47469
|
+
this.BGColor=g_JSChartResource.RectDrag.BGColor; //面积
|
|
47470
|
+
}
|
|
47471
|
+
|
|
47472
|
+
this.ClearPoint=function()
|
|
47473
|
+
{
|
|
47474
|
+
this.FirstPoint=null;
|
|
47475
|
+
this.SecondPoint=null;
|
|
47476
|
+
|
|
47477
|
+
if (!this.IsClearCanvas) this.Draw();
|
|
47478
|
+
}
|
|
47479
|
+
|
|
47480
|
+
this.SetFirstPoint=function(x, y)
|
|
47481
|
+
{
|
|
47482
|
+
this.FirstPoint={ X:x, Y:y };
|
|
47483
|
+
}
|
|
47484
|
+
|
|
47485
|
+
this.SetSecondPoint=function(x, y)
|
|
47486
|
+
{
|
|
47487
|
+
this.SecondPoint={ X:x, Y:y };
|
|
47488
|
+
}
|
|
47489
|
+
|
|
47490
|
+
this.DrawSelectedBorderMode=function(rtSelect)
|
|
47491
|
+
{
|
|
47492
|
+
this.Canvas.strokeStyle=this.LineColor;
|
|
47493
|
+
this.Canvas.strokeRect(ToFixedPoint(rtSelect.Left),ToFixedPoint(rtSelect.Top),ToFixedRect(rtSelect.Width),ToFixedRect(rtSelect.Height));
|
|
47494
|
+
}
|
|
47495
|
+
|
|
47496
|
+
this.DrawUnselectedMaskMode=function(rtSelect, rtClient)
|
|
47497
|
+
{
|
|
47498
|
+
if (this.BGColor)
|
|
47499
|
+
{
|
|
47500
|
+
this.Canvas.save();
|
|
47501
|
+
|
|
47502
|
+
var clipPath=new Path2D();
|
|
47503
|
+
clipPath.rect(rtClient.Left, rtClient.Top, rtClient.Width, rtSelect.Top-rtClient.Top);
|
|
47504
|
+
|
|
47505
|
+
var leftPath=new Path2D();
|
|
47506
|
+
leftPath.rect(rtClient.Left,rtSelect.Top, rtSelect.Left-rtClient.Left, rtSelect.Height);
|
|
47507
|
+
clipPath.addPath(leftPath);
|
|
47508
|
+
|
|
47509
|
+
var rightPath=new Path2D();
|
|
47510
|
+
rightPath.rect(rtSelect.Right,rtSelect.Top, rtClient.Right-rtSelect.Right, rtSelect.Height);
|
|
47511
|
+
clipPath.addPath(rightPath);
|
|
47512
|
+
|
|
47513
|
+
var bottmPath=new Path2D();
|
|
47514
|
+
bottmPath.rect(rtClient.Left,rtSelect.Bottom, rtClient.Width, rtClient.Bottom-rtSelect.Bottom);
|
|
47515
|
+
clipPath.addPath(bottmPath);
|
|
47516
|
+
|
|
47517
|
+
this.Canvas.clip(clipPath);
|
|
47518
|
+
|
|
47519
|
+
this.Canvas.fillStyle=this.BGColor;
|
|
47520
|
+
this.Canvas.fillRect(rtClient.Left,rtClient.Top,rtClient.Width,rtClient.Height);
|
|
47521
|
+
|
|
47522
|
+
this.Canvas.restore();
|
|
47523
|
+
}
|
|
47524
|
+
|
|
47525
|
+
this.Canvas.strokeStyle=this.LineColor;
|
|
47526
|
+
this.Canvas.strokeRect(ToFixedPoint(rtSelect.Left),ToFixedPoint(rtSelect.Top),ToFixedRect(rtSelect.Width),ToFixedRect(rtSelect.Height));
|
|
47527
|
+
}
|
|
47528
|
+
|
|
47529
|
+
this.DrawFullselectedMode=function(rtSelect, rtClient)
|
|
47530
|
+
{
|
|
47531
|
+
if (this.BGColor)
|
|
47532
|
+
{
|
|
47533
|
+
this.Canvas.save();
|
|
47534
|
+
|
|
47535
|
+
var clipPath=new Path2D();
|
|
47536
|
+
clipPath.rect(rtClient.Left, rtClient.Top, rtSelect.Left-rtClient.Left, rtClient.Height);
|
|
47537
|
+
|
|
47538
|
+
var rightPath=new Path2D();
|
|
47539
|
+
rightPath.rect(rtSelect.Right,rtClient.Top, rtClient.Right-rtSelect.Right, rtClient.Height);
|
|
47540
|
+
clipPath.addPath(rightPath);
|
|
47541
|
+
|
|
47542
|
+
this.Canvas.clip(clipPath);
|
|
47543
|
+
|
|
47544
|
+
this.Canvas.fillStyle=this.BGColor;
|
|
47545
|
+
this.Canvas.fillRect(rtClient.Left,rtClient.Top,rtClient.Width,rtClient.Height);
|
|
47546
|
+
|
|
47547
|
+
this.Canvas.restore();
|
|
47548
|
+
}
|
|
47549
|
+
|
|
47550
|
+
this.Canvas.strokeStyle=this.LineColor;
|
|
47551
|
+
this.Canvas.strokeRect(ToFixedPoint(rtSelect.Left),ToFixedPoint(rtClient.Top),ToFixedRect(rtSelect.Width),ToFixedRect(rtClient.Height));
|
|
47552
|
+
}
|
|
47553
|
+
|
|
47554
|
+
this.Draw=function()
|
|
47555
|
+
{
|
|
47556
|
+
if (!this.Enable) return;
|
|
47557
|
+
if (!this.HQChart) return;
|
|
47558
|
+
|
|
47559
|
+
var finder=this.HQChart.GetExtraCanvas(JSChart.RectDragCanvasKey);
|
|
47560
|
+
if (!finder) return;
|
|
47561
|
+
|
|
47562
|
+
this.Canvas=finder.Canvas;
|
|
47563
|
+
this.HQChart.ClearCanvas(this.Canvas);
|
|
47564
|
+
this.IsClearCanvas=true;
|
|
47565
|
+
|
|
47566
|
+
if (!this.FirstPoint && !this.SecondPoint) return;
|
|
47567
|
+
|
|
47568
|
+
var top=this.ChartBorder.GetTop();
|
|
47569
|
+
var bottom=this.ChartBorder.GetBottom();
|
|
47570
|
+
var left=this.ChartBorder.GetLeft();
|
|
47571
|
+
var right=this.ChartBorder.GetRight();
|
|
47572
|
+
|
|
47573
|
+
var rtClient={Left:left, Top:top, Right:right, Bottom:bottom };
|
|
47574
|
+
rtClient.Width=rtClient.Right-rtClient.Left;
|
|
47575
|
+
rtClient.Height=rtClient.Bottom-rtClient.Top;
|
|
47576
|
+
|
|
47577
|
+
var rtSelect=
|
|
47578
|
+
{
|
|
47579
|
+
Left:Math.min(this.FirstPoint.X,this.SecondPoint.X),
|
|
47580
|
+
Right:Math.max(this.FirstPoint.X,this.SecondPoint.X),
|
|
47581
|
+
Top:Math.min(this.FirstPoint.Y,this.SecondPoint.Y),
|
|
47582
|
+
Bottom:Math.max(this.FirstPoint.Y,this.SecondPoint.Y)
|
|
47583
|
+
}
|
|
47584
|
+
|
|
47585
|
+
if (rtSelect.Top<top) rtSelect.Top=top;
|
|
47586
|
+
else if (rtSelect.Top>bottom) rtSelect.Top=bottom;
|
|
47587
|
+
if (rtSelect.Bottom<top) rtSelect.Bottom=top;
|
|
47588
|
+
else if (rtSelect.Bottom>bottom) rtSelect.Bottom=bottom;
|
|
47589
|
+
|
|
47590
|
+
if (rtSelect.Left<left) rtSelect.Left=left;
|
|
47591
|
+
else if (rtSelect.Left>right) rtSelect.Left=right;
|
|
47592
|
+
if (rtSelect.Right<left) rtSelect.Right=left;
|
|
47593
|
+
else if (rtSelect.Right>right) rtSelect.Right=right;
|
|
47594
|
+
|
|
47595
|
+
rtSelect.Width=rtSelect.Right-rtSelect.Left;
|
|
47596
|
+
rtSelect.Height=rtSelect.Bottom-rtSelect.Top;
|
|
47597
|
+
|
|
47598
|
+
switch(this.ShowMode)
|
|
47599
|
+
{
|
|
47600
|
+
case 1:
|
|
47601
|
+
this.DrawUnselectedMaskMode(rtSelect,rtClient);
|
|
47602
|
+
break;
|
|
47603
|
+
case 2:
|
|
47604
|
+
this.DrawFullselectedMode(rtSelect,rtClient);
|
|
47605
|
+
break;
|
|
47606
|
+
default:
|
|
47607
|
+
this.DrawSelectedBorderMode(rtSelect);
|
|
47608
|
+
break;
|
|
47609
|
+
}
|
|
47610
|
+
|
|
47611
|
+
|
|
47612
|
+
|
|
47613
|
+
this.IsClearCanvas=false;
|
|
47614
|
+
}
|
|
47615
|
+
}
|
|
47616
|
+
|
|
47263
47617
|
//深度图 支持横屏
|
|
47264
47618
|
/*
|
|
47265
47619
|
数据格式:
|
|
@@ -61362,8 +61716,8 @@ function ChartDrawHLine()
|
|
|
61362
61716
|
var bottom=this.Frame.ChartBorder.GetBottomEx();
|
|
61363
61717
|
var pixelTatio = GetDevicePixelRatio();
|
|
61364
61718
|
|
|
61365
|
-
if (IFrameSplitOperator.IsNumber(labInfo.TopOffset)) top-=labInfo.TopOffset;
|
|
61366
|
-
if (IFrameSplitOperator.IsNumber(labInfo.BottomOffset)) bottom+=labInfo.BottomOffset;
|
|
61719
|
+
if (labInfo && IFrameSplitOperator.IsNumber(labInfo.TopOffset)) top-=labInfo.TopOffset;
|
|
61720
|
+
if (labInfo && IFrameSplitOperator.IsNumber(labInfo.BottomOffset)) bottom+=labInfo.BottomOffset;
|
|
61367
61721
|
|
|
61368
61722
|
var yValue=this.Frame.GetYData(y,false);
|
|
61369
61723
|
var strValue=yValue.toFixed(this.Precision);
|
|
@@ -70440,6 +70794,7 @@ function JSChartResource()
|
|
|
70440
70794
|
RangeTextSubBGColor:'rgb(54,54,54)',
|
|
70441
70795
|
}
|
|
70442
70796
|
|
|
70797
|
+
//选中图形
|
|
70443
70798
|
this.SelectedChart=
|
|
70444
70799
|
{
|
|
70445
70800
|
LineWidth:1,
|
|
@@ -70449,6 +70804,14 @@ function JSChartResource()
|
|
|
70449
70804
|
BGColor:"rgb(255,255,255)"
|
|
70450
70805
|
}
|
|
70451
70806
|
|
|
70807
|
+
//鼠标区间选中
|
|
70808
|
+
this.RectDrag=
|
|
70809
|
+
{
|
|
70810
|
+
LineColor:"rgb(0,0,0)", //竖线
|
|
70811
|
+
LineWidth:1*GetDevicePixelRatio(),
|
|
70812
|
+
BGColor:"rgba(128,128,128,0.2)", //面积
|
|
70813
|
+
}
|
|
70814
|
+
|
|
70452
70815
|
this.DragMovePaint=
|
|
70453
70816
|
{
|
|
70454
70817
|
TextColor:"rgb(0,0,0)",
|
|
@@ -71182,6 +71545,16 @@ function JSChartResource()
|
|
|
71182
71545
|
if (item.RangeTextSubBGColor) this.RectSelect.RangeTextSubBGColor=item.RangeTextSubBGColor;
|
|
71183
71546
|
}
|
|
71184
71547
|
|
|
71548
|
+
if (style.RectDrag)
|
|
71549
|
+
{
|
|
71550
|
+
var item=style.RectDrag;
|
|
71551
|
+
var dest=this.RectDrag;
|
|
71552
|
+
|
|
71553
|
+
if (item.LineColor) dest.LineColor=item.LineColor;
|
|
71554
|
+
if (IFrameSplitOperator.IsPlusNumber(item.LineWidth)) dest.LineWidth=item.LineWidth;
|
|
71555
|
+
if (item.BGColor) dest.BGColor=item.BGColor;
|
|
71556
|
+
}
|
|
71557
|
+
|
|
71185
71558
|
if (style.OrderFlow)
|
|
71186
71559
|
{
|
|
71187
71560
|
item=style.OrderFlow;
|
|
@@ -73577,6 +73950,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
73577
73950
|
this.CreateMainKLine();
|
|
73578
73951
|
this.CreateExtendChart("RectSelectPaint", option? option.SelectRect:null); //区间统计
|
|
73579
73952
|
if (this.EnableIndexChartDrag) this.CreateExtendChart("DragMovePaint");
|
|
73953
|
+
this.CreateDragSelectRect(option? option.DragSelectRect:null);
|
|
73580
73954
|
|
|
73581
73955
|
//子窗口动态标题
|
|
73582
73956
|
for(var i in this.Frame.SubFrame)
|
|
@@ -73617,6 +73991,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
73617
73991
|
if (bRegisterWheel) this.UIElement.addEventListener("wheel", (e)=>{ this.OnWheel(e); }, true); //上下滚动消息
|
|
73618
73992
|
}
|
|
73619
73993
|
|
|
73994
|
+
|
|
73995
|
+
|
|
73620
73996
|
this.OnCustomKeyDown=function(keyID, e) //自定义键盘事件
|
|
73621
73997
|
{
|
|
73622
73998
|
if (keyID==37 && e.ctrlKey) //Ctrl+Left
|
|
@@ -78389,7 +78765,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
78389
78765
|
|
|
78390
78766
|
{ Name:"禁止拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[0]}, Checked:0==this.DragMode },
|
|
78391
78767
|
{ Name:"启动拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1]}, Checked:1==this.DragMode },
|
|
78392
|
-
{ Name:"
|
|
78768
|
+
{ Name:"左键区间选择", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[2]}, Checked:2==this.DragMode },
|
|
78393
78769
|
{ Name:JSPopMenu.SEPARATOR_LINE_NAME },
|
|
78394
78770
|
|
|
78395
78771
|
{ Name:"背景分割", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_BG_SPLIT_ID, Args:[!bBGSpit]}, Checked:bBGSpit},
|
|
@@ -78415,6 +78791,15 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
78415
78791
|
{ Name:"繁体", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_LANGUAGE_ID, Args:["TC"]}, Checked:this.LanguageID==JSCHART_LANGUAGE_ID.LANGUAGE_TRADITIONAL_CHINESE_ID },
|
|
78416
78792
|
]
|
|
78417
78793
|
},
|
|
78794
|
+
{
|
|
78795
|
+
Name:"区间选择样式",
|
|
78796
|
+
SubMenu:
|
|
78797
|
+
[
|
|
78798
|
+
{ Name:"样式1(默认)", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[0]}, Checked:0==this.ChartDragSelectRect.ShowMode },
|
|
78799
|
+
{ Name:"样式2", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[1]}, Checked:1==this.ChartDragSelectRect.ShowMode },
|
|
78800
|
+
{ Name:"样式3", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[2]}, Checked:2==this.ChartDragSelectRect.ShowMode },
|
|
78801
|
+
]
|
|
78802
|
+
}
|
|
78418
78803
|
]
|
|
78419
78804
|
}
|
|
78420
78805
|
];
|
|
@@ -80784,11 +81169,10 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80784
81169
|
|
|
80785
81170
|
//this.UIElement.style.cursor="default";
|
|
80786
81171
|
this.SetCursor({Cursor:"default"});
|
|
80787
|
-
var
|
|
80788
|
-
var
|
|
80789
|
-
|
|
80790
|
-
|
|
80791
|
-
this.ShowSelectRect(x,y,x2,y2);
|
|
81172
|
+
var ptStart=this.PointAbsoluteToRelative(drag.Click.X, drag.Click.Y);
|
|
81173
|
+
var ptEnd=this.PointAbsoluteToRelative(e.clientX, e.clientY);
|
|
81174
|
+
|
|
81175
|
+
this.ShowDragSelectRect(ptStart, ptEnd);
|
|
80792
81176
|
|
|
80793
81177
|
drag.LastMove.X=e.clientX;
|
|
80794
81178
|
drag.LastMove.Y=e.clientY;
|
|
@@ -81959,6 +82343,16 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
81959
82343
|
SubMenu:
|
|
81960
82344
|
[
|
|
81961
82345
|
{ Name:"画图工具", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID, Args:[]}, Checked:this.IsShowDrawToolDialog()},
|
|
82346
|
+
|
|
82347
|
+
{
|
|
82348
|
+
Name:"区间选择样式",
|
|
82349
|
+
SubMenu:
|
|
82350
|
+
[
|
|
82351
|
+
{ Name:"样式1(默认)", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[0]}, Checked:0==this.ChartDragSelectRect.ShowMode },
|
|
82352
|
+
{ Name:"样式2", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[1]}, Checked:1==this.ChartDragSelectRect.ShowMode },
|
|
82353
|
+
{ Name:"样式3", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[2]}, Checked:2==this.ChartDragSelectRect.ShowMode },
|
|
82354
|
+
]
|
|
82355
|
+
}
|
|
81962
82356
|
]
|
|
81963
82357
|
}
|
|
81964
82358
|
|
|
@@ -82149,6 +82543,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
82149
82543
|
this.CreateMainKLine();
|
|
82150
82544
|
this.CreateExtendChart("RectSelectPaint", option? option.SelectRect:null); //区间统计
|
|
82151
82545
|
if (this.EnableIndexChartDrag) this.CreateExtendChart("DragMovePaint");
|
|
82546
|
+
this.CreateDragSelectRect(option? option.DragSelectRect:null);
|
|
82152
82547
|
|
|
82153
82548
|
//子窗口动态标题
|
|
82154
82549
|
for(var i=0;i<this.Frame.SubFrame.length; ++i)
|
|
@@ -113585,6 +113980,7 @@ function JSExecute(ast,option)
|
|
|
113585
113980
|
let isExData=false;
|
|
113586
113981
|
let isDotLine=false;
|
|
113587
113982
|
let isOverlayLine=false; //叠加线
|
|
113983
|
+
let isSingleLine=false; //独立线段
|
|
113588
113984
|
var isNoneName=false;
|
|
113589
113985
|
var isShowTitle=true;
|
|
113590
113986
|
//显示在位置之上,对于DRAWTEXT和DRAWNUMBER等函数有用,放在语句的最后面(不能与LINETHICK等函数共用),比如:
|
|
@@ -113641,9 +114037,11 @@ function JSExecute(ast,option)
|
|
|
113641
114037
|
else if (value==="DRAWCENTER") isDrawCenter=true;
|
|
113642
114038
|
else if (value=="DRAWBELOW") isDrawBelow=true;
|
|
113643
114039
|
else if (value=="STEPLINE") stepLine=true;
|
|
114040
|
+
else if (value=="SINGLELINE") isSingleLine=true;
|
|
113644
114041
|
else if (value.indexOf('COLOR')==0) color=value;
|
|
113645
114042
|
else if (value.indexOf("RGBX")==0 && value.length==10) color=value; //RGBX+“RRGGBB”
|
|
113646
114043
|
else if (value.indexOf('LINETHICK')==0) lineWidth=value;
|
|
114044
|
+
|
|
113647
114045
|
|
|
113648
114046
|
else if (value=="ALIGN0") drawAlign=0;
|
|
113649
114047
|
else if (value=="ALIGN1") drawAlign=1;
|
|
@@ -113892,6 +114290,7 @@ function JSExecute(ast,option)
|
|
|
113892
114290
|
if (isExData==true) value.IsExData = true;
|
|
113893
114291
|
if (isDotLine==true) value.IsDotLine=true;
|
|
113894
114292
|
if (isOverlayLine==true) value.IsOverlayLine=true;
|
|
114293
|
+
if (isSingleLine==true) value.IsSingleLine=true;
|
|
113895
114294
|
if (isNoneName==true) value.NoneName=true;
|
|
113896
114295
|
if (isShowTitle==false) value.IsShowTitle=false;
|
|
113897
114296
|
if (stepLine==true) value.Type=7;
|
|
@@ -113927,6 +114326,7 @@ function JSExecute(ast,option)
|
|
|
113927
114326
|
if (isExData==true) value.IsExData = true;
|
|
113928
114327
|
if (isDotLine==true) value.IsDotLine=true;
|
|
113929
114328
|
if (isOverlayLine==true) value.IsOverlayLine=true;
|
|
114329
|
+
if (isSingleLine==true) value.IsSingleLine=true;
|
|
113930
114330
|
if (isShowTitle==false) value.IsShowTitle=false;
|
|
113931
114331
|
if (stepLine==true) value.Type=7;
|
|
113932
114332
|
this.OutVarTable.push(value);
|
|
@@ -116754,6 +117154,54 @@ function ScriptIndex(name,script,args,option)
|
|
|
116754
117154
|
hqChart.ChartPaint.push(line);
|
|
116755
117155
|
}
|
|
116756
117156
|
|
|
117157
|
+
this.CreateSingleLine=function(hqChart,windowIndex,varItem,id,lineType)
|
|
117158
|
+
{
|
|
117159
|
+
var line=new ChartSingleLine();
|
|
117160
|
+
line.Canvas=hqChart.Canvas;
|
|
117161
|
+
line.DrawType=1;
|
|
117162
|
+
line.Name=varItem.Name;
|
|
117163
|
+
line.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;
|
|
117164
|
+
line.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;
|
|
117165
|
+
line.Identify=this.Guid;
|
|
117166
|
+
if (varItem.Color) line.Color=this.GetColor(varItem.Color);
|
|
117167
|
+
else line.Color=this.GetDefaultColor(id);
|
|
117168
|
+
|
|
117169
|
+
if (varItem.LineWidth)
|
|
117170
|
+
{
|
|
117171
|
+
let width=parseInt(varItem.LineWidth.replace("LINETHICK",""));
|
|
117172
|
+
if (!isNaN(width) && width>0) line.LineWidth=width;
|
|
117173
|
+
}
|
|
117174
|
+
|
|
117175
|
+
if (varItem.IsDotLine) line.IsDotLine=true; //虚线
|
|
117176
|
+
if (varItem.IsShow==false) line.IsShow=false;
|
|
117177
|
+
|
|
117178
|
+
let titleIndex=windowIndex+1;
|
|
117179
|
+
line.Data.Data=varItem.Data;
|
|
117180
|
+
|
|
117181
|
+
this.ReloadChartResource(hqChart,windowIndex,line);
|
|
117182
|
+
|
|
117183
|
+
if (varItem.IsShowTitle===false) //NOTEXT 不绘制标题
|
|
117184
|
+
{
|
|
117185
|
+
|
|
117186
|
+
}
|
|
117187
|
+
else if (IFrameSplitOperator.IsString(varItem.Name) && varItem.Name.indexOf("NOTEXT")==0) //标题中包含NOTEXT不绘制标题
|
|
117188
|
+
{
|
|
117189
|
+
|
|
117190
|
+
}
|
|
117191
|
+
else
|
|
117192
|
+
{
|
|
117193
|
+
if (varItem.NoneName)
|
|
117194
|
+
hqChart.TitlePaint[titleIndex].Data[id]=new DynamicTitleData(line.Data,null,line.Color);
|
|
117195
|
+
else
|
|
117196
|
+
hqChart.TitlePaint[titleIndex].Data[id]=new DynamicTitleData(line.Data,varItem.Name,line.Color);
|
|
117197
|
+
|
|
117198
|
+
this.SetTitleData(hqChart.TitlePaint[titleIndex].Data[id],line);
|
|
117199
|
+
}
|
|
117200
|
+
|
|
117201
|
+
this.SetChartIndexName(line);
|
|
117202
|
+
hqChart.ChartPaint.push(line);
|
|
117203
|
+
}
|
|
117204
|
+
|
|
116757
117205
|
//创建柱子
|
|
116758
117206
|
this.CreateBar=function(hqChart,windowIndex,varItem,id)
|
|
116759
117207
|
{
|
|
@@ -118058,6 +118506,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
118058
118506
|
if (item.Type==0)
|
|
118059
118507
|
{
|
|
118060
118508
|
if (item.IsOverlayLine) this.CreateOverlayLine(hqChart,windowIndex,item,i,item.Type);
|
|
118509
|
+
else if (item.IsSingleLine) this.CreateSingleLine(hqChart,windowIndex,item,i,item.Type);
|
|
118061
118510
|
else this.CreateLine(hqChart,windowIndex,item,i,item.Type);
|
|
118062
118511
|
}
|
|
118063
118512
|
else if (item.Type==1)
|
|
@@ -122757,6 +123206,13 @@ function GetBlackStyle()
|
|
|
122757
123206
|
AreaColor:"rgba(26,13,7,0.5)", //面积
|
|
122758
123207
|
},
|
|
122759
123208
|
|
|
123209
|
+
RectDrag:
|
|
123210
|
+
{
|
|
123211
|
+
LineColor:"rgb(220,220,220)",
|
|
123212
|
+
LineWidth:1*GetDevicePixelRatio(),
|
|
123213
|
+
BGColor:"rgba(220,220,220,0.2)", //面积
|
|
123214
|
+
},
|
|
123215
|
+
|
|
122760
123216
|
SelectedChart:
|
|
122761
123217
|
{
|
|
122762
123218
|
LineWidth:1,
|
|
@@ -137670,7 +138126,7 @@ function HQChartScriptWorker()
|
|
|
137670
138126
|
|
|
137671
138127
|
|
|
137672
138128
|
|
|
137673
|
-
var HQCHART_VERSION="1.1.
|
|
138129
|
+
var HQCHART_VERSION="1.1.13435";
|
|
137674
138130
|
|
|
137675
138131
|
function PrintHQChartVersion()
|
|
137676
138132
|
{
|