hqchart 1.1.14683 → 1.1.14691
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 +49 -42
- package/package.json +1 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +49 -1
- package/src/jscommon/umychart.js +339 -7
- package/src/jscommon/umychart.report.js +68 -58
- package/src/jscommon/umychart.style.js +9 -0
- package/src/jscommon/umychart.testdata.js +49 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +417 -66
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +49 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +417 -66
package/package.json
CHANGED
|
@@ -55711,6 +55711,7 @@ HQData.Minute_RequestMinuteData=function(data, callback)
|
|
|
55711
55711
|
data.PreventDefault=true;
|
|
55712
55712
|
var symbol=data.Request.Data.symbol[0]; //请求的股票代码
|
|
55713
55713
|
var callcation=data.Request.Data.callcation; //集合竞价
|
|
55714
|
+
var bBuySellBar=data.Request.Data.IsShowBuySellBar;
|
|
55714
55715
|
console.log(`[HQData::RequestMinuteData] Symbol=${symbol}`);
|
|
55715
55716
|
|
|
55716
55717
|
setTimeout(()=>{
|
|
@@ -55741,6 +55742,29 @@ HQData.Minute_RequestMinuteData=function(data, callback)
|
|
|
55741
55742
|
stockItem.beforeinfo=beforeinfo;
|
|
55742
55743
|
}
|
|
55743
55744
|
|
|
55745
|
+
var lastPrice=stockItem.minute[stockItem.minute.length-1].price;
|
|
55746
|
+
|
|
55747
|
+
|
|
55748
|
+
if (bBuySellBar) //盘口分析
|
|
55749
|
+
{
|
|
55750
|
+
var aryBuy=[];
|
|
55751
|
+
var value=lastPrice+0.01;
|
|
55752
|
+
for(var i=0;i<10;++i)
|
|
55753
|
+
{
|
|
55754
|
+
aryBuy.push({Price:value, Type:1, Vol:HQData.GetRandomTestData(1000,10000) });
|
|
55755
|
+
value+=0.02;
|
|
55756
|
+
}
|
|
55757
|
+
|
|
55758
|
+
var arySell=[];
|
|
55759
|
+
for(var i=0;i<10;++i)
|
|
55760
|
+
{
|
|
55761
|
+
arySell.push({Price:value, Type:2, Vol:HQData.GetRandomTestData(1000,10000) });
|
|
55762
|
+
value+=0.02;
|
|
55763
|
+
}
|
|
55764
|
+
|
|
55765
|
+
stockItem.BuySellData={ AryBuy:aryBuy, ArySell:arySell };
|
|
55766
|
+
}
|
|
55767
|
+
|
|
55744
55768
|
//测试用 这里可以修改数据
|
|
55745
55769
|
//var lastItem=srcStock.minute[srcStock.minute.length-1];
|
|
55746
55770
|
//lastItem.price+=Math.ceil(Math.random()*10)/1000*lastItem.price;
|
|
@@ -55752,7 +55776,7 @@ HQData.Minute_RequestMinuteData=function(data, callback)
|
|
|
55752
55776
|
}
|
|
55753
55777
|
*/
|
|
55754
55778
|
|
|
55755
|
-
|
|
55779
|
+
stockItem.minute.length=50;
|
|
55756
55780
|
|
|
55757
55781
|
var hqchartData={code:0, stock:[stockItem] };
|
|
55758
55782
|
|
|
@@ -55850,6 +55874,7 @@ HQData.Minute_RequestHistoryMinuteData=function(data, callback)
|
|
|
55850
55874
|
var symbol=data.Request.Data.symbol; //请求的股票代码
|
|
55851
55875
|
var dayCount=data.Request.Data.daycount;
|
|
55852
55876
|
var callcation=data.Request.Data.callcation; //集合竞价
|
|
55877
|
+
var bBuySellBar=data.Request.Data.IsShowBuySellBar;
|
|
55853
55878
|
|
|
55854
55879
|
console.log(`[HQData::Minute_RequestHistoryMinuteData] Symbol=${symbol}`);
|
|
55855
55880
|
|
|
@@ -55886,6 +55911,29 @@ HQData.Minute_RequestHistoryMinuteData=function(data, callback)
|
|
|
55886
55911
|
item.beforeinfo=beforeinfo;
|
|
55887
55912
|
}
|
|
55888
55913
|
}
|
|
55914
|
+
|
|
55915
|
+
if (bBuySellBar) //盘口分析
|
|
55916
|
+
{
|
|
55917
|
+
var dayItem=aryDay[0];
|
|
55918
|
+
var lastPrice=dayItem.minute[dayItem.minute.length-1][4];
|
|
55919
|
+
|
|
55920
|
+
var aryBuy=[];
|
|
55921
|
+
var value=lastPrice+0.01;
|
|
55922
|
+
for(var i=0;i<10;++i)
|
|
55923
|
+
{
|
|
55924
|
+
aryBuy.push({Price:value, Type:1, Vol:HQData.GetRandomTestData(1000,10000) });
|
|
55925
|
+
value+=0.02;
|
|
55926
|
+
}
|
|
55927
|
+
|
|
55928
|
+
var arySell=[];
|
|
55929
|
+
for(var i=0;i<10;++i)
|
|
55930
|
+
{
|
|
55931
|
+
arySell.push({Price:value, Type:2, Vol:HQData.GetRandomTestData(1000,10000) });
|
|
55932
|
+
value+=0.02;
|
|
55933
|
+
}
|
|
55934
|
+
|
|
55935
|
+
dayItem.BuySellData={ AryBuy:aryBuy, ArySell:arySell };
|
|
55936
|
+
}
|
|
55889
55937
|
|
|
55890
55938
|
var hqchartData={code:0, data:aryDay, name:symbol, symbol: symbol};
|
|
55891
55939
|
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -1028,6 +1028,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
1028
1028
|
chart.EnableBorderDrag=option.EnableBorderDrag;
|
|
1029
1029
|
}
|
|
1030
1030
|
|
|
1031
|
+
if (IFrameSplitOperator.IsBool(option.EnableBuySellBar))
|
|
1032
|
+
{
|
|
1033
|
+
var barChart=chart.GetChartMinuteBuySellBar();
|
|
1034
|
+
if (barChart) barChart.IsShow=option.EnableBuySellBar;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1031
1037
|
this.AdjustChartBorder(chart);
|
|
1032
1038
|
|
|
1033
1039
|
if (option.Frame)
|
|
@@ -2590,7 +2596,7 @@ var JSCHART_EVENT_ID=
|
|
|
2590
2596
|
ON_RCLICK_REPORT_HEADER:52, //右键点击表头
|
|
2591
2597
|
ON_REPORT_LOCAL_SORT:53, //报价列表本地排序
|
|
2592
2598
|
ON_DRAW_REPORT_NAME_COLOR:54, //报价列表股票名称列颜色
|
|
2593
|
-
ON_DRAW_CUSTOM_TEXT:55,
|
|
2599
|
+
ON_DRAW_CUSTOM_TEXT:55, //报价列表自定义列(废弃)
|
|
2594
2600
|
ON_CLICK_REPORT_TAB:56, //报价列表标签点击
|
|
2595
2601
|
ON_CLICK_REPORT_TABMENU:57, //报价列表标签菜单点击
|
|
2596
2602
|
ON_DRAW_REPORT_FIXEDROW_TEXT:58, //报价列表固定行绘制
|
|
@@ -2927,6 +2933,7 @@ var JSCHART_MENU_ID=
|
|
|
2927
2933
|
CMD_FULLSCREEN_SUMMARY_ID:56, //当前屏区间统计
|
|
2928
2934
|
CMD_CORSS_DBCLICK_ID:57, //双击显示隐藏十字光标
|
|
2929
2935
|
CMD_ENABLE_KLINE_DAY_SUMMARY_ID:58, //K线底部显示走完剩余时间
|
|
2936
|
+
CMD_SHOW_BUYSELL_BAR_ID:59, //盘口分析(右侧显示买卖盘柱子) 分时图
|
|
2930
2937
|
|
|
2931
2938
|
|
|
2932
2939
|
|
|
@@ -3169,6 +3176,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3169
3176
|
this.CustomChartDrag; //自定义图形的拖拽操作 { Type:, Data: }
|
|
3170
3177
|
|
|
3171
3178
|
this.StockCache={ Data:null }; //扩展数据缓存数据
|
|
3179
|
+
this.BuySellData={ ArySell:null, AryBuy:null }; //10档买卖盘
|
|
3172
3180
|
|
|
3173
3181
|
this.JSPopMenu; //内置菜单
|
|
3174
3182
|
this.IsShowRightMenu=true; //显示右键菜单
|
|
@@ -3220,6 +3228,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3220
3228
|
this.ClearStockCache=function()
|
|
3221
3229
|
{
|
|
3222
3230
|
this.StockCache.Data=null;
|
|
3231
|
+
this.BuySellData.AryBuy=null;
|
|
3232
|
+
this.BuySellData.ArySell=null;
|
|
3223
3233
|
}
|
|
3224
3234
|
|
|
3225
3235
|
this.InitalPopMenu=function() //初始化弹出窗口
|
|
@@ -10907,6 +10917,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10907
10917
|
this.Draw();
|
|
10908
10918
|
}
|
|
10909
10919
|
break;
|
|
10920
|
+
case JSCHART_MENU_ID.CMD_SHOW_BUYSELL_BAR_ID:
|
|
10921
|
+
if (IFrameSplitOperator.IsBool(srcParam))
|
|
10922
|
+
{
|
|
10923
|
+
var chart=this.GetChartMinuteBuySellBar();
|
|
10924
|
+
chart.IsShow=srcParam;
|
|
10925
|
+
this.RequestData({ ClearYCoordinateMaxMin:true });
|
|
10926
|
+
this.Draw();
|
|
10927
|
+
}
|
|
10928
|
+
break;
|
|
10910
10929
|
}
|
|
10911
10930
|
}
|
|
10912
10931
|
|
|
@@ -25557,7 +25576,8 @@ function ChartPaintFactory()
|
|
|
25557
25576
|
[
|
|
25558
25577
|
["ChartKLine", { Create:function(option) { return new ChartKLine(); } }], //K线图
|
|
25559
25578
|
["ChartMinuteVolumBar",{ Create:function(option) { return new ChartMinuteVolumBar(); } }], //分时成交量柱子
|
|
25560
|
-
["ChartMinutePriceLine",{ Create:function(option) { return new ChartMinutePriceLine();} }]
|
|
25579
|
+
["ChartMinutePriceLine",{ Create:function(option) { return new ChartMinutePriceLine();} }],
|
|
25580
|
+
["ChartMinuteBuySellBar", { Create:function(option){ return new ChartMinuteBuySellBar(); }}],
|
|
25561
25581
|
]);
|
|
25562
25582
|
|
|
25563
25583
|
this.Create=function(name, option)
|
|
@@ -40078,6 +40098,216 @@ function ChartMinutePositionLine()
|
|
|
40078
40098
|
}
|
|
40079
40099
|
}
|
|
40080
40100
|
|
|
40101
|
+
//分时图 右侧10档买卖柱子
|
|
40102
|
+
function ChartMinuteBuySellBar()
|
|
40103
|
+
{
|
|
40104
|
+
this.newMethod=IChartPainting; //派生
|
|
40105
|
+
this.newMethod();
|
|
40106
|
+
delete this.newMethod;
|
|
40107
|
+
|
|
40108
|
+
this.BuyColor=g_JSChartResource.Minute.BuySellBar.BuyColor;
|
|
40109
|
+
this.SellColor=g_JSChartResource.Minute.BuySellBar.SellColor;
|
|
40110
|
+
this.BarWidth=g_JSChartResource.Minute.BuySellBar.BarWidth;
|
|
40111
|
+
this.MaxBarWidth=g_JSChartResource.Minute.BuySellBar.MaxBarWidth;
|
|
40112
|
+
this.YOffset=g_JSChartResource.Minute.BuySellBar.YOffset;
|
|
40113
|
+
this.Font=g_JSChartResource.Minute.BuySellBar.Font;
|
|
40114
|
+
this.TextColor=g_JSChartResource.Minute.BuySellBar.TextColor;
|
|
40115
|
+
|
|
40116
|
+
this.IsDrawFirst=true;
|
|
40117
|
+
this.IsShow=false;
|
|
40118
|
+
|
|
40119
|
+
this.BuySellData=null; //{ AryBuy:[{ Price:10.5, Vol:300}], ArySell:[{ Price:10.5, Vol:300}] }
|
|
40120
|
+
|
|
40121
|
+
this.ReloadResource=function(resource)
|
|
40122
|
+
{
|
|
40123
|
+
this.BuyColor=g_JSChartResource.Minute.BuySellBar.BuyColor;
|
|
40124
|
+
this.SellColor=g_JSChartResource.Minute.BuySellBar.SellColor;
|
|
40125
|
+
this.BarWidth=g_JSChartResource.Minute.BuySellBar.BarWidth;
|
|
40126
|
+
this.MaxBarWidth=g_JSChartResource.Minute.BuySellBar.MaxBarWidth;
|
|
40127
|
+
this.YOffset=g_JSChartResource.Minute.BuySellBar.YOffset;
|
|
40128
|
+
this.Font=g_JSChartResource.Minute.BuySellBar.Font;
|
|
40129
|
+
this.TextColor=g_JSChartResource.Minute.BuySellBar.TextColor;
|
|
40130
|
+
}
|
|
40131
|
+
|
|
40132
|
+
this.Draw=function()
|
|
40133
|
+
{
|
|
40134
|
+
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
40135
|
+
if (this.IsShowIndexTitleOnly()) return;
|
|
40136
|
+
if (this.IsHideScriptIndex()) return;
|
|
40137
|
+
if (!this.BuySellData) return;
|
|
40138
|
+
|
|
40139
|
+
var volRange=this.GetVolRange();
|
|
40140
|
+
if (!volRange) return;
|
|
40141
|
+
|
|
40142
|
+
var bHScreen=(this.ChartFrame.IsHScreen===true);
|
|
40143
|
+
var xPointCount=this.ChartFrame.XPointCount;
|
|
40144
|
+
|
|
40145
|
+
var xStart=this.ChartFrame.GetXFromIndex(xPointCount-this.MaxBarWidth);
|
|
40146
|
+
var xEnd=this.ChartFrame.GetXFromIndex(xPointCount-1);
|
|
40147
|
+
|
|
40148
|
+
function _Temp_GetXFromData(value)
|
|
40149
|
+
{
|
|
40150
|
+
var maxWidth=xEnd-xStart;
|
|
40151
|
+
var width = maxWidth * (value - volRange.Min) / (volRange.Max - volRange.Min);
|
|
40152
|
+
return xEnd-width;
|
|
40153
|
+
}
|
|
40154
|
+
|
|
40155
|
+
this.Canvas.save();
|
|
40156
|
+
this.ClipClient(bHScreen);
|
|
40157
|
+
|
|
40158
|
+
var aryBuy=this.BuySellData.AryBuy;
|
|
40159
|
+
if (IFrameSplitOperator.IsNonEmptyArray(aryBuy))
|
|
40160
|
+
{
|
|
40161
|
+
this.Canvas.beginPath();
|
|
40162
|
+
var lineCount=0;
|
|
40163
|
+
for(var i=0;i<aryBuy.length;++i)
|
|
40164
|
+
{
|
|
40165
|
+
var item=aryBuy[i];
|
|
40166
|
+
if (!item || !IFrameSplitOperator.IsNumber(item.Vol) || !IFrameSplitOperator.IsNumber(item.Price)) continue;
|
|
40167
|
+
|
|
40168
|
+
var y=this.GetYFromData(item.Price,false)
|
|
40169
|
+
var x=_Temp_GetXFromData(item.Vol);
|
|
40170
|
+
|
|
40171
|
+
if (bHScreen)
|
|
40172
|
+
{
|
|
40173
|
+
y-=-this.YOffset;
|
|
40174
|
+
this.Canvas.moveTo(y,x);
|
|
40175
|
+
this.Canvas.lineTo(y,xEnd);
|
|
40176
|
+
}
|
|
40177
|
+
else
|
|
40178
|
+
{
|
|
40179
|
+
y-=-this.YOffset;
|
|
40180
|
+
this.Canvas.moveTo(x,y);
|
|
40181
|
+
this.Canvas.lineTo(xEnd,y);
|
|
40182
|
+
}
|
|
40183
|
+
|
|
40184
|
+
++lineCount;
|
|
40185
|
+
}
|
|
40186
|
+
|
|
40187
|
+
if (lineCount>0)
|
|
40188
|
+
{
|
|
40189
|
+
this.Canvas.strokeStyle=this.BuyColor;
|
|
40190
|
+
if (IFrameSplitOperator.IsPlusNumber(this.BarWidth)) this.Canvas.lineWidth=this.BarWidth;
|
|
40191
|
+
this.Canvas.stroke();
|
|
40192
|
+
}
|
|
40193
|
+
}
|
|
40194
|
+
|
|
40195
|
+
var arySell=this.BuySellData.ArySell;
|
|
40196
|
+
if (IFrameSplitOperator.IsNonEmptyArray(arySell))
|
|
40197
|
+
{
|
|
40198
|
+
this.Canvas.beginPath();
|
|
40199
|
+
var lineCount=0;
|
|
40200
|
+
for(var i=0;i<arySell.length;++i)
|
|
40201
|
+
{
|
|
40202
|
+
var item=arySell[i];
|
|
40203
|
+
if (!item || !IFrameSplitOperator.IsNumber(item.Vol) || !IFrameSplitOperator.IsNumber(item.Price)) continue;
|
|
40204
|
+
|
|
40205
|
+
var y=this.GetYFromData(item.Price,false);
|
|
40206
|
+
var x=_Temp_GetXFromData(item.Vol);
|
|
40207
|
+
|
|
40208
|
+
if (bHScreen)
|
|
40209
|
+
{
|
|
40210
|
+
y-=-this.YOffset;
|
|
40211
|
+
this.Canvas.moveTo(y,x);
|
|
40212
|
+
this.Canvas.lineTo(y,xEnd);
|
|
40213
|
+
}
|
|
40214
|
+
else
|
|
40215
|
+
{
|
|
40216
|
+
y-=-this.YOffset;
|
|
40217
|
+
this.Canvas.moveTo(x,y);
|
|
40218
|
+
this.Canvas.lineTo(xEnd,y);
|
|
40219
|
+
}
|
|
40220
|
+
|
|
40221
|
+
++lineCount;
|
|
40222
|
+
}
|
|
40223
|
+
|
|
40224
|
+
if (lineCount>0)
|
|
40225
|
+
{
|
|
40226
|
+
this.Canvas.strokeStyle=this.SellColor;
|
|
40227
|
+
if (IFrameSplitOperator.IsPlusNumber(this.BarWidth)) this.Canvas.lineWidth=this.BarWidth;
|
|
40228
|
+
this.Canvas.stroke();
|
|
40229
|
+
}
|
|
40230
|
+
}
|
|
40231
|
+
|
|
40232
|
+
|
|
40233
|
+
this.DrawMaxVolText(volRange.Max, xStart);
|
|
40234
|
+
|
|
40235
|
+
this.Canvas.restore();
|
|
40236
|
+
}
|
|
40237
|
+
|
|
40238
|
+
this.DrawMaxVolText=function(value, x)
|
|
40239
|
+
{
|
|
40240
|
+
if (!IFrameSplitOperator.IsNumber(value)) return;
|
|
40241
|
+
|
|
40242
|
+
var border=this.ChartFrame.GetBorder();
|
|
40243
|
+
var text=value.toFixed(0);
|
|
40244
|
+
this.Canvas.textAlign = 'left';
|
|
40245
|
+
this.Canvas.textBaseline = 'bottom';
|
|
40246
|
+
this.Canvas.font=this.Font;
|
|
40247
|
+
this.Canvas.fillStyle=this.TextColor;
|
|
40248
|
+
|
|
40249
|
+
if (this.ChartFrame.IsHScreen===true)
|
|
40250
|
+
{
|
|
40251
|
+
var yBottom=border.LeftEx+1;
|
|
40252
|
+
this.Canvas.save();
|
|
40253
|
+
this.Canvas.translate(yBottom,x);
|
|
40254
|
+
this.Canvas.rotate(90 * Math.PI / 180);
|
|
40255
|
+
this.Canvas.fillText(text,0,0);
|
|
40256
|
+
this.Canvas.restore();
|
|
40257
|
+
}
|
|
40258
|
+
else
|
|
40259
|
+
{
|
|
40260
|
+
var yBottom=border.Bottom-1;
|
|
40261
|
+
this.Canvas.fillText(text,x,yBottom);
|
|
40262
|
+
}
|
|
40263
|
+
}
|
|
40264
|
+
|
|
40265
|
+
this.GetVolRange=function()
|
|
40266
|
+
{
|
|
40267
|
+
if (!this.BuySellData) return null;
|
|
40268
|
+
|
|
40269
|
+
var range={ Min:0, Max:null };
|
|
40270
|
+
var aryBuy=this.BuySellData.AryBuy;
|
|
40271
|
+
var arySell=this.BuySellData.ArySell;
|
|
40272
|
+
var count=0;
|
|
40273
|
+
|
|
40274
|
+
if (IFrameSplitOperator.IsNonEmptyArray(aryBuy))
|
|
40275
|
+
{
|
|
40276
|
+
for(var i=0;i<aryBuy.length;++i)
|
|
40277
|
+
{
|
|
40278
|
+
var item=aryBuy[i];
|
|
40279
|
+
if (!IFrameSplitOperator.IsNumber(item.Vol)) continue;
|
|
40280
|
+
|
|
40281
|
+
if (range.Min==null || range.Min>item.Vol) range.Min=item.Vol;
|
|
40282
|
+
if (range.Max==null || range.Max<item.Vol) range.Max=item.Vol;
|
|
40283
|
+
++count;
|
|
40284
|
+
}
|
|
40285
|
+
}
|
|
40286
|
+
|
|
40287
|
+
if (IFrameSplitOperator.IsNonEmptyArray(arySell))
|
|
40288
|
+
{
|
|
40289
|
+
for(var i=0;i<arySell.length;++i)
|
|
40290
|
+
{
|
|
40291
|
+
var item=arySell[i];
|
|
40292
|
+
if (!IFrameSplitOperator.IsNumber(item.Vol)) continue;
|
|
40293
|
+
|
|
40294
|
+
if (range.Min==null || range.Min>item.Vol) range.Min=item.Vol;
|
|
40295
|
+
if (range.Max==null || range.Max<item.Vol) range.Max=item.Vol;
|
|
40296
|
+
++count;
|
|
40297
|
+
}
|
|
40298
|
+
}
|
|
40299
|
+
|
|
40300
|
+
if (count<=0) return null;
|
|
40301
|
+
|
|
40302
|
+
return range;
|
|
40303
|
+
}
|
|
40304
|
+
|
|
40305
|
+
this.GetMaxMin=function()
|
|
40306
|
+
{
|
|
40307
|
+
return { Min:null, Max:null };
|
|
40308
|
+
}
|
|
40309
|
+
}
|
|
40310
|
+
|
|
40081
40311
|
//分钟信息地雷 支持横屏
|
|
40082
40312
|
function ChartMinuteInfo()
|
|
40083
40313
|
{
|
|
@@ -47317,6 +47547,7 @@ function MinuteLeftTooltipPaint()
|
|
|
47317
47547
|
this.Draw=function()
|
|
47318
47548
|
{
|
|
47319
47549
|
if (!this.IsEnableDraw()) return;
|
|
47550
|
+
if (this.ChartFrame && this.ChartFrame.IsHScreen===true) return; //不支持横屏
|
|
47320
47551
|
|
|
47321
47552
|
this.TitlePaint=this.HQChart.TitlePaint[0];
|
|
47322
47553
|
if (!this.TitlePaint) return;
|
|
@@ -73573,6 +73804,17 @@ function JSChartResource()
|
|
|
73573
73804
|
Night: { Color:"rgb(0,0,0)", BGColor:"rgb(179,179,179)", BorderColor:"rgb(179,179,179)", Margin:{ Left:5, Top:2, Bottom:2, Right:5 } },
|
|
73574
73805
|
}
|
|
73575
73806
|
|
|
73807
|
+
this.Minute.BuySellBar=
|
|
73808
|
+
{
|
|
73809
|
+
BuyColor:"rgb(242,54,69)",
|
|
73810
|
+
SellColor:"rgb(8,153,129)",
|
|
73811
|
+
BarWidth:4*GetDevicePixelRatio(),
|
|
73812
|
+
MaxBarWidth:120,
|
|
73813
|
+
YOffset:1,
|
|
73814
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
73815
|
+
TextColor:"rgb(128,128,128)",
|
|
73816
|
+
}
|
|
73817
|
+
|
|
73576
73818
|
this.DefaultTextColor="rgb(43,54,69)"; //图形中默认的字体颜色
|
|
73577
73819
|
this.DefaultTextFont=14*GetDevicePixelRatio() +'px 微软雅黑'; //图形中默认的字体
|
|
73578
73820
|
this.TitleFont=13*GetDevicePixelRatio() +'px 微软雅黑'; //指标显示,tooltip显示字体
|
|
@@ -74688,6 +74930,7 @@ function JSChartResource()
|
|
|
74688
74930
|
{
|
|
74689
74931
|
BorderColor:'rgb(192,192,192)', //边框线
|
|
74690
74932
|
SelectedColor:"rgb(180,240,240)", //选中行
|
|
74933
|
+
SelectedLine:{ Color:"rgb(180,240,240)", Width:2 },
|
|
74691
74934
|
Header:
|
|
74692
74935
|
{
|
|
74693
74936
|
Color:"rgb(60,60,60)", //表头文字颜色
|
|
@@ -75110,6 +75353,19 @@ function JSChartResource()
|
|
|
75110
75353
|
CopyMarginConfig(this.Minute.NightDay.Night.Margin,subItem.Margin);
|
|
75111
75354
|
}
|
|
75112
75355
|
}
|
|
75356
|
+
|
|
75357
|
+
if (style.Minute.BuySellBar)
|
|
75358
|
+
{
|
|
75359
|
+
var item=style.Minute.BuySellBar;
|
|
75360
|
+
var dest=this.Minute.BuySellBar;
|
|
75361
|
+
if (item.BuyColor) dest.BuyColor=item.BuyColor;
|
|
75362
|
+
if (item.SellColor) dest.SellColor=item.SellColor;
|
|
75363
|
+
if (item.Font) dest.Font=item.Font;
|
|
75364
|
+
if (item.TextColor) dest.TextColor=item.TextColor;
|
|
75365
|
+
if (IFrameSplitOperator.IsNumber(item.BarWidth)) dest.BarWidth=item.BarWidth;
|
|
75366
|
+
if (IFrameSplitOperator.IsNumber(item.MaxBarWidth)) dest.MaxBarWidth=item.MaxBarWidth;
|
|
75367
|
+
if (IFrameSplitOperator.IsNumber(item.YOffset)) dest.YOffset=item.YOffset;
|
|
75368
|
+
}
|
|
75113
75369
|
}
|
|
75114
75370
|
|
|
75115
75371
|
if (style.PopMinuteChart)
|
|
@@ -76006,6 +76262,14 @@ function JSChartResource()
|
|
|
76006
76262
|
if (item.DownTextColor) this.Report.DownTextColor=item.DownTextColor;
|
|
76007
76263
|
if (item.UnchagneTextColor) this.Report.UnchagneTextColor=item.UnchagneTextColor;
|
|
76008
76264
|
if (item.BorderColor) this.Report.SelectedColor=item.SelectedColor;
|
|
76265
|
+
|
|
76266
|
+
if (item.SelectedLine)
|
|
76267
|
+
{
|
|
76268
|
+
var subItem=item.SelectedLine;
|
|
76269
|
+
var subDest=this.Report.SelectedLine;
|
|
76270
|
+
if (subItem.Color) subDest.Color=subItem.Color;
|
|
76271
|
+
if (IFrameSplitOperator.IsNumber(subItem.Width)) subDest.Width=subItem.Width;
|
|
76272
|
+
}
|
|
76009
76273
|
|
|
76010
76274
|
|
|
76011
76275
|
if (item.CloseLine)
|
|
@@ -86510,6 +86774,24 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
86510
86774
|
return false;
|
|
86511
86775
|
}
|
|
86512
86776
|
|
|
86777
|
+
this.GetChartMinuteBuySellBar=function()
|
|
86778
|
+
{
|
|
86779
|
+
var chart=this.ChartPaint[3];
|
|
86780
|
+
if (!chart) return null;
|
|
86781
|
+
|
|
86782
|
+
if (chart.Name!="Minute-BuySell-Bar") return null;
|
|
86783
|
+
|
|
86784
|
+
return chart;
|
|
86785
|
+
}
|
|
86786
|
+
|
|
86787
|
+
this.IsShowMinuteBuySellBar=function()
|
|
86788
|
+
{
|
|
86789
|
+
var chart=this.GetChartMinuteBuySellBar();
|
|
86790
|
+
if (!chart) return false;
|
|
86791
|
+
|
|
86792
|
+
return chart.IsShow;
|
|
86793
|
+
}
|
|
86794
|
+
|
|
86513
86795
|
//左右拖拽
|
|
86514
86796
|
this.OnDragMode_One=function(moveData, e)
|
|
86515
86797
|
{
|
|
@@ -87969,7 +88251,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
87969
88251
|
bRButtonSelectRect=this.ChartDragSelectRect.EnableRButton;
|
|
87970
88252
|
bLButtonSelectRect=this.ChartDragSelectRect.EnableLButton;
|
|
87971
88253
|
}
|
|
87972
|
-
|
|
88254
|
+
|
|
88255
|
+
var bShowBuySellBar=this.IsShowMinuteBuySellBar();
|
|
88256
|
+
|
|
87973
88257
|
var minItem=null;
|
|
87974
88258
|
if (frameID>=0 && option && IFrameSplitOperator.IsNumber(option.CursorIndex))
|
|
87975
88259
|
{
|
|
@@ -88066,6 +88350,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
88066
88350
|
SubMenu:
|
|
88067
88351
|
[
|
|
88068
88352
|
{ Name:"画图工具", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID, Args:[]}, Checked:this.IsShowDrawToolDialog()},
|
|
88353
|
+
{ Name:"盘口分析", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_BUYSELL_BAR_ID, Args:[!bShowBuySellBar]}, Checked:bShowBuySellBar },
|
|
88069
88354
|
|
|
88070
88355
|
{ Name:JSPopMenu.SEPARATOR_LINE_NAME },
|
|
88071
88356
|
|
|
@@ -88758,6 +89043,16 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
88758
89043
|
volLine.ShareAfterVol=this.ShareAfterVol;
|
|
88759
89044
|
this.ChartPaint[2]=volLine;
|
|
88760
89045
|
|
|
89046
|
+
var buySellBar=g_ChartPaintFactory.Create("ChartMinuteBuySellBar");
|
|
89047
|
+
buySellBar.Canvas=this.Canvas;
|
|
89048
|
+
buySellBar.ChartBorder=this.Frame.SubFrame[0].Frame.ChartBorder;
|
|
89049
|
+
buySellBar.ChartFrame=this.Frame.SubFrame[0].Frame;
|
|
89050
|
+
buySellBar.Name="Minute-BuySell-Bar";
|
|
89051
|
+
buySellBar.Identify="Minute-BuySell-Bar";
|
|
89052
|
+
buySellBar.BuySellData=this.BuySellData;
|
|
89053
|
+
this.ChartPaint[3]=buySellBar;
|
|
89054
|
+
|
|
89055
|
+
|
|
88761
89056
|
this.TitlePaint[0]=new DynamicMinuteTitlePainting();
|
|
88762
89057
|
this.TitlePaint[0].Frame=this.Frame.SubFrame[0].Frame;
|
|
88763
89058
|
this.TitlePaint[0].Canvas=this.Canvas;
|
|
@@ -89363,7 +89658,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
89363
89658
|
this.AutoUpdateEvent(false, "MinuteChartContainer::ChangeDayCount");
|
|
89364
89659
|
this.DayCount=count;
|
|
89365
89660
|
this.ClearMinuteData();
|
|
89661
|
+
this.ClearStockCache();
|
|
89366
89662
|
this.UnlockCorssCursor();
|
|
89663
|
+
this.Frame.ClearYCoordinateMaxMin();
|
|
89367
89664
|
|
|
89368
89665
|
if (option && option.PageInfo)
|
|
89369
89666
|
{
|
|
@@ -89633,8 +89930,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
89633
89930
|
}
|
|
89634
89931
|
}
|
|
89635
89932
|
|
|
89636
|
-
|
|
89933
|
+
//option={ ClearYCoordinateMaxMin:true }
|
|
89934
|
+
this.RequestData=function(option)
|
|
89637
89935
|
{
|
|
89936
|
+
if (option)
|
|
89937
|
+
{
|
|
89938
|
+
if (option.ClearYCoordinateMaxMin===true) this.Frame.ClearYCoordinateMaxMin();
|
|
89939
|
+
}
|
|
89940
|
+
|
|
89638
89941
|
if (this.DayCount<=1) this.RequestMinuteData();
|
|
89639
89942
|
else this.RequestHistoryMinuteData();
|
|
89640
89943
|
}
|
|
@@ -89706,11 +90009,13 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
89706
90009
|
After:this.IsShowMultiDayAfterData
|
|
89707
90010
|
} //集合竞价
|
|
89708
90011
|
|
|
90012
|
+
var bBuySellBar=this.IsShowMinuteBuySellBar();
|
|
90013
|
+
|
|
89709
90014
|
var obj=
|
|
89710
90015
|
{
|
|
89711
90016
|
Name:'MinuteChartContainer::RequestHistoryMinuteData', //类名::函数
|
|
89712
90017
|
Explain:'多日分时数据',
|
|
89713
|
-
Request:{ Url:self.HistoryMinuteApiUrl, Data:{daycount:self.DayCount, symbol:self.Symbol, callcation:callCation, AryDate:this.AryDate }, Type:'POST' },
|
|
90018
|
+
Request:{ Url:self.HistoryMinuteApiUrl, Data:{daycount:self.DayCount, symbol:self.Symbol, callcation:callCation, AryDate:this.AryDate, IsShowBuySellBar:bBuySellBar }, Type:'POST' },
|
|
89714
90019
|
Self:this,
|
|
89715
90020
|
PreventDefault:false
|
|
89716
90021
|
};
|
|
@@ -89757,6 +90062,10 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
89757
90062
|
|
|
89758
90063
|
this.DataStatus.MultiDay=true;
|
|
89759
90064
|
|
|
90065
|
+
var lastDayData=null;
|
|
90066
|
+
if (IFrameSplitOperator.IsNonEmptyArray(data.data) && data.data[0]) lastDayData=data.data[0];
|
|
90067
|
+
if (lastDayData) this.RecvBuySellData(lastDayData.BuySellData);
|
|
90068
|
+
|
|
89760
90069
|
this.CaclutateCallCationYRange();
|
|
89761
90070
|
this.Symbol=data.symbol;
|
|
89762
90071
|
this.Name=data.name;
|
|
@@ -90076,6 +90385,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
90076
90385
|
this.IsAfterData=true;
|
|
90077
90386
|
}
|
|
90078
90387
|
|
|
90388
|
+
//5档买卖盘
|
|
90389
|
+
var bBuySellBar=this.IsShowMinuteBuySellBar();
|
|
90390
|
+
|
|
90079
90391
|
if (this.NetworkFilter)
|
|
90080
90392
|
{
|
|
90081
90393
|
var dateRange=null;
|
|
@@ -90100,7 +90412,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
90100
90412
|
{
|
|
90101
90413
|
Name:'MinuteChartContainer::RequestMinuteData', //类名::函数名
|
|
90102
90414
|
Explain:'最新分时数据',
|
|
90103
|
-
Request:{ Url:self.MinuteApiUrl, Data:{field:fields, symbol:[self.Symbol], callcation:callCation, AryDate:this.AryDate }, Type:'POST' },
|
|
90415
|
+
Request:{ Url:self.MinuteApiUrl, Data:{field:fields, symbol:[self.Symbol], callcation:callCation, AryDate:this.AryDate, IsShowBuySellBar:bBuySellBar }, Type:'POST' },
|
|
90104
90416
|
Self:this,
|
|
90105
90417
|
PreventDefault:false
|
|
90106
90418
|
};
|
|
@@ -90235,6 +90547,21 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
90235
90547
|
}
|
|
90236
90548
|
}
|
|
90237
90549
|
|
|
90550
|
+
this.RecvBuySellData=function(data)
|
|
90551
|
+
{
|
|
90552
|
+
if (!data) return;
|
|
90553
|
+
|
|
90554
|
+
if (Array.isArray(data.AryBuy))
|
|
90555
|
+
{
|
|
90556
|
+
this.BuySellData.AryBuy=data.AryBuy.slice();
|
|
90557
|
+
}
|
|
90558
|
+
|
|
90559
|
+
if (Array.isArray(data.ArySell))
|
|
90560
|
+
{
|
|
90561
|
+
this.BuySellData.ArySell=data.ArySell.slice();
|
|
90562
|
+
}
|
|
90563
|
+
}
|
|
90564
|
+
|
|
90238
90565
|
this.RecvMinuteData=function(data)
|
|
90239
90566
|
{
|
|
90240
90567
|
if (!data)
|
|
@@ -90269,7 +90596,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
90269
90596
|
|
|
90270
90597
|
var bFirstData=(this.DataStatus.LatestDay==false); //首条单日数据
|
|
90271
90598
|
|
|
90272
|
-
|
|
90599
|
+
if (IFrameSplitOperator.IsNonEmptyArray(data.stock) && data.stock[0])
|
|
90600
|
+
{
|
|
90601
|
+
this.DataStatus.LatestDate=data.stock[0].date; //保存下最后一天的日期
|
|
90602
|
+
this.RecvBuySellData(data.stock[0].BuySellData);
|
|
90603
|
+
}
|
|
90604
|
+
|
|
90273
90605
|
this.DataStatus.LatestDay=true;
|
|
90274
90606
|
|
|
90275
90607
|
if (this.DayCount>1) //多日走势图
|