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
|
@@ -125,6 +125,8 @@ function JSIndexScript()
|
|
|
125
125
|
["ICHIMOKU",this.ICHIMOKU],["CDP-STD", this.CDP_STD],["TBP-STD",this.TBP_STD],
|
|
126
126
|
["ADX", this.ADX],
|
|
127
127
|
|
|
128
|
+
["持仓量", this.VOL_POSITION], //成交量+持仓量
|
|
129
|
+
|
|
128
130
|
//通达信特色指标
|
|
129
131
|
["散户线", this.ShareholderCount],["NXTS", this.NXTS],["FKX", this.FKX],["两融资金", this.Margin4],
|
|
130
132
|
["ZSDB",this.ZSDB],
|
|
@@ -3363,6 +3365,20 @@ JSIndexScript.prototype.CJL = function ()
|
|
|
3363
3365
|
return data;
|
|
3364
3366
|
}
|
|
3365
3367
|
|
|
3368
|
+
JSIndexScript.prototype.VOL_POSITION=function()
|
|
3369
|
+
{
|
|
3370
|
+
let data =
|
|
3371
|
+
{
|
|
3372
|
+
Name: '持仓量', Description: '持仓量', IsMainIndex: false,
|
|
3373
|
+
Args: [],
|
|
3374
|
+
Script: //脚本
|
|
3375
|
+
"成交量:VOL,VOLSTICK;\n\
|
|
3376
|
+
持仓量:VOLINSTK,SINGLELINE;"
|
|
3377
|
+
};
|
|
3378
|
+
|
|
3379
|
+
return data;
|
|
3380
|
+
}
|
|
3381
|
+
|
|
3366
3382
|
JSIndexScript.prototype.ASI = function ()
|
|
3367
3383
|
{
|
|
3368
3384
|
let data =
|
|
@@ -3996,6 +4012,17 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
3996
4012
|
if (IFrameSplitOperator.IsNumber(option.ZIndex)) element.style["z-index"]=option.ZIndex;
|
|
3997
4013
|
}
|
|
3998
4014
|
|
|
4015
|
+
if (this.CanvasElement)
|
|
4016
|
+
{
|
|
4017
|
+
element.height=this.CanvasElement.height;
|
|
4018
|
+
element.width=this.CanvasElement.width;
|
|
4019
|
+
if (element.style)
|
|
4020
|
+
{
|
|
4021
|
+
element.style.width=this.CanvasElement.style.width;
|
|
4022
|
+
element.style.height=this.CanvasElement.style.height
|
|
4023
|
+
}
|
|
4024
|
+
}
|
|
4025
|
+
|
|
3999
4026
|
divElement.appendChild(element);
|
|
4000
4027
|
|
|
4001
4028
|
var item={ Element:element, Canvas:null };
|
|
@@ -4332,6 +4359,22 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4332
4359
|
}
|
|
4333
4360
|
}
|
|
4334
4361
|
|
|
4362
|
+
if (chart.ClassName=="KLineChartContainer")
|
|
4363
|
+
{
|
|
4364
|
+
if (!option.DragSelectRect)
|
|
4365
|
+
{
|
|
4366
|
+
option.DragSelectRect={ Enable:true }; //默认开启区间选中画布
|
|
4367
|
+
}
|
|
4368
|
+
|
|
4369
|
+
if (option.DragSelectRect)
|
|
4370
|
+
{
|
|
4371
|
+
var zindex=10;
|
|
4372
|
+
var item=option.DragSelectRect;
|
|
4373
|
+
if (IFrameSplitOperator.IsNumber(item.ZIndex)) zindex=item.ZIndex;
|
|
4374
|
+
if (item.Enable) this.CreateExtraCanvasElement(JSChart.RectDragCanvasKey, { ZIndex:zindex }); //创建独立的区间选择画布
|
|
4375
|
+
}
|
|
4376
|
+
}
|
|
4377
|
+
|
|
4335
4378
|
//创建子窗口
|
|
4336
4379
|
chart.Create(option.Windows.length, option);
|
|
4337
4380
|
|
|
@@ -4339,6 +4382,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4339
4382
|
|
|
4340
4383
|
this.AdjustChartBorder(chart);
|
|
4341
4384
|
|
|
4385
|
+
|
|
4342
4386
|
if (option.KLine)
|
|
4343
4387
|
{
|
|
4344
4388
|
if (option.KLine.PageSize > 0) //一屏显示的数据个数
|
|
@@ -4811,6 +4855,22 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4811
4855
|
if (IFrameSplitOperator.IsBool(item.EnableMoveOn)) chart.SelectedChart.EnableMoveOn=item.EnableMoveOn;
|
|
4812
4856
|
}
|
|
4813
4857
|
|
|
4858
|
+
if (chart.ClassName=="MinuteChartContainer")
|
|
4859
|
+
{
|
|
4860
|
+
if (!option.DragSelectRect)
|
|
4861
|
+
{
|
|
4862
|
+
option.DragSelectRect={ Enable:true }; //默认开启区间选中画布
|
|
4863
|
+
}
|
|
4864
|
+
|
|
4865
|
+
if (option.DragSelectRect)
|
|
4866
|
+
{
|
|
4867
|
+
var item=option.DragSelectRect;
|
|
4868
|
+
var zindex=10;
|
|
4869
|
+
if (IFrameSplitOperator.IsNumber(item.ZIndex)) zindex=item.ZIndex;
|
|
4870
|
+
if (item.Enable) this.CreateExtraCanvasElement(JSChart.RectDragCanvasKey, { ZIndex:zindex }); //创建独立的区间选择画布
|
|
4871
|
+
}
|
|
4872
|
+
}
|
|
4873
|
+
|
|
4814
4874
|
//分页
|
|
4815
4875
|
if (option.PageInfo) chart.SetPageInfo(option.PageInfo);
|
|
4816
4876
|
|
|
@@ -6064,6 +6124,7 @@ JSChart.LastVersion=null; //最新的版本号
|
|
|
6064
6124
|
JSChart.EnableCanvasWillReadFrequently=false; //https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently
|
|
6065
6125
|
JSChart.CorssCursorCanvasKey="hqchart_corsscursor";
|
|
6066
6126
|
JSChart.TooltipCursorCanvasKey="hqchart_tooltip";
|
|
6127
|
+
JSChart.RectDragCanvasKey="hqchart_drag_rect";
|
|
6067
6128
|
|
|
6068
6129
|
//初始化
|
|
6069
6130
|
JSChart.Init=function(divElement,bScreen,bCacheCanvas)
|
|
@@ -6443,7 +6504,7 @@ var JSCHART_EVENT_ID=
|
|
|
6443
6504
|
|
|
6444
6505
|
|
|
6445
6506
|
ON_CHANGE_INDEX:150, //切换指标
|
|
6446
|
-
ON_MENU_COMMAND:151,
|
|
6507
|
+
ON_MENU_COMMAND:151, //菜单事件回调
|
|
6447
6508
|
ON_CREATE_RIGHT_MENU:152, //创建右键菜单
|
|
6448
6509
|
|
|
6449
6510
|
ON_FORMAT_CALL_AUCTION_INDEX_TITLE:153, //集合竞价指标窗口标题内容
|
|
@@ -6607,6 +6668,8 @@ var JSCHART_MENU_ID=
|
|
|
6607
6668
|
CMD_ADD_OVERLAY_INDEX_ID:36, //添加叠加指标
|
|
6608
6669
|
|
|
6609
6670
|
CMD_CHANGE_LANGUAGE_ID:37, //语言切换
|
|
6671
|
+
|
|
6672
|
+
CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID:38,
|
|
6610
6673
|
}
|
|
6611
6674
|
|
|
6612
6675
|
|
|
@@ -6690,6 +6753,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6690
6753
|
this.EnableShowCorssCursor={ DrawPicture:true }; //DrawPicture=画图是否显示十字光标
|
|
6691
6754
|
this.ChartPictureMenu; //画图工具 单个图形设置菜单
|
|
6692
6755
|
this.ChartCorssCursor; //十字光标
|
|
6756
|
+
this.ChartDragSelectRect; //选择区间选中
|
|
6693
6757
|
this.IsClickShowCorssCursor=false; //手势点击显示十字光标
|
|
6694
6758
|
this.ChartSplashPaint=null; //等待提示
|
|
6695
6759
|
this.LoadDataSplashTitle="数据加载中"; //下载数据提示信息
|
|
@@ -6763,16 +6827,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6763
6827
|
this.IsShowTooltip=true; //是否显示K线tooltip
|
|
6764
6828
|
this.TooltipCache={ Type:null, IsShow:false, X:null, Y:null, Data:null, InnerHTML:null }; //缓存tooltip数据
|
|
6765
6829
|
|
|
6766
|
-
//区间选择
|
|
6767
|
-
this.SelectRect=document.createElement("div");
|
|
6768
|
-
this.SelectRect.className="jschart-selectrect";
|
|
6769
|
-
this.SelectRect.style.background=g_JSChartResource.SelectRectBGColor;
|
|
6770
|
-
this.SelectRect.style["pointer-events"]="none";
|
|
6771
|
-
//this.SelectRect.style.opacity=g_JSChartResource.SelectRectAlpha;
|
|
6772
|
-
this.SelectRect.id=Guid();
|
|
6773
|
-
this.SelectRect.oncontextmenu=function() { return false; }; //屏蔽选中区域系统右键菜单
|
|
6774
|
-
uielement.parentNode.appendChild(this.SelectRect);
|
|
6775
|
-
|
|
6776
6830
|
//坐标轴风格方法 double-更加数值型分割 price-更加股票价格分割
|
|
6777
6831
|
this.FrameSplitData=new Map();
|
|
6778
6832
|
this.FrameSplitData.set("double",new SplitData());
|
|
@@ -7330,6 +7384,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7330
7384
|
}
|
|
7331
7385
|
|
|
7332
7386
|
this.HideSelectRect();
|
|
7387
|
+
this.ClearDragSelectRect();
|
|
7333
7388
|
if (this.ChartPictureMenu) this.ChartPictureMenu.Hide();
|
|
7334
7389
|
|
|
7335
7390
|
var paint=this.GetRectSelectPaint();
|
|
@@ -7733,13 +7788,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7733
7788
|
|
|
7734
7789
|
if (moveSetp<5 && yMoveSetp<5) return;
|
|
7735
7790
|
|
|
7736
|
-
//this.UIElement.style.cursor="default";
|
|
7737
7791
|
this.SetCursor({Cursor:"default"});
|
|
7738
|
-
var
|
|
7739
|
-
var
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
this.ShowSelectRect(x,y,x2,y2);
|
|
7792
|
+
var ptStart=this.PointAbsoluteToRelative(drag.Click.X, drag.Click.Y);
|
|
7793
|
+
var ptEnd=this.PointAbsoluteToRelative(e.clientX, e.clientY);
|
|
7794
|
+
|
|
7795
|
+
this.ShowDragSelectRect(ptStart, ptEnd);
|
|
7743
7796
|
|
|
7744
7797
|
drag.LastMove.X=e.clientX;
|
|
7745
7798
|
drag.LastMove.Y=e.clientY;
|
|
@@ -7951,7 +8004,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7951
8004
|
selectData.JSChartContainer=this;
|
|
7952
8005
|
selectData.Stock={Symbol:this.Symbol, Name:this.Name};
|
|
7953
8006
|
|
|
7954
|
-
if (!this.BorderDrag && this.GetSelectRectData(selectData))
|
|
8007
|
+
if (this.ChartDragSelectRect.Enable && !this.BorderDrag && this.GetSelectRectData(selectData))
|
|
7955
8008
|
{
|
|
7956
8009
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_SELECT_RECT);
|
|
7957
8010
|
var paint=this.GetRectSelectPaint();
|
|
@@ -7962,7 +8015,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7962
8015
|
{
|
|
7963
8016
|
X:drag.LastMove.X-uielement.getBoundingClientRect().left,
|
|
7964
8017
|
Y:drag.LastMove.Y-uielement.getBoundingClientRect().top,
|
|
7965
|
-
SelectData:selectData,
|
|
8018
|
+
SelectData:selectData, //区间选择的数据
|
|
7966
8019
|
RectSelectPaint:paint, //区间选择背景
|
|
7967
8020
|
IsShowMenu:true,
|
|
7968
8021
|
e,e
|
|
@@ -9041,6 +9094,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9041
9094
|
}
|
|
9042
9095
|
}
|
|
9043
9096
|
|
|
9097
|
+
//清空画布
|
|
9098
|
+
this.ClearCanvas=function(canvas)
|
|
9099
|
+
{
|
|
9100
|
+
if (!canvas) return;
|
|
9101
|
+
if (!this.UIElement) return;
|
|
9102
|
+
|
|
9103
|
+
canvas.clearRect(0,0,this.UIElement.width,this.UIElement.height);
|
|
9104
|
+
}
|
|
9105
|
+
|
|
9044
9106
|
this.Draw=function()
|
|
9045
9107
|
{
|
|
9046
9108
|
if (this.ChartCorssCursor) this.ChartCorssCursor.Status=0;
|
|
@@ -10879,36 +10941,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10879
10941
|
if (this.Tooltip.style.display!="none") this.Tooltip.style.display = "none";
|
|
10880
10942
|
}
|
|
10881
10943
|
|
|
10882
|
-
this.ShowSelectRect=function(x,y,x2,y2)
|
|
10883
|
-
{
|
|
10884
|
-
var left = x;
|
|
10885
|
-
var top = y;
|
|
10886
|
-
|
|
10887
|
-
var border=this.Frame.ChartBorder.GetBorder();
|
|
10888
|
-
|
|
10889
|
-
var borderRight=border.Right;
|
|
10890
|
-
var borderLeft=border.Left;
|
|
10891
|
-
|
|
10892
|
-
if (x>borderRight) x=borderRight;
|
|
10893
|
-
if (x2>borderRight) x2=borderRight;
|
|
10894
|
-
|
|
10895
|
-
if (x<borderLeft) x=borderLeft;
|
|
10896
|
-
if (x2<borderLeft) x2=borderLeft;
|
|
10897
|
-
|
|
10898
|
-
if (x>x2) left=x2;
|
|
10899
|
-
if (y>y2) top=y2;
|
|
10900
|
-
|
|
10901
|
-
var width=Math.abs(x-x2);
|
|
10902
|
-
var height=Math.abs(y-y2);
|
|
10903
|
-
|
|
10904
|
-
this.SelectRect.style.width = width+"px";
|
|
10905
|
-
this.SelectRect.style.height =height+"px";
|
|
10906
|
-
this.SelectRect.style.position = "absolute";
|
|
10907
|
-
this.SelectRect.style.left = left +"px";
|
|
10908
|
-
this.SelectRect.style.top = top +"px";
|
|
10909
|
-
this.SelectRect.style.display = "block";
|
|
10910
|
-
}
|
|
10911
|
-
|
|
10912
10944
|
this.UpdateSelectRect=function(start,end)
|
|
10913
10945
|
{
|
|
10914
10946
|
if (!this.ChartPaint[0].Data) return;
|
|
@@ -10928,7 +10960,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10928
10960
|
|
|
10929
10961
|
this.HideSelectRect=function()
|
|
10930
10962
|
{
|
|
10931
|
-
this.
|
|
10963
|
+
this.ClearDragSelectRect();
|
|
10932
10964
|
}
|
|
10933
10965
|
|
|
10934
10966
|
this.ResetFrameXYSplit=function()
|
|
@@ -11723,11 +11755,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11723
11755
|
|
|
11724
11756
|
this.ReloadExtendChartPaintResource=function(resource) //扩展画法重新加载配置
|
|
11725
11757
|
{
|
|
11726
|
-
for(var i
|
|
11758
|
+
for(var i=0;i<this.ExtendChartPaint.length; ++i)
|
|
11727
11759
|
{
|
|
11728
11760
|
var item=this.ExtendChartPaint[i];
|
|
11729
11761
|
if (item.ReloadResource) item.ReloadResource(resource);
|
|
11730
11762
|
}
|
|
11763
|
+
|
|
11764
|
+
if (this.ChartDragSelectRect && this.ChartDragSelectRect.ReloadResource) this.ChartDragSelectRect.ReloadResource(resource);
|
|
11731
11765
|
}
|
|
11732
11766
|
|
|
11733
11767
|
this.ReloadChartDrawPictureResource=function(resource)
|
|
@@ -12428,14 +12462,19 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12428
12462
|
//区间选择
|
|
12429
12463
|
this.GetRectSelectPaint=function()
|
|
12430
12464
|
{
|
|
12431
|
-
|
|
12432
|
-
|
|
12433
|
-
var item=this.ExtendChartPaint[i];
|
|
12434
|
-
if (item.ClassName=="RectSelectPaint")
|
|
12435
|
-
return item;
|
|
12436
|
-
}
|
|
12465
|
+
var finder=this.GetExtendChartByClassName("RectSelectPaint");
|
|
12466
|
+
if (!finder) return null;
|
|
12437
12467
|
|
|
12438
|
-
return
|
|
12468
|
+
return finder.Chart;
|
|
12469
|
+
}
|
|
12470
|
+
|
|
12471
|
+
//鼠标拖动区域
|
|
12472
|
+
this.GetRectDragPaint=function()
|
|
12473
|
+
{
|
|
12474
|
+
var finder=this.GetExtendChartByClassName("RectDragPaint");
|
|
12475
|
+
if (!finder) return null;
|
|
12476
|
+
|
|
12477
|
+
return finder.Chart;
|
|
12439
12478
|
}
|
|
12440
12479
|
|
|
12441
12480
|
this.SetRectSelectData=function(kItem, index)
|
|
@@ -13401,6 +13440,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
13401
13440
|
case JSCHART_MENU_ID.CMD_CHANGE_LANGUAGE_ID:
|
|
13402
13441
|
if (srcParam) this.SetLanguage(srcParam);
|
|
13403
13442
|
break;
|
|
13443
|
+
|
|
13444
|
+
case JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID:
|
|
13445
|
+
if (param!=null)
|
|
13446
|
+
{
|
|
13447
|
+
if (this.ChartDragSelectRect) this.ChartDragSelectRect.ShowMode=param;
|
|
13448
|
+
}
|
|
13449
|
+
break;
|
|
13404
13450
|
}
|
|
13405
13451
|
}
|
|
13406
13452
|
|
|
@@ -13544,6 +13590,37 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
13544
13590
|
{
|
|
13545
13591
|
this.CurrentChartDrawPicture=null;
|
|
13546
13592
|
}
|
|
13593
|
+
|
|
13594
|
+
|
|
13595
|
+
this.CreateDragSelectRect=function(option)
|
|
13596
|
+
{
|
|
13597
|
+
var chart=g_ExtendChartPaintFactory.Create("RectDragPaint",option);
|
|
13598
|
+
if (!chart) return null;
|
|
13599
|
+
|
|
13600
|
+
if (option && option.Enable===true) chart.Enable=true;
|
|
13601
|
+
chart.ChartBorder=this.Frame.ChartBorder;
|
|
13602
|
+
chart.ChartFrame=this.Frame;
|
|
13603
|
+
chart.HQChart=this;
|
|
13604
|
+
chart.SetOption(option);
|
|
13605
|
+
|
|
13606
|
+
this.ChartDragSelectRect=chart;
|
|
13607
|
+
}
|
|
13608
|
+
|
|
13609
|
+
this.ClearDragSelectRect=function()
|
|
13610
|
+
{
|
|
13611
|
+
if (!this.ChartDragSelectRect) return;
|
|
13612
|
+
|
|
13613
|
+
this.ChartDragSelectRect.ClearPoint();
|
|
13614
|
+
}
|
|
13615
|
+
|
|
13616
|
+
this.ShowDragSelectRect=function(ptStart, ptEnd)
|
|
13617
|
+
{
|
|
13618
|
+
if (!this.ChartDragSelectRect) return;
|
|
13619
|
+
|
|
13620
|
+
this.ChartDragSelectRect.SetFirstPoint(ptStart.X, ptStart.Y);
|
|
13621
|
+
this.ChartDragSelectRect.SetSecondPoint(ptEnd.X, ptEnd.Y);
|
|
13622
|
+
this.ChartDragSelectRect.Draw();
|
|
13623
|
+
}
|
|
13547
13624
|
}
|
|
13548
13625
|
|
|
13549
13626
|
function GetDevicePixelRatio()
|
|
@@ -23600,6 +23677,8 @@ function HistoryData()
|
|
|
23600
23677
|
this.BFactor; //前复权
|
|
23601
23678
|
this.AFactor; //后复权
|
|
23602
23679
|
|
|
23680
|
+
this.RightSeed; //本地计算的复权系数
|
|
23681
|
+
|
|
23603
23682
|
/*
|
|
23604
23683
|
{
|
|
23605
23684
|
PriceOffset: 每个单元的价格间距,
|
|
@@ -24601,11 +24680,15 @@ function ChartData()
|
|
|
24601
24680
|
var yClose=this.Data[index].YClose;
|
|
24602
24681
|
|
|
24603
24682
|
result[index]=HistoryData.Copy(this.Data[index]);
|
|
24683
|
+
result[index].RightSeed=seed;
|
|
24604
24684
|
|
|
24605
24685
|
for(--index; index>=0; --index)
|
|
24606
24686
|
{
|
|
24607
24687
|
if (yClose!=this.Data[index].Close) break;
|
|
24608
|
-
|
|
24688
|
+
var newItem=HistoryData.Copy(this.Data[index]);
|
|
24689
|
+
newItem.RightSeed=seed;
|
|
24690
|
+
result[index]=newItem;
|
|
24691
|
+
|
|
24609
24692
|
yClose=this.Data[index].YClose;
|
|
24610
24693
|
}
|
|
24611
24694
|
|
|
@@ -24615,7 +24698,9 @@ function ChartData()
|
|
|
24615
24698
|
if(yClose!=value && value!=0)
|
|
24616
24699
|
seed *= yClose/value;
|
|
24617
24700
|
|
|
24618
|
-
|
|
24701
|
+
var newItem=HistoryData.CopyRight(this.Data[index],seed);
|
|
24702
|
+
newItem.RightSeed=seed;
|
|
24703
|
+
result[index]=newItem
|
|
24619
24704
|
|
|
24620
24705
|
yClose=this.Data[index].YClose;
|
|
24621
24706
|
}
|
|
@@ -24626,11 +24711,14 @@ function ChartData()
|
|
|
24626
24711
|
var seed=1;
|
|
24627
24712
|
var close=this.Data[index].Close;
|
|
24628
24713
|
result[index]=HistoryData.Copy(this.Data[index]);
|
|
24714
|
+
result[index].RightSeed=seed;
|
|
24629
24715
|
|
|
24630
24716
|
for(++index;index<this.Data.length;++index)
|
|
24631
24717
|
{
|
|
24632
24718
|
if (close!=this.Data[index].YClose) break;
|
|
24633
|
-
|
|
24719
|
+
var newItem=HistoryData.Copy(this.Data[index]);
|
|
24720
|
+
newItem.RightSeed=seed;
|
|
24721
|
+
result[index]=newItem;
|
|
24634
24722
|
close=this.Data[index].Close;
|
|
24635
24723
|
}
|
|
24636
24724
|
|
|
@@ -24639,7 +24727,9 @@ function ChartData()
|
|
|
24639
24727
|
if(close!=this.Data[index].YClose)
|
|
24640
24728
|
seed *= close/this.Data[index].YClose;
|
|
24641
24729
|
|
|
24642
|
-
|
|
24730
|
+
var newItem=HistoryData.CopyRight(this.Data[index],seed);
|
|
24731
|
+
newItem.RightSeed=seed;
|
|
24732
|
+
result[index]=newItem;
|
|
24643
24733
|
|
|
24644
24734
|
close=this.Data[index].Close;
|
|
24645
24735
|
}
|
|
@@ -34951,6 +35041,86 @@ function ChartOverlayLine()
|
|
|
34951
35041
|
}
|
|
34952
35042
|
}
|
|
34953
35043
|
|
|
35044
|
+
//独立线段
|
|
35045
|
+
function ChartSingleLine()
|
|
35046
|
+
{
|
|
35047
|
+
this.newMethod=ChartLine; //派生
|
|
35048
|
+
this.newMethod();
|
|
35049
|
+
delete this.newMethod;
|
|
35050
|
+
|
|
35051
|
+
this.ClassName='ChartSingleLine'; //类名
|
|
35052
|
+
this.MaxMin=null; //当前的显示范围
|
|
35053
|
+
|
|
35054
|
+
this.Draw=function()
|
|
35055
|
+
{
|
|
35056
|
+
this.MaxMin=null;
|
|
35057
|
+
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
35058
|
+
if (this.IsShowIndexTitleOnly()) return;
|
|
35059
|
+
if (this.IsHideScriptIndex()) return;
|
|
35060
|
+
|
|
35061
|
+
if (!this.Data || !this.Data.Data) return;
|
|
35062
|
+
|
|
35063
|
+
this.MaxMin=this.GetCurrentMaxMin();
|
|
35064
|
+
if (!this.MaxMin) return;
|
|
35065
|
+
if (!IFrameSplitOperator.IsNumber(this.MaxMin.Max) || !IFrameSplitOperator.IsNumber(this.MaxMin.Min)) return;
|
|
35066
|
+
|
|
35067
|
+
switch(this.DrawType)
|
|
35068
|
+
{
|
|
35069
|
+
|
|
35070
|
+
default:
|
|
35071
|
+
return this.DrawStraightLine();
|
|
35072
|
+
}
|
|
35073
|
+
}
|
|
35074
|
+
|
|
35075
|
+
//获取当前页的最大最小值
|
|
35076
|
+
this.GetCurrentMaxMin=function()
|
|
35077
|
+
{
|
|
35078
|
+
var xPointCount=this.ChartFrame.XPointCount;
|
|
35079
|
+
var range={ Max:null, Min:null };
|
|
35080
|
+
|
|
35081
|
+
for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j)
|
|
35082
|
+
{
|
|
35083
|
+
var value=this.Data.Data[i];
|
|
35084
|
+
if (!IFrameSplitOperator.IsNumber(value)) continue;
|
|
35085
|
+
|
|
35086
|
+
if (range.Max==null) range.Max=value;
|
|
35087
|
+
if (range.Min==null) range.Min=value;
|
|
35088
|
+
|
|
35089
|
+
if (range.Max<value) range.Max=value;
|
|
35090
|
+
if (range.Min>value) range.Min=value;
|
|
35091
|
+
}
|
|
35092
|
+
|
|
35093
|
+
return range;
|
|
35094
|
+
}
|
|
35095
|
+
|
|
35096
|
+
this.GetMaxMin=function()
|
|
35097
|
+
{
|
|
35098
|
+
return { Max:null, Min:null };
|
|
35099
|
+
}
|
|
35100
|
+
|
|
35101
|
+
this.GetYFromData=function(value)
|
|
35102
|
+
{
|
|
35103
|
+
var bHScreen = (this.ChartFrame.IsHScreen === true);
|
|
35104
|
+
|
|
35105
|
+
if (bHScreen)
|
|
35106
|
+
{
|
|
35107
|
+
if (value <= this.MaxMin.Min) return this.ChartBorder.GetLeftEx();
|
|
35108
|
+
if (value >= this.MaxMin.Max) return this.ChartBorder.GetRightEx();
|
|
35109
|
+
|
|
35110
|
+
var width = this.ChartBorder.GetWidthEx() * (value - this.MaxMin.Min) / (this.MaxMin.Max - this.MaxMin.Min);
|
|
35111
|
+
return this.ChartBorder.GetLeftEx() + width;
|
|
35112
|
+
}
|
|
35113
|
+
else
|
|
35114
|
+
{
|
|
35115
|
+
if(value<=this.MaxMin.Min) return this.ChartBorder.GetBottomEx();
|
|
35116
|
+
if(value>=this.MaxMin.Max) return this.ChartBorder.GetTopEx();
|
|
35117
|
+
|
|
35118
|
+
var height=this.ChartBorder.GetHeightEx()*(value-this.MaxMin.Min)/(this.MaxMin.Max-this.MaxMin.Min);
|
|
35119
|
+
return this.ChartBorder.GetBottomEx()-height;
|
|
35120
|
+
}
|
|
35121
|
+
}
|
|
35122
|
+
}
|
|
35123
|
+
|
|
34954
35124
|
//彩色线段
|
|
34955
35125
|
function ChartPartLine()
|
|
34956
35126
|
{
|
|
@@ -37871,8 +38041,8 @@ function ChartMinutePriceLine()
|
|
|
37871
38041
|
if (isHScreen===true) chartright=this.ChartBorder.GetBottom();
|
|
37872
38042
|
var xPointCount=this.ChartFrame.XPointCount;
|
|
37873
38043
|
var minuteCount=this.ChartFrame.MinuteCount;
|
|
37874
|
-
var bottom=this.ChartBorder.
|
|
37875
|
-
var left=this.ChartBorder.
|
|
38044
|
+
var bottom=this.ChartBorder.GetBottom();
|
|
38045
|
+
var left=this.ChartBorder.GetLeft();
|
|
37876
38046
|
var data=this.Data;
|
|
37877
38047
|
|
|
37878
38048
|
this.DrawBeforeOpen(); //盘前
|
|
@@ -44230,6 +44400,7 @@ function ExtendChartPaintFactory()
|
|
|
44230
44400
|
[
|
|
44231
44401
|
["FrameSplitPaint", { Create:function() { return new FrameSplitPaint(); } }],
|
|
44232
44402
|
["RectSelectPaint", { Create:function() { return new RectSelectPaint(); } }],
|
|
44403
|
+
["RectDragPaint", { Create:function() { return new RectDragPaint(); } }],
|
|
44233
44404
|
["DragMovePaint", { Create:function() { return new DragMovePaint(); } }],
|
|
44234
44405
|
["SessionBreaksPaint", { Create:function() { return new SessionBreaksPaint(); }}],
|
|
44235
44406
|
["FrameButtomToolbarPaint", {Create:function() { return new FrameButtomToolbarPaint(); }}]
|
|
@@ -47216,6 +47387,189 @@ function RectSelectPaint()
|
|
|
47216
47387
|
}
|
|
47217
47388
|
}
|
|
47218
47389
|
}
|
|
47390
|
+
|
|
47391
|
+
//鼠标拖动选中区域
|
|
47392
|
+
function RectDragPaint()
|
|
47393
|
+
{
|
|
47394
|
+
this.newMethod=IExtendChartPainting; //派生
|
|
47395
|
+
this.newMethod();
|
|
47396
|
+
delete this.newMethod;
|
|
47397
|
+
|
|
47398
|
+
this.ClassName='RectDragPaint';
|
|
47399
|
+
this.LineColor=g_JSChartResource.RectDrag.LineColor; //竖线
|
|
47400
|
+
this.LineWidth=g_JSChartResource.RectDrag.LineWidth;
|
|
47401
|
+
this.BGColor=g_JSChartResource.RectDrag.BGColor;
|
|
47402
|
+
this.ShowMode=0; //0=只画边框 1=遮挡未选中区域 2=整体全选
|
|
47403
|
+
this.Enable=false;
|
|
47404
|
+
|
|
47405
|
+
this.FirstPoint;
|
|
47406
|
+
this.SecondPoint;
|
|
47407
|
+
|
|
47408
|
+
this.IsClearCanvas=true; //画布是否是清空状态
|
|
47409
|
+
|
|
47410
|
+
//设置参数接口
|
|
47411
|
+
this.SetOption=function(option)
|
|
47412
|
+
{
|
|
47413
|
+
if (option)
|
|
47414
|
+
{
|
|
47415
|
+
if (option.LineColor) this.LineColor=option.LineColor;
|
|
47416
|
+
if (option.BGColor) this.BGColor=option.BGColor;
|
|
47417
|
+
if (IFrameSplitOperator.IsNumber(option.ShowMode)) this.ShowMode=option.ShowMode;
|
|
47418
|
+
}
|
|
47419
|
+
}
|
|
47420
|
+
|
|
47421
|
+
this.ReloadResource=function(resource)
|
|
47422
|
+
{
|
|
47423
|
+
this.LineColor=g_JSChartResource.RectDrag.LineColor; //竖线
|
|
47424
|
+
this.LineWidth=g_JSChartResource.RectDrag.LineWidth;
|
|
47425
|
+
this.BGColor=g_JSChartResource.RectDrag.BGColor; //面积
|
|
47426
|
+
}
|
|
47427
|
+
|
|
47428
|
+
this.ClearPoint=function()
|
|
47429
|
+
{
|
|
47430
|
+
this.FirstPoint=null;
|
|
47431
|
+
this.SecondPoint=null;
|
|
47432
|
+
|
|
47433
|
+
if (!this.IsClearCanvas) this.Draw();
|
|
47434
|
+
}
|
|
47435
|
+
|
|
47436
|
+
this.SetFirstPoint=function(x, y)
|
|
47437
|
+
{
|
|
47438
|
+
this.FirstPoint={ X:x, Y:y };
|
|
47439
|
+
}
|
|
47440
|
+
|
|
47441
|
+
this.SetSecondPoint=function(x, y)
|
|
47442
|
+
{
|
|
47443
|
+
this.SecondPoint={ X:x, Y:y };
|
|
47444
|
+
}
|
|
47445
|
+
|
|
47446
|
+
this.DrawSelectedBorderMode=function(rtSelect)
|
|
47447
|
+
{
|
|
47448
|
+
this.Canvas.strokeStyle=this.LineColor;
|
|
47449
|
+
this.Canvas.strokeRect(ToFixedPoint(rtSelect.Left),ToFixedPoint(rtSelect.Top),ToFixedRect(rtSelect.Width),ToFixedRect(rtSelect.Height));
|
|
47450
|
+
}
|
|
47451
|
+
|
|
47452
|
+
this.DrawUnselectedMaskMode=function(rtSelect, rtClient)
|
|
47453
|
+
{
|
|
47454
|
+
if (this.BGColor)
|
|
47455
|
+
{
|
|
47456
|
+
this.Canvas.save();
|
|
47457
|
+
|
|
47458
|
+
var clipPath=new Path2D();
|
|
47459
|
+
clipPath.rect(rtClient.Left, rtClient.Top, rtClient.Width, rtSelect.Top-rtClient.Top);
|
|
47460
|
+
|
|
47461
|
+
var leftPath=new Path2D();
|
|
47462
|
+
leftPath.rect(rtClient.Left,rtSelect.Top, rtSelect.Left-rtClient.Left, rtSelect.Height);
|
|
47463
|
+
clipPath.addPath(leftPath);
|
|
47464
|
+
|
|
47465
|
+
var rightPath=new Path2D();
|
|
47466
|
+
rightPath.rect(rtSelect.Right,rtSelect.Top, rtClient.Right-rtSelect.Right, rtSelect.Height);
|
|
47467
|
+
clipPath.addPath(rightPath);
|
|
47468
|
+
|
|
47469
|
+
var bottmPath=new Path2D();
|
|
47470
|
+
bottmPath.rect(rtClient.Left,rtSelect.Bottom, rtClient.Width, rtClient.Bottom-rtSelect.Bottom);
|
|
47471
|
+
clipPath.addPath(bottmPath);
|
|
47472
|
+
|
|
47473
|
+
this.Canvas.clip(clipPath);
|
|
47474
|
+
|
|
47475
|
+
this.Canvas.fillStyle=this.BGColor;
|
|
47476
|
+
this.Canvas.fillRect(rtClient.Left,rtClient.Top,rtClient.Width,rtClient.Height);
|
|
47477
|
+
|
|
47478
|
+
this.Canvas.restore();
|
|
47479
|
+
}
|
|
47480
|
+
|
|
47481
|
+
this.Canvas.strokeStyle=this.LineColor;
|
|
47482
|
+
this.Canvas.strokeRect(ToFixedPoint(rtSelect.Left),ToFixedPoint(rtSelect.Top),ToFixedRect(rtSelect.Width),ToFixedRect(rtSelect.Height));
|
|
47483
|
+
}
|
|
47484
|
+
|
|
47485
|
+
this.DrawFullselectedMode=function(rtSelect, rtClient)
|
|
47486
|
+
{
|
|
47487
|
+
if (this.BGColor)
|
|
47488
|
+
{
|
|
47489
|
+
this.Canvas.save();
|
|
47490
|
+
|
|
47491
|
+
var clipPath=new Path2D();
|
|
47492
|
+
clipPath.rect(rtClient.Left, rtClient.Top, rtSelect.Left-rtClient.Left, rtClient.Height);
|
|
47493
|
+
|
|
47494
|
+
var rightPath=new Path2D();
|
|
47495
|
+
rightPath.rect(rtSelect.Right,rtClient.Top, rtClient.Right-rtSelect.Right, rtClient.Height);
|
|
47496
|
+
clipPath.addPath(rightPath);
|
|
47497
|
+
|
|
47498
|
+
this.Canvas.clip(clipPath);
|
|
47499
|
+
|
|
47500
|
+
this.Canvas.fillStyle=this.BGColor;
|
|
47501
|
+
this.Canvas.fillRect(rtClient.Left,rtClient.Top,rtClient.Width,rtClient.Height);
|
|
47502
|
+
|
|
47503
|
+
this.Canvas.restore();
|
|
47504
|
+
}
|
|
47505
|
+
|
|
47506
|
+
this.Canvas.strokeStyle=this.LineColor;
|
|
47507
|
+
this.Canvas.strokeRect(ToFixedPoint(rtSelect.Left),ToFixedPoint(rtClient.Top),ToFixedRect(rtSelect.Width),ToFixedRect(rtClient.Height));
|
|
47508
|
+
}
|
|
47509
|
+
|
|
47510
|
+
this.Draw=function()
|
|
47511
|
+
{
|
|
47512
|
+
if (!this.Enable) return;
|
|
47513
|
+
if (!this.HQChart) return;
|
|
47514
|
+
|
|
47515
|
+
var finder=this.HQChart.GetExtraCanvas(JSChart.RectDragCanvasKey);
|
|
47516
|
+
if (!finder) return;
|
|
47517
|
+
|
|
47518
|
+
this.Canvas=finder.Canvas;
|
|
47519
|
+
this.HQChart.ClearCanvas(this.Canvas);
|
|
47520
|
+
this.IsClearCanvas=true;
|
|
47521
|
+
|
|
47522
|
+
if (!this.FirstPoint && !this.SecondPoint) return;
|
|
47523
|
+
|
|
47524
|
+
var top=this.ChartBorder.GetTop();
|
|
47525
|
+
var bottom=this.ChartBorder.GetBottom();
|
|
47526
|
+
var left=this.ChartBorder.GetLeft();
|
|
47527
|
+
var right=this.ChartBorder.GetRight();
|
|
47528
|
+
|
|
47529
|
+
var rtClient={Left:left, Top:top, Right:right, Bottom:bottom };
|
|
47530
|
+
rtClient.Width=rtClient.Right-rtClient.Left;
|
|
47531
|
+
rtClient.Height=rtClient.Bottom-rtClient.Top;
|
|
47532
|
+
|
|
47533
|
+
var rtSelect=
|
|
47534
|
+
{
|
|
47535
|
+
Left:Math.min(this.FirstPoint.X,this.SecondPoint.X),
|
|
47536
|
+
Right:Math.max(this.FirstPoint.X,this.SecondPoint.X),
|
|
47537
|
+
Top:Math.min(this.FirstPoint.Y,this.SecondPoint.Y),
|
|
47538
|
+
Bottom:Math.max(this.FirstPoint.Y,this.SecondPoint.Y)
|
|
47539
|
+
}
|
|
47540
|
+
|
|
47541
|
+
if (rtSelect.Top<top) rtSelect.Top=top;
|
|
47542
|
+
else if (rtSelect.Top>bottom) rtSelect.Top=bottom;
|
|
47543
|
+
if (rtSelect.Bottom<top) rtSelect.Bottom=top;
|
|
47544
|
+
else if (rtSelect.Bottom>bottom) rtSelect.Bottom=bottom;
|
|
47545
|
+
|
|
47546
|
+
if (rtSelect.Left<left) rtSelect.Left=left;
|
|
47547
|
+
else if (rtSelect.Left>right) rtSelect.Left=right;
|
|
47548
|
+
if (rtSelect.Right<left) rtSelect.Right=left;
|
|
47549
|
+
else if (rtSelect.Right>right) rtSelect.Right=right;
|
|
47550
|
+
|
|
47551
|
+
rtSelect.Width=rtSelect.Right-rtSelect.Left;
|
|
47552
|
+
rtSelect.Height=rtSelect.Bottom-rtSelect.Top;
|
|
47553
|
+
|
|
47554
|
+
switch(this.ShowMode)
|
|
47555
|
+
{
|
|
47556
|
+
case 1:
|
|
47557
|
+
this.DrawUnselectedMaskMode(rtSelect,rtClient);
|
|
47558
|
+
break;
|
|
47559
|
+
case 2:
|
|
47560
|
+
this.DrawFullselectedMode(rtSelect,rtClient);
|
|
47561
|
+
break;
|
|
47562
|
+
default:
|
|
47563
|
+
this.DrawSelectedBorderMode(rtSelect);
|
|
47564
|
+
break;
|
|
47565
|
+
}
|
|
47566
|
+
|
|
47567
|
+
|
|
47568
|
+
|
|
47569
|
+
this.IsClearCanvas=false;
|
|
47570
|
+
}
|
|
47571
|
+
}
|
|
47572
|
+
|
|
47219
47573
|
//深度图 支持横屏
|
|
47220
47574
|
/*
|
|
47221
47575
|
数据格式:
|
|
@@ -61318,8 +61672,8 @@ function ChartDrawHLine()
|
|
|
61318
61672
|
var bottom=this.Frame.ChartBorder.GetBottomEx();
|
|
61319
61673
|
var pixelTatio = GetDevicePixelRatio();
|
|
61320
61674
|
|
|
61321
|
-
if (IFrameSplitOperator.IsNumber(labInfo.TopOffset)) top-=labInfo.TopOffset;
|
|
61322
|
-
if (IFrameSplitOperator.IsNumber(labInfo.BottomOffset)) bottom+=labInfo.BottomOffset;
|
|
61675
|
+
if (labInfo && IFrameSplitOperator.IsNumber(labInfo.TopOffset)) top-=labInfo.TopOffset;
|
|
61676
|
+
if (labInfo && IFrameSplitOperator.IsNumber(labInfo.BottomOffset)) bottom+=labInfo.BottomOffset;
|
|
61323
61677
|
|
|
61324
61678
|
var yValue=this.Frame.GetYData(y,false);
|
|
61325
61679
|
var strValue=yValue.toFixed(this.Precision);
|
|
@@ -70396,6 +70750,7 @@ function JSChartResource()
|
|
|
70396
70750
|
RangeTextSubBGColor:'rgb(54,54,54)',
|
|
70397
70751
|
}
|
|
70398
70752
|
|
|
70753
|
+
//选中图形
|
|
70399
70754
|
this.SelectedChart=
|
|
70400
70755
|
{
|
|
70401
70756
|
LineWidth:1,
|
|
@@ -70405,6 +70760,14 @@ function JSChartResource()
|
|
|
70405
70760
|
BGColor:"rgb(255,255,255)"
|
|
70406
70761
|
}
|
|
70407
70762
|
|
|
70763
|
+
//鼠标区间选中
|
|
70764
|
+
this.RectDrag=
|
|
70765
|
+
{
|
|
70766
|
+
LineColor:"rgb(0,0,0)", //竖线
|
|
70767
|
+
LineWidth:1*GetDevicePixelRatio(),
|
|
70768
|
+
BGColor:"rgba(128,128,128,0.2)", //面积
|
|
70769
|
+
}
|
|
70770
|
+
|
|
70408
70771
|
this.DragMovePaint=
|
|
70409
70772
|
{
|
|
70410
70773
|
TextColor:"rgb(0,0,0)",
|
|
@@ -71138,6 +71501,16 @@ function JSChartResource()
|
|
|
71138
71501
|
if (item.RangeTextSubBGColor) this.RectSelect.RangeTextSubBGColor=item.RangeTextSubBGColor;
|
|
71139
71502
|
}
|
|
71140
71503
|
|
|
71504
|
+
if (style.RectDrag)
|
|
71505
|
+
{
|
|
71506
|
+
var item=style.RectDrag;
|
|
71507
|
+
var dest=this.RectDrag;
|
|
71508
|
+
|
|
71509
|
+
if (item.LineColor) dest.LineColor=item.LineColor;
|
|
71510
|
+
if (IFrameSplitOperator.IsPlusNumber(item.LineWidth)) dest.LineWidth=item.LineWidth;
|
|
71511
|
+
if (item.BGColor) dest.BGColor=item.BGColor;
|
|
71512
|
+
}
|
|
71513
|
+
|
|
71141
71514
|
if (style.OrderFlow)
|
|
71142
71515
|
{
|
|
71143
71516
|
item=style.OrderFlow;
|
|
@@ -73533,6 +73906,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
73533
73906
|
this.CreateMainKLine();
|
|
73534
73907
|
this.CreateExtendChart("RectSelectPaint", option? option.SelectRect:null); //区间统计
|
|
73535
73908
|
if (this.EnableIndexChartDrag) this.CreateExtendChart("DragMovePaint");
|
|
73909
|
+
this.CreateDragSelectRect(option? option.DragSelectRect:null);
|
|
73536
73910
|
|
|
73537
73911
|
//子窗口动态标题
|
|
73538
73912
|
for(var i in this.Frame.SubFrame)
|
|
@@ -73573,6 +73947,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
73573
73947
|
if (bRegisterWheel) this.UIElement.addEventListener("wheel", (e)=>{ this.OnWheel(e); }, true); //上下滚动消息
|
|
73574
73948
|
}
|
|
73575
73949
|
|
|
73950
|
+
|
|
73951
|
+
|
|
73576
73952
|
this.OnCustomKeyDown=function(keyID, e) //自定义键盘事件
|
|
73577
73953
|
{
|
|
73578
73954
|
if (keyID==37 && e.ctrlKey) //Ctrl+Left
|
|
@@ -78345,7 +78721,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
78345
78721
|
|
|
78346
78722
|
{ Name:"禁止拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[0]}, Checked:0==this.DragMode },
|
|
78347
78723
|
{ Name:"启动拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1]}, Checked:1==this.DragMode },
|
|
78348
|
-
{ Name:"
|
|
78724
|
+
{ Name:"左键区间选择", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[2]}, Checked:2==this.DragMode },
|
|
78349
78725
|
{ Name:JSPopMenu.SEPARATOR_LINE_NAME },
|
|
78350
78726
|
|
|
78351
78727
|
{ Name:"背景分割", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_BG_SPLIT_ID, Args:[!bBGSpit]}, Checked:bBGSpit},
|
|
@@ -78371,6 +78747,15 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
78371
78747
|
{ Name:"繁体", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_LANGUAGE_ID, Args:["TC"]}, Checked:this.LanguageID==JSCHART_LANGUAGE_ID.LANGUAGE_TRADITIONAL_CHINESE_ID },
|
|
78372
78748
|
]
|
|
78373
78749
|
},
|
|
78750
|
+
{
|
|
78751
|
+
Name:"区间选择样式",
|
|
78752
|
+
SubMenu:
|
|
78753
|
+
[
|
|
78754
|
+
{ Name:"样式1(默认)", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[0]}, Checked:0==this.ChartDragSelectRect.ShowMode },
|
|
78755
|
+
{ Name:"样式2", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[1]}, Checked:1==this.ChartDragSelectRect.ShowMode },
|
|
78756
|
+
{ Name:"样式3", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[2]}, Checked:2==this.ChartDragSelectRect.ShowMode },
|
|
78757
|
+
]
|
|
78758
|
+
}
|
|
78374
78759
|
]
|
|
78375
78760
|
}
|
|
78376
78761
|
];
|
|
@@ -80740,11 +81125,10 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80740
81125
|
|
|
80741
81126
|
//this.UIElement.style.cursor="default";
|
|
80742
81127
|
this.SetCursor({Cursor:"default"});
|
|
80743
|
-
var
|
|
80744
|
-
var
|
|
80745
|
-
|
|
80746
|
-
|
|
80747
|
-
this.ShowSelectRect(x,y,x2,y2);
|
|
81128
|
+
var ptStart=this.PointAbsoluteToRelative(drag.Click.X, drag.Click.Y);
|
|
81129
|
+
var ptEnd=this.PointAbsoluteToRelative(e.clientX, e.clientY);
|
|
81130
|
+
|
|
81131
|
+
this.ShowDragSelectRect(ptStart, ptEnd);
|
|
80748
81132
|
|
|
80749
81133
|
drag.LastMove.X=e.clientX;
|
|
80750
81134
|
drag.LastMove.Y=e.clientY;
|
|
@@ -81915,6 +82299,16 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
81915
82299
|
SubMenu:
|
|
81916
82300
|
[
|
|
81917
82301
|
{ Name:"画图工具", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID, Args:[]}, Checked:this.IsShowDrawToolDialog()},
|
|
82302
|
+
|
|
82303
|
+
{
|
|
82304
|
+
Name:"区间选择样式",
|
|
82305
|
+
SubMenu:
|
|
82306
|
+
[
|
|
82307
|
+
{ Name:"样式1(默认)", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[0]}, Checked:0==this.ChartDragSelectRect.ShowMode },
|
|
82308
|
+
{ Name:"样式2", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[1]}, Checked:1==this.ChartDragSelectRect.ShowMode },
|
|
82309
|
+
{ Name:"样式3", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[2]}, Checked:2==this.ChartDragSelectRect.ShowMode },
|
|
82310
|
+
]
|
|
82311
|
+
}
|
|
81918
82312
|
]
|
|
81919
82313
|
}
|
|
81920
82314
|
|
|
@@ -82105,6 +82499,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
82105
82499
|
this.CreateMainKLine();
|
|
82106
82500
|
this.CreateExtendChart("RectSelectPaint", option? option.SelectRect:null); //区间统计
|
|
82107
82501
|
if (this.EnableIndexChartDrag) this.CreateExtendChart("DragMovePaint");
|
|
82502
|
+
this.CreateDragSelectRect(option? option.DragSelectRect:null);
|
|
82108
82503
|
|
|
82109
82504
|
//子窗口动态标题
|
|
82110
82505
|
for(var i=0;i<this.Frame.SubFrame.length; ++i)
|
|
@@ -113541,6 +113936,7 @@ function JSExecute(ast,option)
|
|
|
113541
113936
|
let isExData=false;
|
|
113542
113937
|
let isDotLine=false;
|
|
113543
113938
|
let isOverlayLine=false; //叠加线
|
|
113939
|
+
let isSingleLine=false; //独立线段
|
|
113544
113940
|
var isNoneName=false;
|
|
113545
113941
|
var isShowTitle=true;
|
|
113546
113942
|
//显示在位置之上,对于DRAWTEXT和DRAWNUMBER等函数有用,放在语句的最后面(不能与LINETHICK等函数共用),比如:
|
|
@@ -113597,9 +113993,11 @@ function JSExecute(ast,option)
|
|
|
113597
113993
|
else if (value==="DRAWCENTER") isDrawCenter=true;
|
|
113598
113994
|
else if (value=="DRAWBELOW") isDrawBelow=true;
|
|
113599
113995
|
else if (value=="STEPLINE") stepLine=true;
|
|
113996
|
+
else if (value=="SINGLELINE") isSingleLine=true;
|
|
113600
113997
|
else if (value.indexOf('COLOR')==0) color=value;
|
|
113601
113998
|
else if (value.indexOf("RGBX")==0 && value.length==10) color=value; //RGBX+“RRGGBB”
|
|
113602
113999
|
else if (value.indexOf('LINETHICK')==0) lineWidth=value;
|
|
114000
|
+
|
|
113603
114001
|
|
|
113604
114002
|
else if (value=="ALIGN0") drawAlign=0;
|
|
113605
114003
|
else if (value=="ALIGN1") drawAlign=1;
|
|
@@ -113848,6 +114246,7 @@ function JSExecute(ast,option)
|
|
|
113848
114246
|
if (isExData==true) value.IsExData = true;
|
|
113849
114247
|
if (isDotLine==true) value.IsDotLine=true;
|
|
113850
114248
|
if (isOverlayLine==true) value.IsOverlayLine=true;
|
|
114249
|
+
if (isSingleLine==true) value.IsSingleLine=true;
|
|
113851
114250
|
if (isNoneName==true) value.NoneName=true;
|
|
113852
114251
|
if (isShowTitle==false) value.IsShowTitle=false;
|
|
113853
114252
|
if (stepLine==true) value.Type=7;
|
|
@@ -113883,6 +114282,7 @@ function JSExecute(ast,option)
|
|
|
113883
114282
|
if (isExData==true) value.IsExData = true;
|
|
113884
114283
|
if (isDotLine==true) value.IsDotLine=true;
|
|
113885
114284
|
if (isOverlayLine==true) value.IsOverlayLine=true;
|
|
114285
|
+
if (isSingleLine==true) value.IsSingleLine=true;
|
|
113886
114286
|
if (isShowTitle==false) value.IsShowTitle=false;
|
|
113887
114287
|
if (stepLine==true) value.Type=7;
|
|
113888
114288
|
this.OutVarTable.push(value);
|
|
@@ -116710,6 +117110,54 @@ function ScriptIndex(name,script,args,option)
|
|
|
116710
117110
|
hqChart.ChartPaint.push(line);
|
|
116711
117111
|
}
|
|
116712
117112
|
|
|
117113
|
+
this.CreateSingleLine=function(hqChart,windowIndex,varItem,id,lineType)
|
|
117114
|
+
{
|
|
117115
|
+
var line=new ChartSingleLine();
|
|
117116
|
+
line.Canvas=hqChart.Canvas;
|
|
117117
|
+
line.DrawType=1;
|
|
117118
|
+
line.Name=varItem.Name;
|
|
117119
|
+
line.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;
|
|
117120
|
+
line.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;
|
|
117121
|
+
line.Identify=this.Guid;
|
|
117122
|
+
if (varItem.Color) line.Color=this.GetColor(varItem.Color);
|
|
117123
|
+
else line.Color=this.GetDefaultColor(id);
|
|
117124
|
+
|
|
117125
|
+
if (varItem.LineWidth)
|
|
117126
|
+
{
|
|
117127
|
+
let width=parseInt(varItem.LineWidth.replace("LINETHICK",""));
|
|
117128
|
+
if (!isNaN(width) && width>0) line.LineWidth=width;
|
|
117129
|
+
}
|
|
117130
|
+
|
|
117131
|
+
if (varItem.IsDotLine) line.IsDotLine=true; //虚线
|
|
117132
|
+
if (varItem.IsShow==false) line.IsShow=false;
|
|
117133
|
+
|
|
117134
|
+
let titleIndex=windowIndex+1;
|
|
117135
|
+
line.Data.Data=varItem.Data;
|
|
117136
|
+
|
|
117137
|
+
this.ReloadChartResource(hqChart,windowIndex,line);
|
|
117138
|
+
|
|
117139
|
+
if (varItem.IsShowTitle===false) //NOTEXT 不绘制标题
|
|
117140
|
+
{
|
|
117141
|
+
|
|
117142
|
+
}
|
|
117143
|
+
else if (IFrameSplitOperator.IsString(varItem.Name) && varItem.Name.indexOf("NOTEXT")==0) //标题中包含NOTEXT不绘制标题
|
|
117144
|
+
{
|
|
117145
|
+
|
|
117146
|
+
}
|
|
117147
|
+
else
|
|
117148
|
+
{
|
|
117149
|
+
if (varItem.NoneName)
|
|
117150
|
+
hqChart.TitlePaint[titleIndex].Data[id]=new DynamicTitleData(line.Data,null,line.Color);
|
|
117151
|
+
else
|
|
117152
|
+
hqChart.TitlePaint[titleIndex].Data[id]=new DynamicTitleData(line.Data,varItem.Name,line.Color);
|
|
117153
|
+
|
|
117154
|
+
this.SetTitleData(hqChart.TitlePaint[titleIndex].Data[id],line);
|
|
117155
|
+
}
|
|
117156
|
+
|
|
117157
|
+
this.SetChartIndexName(line);
|
|
117158
|
+
hqChart.ChartPaint.push(line);
|
|
117159
|
+
}
|
|
117160
|
+
|
|
116713
117161
|
//创建柱子
|
|
116714
117162
|
this.CreateBar=function(hqChart,windowIndex,varItem,id)
|
|
116715
117163
|
{
|
|
@@ -118014,6 +118462,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
118014
118462
|
if (item.Type==0)
|
|
118015
118463
|
{
|
|
118016
118464
|
if (item.IsOverlayLine) this.CreateOverlayLine(hqChart,windowIndex,item,i,item.Type);
|
|
118465
|
+
else if (item.IsSingleLine) this.CreateSingleLine(hqChart,windowIndex,item,i,item.Type);
|
|
118017
118466
|
else this.CreateLine(hqChart,windowIndex,item,i,item.Type);
|
|
118018
118467
|
}
|
|
118019
118468
|
else if (item.Type==1)
|
|
@@ -122713,6 +123162,13 @@ function GetBlackStyle()
|
|
|
122713
123162
|
AreaColor:"rgba(26,13,7,0.5)", //面积
|
|
122714
123163
|
},
|
|
122715
123164
|
|
|
123165
|
+
RectDrag:
|
|
123166
|
+
{
|
|
123167
|
+
LineColor:"rgb(220,220,220)",
|
|
123168
|
+
LineWidth:1*GetDevicePixelRatio(),
|
|
123169
|
+
BGColor:"rgba(220,220,220,0.2)", //面积
|
|
123170
|
+
},
|
|
123171
|
+
|
|
122716
123172
|
SelectedChart:
|
|
122717
123173
|
{
|
|
122718
123174
|
LineWidth:1,
|
|
@@ -133729,7 +134185,7 @@ function ScrollBarBGChart()
|
|
|
133729
134185
|
|
|
133730
134186
|
|
|
133731
134187
|
|
|
133732
|
-
var HQCHART_VERSION="1.1.
|
|
134188
|
+
var HQCHART_VERSION="1.1.13435";
|
|
133733
134189
|
|
|
133734
134190
|
function PrintHQChartVersion()
|
|
133735
134191
|
{
|
|
@@ -133834,6 +134290,13 @@ export default {
|
|
|
133834
134290
|
|
|
133835
134291
|
CoordinateInfo:CoordinateInfo,
|
|
133836
134292
|
|
|
134293
|
+
//图形基类导出
|
|
134294
|
+
IChartPainting:IChartPainting, //图形
|
|
134295
|
+
IExtendChartPainting:IExtendChartPainting, //扩展图形
|
|
134296
|
+
IChartTitlePainting:IChartTitlePainting, //标题类
|
|
134297
|
+
IChartDrawPicture:IChartDrawPicture, //画图工具
|
|
134298
|
+
DynamicTitleData:DynamicTitleData, //指标标题数据
|
|
134299
|
+
|
|
133837
134300
|
//成交明细
|
|
133838
134301
|
JSDealChart:JSDealChart,
|
|
133839
134302
|
DEAL_COLUMN_ID:DEAL_COLUMN_ID,
|
|
@@ -133842,9 +134305,9 @@ export default {
|
|
|
133842
134305
|
JSReportChart:JSReportChart,
|
|
133843
134306
|
REPORT_COLUMN_ID:REPORT_COLUMN_ID,
|
|
133844
134307
|
|
|
133845
|
-
|
|
133846
|
-
|
|
133847
|
-
|
|
134308
|
+
//键盘精灵
|
|
134309
|
+
JSKeyboardChart:JSKeyboardChart,
|
|
134310
|
+
KEYBOARD_COLUMN_ID:KEYBOARD_COLUMN_ID,
|
|
133848
134311
|
|
|
133849
134312
|
//X轴滚动条
|
|
133850
134313
|
JSScrollBarChart:JSScrollBarChart,
|