hqchart 1.1.14161 → 1.1.14172
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 +37 -20
- package/package.json +1 -1
- package/src/jscommon/umychart.TReport.js +113 -2
- package/src/jscommon/umychart.js +169 -5
- package/src/jscommon/umychart.report.js +3 -1
- package/src/jscommon/umychart.resource/font/iconfont.css +11 -3
- package/src/jscommon/umychart.resource/font/iconfont.ttf +0 -0
- package/src/jscommon/umychart.resource/font/iconfont.woff +0 -0
- package/src/jscommon/umychart.resource/font/iconfont.woff2 +0 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +173 -7
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +286 -9
package/src/jscommon/umychart.js
CHANGED
|
@@ -3039,9 +3039,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3039
3039
|
{
|
|
3040
3040
|
IsValueFullRange:false ,
|
|
3041
3041
|
IsDisplayLatest:false,
|
|
3042
|
-
SelectedBorder:{ Mode:0, SelFrame:0 },
|
|
3043
|
-
SelectedXBorder: { Mode:0, Date:null }
|
|
3042
|
+
SelectedBorder:{ Mode:0, SelFrame:0 }, //边框选中模式 Mode:0=禁用 1=右侧标记选中 2=指标窗口标记选中
|
|
3043
|
+
SelectedXBorder: { Mode:0, Date:null }, //X边框选中模式 Mode:0=禁用 分时图图有效
|
|
3044
3044
|
//XDateFormat (多日分时图x轴底部日期格式)
|
|
3045
|
+
RightHorizontal:
|
|
3046
|
+
{
|
|
3047
|
+
//Show:true,
|
|
3048
|
+
//Width:5
|
|
3049
|
+
} //右侧框架外部坐标和间距
|
|
3045
3050
|
};
|
|
3046
3051
|
|
|
3047
3052
|
this.VerticalDrag; //通过X轴左右拖动数据(手势才有)
|
|
@@ -11831,6 +11836,23 @@ function AverageWidthFrame()
|
|
|
11831
11836
|
}
|
|
11832
11837
|
}
|
|
11833
11838
|
|
|
11839
|
+
this.IsShowRightHorizontal=function()
|
|
11840
|
+
{
|
|
11841
|
+
var borderRight=this.ChartBorder.Right;
|
|
11842
|
+
if (borderRight<=10) return false;
|
|
11843
|
+
|
|
11844
|
+
if (this.YTextPosition[1]==2) return false;
|
|
11845
|
+
if (this.IsShowYText[1]===false) return false;
|
|
11846
|
+
|
|
11847
|
+
if (this.GlobalOption && this.GlobalOption.RightHorizontal)
|
|
11848
|
+
{
|
|
11849
|
+
var item=this.GlobalOption.RightHorizontal;
|
|
11850
|
+
if (item.Show===false) return false;
|
|
11851
|
+
}
|
|
11852
|
+
|
|
11853
|
+
return true;
|
|
11854
|
+
}
|
|
11855
|
+
|
|
11834
11856
|
//画Y轴
|
|
11835
11857
|
this.DrawHorizontal=function()
|
|
11836
11858
|
{
|
|
@@ -11847,7 +11869,8 @@ function AverageWidthFrame()
|
|
|
11847
11869
|
var borderLeft=this.ChartBorder.Left;
|
|
11848
11870
|
|
|
11849
11871
|
var isDrawLeft=borderLeft>10 && this.IsShowYText[0]===true && this.YTextPosition[0]!=2;
|
|
11850
|
-
var isDrawRight=borderRight>10 && this.IsShowYText[1]===true && this.YTextPosition[1]!=2;
|
|
11872
|
+
//var isDrawRight=borderRight>10 && this.IsShowYText[1]===true && this.YTextPosition[1]!=2;
|
|
11873
|
+
var isDrawRight=this.IsShowRightHorizontal();
|
|
11851
11874
|
|
|
11852
11875
|
var rightExtendLine=null; //右侧延长线
|
|
11853
11876
|
var leftExtendLine=null; //左侧延长线
|
|
@@ -13846,7 +13869,8 @@ function AverageWidthFrame()
|
|
|
13846
13869
|
var borderRight=this.ChartBorder.Right;
|
|
13847
13870
|
var borderLeft=this.ChartBorder.Left;
|
|
13848
13871
|
var isDrawLeft=borderLeft>10 && this.IsShowYText[0]===true && this.YTextPosition[0]!=2;
|
|
13849
|
-
var isDrawRight=borderRight>10 && this.IsShowYText[1]===true && this.YTextPosition[1]!=2;
|
|
13872
|
+
//var isDrawRight=borderRight>10 && this.IsShowYText[1]===true && this.YTextPosition[1]!=2;
|
|
13873
|
+
isDrawRight=this.IsShowRightHorizontal();
|
|
13850
13874
|
}
|
|
13851
13875
|
|
|
13852
13876
|
if (!isDrawRight && !isDrawLeft) return null;
|
|
@@ -43744,7 +43768,7 @@ function StockInfoExtendChartPaint()
|
|
|
43744
43768
|
this.Canvas.textAlign="left";
|
|
43745
43769
|
this.Canvas.fillText(this.Name,middle+2,y);
|
|
43746
43770
|
}
|
|
43747
|
-
|
|
43771
|
+
|
|
43748
43772
|
this.Canvas.strokeStyle=this.BorderColor;
|
|
43749
43773
|
this.Canvas.moveTo(left,y);
|
|
43750
43774
|
this.Canvas.lineTo(right,y);
|
|
@@ -44525,6 +44549,133 @@ function StockChip()
|
|
|
44525
44549
|
}
|
|
44526
44550
|
}
|
|
44527
44551
|
|
|
44552
|
+
//筹码分布手机版
|
|
44553
|
+
function StockChipPhone()
|
|
44554
|
+
{
|
|
44555
|
+
this.newMethod=StockChip; //派生
|
|
44556
|
+
this.newMethod();
|
|
44557
|
+
delete this.newMethod;
|
|
44558
|
+
|
|
44559
|
+
this.Name='筹码分布手机版';
|
|
44560
|
+
this.ClassName='StockChipPhone';
|
|
44561
|
+
this.ShowType=0; //0=所有筹码 手机版只支持0
|
|
44562
|
+
|
|
44563
|
+
this.Draw=function()
|
|
44564
|
+
{
|
|
44565
|
+
this.ShowType=0;
|
|
44566
|
+
this.PixelRatio=GetDevicePixelRatio();
|
|
44567
|
+
var left=ToFixedPoint(this.ChartBorder.GetRight()+this.Left);
|
|
44568
|
+
var top=ToFixedPoint(this.ChartBorder.GetTop());
|
|
44569
|
+
var right=ToFixedPoint(left+this.Width-1*this.PixelRatio);
|
|
44570
|
+
var bottom=ToFixedPoint(this.ChartBorder.GetBottom());
|
|
44571
|
+
var width=right-left;
|
|
44572
|
+
var height=bottom-top;
|
|
44573
|
+
this.ClientRect={Left:left,Top:top,Width:width,Height:height};
|
|
44574
|
+
|
|
44575
|
+
if (ChartData.IsTickPeriod(this.HQChart.Period))
|
|
44576
|
+
{
|
|
44577
|
+
|
|
44578
|
+
}
|
|
44579
|
+
else
|
|
44580
|
+
{
|
|
44581
|
+
if (this.CalculateChip())
|
|
44582
|
+
{
|
|
44583
|
+
this.DrawFrame();
|
|
44584
|
+
this.DrawAllChip();
|
|
44585
|
+
|
|
44586
|
+
this.CalculateCast(); //计算成本
|
|
44587
|
+
this.DrawChipInfo();
|
|
44588
|
+
}
|
|
44589
|
+
}
|
|
44590
|
+
|
|
44591
|
+
this.DrawBorder();
|
|
44592
|
+
this.SizeChange=false;
|
|
44593
|
+
}
|
|
44594
|
+
|
|
44595
|
+
this.DrawToolbar=function(moveonPoint, mouseStatus)
|
|
44596
|
+
{
|
|
44597
|
+
|
|
44598
|
+
}
|
|
44599
|
+
|
|
44600
|
+
this.GetChipInfoTitle=function()
|
|
44601
|
+
{
|
|
44602
|
+
var aryText=[]; //从底部往上
|
|
44603
|
+
|
|
44604
|
+
var item={ Title:"日期:", Text:IFrameSplitOperator.FormatDateString(this.Data.SelectData.Date) };
|
|
44605
|
+
aryText.push(item);
|
|
44606
|
+
|
|
44607
|
+
var item={ Title:"集中度:", Text:"--.--%", };
|
|
44608
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Cast)) item.Text=`${this.Data.Cast[0].Rate.toFixed(2)}%`;
|
|
44609
|
+
aryText.push(item);
|
|
44610
|
+
|
|
44611
|
+
var item={ Title:"90%成本:", Text:"--.--", };
|
|
44612
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Cast)) item.Text=`${this.Data.Cast[0].MinPrice.toFixed(2)}-${this.Data.Cast[0].MaxPrice.toFixed(2)}`;
|
|
44613
|
+
aryText.push(item);
|
|
44614
|
+
|
|
44615
|
+
|
|
44616
|
+
var item={ Title:"平均成本::", Text:"--.--", };
|
|
44617
|
+
if (this.Data.ChipInfo && IFrameSplitOperator.IsNumber(this.Data.ChipInfo.AveragePrice)) item.Text=`${this.Data.ChipInfo.AveragePrice.toFixed(2)}`;
|
|
44618
|
+
|
|
44619
|
+
if (IFrameSplitOperator.IsNumber(this.Data.YPrice) && IFrameSplitOperator.IsNumber(this.Data.ChipInfo.YProfitRate))
|
|
44620
|
+
{
|
|
44621
|
+
var item={ Title:`${this.Data.YPrice.toFixed(2)}获利:`, Text:`${this.Data.ChipInfo.YProfitRate.toFixed(2)}%` };
|
|
44622
|
+
aryText.push(item);
|
|
44623
|
+
}
|
|
44624
|
+
|
|
44625
|
+
return aryText;
|
|
44626
|
+
}
|
|
44627
|
+
|
|
44628
|
+
this.DrawChipInfo=function()
|
|
44629
|
+
{
|
|
44630
|
+
var aryText=this.GetChipInfoTitle();
|
|
44631
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(aryText)) return;
|
|
44632
|
+
|
|
44633
|
+
var bottom=this.ClientRect.Top+this.ClientRect.Height-1;
|
|
44634
|
+
var left=this.ClientRect.Left+2;
|
|
44635
|
+
var right=this.ClientRect.Left+this.ClientRect.Width;
|
|
44636
|
+
|
|
44637
|
+
this.Canvas.font=this.Font;
|
|
44638
|
+
this.Canvas.fillStyle=this.InfoColor;
|
|
44639
|
+
this.Canvas.textBaseline='bottom';
|
|
44640
|
+
this.Canvas.textAlign='left';
|
|
44641
|
+
|
|
44642
|
+
var lineHeight=this.LineHeight*GetDevicePixelRatio();
|
|
44643
|
+
var yText=bottom;
|
|
44644
|
+
for(var i=0;i<aryText.length;++i)
|
|
44645
|
+
{
|
|
44646
|
+
var item=aryText[i];
|
|
44647
|
+
|
|
44648
|
+
var textColor=item.TitleColor;
|
|
44649
|
+
if (item.TitleColor) textColor=item.TitleColor;
|
|
44650
|
+
this.Canvas.fillStyle=textColor;
|
|
44651
|
+
this.Canvas.fillText(item.Title,left,yText);
|
|
44652
|
+
var textWidth=this.Canvas.measureText(item.Title).width+4;
|
|
44653
|
+
var xText=left+textWidth;
|
|
44654
|
+
|
|
44655
|
+
var textColor=item.TitleColor;
|
|
44656
|
+
if (item.TextColor) textColor=item.TextColor;
|
|
44657
|
+
this.Canvas.fillStyle=textColor;
|
|
44658
|
+
this.Canvas.fillText(item.Text,xText,yText);
|
|
44659
|
+
|
|
44660
|
+
yText-=lineHeight;
|
|
44661
|
+
}
|
|
44662
|
+
|
|
44663
|
+
var text='获利比例:';
|
|
44664
|
+
this.Canvas.fillText(text,left,yText);
|
|
44665
|
+
var textWidth=this.Canvas.measureText(text).width+2;
|
|
44666
|
+
var barLeft=left+textWidth;
|
|
44667
|
+
var barWidth=(right-5-barLeft);
|
|
44668
|
+
this.Canvas.strokeStyle=this.ColorNoProfit;
|
|
44669
|
+
this.Canvas.strokeRect(barLeft,yText-lineHeight,barWidth,lineHeight);
|
|
44670
|
+
this.Canvas.strokeStyle=this.ColorProfit;
|
|
44671
|
+
this.Canvas.strokeRect(barLeft,yText-lineHeight,barWidth*(this.Data.ChipInfo.ProfitRate/100),lineHeight);
|
|
44672
|
+
text=this.Data.ChipInfo.ProfitRate.toFixed(2)+'%';
|
|
44673
|
+
this.Canvas.textAlign='center';
|
|
44674
|
+
this.Canvas.fillText(text,barLeft+barWidth/2,yText);
|
|
44675
|
+
yText-=lineHeight;
|
|
44676
|
+
}
|
|
44677
|
+
}
|
|
44678
|
+
|
|
44528
44679
|
//窗口分割
|
|
44529
44680
|
function FrameSplitPaint()
|
|
44530
44681
|
{
|
|
@@ -77061,6 +77212,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77061
77212
|
switch(name)
|
|
77062
77213
|
{
|
|
77063
77214
|
case '筹码分布':
|
|
77215
|
+
case "StockChip":
|
|
77064
77216
|
chart=new StockChip();
|
|
77065
77217
|
chart.Canvas=this.Canvas;
|
|
77066
77218
|
chart.ChartBorder=this.Frame.ChartBorder;
|
|
@@ -77071,6 +77223,18 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77071
77223
|
this.ExtendChartPaint.push(chart);
|
|
77072
77224
|
this.Frame.ChartBorder.Right+=chart.Width; //创建筹码需要增加右边的间距
|
|
77073
77225
|
return chart;
|
|
77226
|
+
case "StockChipPhone":
|
|
77227
|
+
chart=new StockChipPhone();
|
|
77228
|
+
chart.Canvas=this.Canvas;
|
|
77229
|
+
chart.ChartBorder=this.Frame.ChartBorder;
|
|
77230
|
+
chart.ChartFrame=this.Frame;
|
|
77231
|
+
chart.HQChart=this;
|
|
77232
|
+
chart.Left=this.Frame.ChartBorder.Right; //左边间距使用当前框架间距
|
|
77233
|
+
chart.SetOption(option);
|
|
77234
|
+
this.ExtendChartPaint.push(chart);
|
|
77235
|
+
this.Frame.ChartBorder.Right+=chart.Width; //创建筹码需要增加右边的间距
|
|
77236
|
+
this.GlobalOption.RightHorizontal.Show=false;
|
|
77237
|
+
return chart;
|
|
77074
77238
|
case 'KLineTooltip':
|
|
77075
77239
|
if (option.Create && typeof(option.Create)=='function') chart=option.Create();
|
|
77076
77240
|
else chart=new KLineTooltipPaint();
|
|
@@ -1975,6 +1975,8 @@ function JSReportChartContainer(uielement)
|
|
|
1975
1975
|
//去掉右键菜单
|
|
1976
1976
|
this.UIOnContextMenu=function(e)
|
|
1977
1977
|
{
|
|
1978
|
+
e.preventDefault();
|
|
1979
|
+
|
|
1978
1980
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
1979
1981
|
|
|
1980
1982
|
if (!this.IsShowRightMenu) return;
|
|
@@ -1987,7 +1989,7 @@ function JSReportChartContainer(uielement)
|
|
|
1987
1989
|
|
|
1988
1990
|
this.OnRightMenu=function(x,y,e)
|
|
1989
1991
|
{
|
|
1990
|
-
|
|
1992
|
+
|
|
1991
1993
|
}
|
|
1992
1994
|
|
|
1993
1995
|
this.UIOnMouseMove=function(e)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: "iconfont"; /* Project id 1040563 */
|
|
3
|
-
src: url('iconfont.woff2?t=
|
|
4
|
-
url('iconfont.woff?t=
|
|
5
|
-
url('iconfont.ttf?t=
|
|
3
|
+
src: url('iconfont.woff2?t=1732508423204') format('woff2'),
|
|
4
|
+
url('iconfont.woff?t=1732508423204') format('woff'),
|
|
5
|
+
url('iconfont.ttf?t=1732508423204') format('truetype');
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.iconfont {
|
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
-moz-osx-font-smoothing: grayscale;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
.icon-chicangzuheicon:before {
|
|
17
|
+
content: "\e6b6";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.icon-sort:before {
|
|
21
|
+
content: "\e6b5";
|
|
22
|
+
}
|
|
23
|
+
|
|
16
24
|
.icon-Unchecked-box:before {
|
|
17
25
|
content: "\e6b4";
|
|
18
26
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -6964,9 +6964,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6964
6964
|
{
|
|
6965
6965
|
IsValueFullRange:false ,
|
|
6966
6966
|
IsDisplayLatest:false,
|
|
6967
|
-
SelectedBorder:{ Mode:0, SelFrame:0 },
|
|
6968
|
-
SelectedXBorder: { Mode:0, Date:null }
|
|
6967
|
+
SelectedBorder:{ Mode:0, SelFrame:0 }, //边框选中模式 Mode:0=禁用 1=右侧标记选中 2=指标窗口标记选中
|
|
6968
|
+
SelectedXBorder: { Mode:0, Date:null }, //X边框选中模式 Mode:0=禁用 分时图图有效
|
|
6969
6969
|
//XDateFormat (多日分时图x轴底部日期格式)
|
|
6970
|
+
RightHorizontal:
|
|
6971
|
+
{
|
|
6972
|
+
//Show:true,
|
|
6973
|
+
//Width:5
|
|
6974
|
+
} //右侧框架外部坐标和间距
|
|
6970
6975
|
};
|
|
6971
6976
|
|
|
6972
6977
|
this.VerticalDrag; //通过X轴左右拖动数据(手势才有)
|
|
@@ -15756,6 +15761,23 @@ function AverageWidthFrame()
|
|
|
15756
15761
|
}
|
|
15757
15762
|
}
|
|
15758
15763
|
|
|
15764
|
+
this.IsShowRightHorizontal=function()
|
|
15765
|
+
{
|
|
15766
|
+
var borderRight=this.ChartBorder.Right;
|
|
15767
|
+
if (borderRight<=10) return false;
|
|
15768
|
+
|
|
15769
|
+
if (this.YTextPosition[1]==2) return false;
|
|
15770
|
+
if (this.IsShowYText[1]===false) return false;
|
|
15771
|
+
|
|
15772
|
+
if (this.GlobalOption && this.GlobalOption.RightHorizontal)
|
|
15773
|
+
{
|
|
15774
|
+
var item=this.GlobalOption.RightHorizontal;
|
|
15775
|
+
if (item.Show===false) return false;
|
|
15776
|
+
}
|
|
15777
|
+
|
|
15778
|
+
return true;
|
|
15779
|
+
}
|
|
15780
|
+
|
|
15759
15781
|
//画Y轴
|
|
15760
15782
|
this.DrawHorizontal=function()
|
|
15761
15783
|
{
|
|
@@ -15772,7 +15794,8 @@ function AverageWidthFrame()
|
|
|
15772
15794
|
var borderLeft=this.ChartBorder.Left;
|
|
15773
15795
|
|
|
15774
15796
|
var isDrawLeft=borderLeft>10 && this.IsShowYText[0]===true && this.YTextPosition[0]!=2;
|
|
15775
|
-
var isDrawRight=borderRight>10 && this.IsShowYText[1]===true && this.YTextPosition[1]!=2;
|
|
15797
|
+
//var isDrawRight=borderRight>10 && this.IsShowYText[1]===true && this.YTextPosition[1]!=2;
|
|
15798
|
+
var isDrawRight=this.IsShowRightHorizontal();
|
|
15776
15799
|
|
|
15777
15800
|
var rightExtendLine=null; //右侧延长线
|
|
15778
15801
|
var leftExtendLine=null; //左侧延长线
|
|
@@ -17771,7 +17794,8 @@ function AverageWidthFrame()
|
|
|
17771
17794
|
var borderRight=this.ChartBorder.Right;
|
|
17772
17795
|
var borderLeft=this.ChartBorder.Left;
|
|
17773
17796
|
var isDrawLeft=borderLeft>10 && this.IsShowYText[0]===true && this.YTextPosition[0]!=2;
|
|
17774
|
-
var isDrawRight=borderRight>10 && this.IsShowYText[1]===true && this.YTextPosition[1]!=2;
|
|
17797
|
+
//var isDrawRight=borderRight>10 && this.IsShowYText[1]===true && this.YTextPosition[1]!=2;
|
|
17798
|
+
isDrawRight=this.IsShowRightHorizontal();
|
|
17775
17799
|
}
|
|
17776
17800
|
|
|
17777
17801
|
if (!isDrawRight && !isDrawLeft) return null;
|
|
@@ -47669,7 +47693,7 @@ function StockInfoExtendChartPaint()
|
|
|
47669
47693
|
this.Canvas.textAlign="left";
|
|
47670
47694
|
this.Canvas.fillText(this.Name,middle+2,y);
|
|
47671
47695
|
}
|
|
47672
|
-
|
|
47696
|
+
|
|
47673
47697
|
this.Canvas.strokeStyle=this.BorderColor;
|
|
47674
47698
|
this.Canvas.moveTo(left,y);
|
|
47675
47699
|
this.Canvas.lineTo(right,y);
|
|
@@ -48450,6 +48474,133 @@ function StockChip()
|
|
|
48450
48474
|
}
|
|
48451
48475
|
}
|
|
48452
48476
|
|
|
48477
|
+
//筹码分布手机版
|
|
48478
|
+
function StockChipPhone()
|
|
48479
|
+
{
|
|
48480
|
+
this.newMethod=StockChip; //派生
|
|
48481
|
+
this.newMethod();
|
|
48482
|
+
delete this.newMethod;
|
|
48483
|
+
|
|
48484
|
+
this.Name='筹码分布手机版';
|
|
48485
|
+
this.ClassName='StockChipPhone';
|
|
48486
|
+
this.ShowType=0; //0=所有筹码 手机版只支持0
|
|
48487
|
+
|
|
48488
|
+
this.Draw=function()
|
|
48489
|
+
{
|
|
48490
|
+
this.ShowType=0;
|
|
48491
|
+
this.PixelRatio=GetDevicePixelRatio();
|
|
48492
|
+
var left=ToFixedPoint(this.ChartBorder.GetRight()+this.Left);
|
|
48493
|
+
var top=ToFixedPoint(this.ChartBorder.GetTop());
|
|
48494
|
+
var right=ToFixedPoint(left+this.Width-1*this.PixelRatio);
|
|
48495
|
+
var bottom=ToFixedPoint(this.ChartBorder.GetBottom());
|
|
48496
|
+
var width=right-left;
|
|
48497
|
+
var height=bottom-top;
|
|
48498
|
+
this.ClientRect={Left:left,Top:top,Width:width,Height:height};
|
|
48499
|
+
|
|
48500
|
+
if (ChartData.IsTickPeriod(this.HQChart.Period))
|
|
48501
|
+
{
|
|
48502
|
+
|
|
48503
|
+
}
|
|
48504
|
+
else
|
|
48505
|
+
{
|
|
48506
|
+
if (this.CalculateChip())
|
|
48507
|
+
{
|
|
48508
|
+
this.DrawFrame();
|
|
48509
|
+
this.DrawAllChip();
|
|
48510
|
+
|
|
48511
|
+
this.CalculateCast(); //计算成本
|
|
48512
|
+
this.DrawChipInfo();
|
|
48513
|
+
}
|
|
48514
|
+
}
|
|
48515
|
+
|
|
48516
|
+
this.DrawBorder();
|
|
48517
|
+
this.SizeChange=false;
|
|
48518
|
+
}
|
|
48519
|
+
|
|
48520
|
+
this.DrawToolbar=function(moveonPoint, mouseStatus)
|
|
48521
|
+
{
|
|
48522
|
+
|
|
48523
|
+
}
|
|
48524
|
+
|
|
48525
|
+
this.GetChipInfoTitle=function()
|
|
48526
|
+
{
|
|
48527
|
+
var aryText=[]; //从底部往上
|
|
48528
|
+
|
|
48529
|
+
var item={ Title:"日期:", Text:IFrameSplitOperator.FormatDateString(this.Data.SelectData.Date) };
|
|
48530
|
+
aryText.push(item);
|
|
48531
|
+
|
|
48532
|
+
var item={ Title:"集中度:", Text:"--.--%", };
|
|
48533
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Cast)) item.Text=`${this.Data.Cast[0].Rate.toFixed(2)}%`;
|
|
48534
|
+
aryText.push(item);
|
|
48535
|
+
|
|
48536
|
+
var item={ Title:"90%成本:", Text:"--.--", };
|
|
48537
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Cast)) item.Text=`${this.Data.Cast[0].MinPrice.toFixed(2)}-${this.Data.Cast[0].MaxPrice.toFixed(2)}`;
|
|
48538
|
+
aryText.push(item);
|
|
48539
|
+
|
|
48540
|
+
|
|
48541
|
+
var item={ Title:"平均成本::", Text:"--.--", };
|
|
48542
|
+
if (this.Data.ChipInfo && IFrameSplitOperator.IsNumber(this.Data.ChipInfo.AveragePrice)) item.Text=`${this.Data.ChipInfo.AveragePrice.toFixed(2)}`;
|
|
48543
|
+
|
|
48544
|
+
if (IFrameSplitOperator.IsNumber(this.Data.YPrice) && IFrameSplitOperator.IsNumber(this.Data.ChipInfo.YProfitRate))
|
|
48545
|
+
{
|
|
48546
|
+
var item={ Title:`${this.Data.YPrice.toFixed(2)}获利:`, Text:`${this.Data.ChipInfo.YProfitRate.toFixed(2)}%` };
|
|
48547
|
+
aryText.push(item);
|
|
48548
|
+
}
|
|
48549
|
+
|
|
48550
|
+
return aryText;
|
|
48551
|
+
}
|
|
48552
|
+
|
|
48553
|
+
this.DrawChipInfo=function()
|
|
48554
|
+
{
|
|
48555
|
+
var aryText=this.GetChipInfoTitle();
|
|
48556
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(aryText)) return;
|
|
48557
|
+
|
|
48558
|
+
var bottom=this.ClientRect.Top+this.ClientRect.Height-1;
|
|
48559
|
+
var left=this.ClientRect.Left+2;
|
|
48560
|
+
var right=this.ClientRect.Left+this.ClientRect.Width;
|
|
48561
|
+
|
|
48562
|
+
this.Canvas.font=this.Font;
|
|
48563
|
+
this.Canvas.fillStyle=this.InfoColor;
|
|
48564
|
+
this.Canvas.textBaseline='bottom';
|
|
48565
|
+
this.Canvas.textAlign='left';
|
|
48566
|
+
|
|
48567
|
+
var lineHeight=this.LineHeight*GetDevicePixelRatio();
|
|
48568
|
+
var yText=bottom;
|
|
48569
|
+
for(var i=0;i<aryText.length;++i)
|
|
48570
|
+
{
|
|
48571
|
+
var item=aryText[i];
|
|
48572
|
+
|
|
48573
|
+
var textColor=item.TitleColor;
|
|
48574
|
+
if (item.TitleColor) textColor=item.TitleColor;
|
|
48575
|
+
this.Canvas.fillStyle=textColor;
|
|
48576
|
+
this.Canvas.fillText(item.Title,left,yText);
|
|
48577
|
+
var textWidth=this.Canvas.measureText(item.Title).width+4;
|
|
48578
|
+
var xText=left+textWidth;
|
|
48579
|
+
|
|
48580
|
+
var textColor=item.TitleColor;
|
|
48581
|
+
if (item.TextColor) textColor=item.TextColor;
|
|
48582
|
+
this.Canvas.fillStyle=textColor;
|
|
48583
|
+
this.Canvas.fillText(item.Text,xText,yText);
|
|
48584
|
+
|
|
48585
|
+
yText-=lineHeight;
|
|
48586
|
+
}
|
|
48587
|
+
|
|
48588
|
+
var text='获利比例:';
|
|
48589
|
+
this.Canvas.fillText(text,left,yText);
|
|
48590
|
+
var textWidth=this.Canvas.measureText(text).width+2;
|
|
48591
|
+
var barLeft=left+textWidth;
|
|
48592
|
+
var barWidth=(right-5-barLeft);
|
|
48593
|
+
this.Canvas.strokeStyle=this.ColorNoProfit;
|
|
48594
|
+
this.Canvas.strokeRect(barLeft,yText-lineHeight,barWidth,lineHeight);
|
|
48595
|
+
this.Canvas.strokeStyle=this.ColorProfit;
|
|
48596
|
+
this.Canvas.strokeRect(barLeft,yText-lineHeight,barWidth*(this.Data.ChipInfo.ProfitRate/100),lineHeight);
|
|
48597
|
+
text=this.Data.ChipInfo.ProfitRate.toFixed(2)+'%';
|
|
48598
|
+
this.Canvas.textAlign='center';
|
|
48599
|
+
this.Canvas.fillText(text,barLeft+barWidth/2,yText);
|
|
48600
|
+
yText-=lineHeight;
|
|
48601
|
+
}
|
|
48602
|
+
}
|
|
48603
|
+
|
|
48453
48604
|
//窗口分割
|
|
48454
48605
|
function FrameSplitPaint()
|
|
48455
48606
|
{
|
|
@@ -80986,6 +81137,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
80986
81137
|
switch(name)
|
|
80987
81138
|
{
|
|
80988
81139
|
case '筹码分布':
|
|
81140
|
+
case "StockChip":
|
|
80989
81141
|
chart=new StockChip();
|
|
80990
81142
|
chart.Canvas=this.Canvas;
|
|
80991
81143
|
chart.ChartBorder=this.Frame.ChartBorder;
|
|
@@ -80996,6 +81148,18 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
80996
81148
|
this.ExtendChartPaint.push(chart);
|
|
80997
81149
|
this.Frame.ChartBorder.Right+=chart.Width; //创建筹码需要增加右边的间距
|
|
80998
81150
|
return chart;
|
|
81151
|
+
case "StockChipPhone":
|
|
81152
|
+
chart=new StockChipPhone();
|
|
81153
|
+
chart.Canvas=this.Canvas;
|
|
81154
|
+
chart.ChartBorder=this.Frame.ChartBorder;
|
|
81155
|
+
chart.ChartFrame=this.Frame;
|
|
81156
|
+
chart.HQChart=this;
|
|
81157
|
+
chart.Left=this.Frame.ChartBorder.Right; //左边间距使用当前框架间距
|
|
81158
|
+
chart.SetOption(option);
|
|
81159
|
+
this.ExtendChartPaint.push(chart);
|
|
81160
|
+
this.Frame.ChartBorder.Right+=chart.Width; //创建筹码需要增加右边的间距
|
|
81161
|
+
this.GlobalOption.RightHorizontal.Show=false;
|
|
81162
|
+
return chart;
|
|
80999
81163
|
case 'KLineTooltip':
|
|
81000
81164
|
if (option.Create && typeof(option.Create)=='function') chart=option.Create();
|
|
81001
81165
|
else chart=new KLineTooltipPaint();
|
|
@@ -129082,6 +129246,8 @@ function JSReportChartContainer(uielement)
|
|
|
129082
129246
|
//去掉右键菜单
|
|
129083
129247
|
this.UIOnContextMenu=function(e)
|
|
129084
129248
|
{
|
|
129249
|
+
e.preventDefault();
|
|
129250
|
+
|
|
129085
129251
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
129086
129252
|
|
|
129087
129253
|
if (!this.IsShowRightMenu) return;
|
|
@@ -129094,7 +129260,7 @@ function JSReportChartContainer(uielement)
|
|
|
129094
129260
|
|
|
129095
129261
|
this.OnRightMenu=function(x,y,e)
|
|
129096
129262
|
{
|
|
129097
|
-
|
|
129263
|
+
|
|
129098
129264
|
}
|
|
129099
129265
|
|
|
129100
129266
|
this.UIOnMouseMove=function(e)
|
|
@@ -139529,7 +139695,7 @@ function ScrollBarBGChart()
|
|
|
139529
139695
|
|
|
139530
139696
|
|
|
139531
139697
|
|
|
139532
|
-
var HQCHART_VERSION="1.1.
|
|
139698
|
+
var HQCHART_VERSION="1.1.14171";
|
|
139533
139699
|
|
|
139534
139700
|
function PrintHQChartVersion()
|
|
139535
139701
|
{
|