hqchart 1.1.14675 → 1.1.14688
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 +62 -48
- package/package.json +1 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +73 -11
- package/src/jscommon/umychart.complier.js +41 -14
- package/src/jscommon/umychart.js +417 -57
- package/src/jscommon/umychart.report.js +63 -6
- package/src/jscommon/umychart.style.js +9 -0
- package/src/jscommon/umychart.testdata.js +73 -11
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +531 -78
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +73 -11
- package/src/jscommon/umychart.vue/umychart.vue.js +531 -78
|
@@ -5168,6 +5168,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5168
5168
|
chart.EnableBorderDrag=option.EnableBorderDrag;
|
|
5169
5169
|
}
|
|
5170
5170
|
|
|
5171
|
+
if (IFrameSplitOperator.IsBool(option.EnableBuySellBar))
|
|
5172
|
+
{
|
|
5173
|
+
var barChart=chart.GetChartMinuteBuySellBar();
|
|
5174
|
+
if (barChart) barChart.IsShow=option.EnableBuySellBar;
|
|
5175
|
+
}
|
|
5176
|
+
|
|
5171
5177
|
this.AdjustChartBorder(chart);
|
|
5172
5178
|
|
|
5173
5179
|
if (option.Frame)
|
|
@@ -7067,6 +7073,7 @@ var JSCHART_MENU_ID=
|
|
|
7067
7073
|
CMD_FULLSCREEN_SUMMARY_ID:56, //当前屏区间统计
|
|
7068
7074
|
CMD_CORSS_DBCLICK_ID:57, //双击显示隐藏十字光标
|
|
7069
7075
|
CMD_ENABLE_KLINE_DAY_SUMMARY_ID:58, //K线底部显示走完剩余时间
|
|
7076
|
+
CMD_SHOW_BUYSELL_BAR_ID:59, //盘口分析(右侧显示买卖盘柱子) 分时图
|
|
7070
7077
|
|
|
7071
7078
|
|
|
7072
7079
|
|
|
@@ -7309,6 +7316,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7309
7316
|
this.CustomChartDrag; //自定义图形的拖拽操作 { Type:, Data: }
|
|
7310
7317
|
|
|
7311
7318
|
this.StockCache={ Data:null }; //扩展数据缓存数据
|
|
7319
|
+
this.BuySellData={ ArySell:null, AryBuy:null }; //10档买卖盘
|
|
7312
7320
|
|
|
7313
7321
|
this.JSPopMenu; //内置菜单
|
|
7314
7322
|
this.IsShowRightMenu=true; //显示右键菜单
|
|
@@ -7360,6 +7368,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7360
7368
|
this.ClearStockCache=function()
|
|
7361
7369
|
{
|
|
7362
7370
|
this.StockCache.Data=null;
|
|
7371
|
+
this.BuySellData.AryBuy=null;
|
|
7372
|
+
this.BuySellData.ArySell=null;
|
|
7363
7373
|
}
|
|
7364
7374
|
|
|
7365
7375
|
this.InitalPopMenu=function() //初始化弹出窗口
|
|
@@ -15047,6 +15057,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
15047
15057
|
this.Draw();
|
|
15048
15058
|
}
|
|
15049
15059
|
break;
|
|
15060
|
+
case JSCHART_MENU_ID.CMD_SHOW_BUYSELL_BAR_ID:
|
|
15061
|
+
if (IFrameSplitOperator.IsBool(srcParam))
|
|
15062
|
+
{
|
|
15063
|
+
var chart=this.GetChartMinuteBuySellBar();
|
|
15064
|
+
chart.IsShow=srcParam;
|
|
15065
|
+
this.RequestData({ ClearYCoordinateMaxMin:true });
|
|
15066
|
+
this.Draw();
|
|
15067
|
+
}
|
|
15068
|
+
break;
|
|
15050
15069
|
}
|
|
15051
15070
|
}
|
|
15052
15071
|
|
|
@@ -29697,7 +29716,8 @@ function ChartPaintFactory()
|
|
|
29697
29716
|
[
|
|
29698
29717
|
["ChartKLine", { Create:function(option) { return new ChartKLine(); } }], //K线图
|
|
29699
29718
|
["ChartMinuteVolumBar",{ Create:function(option) { return new ChartMinuteVolumBar(); } }], //分时成交量柱子
|
|
29700
|
-
["ChartMinutePriceLine",{ Create:function(option) { return new ChartMinutePriceLine();} }]
|
|
29719
|
+
["ChartMinutePriceLine",{ Create:function(option) { return new ChartMinutePriceLine();} }],
|
|
29720
|
+
["ChartMinuteBuySellBar", { Create:function(option){ return new ChartMinuteBuySellBar(); }}],
|
|
29701
29721
|
]);
|
|
29702
29722
|
|
|
29703
29723
|
this.Create=function(name, option)
|
|
@@ -39116,6 +39136,32 @@ function ChartIndexTitle()
|
|
|
39116
39136
|
delete this.newMethod;
|
|
39117
39137
|
|
|
39118
39138
|
this.ClassName='ChartIndexTitle'; //类名
|
|
39139
|
+
this.AryTitle=[]; //{ Date, Time, AryText:[ ] }
|
|
39140
|
+
this.MapCache=null; //key=date/date-time value={ Data:[] }
|
|
39141
|
+
|
|
39142
|
+
this.BuildCacheData=function()
|
|
39143
|
+
{
|
|
39144
|
+
var mapData=new Map();
|
|
39145
|
+
this.MapCache=mapData;
|
|
39146
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.AryTitle)) return;
|
|
39147
|
+
|
|
39148
|
+
for(var i=0;i<this.AryTitle.length;++i)
|
|
39149
|
+
{
|
|
39150
|
+
var item=this.AryTitle[i];
|
|
39151
|
+
var key=this.BuildKey(item);
|
|
39152
|
+
|
|
39153
|
+
mapData.set(key,{ Data:item });
|
|
39154
|
+
}
|
|
39155
|
+
}
|
|
39156
|
+
|
|
39157
|
+
this.GetItem=function(kItem)
|
|
39158
|
+
{
|
|
39159
|
+
if (!this.MapCache || this.MapCache.size<=0) return null;
|
|
39160
|
+
var key=this.BuildKey(kItem);
|
|
39161
|
+
if (!this.MapCache.has(key)) return null;
|
|
39162
|
+
|
|
39163
|
+
return this.MapCache.get(key);
|
|
39164
|
+
}
|
|
39119
39165
|
|
|
39120
39166
|
this.Draw=function()
|
|
39121
39167
|
{
|
|
@@ -44192,6 +44238,216 @@ function ChartMinutePositionLine()
|
|
|
44192
44238
|
}
|
|
44193
44239
|
}
|
|
44194
44240
|
|
|
44241
|
+
//分时图 右侧10档买卖柱子
|
|
44242
|
+
function ChartMinuteBuySellBar()
|
|
44243
|
+
{
|
|
44244
|
+
this.newMethod=IChartPainting; //派生
|
|
44245
|
+
this.newMethod();
|
|
44246
|
+
delete this.newMethod;
|
|
44247
|
+
|
|
44248
|
+
this.BuyColor=g_JSChartResource.Minute.BuySellBar.BuyColor;
|
|
44249
|
+
this.SellColor=g_JSChartResource.Minute.BuySellBar.SellColor;
|
|
44250
|
+
this.BarWidth=g_JSChartResource.Minute.BuySellBar.BarWidth;
|
|
44251
|
+
this.MaxBarWidth=g_JSChartResource.Minute.BuySellBar.MaxBarWidth;
|
|
44252
|
+
this.YOffset=g_JSChartResource.Minute.BuySellBar.YOffset;
|
|
44253
|
+
this.Font=g_JSChartResource.Minute.BuySellBar.Font;
|
|
44254
|
+
this.TextColor=g_JSChartResource.Minute.BuySellBar.TextColor;
|
|
44255
|
+
|
|
44256
|
+
this.IsDrawFirst=true;
|
|
44257
|
+
this.IsShow=false;
|
|
44258
|
+
|
|
44259
|
+
this.BuySellData=null; //{ AryBuy:[{ Price:10.5, Vol:300}], ArySell:[{ Price:10.5, Vol:300}] }
|
|
44260
|
+
|
|
44261
|
+
this.ReloadResource=function(resource)
|
|
44262
|
+
{
|
|
44263
|
+
this.BuyColor=g_JSChartResource.Minute.BuySellBar.BuyColor;
|
|
44264
|
+
this.SellColor=g_JSChartResource.Minute.BuySellBar.SellColor;
|
|
44265
|
+
this.BarWidth=g_JSChartResource.Minute.BuySellBar.BarWidth;
|
|
44266
|
+
this.MaxBarWidth=g_JSChartResource.Minute.BuySellBar.MaxBarWidth;
|
|
44267
|
+
this.YOffset=g_JSChartResource.Minute.BuySellBar.YOffset;
|
|
44268
|
+
this.Font=g_JSChartResource.Minute.BuySellBar.Font;
|
|
44269
|
+
this.TextColor=g_JSChartResource.Minute.BuySellBar.TextColor;
|
|
44270
|
+
}
|
|
44271
|
+
|
|
44272
|
+
this.Draw=function()
|
|
44273
|
+
{
|
|
44274
|
+
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
44275
|
+
if (this.IsShowIndexTitleOnly()) return;
|
|
44276
|
+
if (this.IsHideScriptIndex()) return;
|
|
44277
|
+
if (!this.BuySellData) return;
|
|
44278
|
+
|
|
44279
|
+
var volRange=this.GetVolRange();
|
|
44280
|
+
if (!volRange) return;
|
|
44281
|
+
|
|
44282
|
+
var bHScreen=(this.ChartFrame.IsHScreen===true);
|
|
44283
|
+
var xPointCount=this.ChartFrame.XPointCount;
|
|
44284
|
+
|
|
44285
|
+
var xStart=this.ChartFrame.GetXFromIndex(xPointCount-this.MaxBarWidth);
|
|
44286
|
+
var xEnd=this.ChartFrame.GetXFromIndex(xPointCount-1);
|
|
44287
|
+
|
|
44288
|
+
function _Temp_GetXFromData(value)
|
|
44289
|
+
{
|
|
44290
|
+
var maxWidth=xEnd-xStart;
|
|
44291
|
+
var width = maxWidth * (value - volRange.Min) / (volRange.Max - volRange.Min);
|
|
44292
|
+
return xEnd-width;
|
|
44293
|
+
}
|
|
44294
|
+
|
|
44295
|
+
this.Canvas.save();
|
|
44296
|
+
this.ClipClient(bHScreen);
|
|
44297
|
+
|
|
44298
|
+
var aryBuy=this.BuySellData.AryBuy;
|
|
44299
|
+
if (IFrameSplitOperator.IsNonEmptyArray(aryBuy))
|
|
44300
|
+
{
|
|
44301
|
+
this.Canvas.beginPath();
|
|
44302
|
+
var lineCount=0;
|
|
44303
|
+
for(var i=0;i<aryBuy.length;++i)
|
|
44304
|
+
{
|
|
44305
|
+
var item=aryBuy[i];
|
|
44306
|
+
if (!item || !IFrameSplitOperator.IsNumber(item.Vol) || !IFrameSplitOperator.IsNumber(item.Price)) continue;
|
|
44307
|
+
|
|
44308
|
+
var y=this.GetYFromData(item.Price,false)
|
|
44309
|
+
var x=_Temp_GetXFromData(item.Vol);
|
|
44310
|
+
|
|
44311
|
+
if (bHScreen)
|
|
44312
|
+
{
|
|
44313
|
+
y-=-this.YOffset;
|
|
44314
|
+
this.Canvas.moveTo(y,x);
|
|
44315
|
+
this.Canvas.lineTo(y,xEnd);
|
|
44316
|
+
}
|
|
44317
|
+
else
|
|
44318
|
+
{
|
|
44319
|
+
y-=-this.YOffset;
|
|
44320
|
+
this.Canvas.moveTo(x,y);
|
|
44321
|
+
this.Canvas.lineTo(xEnd,y);
|
|
44322
|
+
}
|
|
44323
|
+
|
|
44324
|
+
++lineCount;
|
|
44325
|
+
}
|
|
44326
|
+
|
|
44327
|
+
if (lineCount>0)
|
|
44328
|
+
{
|
|
44329
|
+
this.Canvas.strokeStyle=this.BuyColor;
|
|
44330
|
+
if (IFrameSplitOperator.IsPlusNumber(this.BarWidth)) this.Canvas.lineWidth=this.BarWidth;
|
|
44331
|
+
this.Canvas.stroke();
|
|
44332
|
+
}
|
|
44333
|
+
}
|
|
44334
|
+
|
|
44335
|
+
var arySell=this.BuySellData.ArySell;
|
|
44336
|
+
if (IFrameSplitOperator.IsNonEmptyArray(arySell))
|
|
44337
|
+
{
|
|
44338
|
+
this.Canvas.beginPath();
|
|
44339
|
+
var lineCount=0;
|
|
44340
|
+
for(var i=0;i<arySell.length;++i)
|
|
44341
|
+
{
|
|
44342
|
+
var item=arySell[i];
|
|
44343
|
+
if (!item || !IFrameSplitOperator.IsNumber(item.Vol) || !IFrameSplitOperator.IsNumber(item.Price)) continue;
|
|
44344
|
+
|
|
44345
|
+
var y=this.GetYFromData(item.Price,false);
|
|
44346
|
+
var x=_Temp_GetXFromData(item.Vol);
|
|
44347
|
+
|
|
44348
|
+
if (bHScreen)
|
|
44349
|
+
{
|
|
44350
|
+
y-=-this.YOffset;
|
|
44351
|
+
this.Canvas.moveTo(y,x);
|
|
44352
|
+
this.Canvas.lineTo(y,xEnd);
|
|
44353
|
+
}
|
|
44354
|
+
else
|
|
44355
|
+
{
|
|
44356
|
+
y-=-this.YOffset;
|
|
44357
|
+
this.Canvas.moveTo(x,y);
|
|
44358
|
+
this.Canvas.lineTo(xEnd,y);
|
|
44359
|
+
}
|
|
44360
|
+
|
|
44361
|
+
++lineCount;
|
|
44362
|
+
}
|
|
44363
|
+
|
|
44364
|
+
if (lineCount>0)
|
|
44365
|
+
{
|
|
44366
|
+
this.Canvas.strokeStyle=this.SellColor;
|
|
44367
|
+
if (IFrameSplitOperator.IsPlusNumber(this.BarWidth)) this.Canvas.lineWidth=this.BarWidth;
|
|
44368
|
+
this.Canvas.stroke();
|
|
44369
|
+
}
|
|
44370
|
+
}
|
|
44371
|
+
|
|
44372
|
+
|
|
44373
|
+
this.DrawMaxVolText(volRange.Max, xStart);
|
|
44374
|
+
|
|
44375
|
+
this.Canvas.restore();
|
|
44376
|
+
}
|
|
44377
|
+
|
|
44378
|
+
this.DrawMaxVolText=function(value, x)
|
|
44379
|
+
{
|
|
44380
|
+
if (!IFrameSplitOperator.IsNumber(value)) return;
|
|
44381
|
+
|
|
44382
|
+
var border=this.ChartFrame.GetBorder();
|
|
44383
|
+
var text=value.toFixed(0);
|
|
44384
|
+
this.Canvas.textAlign = 'left';
|
|
44385
|
+
this.Canvas.textBaseline = 'bottom';
|
|
44386
|
+
this.Canvas.font=this.Font;
|
|
44387
|
+
this.Canvas.fillStyle=this.TextColor;
|
|
44388
|
+
|
|
44389
|
+
if (this.ChartFrame.IsHScreen===true)
|
|
44390
|
+
{
|
|
44391
|
+
var yBottom=border.LeftEx+1;
|
|
44392
|
+
this.Canvas.save();
|
|
44393
|
+
this.Canvas.translate(yBottom,x);
|
|
44394
|
+
this.Canvas.rotate(90 * Math.PI / 180);
|
|
44395
|
+
this.Canvas.fillText(text,0,0);
|
|
44396
|
+
this.Canvas.restore();
|
|
44397
|
+
}
|
|
44398
|
+
else
|
|
44399
|
+
{
|
|
44400
|
+
var yBottom=border.Bottom-1;
|
|
44401
|
+
this.Canvas.fillText(text,x,yBottom);
|
|
44402
|
+
}
|
|
44403
|
+
}
|
|
44404
|
+
|
|
44405
|
+
this.GetVolRange=function()
|
|
44406
|
+
{
|
|
44407
|
+
if (!this.BuySellData) return null;
|
|
44408
|
+
|
|
44409
|
+
var range={ Min:0, Max:null };
|
|
44410
|
+
var aryBuy=this.BuySellData.AryBuy;
|
|
44411
|
+
var arySell=this.BuySellData.ArySell;
|
|
44412
|
+
var count=0;
|
|
44413
|
+
|
|
44414
|
+
if (IFrameSplitOperator.IsNonEmptyArray(aryBuy))
|
|
44415
|
+
{
|
|
44416
|
+
for(var i=0;i<aryBuy.length;++i)
|
|
44417
|
+
{
|
|
44418
|
+
var item=aryBuy[i];
|
|
44419
|
+
if (!IFrameSplitOperator.IsNumber(item.Vol)) continue;
|
|
44420
|
+
|
|
44421
|
+
if (range.Min==null || range.Min>item.Vol) range.Min=item.Vol;
|
|
44422
|
+
if (range.Max==null || range.Max<item.Vol) range.Max=item.Vol;
|
|
44423
|
+
++count;
|
|
44424
|
+
}
|
|
44425
|
+
}
|
|
44426
|
+
|
|
44427
|
+
if (IFrameSplitOperator.IsNonEmptyArray(arySell))
|
|
44428
|
+
{
|
|
44429
|
+
for(var i=0;i<arySell.length;++i)
|
|
44430
|
+
{
|
|
44431
|
+
var item=arySell[i];
|
|
44432
|
+
if (!IFrameSplitOperator.IsNumber(item.Vol)) continue;
|
|
44433
|
+
|
|
44434
|
+
if (range.Min==null || range.Min>item.Vol) range.Min=item.Vol;
|
|
44435
|
+
if (range.Max==null || range.Max<item.Vol) range.Max=item.Vol;
|
|
44436
|
+
++count;
|
|
44437
|
+
}
|
|
44438
|
+
}
|
|
44439
|
+
|
|
44440
|
+
if (count<=0) return null;
|
|
44441
|
+
|
|
44442
|
+
return range;
|
|
44443
|
+
}
|
|
44444
|
+
|
|
44445
|
+
this.GetMaxMin=function()
|
|
44446
|
+
{
|
|
44447
|
+
return { Min:null, Max:null };
|
|
44448
|
+
}
|
|
44449
|
+
}
|
|
44450
|
+
|
|
44195
44451
|
//分钟信息地雷 支持横屏
|
|
44196
44452
|
function ChartMinuteInfo()
|
|
44197
44453
|
{
|
|
@@ -51431,6 +51687,7 @@ function MinuteLeftTooltipPaint()
|
|
|
51431
51687
|
this.Draw=function()
|
|
51432
51688
|
{
|
|
51433
51689
|
if (!this.IsEnableDraw()) return;
|
|
51690
|
+
if (this.ChartFrame && this.ChartFrame.IsHScreen===true) return; //不支持横屏
|
|
51434
51691
|
|
|
51435
51692
|
this.TitlePaint=this.HQChart.TitlePaint[0];
|
|
51436
51693
|
if (!this.TitlePaint) return;
|
|
@@ -60008,44 +60265,39 @@ function ChartCorssCursor()
|
|
|
60008
60265
|
var textSize={ Width:textWidth+4, Height:this.TextHeight, Text:[] };
|
|
60009
60266
|
var buttonData={Y:y, YValue:yValue, FrameID:yValueExtend.FrameID };
|
|
60010
60267
|
|
|
60011
|
-
|
|
60268
|
+
var margin=this.LeftConfig.Margin;
|
|
60269
|
+
var textOffset=this.LeftConfig.TextOffset;
|
|
60270
|
+
var rtBG=null;
|
|
60271
|
+
if (this.Frame.ChartBorder.Left>=30 && this.ShowTextMode.Left==1) //左边
|
|
60012
60272
|
{
|
|
60013
|
-
var margin
|
|
60014
|
-
|
|
60273
|
+
var rtBG={ Right:left, Width:textWidth+margin.Left+margin.Right, YCenter:y, Height:textHeight+margin.Top+margin.Bottom };
|
|
60274
|
+
rtBG.Left=rtBG.Right-rtBG.Width;
|
|
60275
|
+
rtBG.Top=rtBG.YCenter-rtBG.Height/2;
|
|
60276
|
+
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
60015
60277
|
|
|
60016
|
-
|
|
60017
|
-
if (this.ShowTextMode.Left==1)
|
|
60278
|
+
if (rtBG.Left<0)
|
|
60018
60279
|
{
|
|
60019
|
-
|
|
60020
|
-
rtBG.Left=rtBG.Right-rtBG.Width;
|
|
60021
|
-
rtBG.Top=rtBG.YCenter-rtBG.Height/2;
|
|
60022
|
-
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
60023
|
-
|
|
60024
|
-
if (rtBG.Left<0)
|
|
60025
|
-
{
|
|
60026
|
-
rtBG.Left=0;
|
|
60027
|
-
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
60028
|
-
}
|
|
60029
|
-
}
|
|
60030
|
-
else if (this.ShowTextMode.Left==2) //在框架内显示
|
|
60031
|
-
{
|
|
60032
|
-
var rtBG={ Left:left, Width:textWidth+margin.Left+margin.Right, YCenter:y, Height:textHeight+margin.Top+margin.Bottom };
|
|
60280
|
+
rtBG.Left=0;
|
|
60033
60281
|
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
60034
|
-
rtBG.Top=rtBG.YCenter-rtBG.Height/2;
|
|
60035
|
-
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
60036
|
-
}
|
|
60037
|
-
|
|
60038
|
-
if (rtBG)
|
|
60039
|
-
{
|
|
60040
|
-
this.DrawTextBGRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
|
|
60041
|
-
this.Canvas.textAlign="left";
|
|
60042
|
-
this.Canvas.textBaseline="bottom";
|
|
60043
|
-
this.Canvas.fillStyle=this.TextColor;
|
|
60044
|
-
this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
|
|
60045
60282
|
}
|
|
60283
|
+
|
|
60284
|
+
}
|
|
60285
|
+
else if (this.ShowTextMode.Left==2) //在框架内显示
|
|
60286
|
+
{
|
|
60287
|
+
var rtBG={ Left:left, Width:textWidth+margin.Left+margin.Right, YCenter:y, Height:textHeight+margin.Top+margin.Bottom };
|
|
60288
|
+
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
60289
|
+
rtBG.Top=rtBG.YCenter-rtBG.Height/2;
|
|
60290
|
+
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
60046
60291
|
}
|
|
60047
60292
|
|
|
60048
|
-
|
|
60293
|
+
if (rtBG)
|
|
60294
|
+
{
|
|
60295
|
+
this.DrawTextBGRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
|
|
60296
|
+
this.Canvas.textAlign="left";
|
|
60297
|
+
this.Canvas.textBaseline="bottom";
|
|
60298
|
+
this.Canvas.fillStyle=this.TextColor;
|
|
60299
|
+
this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
|
|
60300
|
+
}
|
|
60049
60301
|
|
|
60050
60302
|
var complexText=
|
|
60051
60303
|
{
|
|
@@ -60235,7 +60487,7 @@ function ChartCorssCursor()
|
|
|
60235
60487
|
this.Canvas.textBaseline="bottom";
|
|
60236
60488
|
this.Canvas.fillStyle=this.TextColor;
|
|
60237
60489
|
this.Canvas.fillText(text,rtBG.Left+textOffset.X,rtBG.Bottom+textOffset.Y,textWidth);
|
|
60238
|
-
|
|
60490
|
+
}
|
|
60239
60491
|
}
|
|
60240
60492
|
|
|
60241
60493
|
//子坐标Y轴
|
|
@@ -64210,33 +64462,40 @@ function DynamicChartTitlePainting()
|
|
|
64210
64462
|
return aryText;
|
|
64211
64463
|
}
|
|
64212
64464
|
|
|
64213
|
-
this.FormatIndexTitle=function(
|
|
64465
|
+
this.FormatIndexTitle=function(kItem, dataInfo)
|
|
64214
64466
|
{
|
|
64215
|
-
|
|
64467
|
+
var result=null;
|
|
64468
|
+
var aryText=[];
|
|
64469
|
+
if (dataInfo.Name)
|
|
64470
|
+
{
|
|
64471
|
+
aryText.push({ Text:dataInfo.Name, Color:dataInfo.Color});
|
|
64472
|
+
result={ Text:null, ArrayText:aryText };
|
|
64473
|
+
}
|
|
64216
64474
|
|
|
64217
|
-
if (
|
|
64475
|
+
if (!kItem) return result;
|
|
64476
|
+
if (!dataInfo.Chart) return result;
|
|
64477
|
+
|
|
64478
|
+
var titleItem=dataInfo.Chart.GetItem(kItem);
|
|
64479
|
+
if (!titleItem || !titleItem.Data) return result;
|
|
64480
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(titleItem.Data.AryText)) return result;
|
|
64218
64481
|
|
|
64219
|
-
if (
|
|
64482
|
+
if (!result) result={ Text:null, ArrayText:aryText };
|
|
64483
|
+
|
|
64484
|
+
for(var i=0;i<titleItem.Data.AryText.length;++i)
|
|
64220
64485
|
{
|
|
64221
|
-
var
|
|
64222
|
-
|
|
64223
|
-
{
|
|
64224
|
-
var item=value[i];
|
|
64225
|
-
if (!item) continue;
|
|
64226
|
-
|
|
64227
|
-
var textItem={ Name:null, Text:null };
|
|
64228
|
-
if (item.Name) textItem.Name=item.Name;
|
|
64229
|
-
if (item.Text) textItem.Text=item.Text;
|
|
64230
|
-
if (item.Color) textItem.Color=item.Color;
|
|
64231
|
-
if (IFrameSplitOperator.IsNumber(item.LeftSpace)) textItem.LeftSpace=item.LeftSpace;
|
|
64486
|
+
var item=titleItem.Data.AryText[i];
|
|
64487
|
+
if (!item) continue;
|
|
64232
64488
|
|
|
64233
|
-
|
|
64234
|
-
|
|
64489
|
+
var textItem={ Name:null, Text:null };
|
|
64490
|
+
if (item.Name) textItem.Name=item.Name;
|
|
64491
|
+
if (item.Text) textItem.Text=item.Text;
|
|
64492
|
+
if (item.Color) textItem.Color=item.Color;
|
|
64493
|
+
if (IFrameSplitOperator.IsNumber(item.LeftSpace)) textItem.LeftSpace=item.LeftSpace;
|
|
64235
64494
|
|
|
64236
|
-
|
|
64495
|
+
aryText.push(textItem);
|
|
64237
64496
|
}
|
|
64238
64497
|
|
|
64239
|
-
return
|
|
64498
|
+
return result;
|
|
64240
64499
|
}
|
|
64241
64500
|
|
|
64242
64501
|
this.GetColor=function(price,yClose)
|
|
@@ -77685,6 +77944,17 @@ function JSChartResource()
|
|
|
77685
77944
|
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 } },
|
|
77686
77945
|
}
|
|
77687
77946
|
|
|
77947
|
+
this.Minute.BuySellBar=
|
|
77948
|
+
{
|
|
77949
|
+
BuyColor:"rgb(242,54,69)",
|
|
77950
|
+
SellColor:"rgb(8,153,129)",
|
|
77951
|
+
BarWidth:4*GetDevicePixelRatio(),
|
|
77952
|
+
MaxBarWidth:120,
|
|
77953
|
+
YOffset:1,
|
|
77954
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
77955
|
+
TextColor:"rgb(128,128,128)",
|
|
77956
|
+
}
|
|
77957
|
+
|
|
77688
77958
|
this.DefaultTextColor="rgb(43,54,69)"; //图形中默认的字体颜色
|
|
77689
77959
|
this.DefaultTextFont=14*GetDevicePixelRatio() +'px 微软雅黑'; //图形中默认的字体
|
|
77690
77960
|
this.TitleFont=13*GetDevicePixelRatio() +'px 微软雅黑'; //指标显示,tooltip显示字体
|
|
@@ -78800,6 +79070,7 @@ function JSChartResource()
|
|
|
78800
79070
|
{
|
|
78801
79071
|
BorderColor:'rgb(192,192,192)', //边框线
|
|
78802
79072
|
SelectedColor:"rgb(180,240,240)", //选中行
|
|
79073
|
+
SelectedLine:{ Color:"rgb(180,240,240)", Width:2 },
|
|
78803
79074
|
Header:
|
|
78804
79075
|
{
|
|
78805
79076
|
Color:"rgb(60,60,60)", //表头文字颜色
|
|
@@ -79222,6 +79493,19 @@ function JSChartResource()
|
|
|
79222
79493
|
CopyMarginConfig(this.Minute.NightDay.Night.Margin,subItem.Margin);
|
|
79223
79494
|
}
|
|
79224
79495
|
}
|
|
79496
|
+
|
|
79497
|
+
if (style.Minute.BuySellBar)
|
|
79498
|
+
{
|
|
79499
|
+
var item=style.Minute.BuySellBar;
|
|
79500
|
+
var dest=this.Minute.BuySellBar;
|
|
79501
|
+
if (item.BuyColor) dest.BuyColor=item.BuyColor;
|
|
79502
|
+
if (item.SellColor) dest.SellColor=item.SellColor;
|
|
79503
|
+
if (item.Font) dest.Font=item.Font;
|
|
79504
|
+
if (item.TextColor) dest.TextColor=item.TextColor;
|
|
79505
|
+
if (IFrameSplitOperator.IsNumber(item.BarWidth)) dest.BarWidth=item.BarWidth;
|
|
79506
|
+
if (IFrameSplitOperator.IsNumber(item.MaxBarWidth)) dest.MaxBarWidth=item.MaxBarWidth;
|
|
79507
|
+
if (IFrameSplitOperator.IsNumber(item.YOffset)) dest.YOffset=item.YOffset;
|
|
79508
|
+
}
|
|
79225
79509
|
}
|
|
79226
79510
|
|
|
79227
79511
|
if (style.PopMinuteChart)
|
|
@@ -80118,6 +80402,14 @@ function JSChartResource()
|
|
|
80118
80402
|
if (item.DownTextColor) this.Report.DownTextColor=item.DownTextColor;
|
|
80119
80403
|
if (item.UnchagneTextColor) this.Report.UnchagneTextColor=item.UnchagneTextColor;
|
|
80120
80404
|
if (item.BorderColor) this.Report.SelectedColor=item.SelectedColor;
|
|
80405
|
+
|
|
80406
|
+
if (item.SelectedLine)
|
|
80407
|
+
{
|
|
80408
|
+
var subItem=item.SelectedLine;
|
|
80409
|
+
var subDest=this.Report.SelectedLine;
|
|
80410
|
+
if (subItem.Color) subDest.Color=subItem.Color;
|
|
80411
|
+
if (IFrameSplitOperator.IsNumber(subItem.Width)) subDest.Width=subItem.Width;
|
|
80412
|
+
}
|
|
80121
80413
|
|
|
80122
80414
|
|
|
80123
80415
|
if (item.CloseLine)
|
|
@@ -90622,6 +90914,24 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
90622
90914
|
return false;
|
|
90623
90915
|
}
|
|
90624
90916
|
|
|
90917
|
+
this.GetChartMinuteBuySellBar=function()
|
|
90918
|
+
{
|
|
90919
|
+
var chart=this.ChartPaint[3];
|
|
90920
|
+
if (!chart) return null;
|
|
90921
|
+
|
|
90922
|
+
if (chart.Name!="Minute-BuySell-Bar") return null;
|
|
90923
|
+
|
|
90924
|
+
return chart;
|
|
90925
|
+
}
|
|
90926
|
+
|
|
90927
|
+
this.IsShowMinuteBuySellBar=function()
|
|
90928
|
+
{
|
|
90929
|
+
var chart=this.GetChartMinuteBuySellBar();
|
|
90930
|
+
if (!chart) return false;
|
|
90931
|
+
|
|
90932
|
+
return chart.IsShow;
|
|
90933
|
+
}
|
|
90934
|
+
|
|
90625
90935
|
//左右拖拽
|
|
90626
90936
|
this.OnDragMode_One=function(moveData, e)
|
|
90627
90937
|
{
|
|
@@ -92081,7 +92391,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
92081
92391
|
bRButtonSelectRect=this.ChartDragSelectRect.EnableRButton;
|
|
92082
92392
|
bLButtonSelectRect=this.ChartDragSelectRect.EnableLButton;
|
|
92083
92393
|
}
|
|
92084
|
-
|
|
92394
|
+
|
|
92395
|
+
var bShowBuySellBar=this.IsShowMinuteBuySellBar();
|
|
92396
|
+
|
|
92085
92397
|
var minItem=null;
|
|
92086
92398
|
if (frameID>=0 && option && IFrameSplitOperator.IsNumber(option.CursorIndex))
|
|
92087
92399
|
{
|
|
@@ -92178,6 +92490,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
92178
92490
|
SubMenu:
|
|
92179
92491
|
[
|
|
92180
92492
|
{ Name:"画图工具", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID, Args:[]}, Checked:this.IsShowDrawToolDialog()},
|
|
92493
|
+
{ Name:"盘口分析", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_BUYSELL_BAR_ID, Args:[!bShowBuySellBar]}, Checked:bShowBuySellBar },
|
|
92181
92494
|
|
|
92182
92495
|
{ Name:JSPopMenu.SEPARATOR_LINE_NAME },
|
|
92183
92496
|
|
|
@@ -92870,6 +93183,16 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
92870
93183
|
volLine.ShareAfterVol=this.ShareAfterVol;
|
|
92871
93184
|
this.ChartPaint[2]=volLine;
|
|
92872
93185
|
|
|
93186
|
+
var buySellBar=g_ChartPaintFactory.Create("ChartMinuteBuySellBar");
|
|
93187
|
+
buySellBar.Canvas=this.Canvas;
|
|
93188
|
+
buySellBar.ChartBorder=this.Frame.SubFrame[0].Frame.ChartBorder;
|
|
93189
|
+
buySellBar.ChartFrame=this.Frame.SubFrame[0].Frame;
|
|
93190
|
+
buySellBar.Name="Minute-BuySell-Bar";
|
|
93191
|
+
buySellBar.Identify="Minute-BuySell-Bar";
|
|
93192
|
+
buySellBar.BuySellData=this.BuySellData;
|
|
93193
|
+
this.ChartPaint[3]=buySellBar;
|
|
93194
|
+
|
|
93195
|
+
|
|
92873
93196
|
this.TitlePaint[0]=new DynamicMinuteTitlePainting();
|
|
92874
93197
|
this.TitlePaint[0].Frame=this.Frame.SubFrame[0].Frame;
|
|
92875
93198
|
this.TitlePaint[0].Canvas=this.Canvas;
|
|
@@ -93475,7 +93798,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
93475
93798
|
this.AutoUpdateEvent(false, "MinuteChartContainer::ChangeDayCount");
|
|
93476
93799
|
this.DayCount=count;
|
|
93477
93800
|
this.ClearMinuteData();
|
|
93801
|
+
this.ClearStockCache();
|
|
93478
93802
|
this.UnlockCorssCursor();
|
|
93803
|
+
this.Frame.ClearYCoordinateMaxMin();
|
|
93479
93804
|
|
|
93480
93805
|
if (option && option.PageInfo)
|
|
93481
93806
|
{
|
|
@@ -93745,8 +94070,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
93745
94070
|
}
|
|
93746
94071
|
}
|
|
93747
94072
|
|
|
93748
|
-
|
|
94073
|
+
//option={ ClearYCoordinateMaxMin:true }
|
|
94074
|
+
this.RequestData=function(option)
|
|
93749
94075
|
{
|
|
94076
|
+
if (option)
|
|
94077
|
+
{
|
|
94078
|
+
if (option.ClearYCoordinateMaxMin===true) this.Frame.ClearYCoordinateMaxMin();
|
|
94079
|
+
}
|
|
94080
|
+
|
|
93750
94081
|
if (this.DayCount<=1) this.RequestMinuteData();
|
|
93751
94082
|
else this.RequestHistoryMinuteData();
|
|
93752
94083
|
}
|
|
@@ -93818,11 +94149,13 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
93818
94149
|
After:this.IsShowMultiDayAfterData
|
|
93819
94150
|
} //集合竞价
|
|
93820
94151
|
|
|
94152
|
+
var bBuySellBar=this.IsShowMinuteBuySellBar();
|
|
94153
|
+
|
|
93821
94154
|
var obj=
|
|
93822
94155
|
{
|
|
93823
94156
|
Name:'MinuteChartContainer::RequestHistoryMinuteData', //类名::函数
|
|
93824
94157
|
Explain:'多日分时数据',
|
|
93825
|
-
Request:{ Url:self.HistoryMinuteApiUrl, Data:{daycount:self.DayCount, symbol:self.Symbol, callcation:callCation, AryDate:this.AryDate }, Type:'POST' },
|
|
94158
|
+
Request:{ Url:self.HistoryMinuteApiUrl, Data:{daycount:self.DayCount, symbol:self.Symbol, callcation:callCation, AryDate:this.AryDate, IsShowBuySellBar:bBuySellBar }, Type:'POST' },
|
|
93826
94159
|
Self:this,
|
|
93827
94160
|
PreventDefault:false
|
|
93828
94161
|
};
|
|
@@ -93869,6 +94202,10 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
93869
94202
|
|
|
93870
94203
|
this.DataStatus.MultiDay=true;
|
|
93871
94204
|
|
|
94205
|
+
var lastDayData=null;
|
|
94206
|
+
if (IFrameSplitOperator.IsNonEmptyArray(data.data) && data.data[0]) lastDayData=data.data[0];
|
|
94207
|
+
if (lastDayData) this.RecvBuySellData(lastDayData.BuySellData);
|
|
94208
|
+
|
|
93872
94209
|
this.CaclutateCallCationYRange();
|
|
93873
94210
|
this.Symbol=data.symbol;
|
|
93874
94211
|
this.Name=data.name;
|
|
@@ -94188,6 +94525,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
94188
94525
|
this.IsAfterData=true;
|
|
94189
94526
|
}
|
|
94190
94527
|
|
|
94528
|
+
//5档买卖盘
|
|
94529
|
+
var bBuySellBar=this.IsShowMinuteBuySellBar();
|
|
94530
|
+
|
|
94191
94531
|
if (this.NetworkFilter)
|
|
94192
94532
|
{
|
|
94193
94533
|
var dateRange=null;
|
|
@@ -94212,7 +94552,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
94212
94552
|
{
|
|
94213
94553
|
Name:'MinuteChartContainer::RequestMinuteData', //类名::函数名
|
|
94214
94554
|
Explain:'最新分时数据',
|
|
94215
|
-
Request:{ Url:self.MinuteApiUrl, Data:{field:fields, symbol:[self.Symbol], callcation:callCation, AryDate:this.AryDate }, Type:'POST' },
|
|
94555
|
+
Request:{ Url:self.MinuteApiUrl, Data:{field:fields, symbol:[self.Symbol], callcation:callCation, AryDate:this.AryDate, IsShowBuySellBar:bBuySellBar }, Type:'POST' },
|
|
94216
94556
|
Self:this,
|
|
94217
94557
|
PreventDefault:false
|
|
94218
94558
|
};
|
|
@@ -94347,6 +94687,21 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
94347
94687
|
}
|
|
94348
94688
|
}
|
|
94349
94689
|
|
|
94690
|
+
this.RecvBuySellData=function(data)
|
|
94691
|
+
{
|
|
94692
|
+
if (!data) return;
|
|
94693
|
+
|
|
94694
|
+
if (Array.isArray(data.AryBuy))
|
|
94695
|
+
{
|
|
94696
|
+
this.BuySellData.AryBuy=data.AryBuy.slice();
|
|
94697
|
+
}
|
|
94698
|
+
|
|
94699
|
+
if (Array.isArray(data.ArySell))
|
|
94700
|
+
{
|
|
94701
|
+
this.BuySellData.ArySell=data.ArySell.slice();
|
|
94702
|
+
}
|
|
94703
|
+
}
|
|
94704
|
+
|
|
94350
94705
|
this.RecvMinuteData=function(data)
|
|
94351
94706
|
{
|
|
94352
94707
|
if (!data)
|
|
@@ -94381,7 +94736,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
94381
94736
|
|
|
94382
94737
|
var bFirstData=(this.DataStatus.LatestDay==false); //首条单日数据
|
|
94383
94738
|
|
|
94384
|
-
|
|
94739
|
+
if (IFrameSplitOperator.IsNonEmptyArray(data.stock) && data.stock[0])
|
|
94740
|
+
{
|
|
94741
|
+
this.DataStatus.LatestDate=data.stock[0].date; //保存下最后一天的日期
|
|
94742
|
+
this.RecvBuySellData(data.stock[0].BuySellData);
|
|
94743
|
+
}
|
|
94744
|
+
|
|
94385
94745
|
this.DataStatus.LatestDay=true;
|
|
94386
94746
|
|
|
94387
94747
|
if (this.DayCount>1) //多日走势图
|
|
@@ -125773,13 +126133,16 @@ function ScriptIndex(name,script,args,option)
|
|
|
125773
126133
|
chart.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;
|
|
125774
126134
|
chart.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;
|
|
125775
126135
|
chart.Identify=this.Guid;
|
|
126136
|
+
chart.Data=hqChart.GetKData(); //绑定K线
|
|
125776
126137
|
if (varItem.Color) chart.Color=this.GetColor(varItem.Color);
|
|
125777
126138
|
else chart.Color=this.GetDefaultColor(id);
|
|
125778
|
-
chart.
|
|
126139
|
+
chart.AryTitle=varItem.Draw.DrawData.AryTitle;
|
|
126140
|
+
chart.BuildCacheData();
|
|
125779
126141
|
|
|
125780
126142
|
var titleIndex=windowIndex+1;
|
|
125781
126143
|
var titleData=new DynamicTitleData(chart.Data,varItem.Name,chart.Color);
|
|
125782
126144
|
titleData.DataType="ChartIndexTitle";
|
|
126145
|
+
titleData.Chart=chart;
|
|
125783
126146
|
hqChart.TitlePaint[titleIndex].Data[id]=titleData;
|
|
125784
126147
|
|
|
125785
126148
|
this.SetChartIndexName(chart);
|
|
@@ -127597,6 +127960,9 @@ function ScriptIndex(name,script,args,option)
|
|
|
127597
127960
|
case "DRAWSVG":
|
|
127598
127961
|
this.CreateChartDrawSVG(hqChart,windowIndex,item,i);
|
|
127599
127962
|
break;
|
|
127963
|
+
case "DRAWTITLE":
|
|
127964
|
+
this.CreateTitle(hqChart,windowIndex,item,i);
|
|
127965
|
+
break;
|
|
127600
127966
|
case "MULTI_HTMLDOM":
|
|
127601
127967
|
this.CreateMulitHtmlDom(hqChart,windowIndex,item,i);
|
|
127602
127968
|
break;
|
|
@@ -127690,11 +128056,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
127690
128056
|
{
|
|
127691
128057
|
this.CreateArea(hqChart,windowIndex,item,i);
|
|
127692
128058
|
}
|
|
127693
|
-
|
|
127694
|
-
{
|
|
127695
|
-
this.CreateTitle(hqChart,windowIndex,item,i);
|
|
127696
|
-
}
|
|
127697
|
-
|
|
128059
|
+
|
|
127698
128060
|
var titlePaint=hqChart.TitlePaint[windowIndex+1];
|
|
127699
128061
|
if (titlePaint && titlePaint.Data && i<titlePaint.Data.length) //设置标题数值 小数位数和格式
|
|
127700
128062
|
{
|
|
@@ -127971,6 +128333,9 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
127971
128333
|
case "DRAWSVG":
|
|
127972
128334
|
this.CreateChartDrawSVG(hqChart,windowIndex,item,i);
|
|
127973
128335
|
break;
|
|
128336
|
+
case "DRAWTITLE":
|
|
128337
|
+
this.CreateTitle(hqChart,windowIndex,item,i);
|
|
128338
|
+
break;
|
|
127974
128339
|
case "MULTI_HTMLDOM":
|
|
127975
128340
|
this.CreateMulitHtmlDom(hqChart,windowIndex,item,i);
|
|
127976
128341
|
break;
|
|
@@ -128044,11 +128409,6 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
128044
128409
|
{
|
|
128045
128410
|
this.CreateLine(hqChart,windowIndex,item,i, item.Type);
|
|
128046
128411
|
}
|
|
128047
|
-
else if (item.Type==10)
|
|
128048
|
-
{
|
|
128049
|
-
this.CreateTitle(hqChart,windowIndex,item,i);
|
|
128050
|
-
}
|
|
128051
|
-
|
|
128052
128412
|
|
|
128053
128413
|
|
|
128054
128414
|
var titleData=titleInfo.Data[i];
|
|
@@ -128633,22 +128993,25 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
128633
128993
|
{
|
|
128634
128994
|
var overlayIndex=this.OverlayIndex;
|
|
128635
128995
|
var frame=overlayIndex.Frame;
|
|
128636
|
-
|
|
128996
|
+
var chart=new ChartIndexTitle();
|
|
128637
128997
|
chart.Canvas=hqChart.Canvas;
|
|
128638
128998
|
|
|
128639
128999
|
chart.Name=varItem.Name;
|
|
128640
129000
|
chart.ChartBorder=frame.Frame.ChartBorder;
|
|
128641
129001
|
chart.ChartFrame=frame.Frame;
|
|
128642
129002
|
chart.Identify=overlayIndex.Identify;
|
|
128643
|
-
|
|
129003
|
+
chart.Data=hqChart.GetKData(); //绑定K线
|
|
129004
|
+
|
|
128644
129005
|
if (varItem.Color) chart.Color=this.GetColor(varItem.Color);
|
|
128645
129006
|
else chart.Color=this.GetDefaultColor(id);
|
|
128646
|
-
chart.
|
|
129007
|
+
chart.AryTitle=varItem.Draw.DrawData.AryTitle;
|
|
129008
|
+
chart.BuildCacheData();
|
|
128647
129009
|
|
|
128648
129010
|
var titleIndex=windowIndex+1;
|
|
128649
129011
|
var titlePaint=hqChart.TitlePaint[titleIndex];
|
|
128650
129012
|
var titleData=new DynamicTitleData(chart.Data,chart.Name,chart.Color);
|
|
128651
129013
|
titleData.DataType="ChartIndexTitle";
|
|
129014
|
+
titleData.Chart=chart;
|
|
128652
129015
|
titlePaint.OverlayIndex.get(overlayIndex.Identify).Data[id]=titleData;
|
|
128653
129016
|
|
|
128654
129017
|
this.SetChartIndexName(chart);
|
|
@@ -130264,6 +130627,18 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
130264
130627
|
|
|
130265
130628
|
result.push(outVarItem);
|
|
130266
130629
|
}
|
|
130630
|
+
else if (draw.DrawType=="DRAWTITLE")
|
|
130631
|
+
{
|
|
130632
|
+
drawItem.Name=draw.Name;
|
|
130633
|
+
drawItem.Type=draw.Type;
|
|
130634
|
+
|
|
130635
|
+
drawItem.DrawType=draw.DrawType;
|
|
130636
|
+
drawItem.DrawData=draw.DrawData;
|
|
130637
|
+
|
|
130638
|
+
outVarItem.Draw=drawItem;
|
|
130639
|
+
|
|
130640
|
+
result.push(outVarItem);
|
|
130641
|
+
}
|
|
130267
130642
|
else if (draw.DrawType=="MULTI_HTMLDOM") //外部自己创建dom
|
|
130268
130643
|
{
|
|
130269
130644
|
drawItem.Text=draw.Text;
|
|
@@ -130822,6 +131197,18 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
130822
131197
|
|
|
130823
131198
|
result.push(outVarItem);
|
|
130824
131199
|
}
|
|
131200
|
+
else if (draw.DrawType=="DRAWTITLE")
|
|
131201
|
+
{
|
|
131202
|
+
drawItem.Name=draw.Name;
|
|
131203
|
+
drawItem.Type=draw.Type;
|
|
131204
|
+
|
|
131205
|
+
drawItem.DrawType=draw.DrawType;
|
|
131206
|
+
drawItem.DrawData=draw.DrawData;
|
|
131207
|
+
|
|
131208
|
+
outVarItem.Draw=drawItem;
|
|
131209
|
+
|
|
131210
|
+
result.push(outVarItem);
|
|
131211
|
+
}
|
|
130825
131212
|
else
|
|
130826
131213
|
{
|
|
130827
131214
|
var find=g_ScriptIndexChartFactory.Get(draw.DrawType); //外部挂接
|
|
@@ -131612,6 +131999,14 @@ function GetBlackStyle()
|
|
|
131612
131999
|
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
131613
132000
|
Day: { Color:"rgb(153,153,153)", BGColor:"rgb(51,51,51)", BorderColor:"rgb(51,51,51)", Margin:{ Left:5, Top:2, Bottom:2, Right:5 } },
|
|
131614
132001
|
Night: { Color:"rgb(153,153,153)", BGColor:"rgb(51,51,51)", BorderColor:"rgb(51,51,51)", Margin:{ Left:5, Top:2, Bottom:2, Right:5 } },
|
|
132002
|
+
},
|
|
132003
|
+
|
|
132004
|
+
BuySellBar:
|
|
132005
|
+
{
|
|
132006
|
+
BuyColor:"rgb(102, 33, 33)",
|
|
132007
|
+
SellColor:"rgb(20, 63, 31)",
|
|
132008
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
132009
|
+
TextColor:"rgb(220,220,220)",
|
|
131615
132010
|
}
|
|
131616
132011
|
},
|
|
131617
132012
|
|
|
@@ -132226,6 +132621,7 @@ function GetBlackStyle()
|
|
|
132226
132621
|
{
|
|
132227
132622
|
BorderColor:'rgb(38,38,41)', //边框线
|
|
132228
132623
|
SelectedColor:"rgb(49,48,56)", //选中行
|
|
132624
|
+
SelectedLine:{ Color:"rgb(250,250,250)" },
|
|
132229
132625
|
Header:
|
|
132230
132626
|
{
|
|
132231
132627
|
Color:"RGB(245,245,245)",
|
|
@@ -134352,6 +134748,7 @@ function JSReportChart(divElement)
|
|
|
134352
134748
|
{
|
|
134353
134749
|
if (IFrameSplitOperator.IsNumber(option.TextOverflowStyle)) reportChart.TextOverflowStyle=option.TextOverflowStyle;
|
|
134354
134750
|
if (IFrameSplitOperator.IsNumber(option.MultiSelectModel)) reportChart.MultiSelectModel=option.MultiSelectModel;
|
|
134751
|
+
if (IFrameSplitOperator.IsNumber(option.SelectedStyle)) reportChart.SelectedStyle=option.SelectedStyle;
|
|
134355
134752
|
}
|
|
134356
134753
|
|
|
134357
134754
|
this.SetChartBorder(chart, option);
|
|
@@ -138862,6 +139259,7 @@ function ChartReport()
|
|
|
138862
139259
|
this.SelectedModel=0; //选中模式 0=SelectedRow表示当前屏索引
|
|
138863
139260
|
this.SelectedRow=-1; //选中行ID
|
|
138864
139261
|
this.SelectedFixedRow=-1; //选中固定行ID
|
|
139262
|
+
this.SelectedStyle=1; //选中行样式 1=整行填充 2=底部绘制直线
|
|
138865
139263
|
this.IsDrawBorder=1; //是否绘制单元格边框
|
|
138866
139264
|
this.HeaderRowCount=1; //表头行数
|
|
138867
139265
|
|
|
@@ -138886,6 +139284,7 @@ function ChartReport()
|
|
|
138886
139284
|
|
|
138887
139285
|
this.BorderColor=g_JSChartResource.Report.BorderColor; //边框线
|
|
138888
139286
|
this.SelectedColor=g_JSChartResource.Report.SelectedColor; //选中行
|
|
139287
|
+
this.SelectedLineConfig={ Color:g_JSChartResource.Report.SelectedLine.Color, Width:g_JSChartResource.Report.SelectedLine.Width }; //选中行底部线段
|
|
138889
139288
|
|
|
138890
139289
|
//表头配置
|
|
138891
139290
|
this.HeaderFontConfig={ Size:g_JSChartResource.Report.Header.Font.Size, Name:g_JSChartResource.Report.Header.Font.Name };
|
|
@@ -139006,6 +139405,8 @@ function ChartReport()
|
|
|
139006
139405
|
this.IsShowAllColumn=false; //是否已显示所有列
|
|
139007
139406
|
this.DevicePixelRatio=GetDevicePixelRatio(); //分辨率
|
|
139008
139407
|
|
|
139408
|
+
this.AryFullSelectedRow=[]; //选中行
|
|
139409
|
+
|
|
139009
139410
|
//{
|
|
139010
139411
|
// Type:列id, Title:标题, TextAlign:文字对齐方式, MaxText:文字最大宽度 , TextColor:文字颜色, Sort:0=不支持排序 1=本地排序 0=远程排序,
|
|
139011
139412
|
// Icon:{ Family:"iconfont", Size:12, Symbol:"", Margin: { Left:, Bottom }}
|
|
@@ -139150,8 +139551,11 @@ function ChartReport()
|
|
|
139150
139551
|
if (IFrameSplitOperator.IsNumber(item.Sort)) colItem.Sort=item.Sort;
|
|
139151
139552
|
if (IFrameSplitOperator.IsNumber(item.FixedWidth)) colItem.FixedWidth=item.FixedWidth;
|
|
139152
139553
|
if (IFrameSplitOperator.IsBool(item.EnableDragWidth)) colItem.EnableDragWidth=item.EnableDragWidth;
|
|
139554
|
+
|
|
139555
|
+
colItem.IsDrawCallback=false;
|
|
139153
139556
|
if (IFrameSplitOperator.IsBool(item.IsDrawCallback)) colItem.IsDrawCallback=item.IsDrawCallback;
|
|
139154
|
-
|
|
139557
|
+
|
|
139558
|
+
if (IFrameSplitOperator.IsBool(item.EnableFormatDrawInfoEvent)) colItem.EnableFormatDrawInfoEvent=item.EnableFormatDrawInfoEvent;
|
|
139155
139559
|
|
|
139156
139560
|
if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) colItem.FloatPrecision=item.FloatPrecision; //小数位数
|
|
139157
139561
|
if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
|
|
@@ -139493,6 +139897,7 @@ function ChartReport()
|
|
|
139493
139897
|
this.ShowSymbol=[];
|
|
139494
139898
|
this.TooltipRect=[];
|
|
139495
139899
|
this.ButtonRect=[];
|
|
139900
|
+
this.AryFullSelectedRow=[];
|
|
139496
139901
|
this.DevicePixelRatio=GetDevicePixelRatio()
|
|
139497
139902
|
this.LastMouseStatus=lastMouseStatus;
|
|
139498
139903
|
|
|
@@ -139517,6 +139922,7 @@ function ChartReport()
|
|
|
139517
139922
|
|
|
139518
139923
|
this.ClipClient();
|
|
139519
139924
|
this.DrawBorder();
|
|
139925
|
+
this.DrawSelectedRow();
|
|
139520
139926
|
this.Canvas.restore();
|
|
139521
139927
|
|
|
139522
139928
|
this.DrawDragRow();
|
|
@@ -139531,6 +139937,7 @@ function ChartReport()
|
|
|
139531
139937
|
|
|
139532
139938
|
this.LastMouseStatus=null;
|
|
139533
139939
|
this.SizeChange=false;
|
|
139940
|
+
this.AryFullSelectedRow=[];
|
|
139534
139941
|
}
|
|
139535
139942
|
|
|
139536
139943
|
this.DrawDragHeaderBG=function()
|
|
@@ -140073,6 +140480,8 @@ function ChartReport()
|
|
|
140073
140480
|
var left=this.RectClient.Left;
|
|
140074
140481
|
var rowWidth=this.RectClient.Right-this.RectClient.Left;
|
|
140075
140482
|
|
|
140483
|
+
var arySelectedRow=[];
|
|
140484
|
+
|
|
140076
140485
|
//固定行
|
|
140077
140486
|
var textTop=top;
|
|
140078
140487
|
this.Canvas.font=this.ItemFixedFont;
|
|
@@ -140164,8 +140573,16 @@ function ChartReport()
|
|
|
140164
140573
|
|
|
140165
140574
|
if (bFillRow)
|
|
140166
140575
|
{
|
|
140167
|
-
|
|
140168
|
-
|
|
140576
|
+
var rtRowBG={ Left:left, Top:textTop, Width:rowWidth, Height:this.RowHeight };
|
|
140577
|
+
rtRowBG.Right=rtRowBG.Left+rtRowBG.Width;
|
|
140578
|
+
rtRowBG.Bottom=rtRowBG.Top+rtRowBG.Height;
|
|
140579
|
+
this.AryFullSelectedRow.push(rtRowBG);
|
|
140580
|
+
|
|
140581
|
+
if (this.SelectedStyle===1)
|
|
140582
|
+
{
|
|
140583
|
+
this.Canvas.fillStyle=this.SelectedColor;
|
|
140584
|
+
this.Canvas.fillRect(rtRowBG.Left,rtRowBG.Top,rtRowBG.Width,rtRowBG.Height);
|
|
140585
|
+
}
|
|
140169
140586
|
}
|
|
140170
140587
|
|
|
140171
140588
|
this.DrawRow(symbol, textTop, i);
|
|
@@ -140174,6 +140591,22 @@ function ChartReport()
|
|
|
140174
140591
|
|
|
140175
140592
|
textTop+=this.RowHeight;
|
|
140176
140593
|
}
|
|
140594
|
+
|
|
140595
|
+
|
|
140596
|
+
}
|
|
140597
|
+
|
|
140598
|
+
this.DrawSelectedRow=function()
|
|
140599
|
+
{
|
|
140600
|
+
if (this.SelectedStyle===2 && IFrameSplitOperator.IsNonEmptyArray(this.AryFullSelectedRow))
|
|
140601
|
+
{
|
|
140602
|
+
this.Canvas.fillStyle=this.SelectedLineConfig.Color;
|
|
140603
|
+
var lineWidth=this.SelectedLineConfig.Width;
|
|
140604
|
+
for(var i=0;i<this.AryFullSelectedRow.length;++i)
|
|
140605
|
+
{
|
|
140606
|
+
var rtBG=this.AryFullSelectedRow[i];
|
|
140607
|
+
this.Canvas.fillRect(rtBG.Left,rtBG.Bottom-lineWidth,rtBG.Width,lineWidth);
|
|
140608
|
+
}
|
|
140609
|
+
}
|
|
140177
140610
|
}
|
|
140178
140611
|
|
|
140179
140612
|
this.GetSelectedSymbol=function()
|
|
@@ -140693,10 +141126,12 @@ function ChartReport()
|
|
|
140693
141126
|
else if (this.IsReserveNumber(column.Type))
|
|
140694
141127
|
{
|
|
140695
141128
|
this.FormatReserveNumber(column, stock, drawInfo);
|
|
141129
|
+
this.FormatDrawInfoEvent(stock, data, column, drawInfo);
|
|
140696
141130
|
}
|
|
140697
141131
|
else if (this.IsReserveString(column.Type))
|
|
140698
141132
|
{
|
|
140699
141133
|
this.FormatReserveString(column, stock, drawInfo);
|
|
141134
|
+
this.FormatDrawInfoEvent(stock, data, column, drawInfo);
|
|
140700
141135
|
}
|
|
140701
141136
|
else if (this.IsReserveProgressBarColumn(column.Type))
|
|
140702
141137
|
{
|
|
@@ -140801,8 +141236,22 @@ function ChartReport()
|
|
|
140801
141236
|
var buttonData={ Stock:stock, Index:index, ColumnIndex:columnIndex, Column:column, Rect:drawInfo.Botton.Rect, Type:drawInfo.Botton.Type, Data:drawInfo.Data };
|
|
140802
141237
|
this.ButtonRect.push(buttonData);
|
|
140803
141238
|
}
|
|
141239
|
+
}
|
|
140804
141240
|
|
|
140805
|
-
|
|
141241
|
+
this.FormatDrawInfoEvent=function(stock, data, column, drawInfo)
|
|
141242
|
+
{
|
|
141243
|
+
if (!column.EnableFormatDrawInfoEvent) return;
|
|
141244
|
+
|
|
141245
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_FORMAT_DRAW_INFO);
|
|
141246
|
+
if (!event || !event.Callback) return;
|
|
141247
|
+
|
|
141248
|
+
var sendData=
|
|
141249
|
+
{
|
|
141250
|
+
Stock:stock, Column:column, Data:data,
|
|
141251
|
+
DrawInfo:drawInfo
|
|
141252
|
+
};
|
|
141253
|
+
|
|
141254
|
+
event.Callback(event, sendData, this);
|
|
140806
141255
|
}
|
|
140807
141256
|
|
|
140808
141257
|
this.IsReserveProgressBarColumn=function(value)
|
|
@@ -141462,9 +141911,13 @@ function ChartReport()
|
|
|
141462
141911
|
|
|
141463
141912
|
this.DrawItemBG=function(drawInfo)
|
|
141464
141913
|
{
|
|
141465
|
-
if (drawInfo.BGColor
|
|
141914
|
+
if (!drawInfo.BGColor) return;
|
|
141915
|
+
|
|
141916
|
+
var rtItem=drawInfo.Rect; //绘制背景色
|
|
141917
|
+
if (drawInfo.RectBG) rtItem=drawInfo.RectBG;
|
|
141918
|
+
|
|
141919
|
+
if (rtItem)
|
|
141466
141920
|
{
|
|
141467
|
-
var rtItem=drawInfo.Rect;
|
|
141468
141921
|
this.Canvas.fillStyle=drawInfo.BGColor;
|
|
141469
141922
|
this.Canvas.fillRect(rtItem.Left,rtItem.Top,rtItem.Width,rtItem.Height); //画一个背景色, 不然是一个黑的背景
|
|
141470
141923
|
}
|
|
@@ -157940,7 +158393,7 @@ function HQChartScriptWorker()
|
|
|
157940
158393
|
|
|
157941
158394
|
|
|
157942
158395
|
|
|
157943
|
-
var HQCHART_VERSION="1.1.
|
|
158396
|
+
var HQCHART_VERSION="1.1.14687";
|
|
157944
158397
|
|
|
157945
158398
|
function PrintHQChartVersion()
|
|
157946
158399
|
{
|