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
|
@@ -5124,6 +5124,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5124
5124
|
chart.EnableBorderDrag=option.EnableBorderDrag;
|
|
5125
5125
|
}
|
|
5126
5126
|
|
|
5127
|
+
if (IFrameSplitOperator.IsBool(option.EnableBuySellBar))
|
|
5128
|
+
{
|
|
5129
|
+
var barChart=chart.GetChartMinuteBuySellBar();
|
|
5130
|
+
if (barChart) barChart.IsShow=option.EnableBuySellBar;
|
|
5131
|
+
}
|
|
5132
|
+
|
|
5127
5133
|
this.AdjustChartBorder(chart);
|
|
5128
5134
|
|
|
5129
5135
|
if (option.Frame)
|
|
@@ -7023,6 +7029,7 @@ var JSCHART_MENU_ID=
|
|
|
7023
7029
|
CMD_FULLSCREEN_SUMMARY_ID:56, //当前屏区间统计
|
|
7024
7030
|
CMD_CORSS_DBCLICK_ID:57, //双击显示隐藏十字光标
|
|
7025
7031
|
CMD_ENABLE_KLINE_DAY_SUMMARY_ID:58, //K线底部显示走完剩余时间
|
|
7032
|
+
CMD_SHOW_BUYSELL_BAR_ID:59, //盘口分析(右侧显示买卖盘柱子) 分时图
|
|
7026
7033
|
|
|
7027
7034
|
|
|
7028
7035
|
|
|
@@ -7265,6 +7272,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7265
7272
|
this.CustomChartDrag; //自定义图形的拖拽操作 { Type:, Data: }
|
|
7266
7273
|
|
|
7267
7274
|
this.StockCache={ Data:null }; //扩展数据缓存数据
|
|
7275
|
+
this.BuySellData={ ArySell:null, AryBuy:null }; //10档买卖盘
|
|
7268
7276
|
|
|
7269
7277
|
this.JSPopMenu; //内置菜单
|
|
7270
7278
|
this.IsShowRightMenu=true; //显示右键菜单
|
|
@@ -7316,6 +7324,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7316
7324
|
this.ClearStockCache=function()
|
|
7317
7325
|
{
|
|
7318
7326
|
this.StockCache.Data=null;
|
|
7327
|
+
this.BuySellData.AryBuy=null;
|
|
7328
|
+
this.BuySellData.ArySell=null;
|
|
7319
7329
|
}
|
|
7320
7330
|
|
|
7321
7331
|
this.InitalPopMenu=function() //初始化弹出窗口
|
|
@@ -15003,6 +15013,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
15003
15013
|
this.Draw();
|
|
15004
15014
|
}
|
|
15005
15015
|
break;
|
|
15016
|
+
case JSCHART_MENU_ID.CMD_SHOW_BUYSELL_BAR_ID:
|
|
15017
|
+
if (IFrameSplitOperator.IsBool(srcParam))
|
|
15018
|
+
{
|
|
15019
|
+
var chart=this.GetChartMinuteBuySellBar();
|
|
15020
|
+
chart.IsShow=srcParam;
|
|
15021
|
+
this.RequestData({ ClearYCoordinateMaxMin:true });
|
|
15022
|
+
this.Draw();
|
|
15023
|
+
}
|
|
15024
|
+
break;
|
|
15006
15025
|
}
|
|
15007
15026
|
}
|
|
15008
15027
|
|
|
@@ -29653,7 +29672,8 @@ function ChartPaintFactory()
|
|
|
29653
29672
|
[
|
|
29654
29673
|
["ChartKLine", { Create:function(option) { return new ChartKLine(); } }], //K线图
|
|
29655
29674
|
["ChartMinuteVolumBar",{ Create:function(option) { return new ChartMinuteVolumBar(); } }], //分时成交量柱子
|
|
29656
|
-
["ChartMinutePriceLine",{ Create:function(option) { return new ChartMinutePriceLine();} }]
|
|
29675
|
+
["ChartMinutePriceLine",{ Create:function(option) { return new ChartMinutePriceLine();} }],
|
|
29676
|
+
["ChartMinuteBuySellBar", { Create:function(option){ return new ChartMinuteBuySellBar(); }}],
|
|
29657
29677
|
]);
|
|
29658
29678
|
|
|
29659
29679
|
this.Create=function(name, option)
|
|
@@ -39072,6 +39092,32 @@ function ChartIndexTitle()
|
|
|
39072
39092
|
delete this.newMethod;
|
|
39073
39093
|
|
|
39074
39094
|
this.ClassName='ChartIndexTitle'; //类名
|
|
39095
|
+
this.AryTitle=[]; //{ Date, Time, AryText:[ ] }
|
|
39096
|
+
this.MapCache=null; //key=date/date-time value={ Data:[] }
|
|
39097
|
+
|
|
39098
|
+
this.BuildCacheData=function()
|
|
39099
|
+
{
|
|
39100
|
+
var mapData=new Map();
|
|
39101
|
+
this.MapCache=mapData;
|
|
39102
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.AryTitle)) return;
|
|
39103
|
+
|
|
39104
|
+
for(var i=0;i<this.AryTitle.length;++i)
|
|
39105
|
+
{
|
|
39106
|
+
var item=this.AryTitle[i];
|
|
39107
|
+
var key=this.BuildKey(item);
|
|
39108
|
+
|
|
39109
|
+
mapData.set(key,{ Data:item });
|
|
39110
|
+
}
|
|
39111
|
+
}
|
|
39112
|
+
|
|
39113
|
+
this.GetItem=function(kItem)
|
|
39114
|
+
{
|
|
39115
|
+
if (!this.MapCache || this.MapCache.size<=0) return null;
|
|
39116
|
+
var key=this.BuildKey(kItem);
|
|
39117
|
+
if (!this.MapCache.has(key)) return null;
|
|
39118
|
+
|
|
39119
|
+
return this.MapCache.get(key);
|
|
39120
|
+
}
|
|
39075
39121
|
|
|
39076
39122
|
this.Draw=function()
|
|
39077
39123
|
{
|
|
@@ -44148,6 +44194,216 @@ function ChartMinutePositionLine()
|
|
|
44148
44194
|
}
|
|
44149
44195
|
}
|
|
44150
44196
|
|
|
44197
|
+
//分时图 右侧10档买卖柱子
|
|
44198
|
+
function ChartMinuteBuySellBar()
|
|
44199
|
+
{
|
|
44200
|
+
this.newMethod=IChartPainting; //派生
|
|
44201
|
+
this.newMethod();
|
|
44202
|
+
delete this.newMethod;
|
|
44203
|
+
|
|
44204
|
+
this.BuyColor=g_JSChartResource.Minute.BuySellBar.BuyColor;
|
|
44205
|
+
this.SellColor=g_JSChartResource.Minute.BuySellBar.SellColor;
|
|
44206
|
+
this.BarWidth=g_JSChartResource.Minute.BuySellBar.BarWidth;
|
|
44207
|
+
this.MaxBarWidth=g_JSChartResource.Minute.BuySellBar.MaxBarWidth;
|
|
44208
|
+
this.YOffset=g_JSChartResource.Minute.BuySellBar.YOffset;
|
|
44209
|
+
this.Font=g_JSChartResource.Minute.BuySellBar.Font;
|
|
44210
|
+
this.TextColor=g_JSChartResource.Minute.BuySellBar.TextColor;
|
|
44211
|
+
|
|
44212
|
+
this.IsDrawFirst=true;
|
|
44213
|
+
this.IsShow=false;
|
|
44214
|
+
|
|
44215
|
+
this.BuySellData=null; //{ AryBuy:[{ Price:10.5, Vol:300}], ArySell:[{ Price:10.5, Vol:300}] }
|
|
44216
|
+
|
|
44217
|
+
this.ReloadResource=function(resource)
|
|
44218
|
+
{
|
|
44219
|
+
this.BuyColor=g_JSChartResource.Minute.BuySellBar.BuyColor;
|
|
44220
|
+
this.SellColor=g_JSChartResource.Minute.BuySellBar.SellColor;
|
|
44221
|
+
this.BarWidth=g_JSChartResource.Minute.BuySellBar.BarWidth;
|
|
44222
|
+
this.MaxBarWidth=g_JSChartResource.Minute.BuySellBar.MaxBarWidth;
|
|
44223
|
+
this.YOffset=g_JSChartResource.Minute.BuySellBar.YOffset;
|
|
44224
|
+
this.Font=g_JSChartResource.Minute.BuySellBar.Font;
|
|
44225
|
+
this.TextColor=g_JSChartResource.Minute.BuySellBar.TextColor;
|
|
44226
|
+
}
|
|
44227
|
+
|
|
44228
|
+
this.Draw=function()
|
|
44229
|
+
{
|
|
44230
|
+
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
44231
|
+
if (this.IsShowIndexTitleOnly()) return;
|
|
44232
|
+
if (this.IsHideScriptIndex()) return;
|
|
44233
|
+
if (!this.BuySellData) return;
|
|
44234
|
+
|
|
44235
|
+
var volRange=this.GetVolRange();
|
|
44236
|
+
if (!volRange) return;
|
|
44237
|
+
|
|
44238
|
+
var bHScreen=(this.ChartFrame.IsHScreen===true);
|
|
44239
|
+
var xPointCount=this.ChartFrame.XPointCount;
|
|
44240
|
+
|
|
44241
|
+
var xStart=this.ChartFrame.GetXFromIndex(xPointCount-this.MaxBarWidth);
|
|
44242
|
+
var xEnd=this.ChartFrame.GetXFromIndex(xPointCount-1);
|
|
44243
|
+
|
|
44244
|
+
function _Temp_GetXFromData(value)
|
|
44245
|
+
{
|
|
44246
|
+
var maxWidth=xEnd-xStart;
|
|
44247
|
+
var width = maxWidth * (value - volRange.Min) / (volRange.Max - volRange.Min);
|
|
44248
|
+
return xEnd-width;
|
|
44249
|
+
}
|
|
44250
|
+
|
|
44251
|
+
this.Canvas.save();
|
|
44252
|
+
this.ClipClient(bHScreen);
|
|
44253
|
+
|
|
44254
|
+
var aryBuy=this.BuySellData.AryBuy;
|
|
44255
|
+
if (IFrameSplitOperator.IsNonEmptyArray(aryBuy))
|
|
44256
|
+
{
|
|
44257
|
+
this.Canvas.beginPath();
|
|
44258
|
+
var lineCount=0;
|
|
44259
|
+
for(var i=0;i<aryBuy.length;++i)
|
|
44260
|
+
{
|
|
44261
|
+
var item=aryBuy[i];
|
|
44262
|
+
if (!item || !IFrameSplitOperator.IsNumber(item.Vol) || !IFrameSplitOperator.IsNumber(item.Price)) continue;
|
|
44263
|
+
|
|
44264
|
+
var y=this.GetYFromData(item.Price,false)
|
|
44265
|
+
var x=_Temp_GetXFromData(item.Vol);
|
|
44266
|
+
|
|
44267
|
+
if (bHScreen)
|
|
44268
|
+
{
|
|
44269
|
+
y-=-this.YOffset;
|
|
44270
|
+
this.Canvas.moveTo(y,x);
|
|
44271
|
+
this.Canvas.lineTo(y,xEnd);
|
|
44272
|
+
}
|
|
44273
|
+
else
|
|
44274
|
+
{
|
|
44275
|
+
y-=-this.YOffset;
|
|
44276
|
+
this.Canvas.moveTo(x,y);
|
|
44277
|
+
this.Canvas.lineTo(xEnd,y);
|
|
44278
|
+
}
|
|
44279
|
+
|
|
44280
|
+
++lineCount;
|
|
44281
|
+
}
|
|
44282
|
+
|
|
44283
|
+
if (lineCount>0)
|
|
44284
|
+
{
|
|
44285
|
+
this.Canvas.strokeStyle=this.BuyColor;
|
|
44286
|
+
if (IFrameSplitOperator.IsPlusNumber(this.BarWidth)) this.Canvas.lineWidth=this.BarWidth;
|
|
44287
|
+
this.Canvas.stroke();
|
|
44288
|
+
}
|
|
44289
|
+
}
|
|
44290
|
+
|
|
44291
|
+
var arySell=this.BuySellData.ArySell;
|
|
44292
|
+
if (IFrameSplitOperator.IsNonEmptyArray(arySell))
|
|
44293
|
+
{
|
|
44294
|
+
this.Canvas.beginPath();
|
|
44295
|
+
var lineCount=0;
|
|
44296
|
+
for(var i=0;i<arySell.length;++i)
|
|
44297
|
+
{
|
|
44298
|
+
var item=arySell[i];
|
|
44299
|
+
if (!item || !IFrameSplitOperator.IsNumber(item.Vol) || !IFrameSplitOperator.IsNumber(item.Price)) continue;
|
|
44300
|
+
|
|
44301
|
+
var y=this.GetYFromData(item.Price,false);
|
|
44302
|
+
var x=_Temp_GetXFromData(item.Vol);
|
|
44303
|
+
|
|
44304
|
+
if (bHScreen)
|
|
44305
|
+
{
|
|
44306
|
+
y-=-this.YOffset;
|
|
44307
|
+
this.Canvas.moveTo(y,x);
|
|
44308
|
+
this.Canvas.lineTo(y,xEnd);
|
|
44309
|
+
}
|
|
44310
|
+
else
|
|
44311
|
+
{
|
|
44312
|
+
y-=-this.YOffset;
|
|
44313
|
+
this.Canvas.moveTo(x,y);
|
|
44314
|
+
this.Canvas.lineTo(xEnd,y);
|
|
44315
|
+
}
|
|
44316
|
+
|
|
44317
|
+
++lineCount;
|
|
44318
|
+
}
|
|
44319
|
+
|
|
44320
|
+
if (lineCount>0)
|
|
44321
|
+
{
|
|
44322
|
+
this.Canvas.strokeStyle=this.SellColor;
|
|
44323
|
+
if (IFrameSplitOperator.IsPlusNumber(this.BarWidth)) this.Canvas.lineWidth=this.BarWidth;
|
|
44324
|
+
this.Canvas.stroke();
|
|
44325
|
+
}
|
|
44326
|
+
}
|
|
44327
|
+
|
|
44328
|
+
|
|
44329
|
+
this.DrawMaxVolText(volRange.Max, xStart);
|
|
44330
|
+
|
|
44331
|
+
this.Canvas.restore();
|
|
44332
|
+
}
|
|
44333
|
+
|
|
44334
|
+
this.DrawMaxVolText=function(value, x)
|
|
44335
|
+
{
|
|
44336
|
+
if (!IFrameSplitOperator.IsNumber(value)) return;
|
|
44337
|
+
|
|
44338
|
+
var border=this.ChartFrame.GetBorder();
|
|
44339
|
+
var text=value.toFixed(0);
|
|
44340
|
+
this.Canvas.textAlign = 'left';
|
|
44341
|
+
this.Canvas.textBaseline = 'bottom';
|
|
44342
|
+
this.Canvas.font=this.Font;
|
|
44343
|
+
this.Canvas.fillStyle=this.TextColor;
|
|
44344
|
+
|
|
44345
|
+
if (this.ChartFrame.IsHScreen===true)
|
|
44346
|
+
{
|
|
44347
|
+
var yBottom=border.LeftEx+1;
|
|
44348
|
+
this.Canvas.save();
|
|
44349
|
+
this.Canvas.translate(yBottom,x);
|
|
44350
|
+
this.Canvas.rotate(90 * Math.PI / 180);
|
|
44351
|
+
this.Canvas.fillText(text,0,0);
|
|
44352
|
+
this.Canvas.restore();
|
|
44353
|
+
}
|
|
44354
|
+
else
|
|
44355
|
+
{
|
|
44356
|
+
var yBottom=border.Bottom-1;
|
|
44357
|
+
this.Canvas.fillText(text,x,yBottom);
|
|
44358
|
+
}
|
|
44359
|
+
}
|
|
44360
|
+
|
|
44361
|
+
this.GetVolRange=function()
|
|
44362
|
+
{
|
|
44363
|
+
if (!this.BuySellData) return null;
|
|
44364
|
+
|
|
44365
|
+
var range={ Min:0, Max:null };
|
|
44366
|
+
var aryBuy=this.BuySellData.AryBuy;
|
|
44367
|
+
var arySell=this.BuySellData.ArySell;
|
|
44368
|
+
var count=0;
|
|
44369
|
+
|
|
44370
|
+
if (IFrameSplitOperator.IsNonEmptyArray(aryBuy))
|
|
44371
|
+
{
|
|
44372
|
+
for(var i=0;i<aryBuy.length;++i)
|
|
44373
|
+
{
|
|
44374
|
+
var item=aryBuy[i];
|
|
44375
|
+
if (!IFrameSplitOperator.IsNumber(item.Vol)) continue;
|
|
44376
|
+
|
|
44377
|
+
if (range.Min==null || range.Min>item.Vol) range.Min=item.Vol;
|
|
44378
|
+
if (range.Max==null || range.Max<item.Vol) range.Max=item.Vol;
|
|
44379
|
+
++count;
|
|
44380
|
+
}
|
|
44381
|
+
}
|
|
44382
|
+
|
|
44383
|
+
if (IFrameSplitOperator.IsNonEmptyArray(arySell))
|
|
44384
|
+
{
|
|
44385
|
+
for(var i=0;i<arySell.length;++i)
|
|
44386
|
+
{
|
|
44387
|
+
var item=arySell[i];
|
|
44388
|
+
if (!IFrameSplitOperator.IsNumber(item.Vol)) continue;
|
|
44389
|
+
|
|
44390
|
+
if (range.Min==null || range.Min>item.Vol) range.Min=item.Vol;
|
|
44391
|
+
if (range.Max==null || range.Max<item.Vol) range.Max=item.Vol;
|
|
44392
|
+
++count;
|
|
44393
|
+
}
|
|
44394
|
+
}
|
|
44395
|
+
|
|
44396
|
+
if (count<=0) return null;
|
|
44397
|
+
|
|
44398
|
+
return range;
|
|
44399
|
+
}
|
|
44400
|
+
|
|
44401
|
+
this.GetMaxMin=function()
|
|
44402
|
+
{
|
|
44403
|
+
return { Min:null, Max:null };
|
|
44404
|
+
}
|
|
44405
|
+
}
|
|
44406
|
+
|
|
44151
44407
|
//分钟信息地雷 支持横屏
|
|
44152
44408
|
function ChartMinuteInfo()
|
|
44153
44409
|
{
|
|
@@ -51387,6 +51643,7 @@ function MinuteLeftTooltipPaint()
|
|
|
51387
51643
|
this.Draw=function()
|
|
51388
51644
|
{
|
|
51389
51645
|
if (!this.IsEnableDraw()) return;
|
|
51646
|
+
if (this.ChartFrame && this.ChartFrame.IsHScreen===true) return; //不支持横屏
|
|
51390
51647
|
|
|
51391
51648
|
this.TitlePaint=this.HQChart.TitlePaint[0];
|
|
51392
51649
|
if (!this.TitlePaint) return;
|
|
@@ -59964,44 +60221,39 @@ function ChartCorssCursor()
|
|
|
59964
60221
|
var textSize={ Width:textWidth+4, Height:this.TextHeight, Text:[] };
|
|
59965
60222
|
var buttonData={Y:y, YValue:yValue, FrameID:yValueExtend.FrameID };
|
|
59966
60223
|
|
|
59967
|
-
|
|
60224
|
+
var margin=this.LeftConfig.Margin;
|
|
60225
|
+
var textOffset=this.LeftConfig.TextOffset;
|
|
60226
|
+
var rtBG=null;
|
|
60227
|
+
if (this.Frame.ChartBorder.Left>=30 && this.ShowTextMode.Left==1) //左边
|
|
59968
60228
|
{
|
|
59969
|
-
var margin
|
|
59970
|
-
|
|
59971
|
-
|
|
59972
|
-
|
|
59973
|
-
if (this.ShowTextMode.Left==1)
|
|
59974
|
-
{
|
|
59975
|
-
var rtBG={ Right:left, Width:textWidth+margin.Left+margin.Right, YCenter:y, Height:textHeight+margin.Top+margin.Bottom };
|
|
59976
|
-
rtBG.Left=rtBG.Right-rtBG.Width;
|
|
59977
|
-
rtBG.Top=rtBG.YCenter-rtBG.Height/2;
|
|
59978
|
-
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
60229
|
+
var rtBG={ Right:left, Width:textWidth+margin.Left+margin.Right, YCenter:y, Height:textHeight+margin.Top+margin.Bottom };
|
|
60230
|
+
rtBG.Left=rtBG.Right-rtBG.Width;
|
|
60231
|
+
rtBG.Top=rtBG.YCenter-rtBG.Height/2;
|
|
60232
|
+
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
59979
60233
|
|
|
59980
|
-
|
|
59981
|
-
{
|
|
59982
|
-
rtBG.Left=0;
|
|
59983
|
-
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
59984
|
-
}
|
|
59985
|
-
}
|
|
59986
|
-
else if (this.ShowTextMode.Left==2) //在框架内显示
|
|
60234
|
+
if (rtBG.Left<0)
|
|
59987
60235
|
{
|
|
59988
|
-
|
|
60236
|
+
rtBG.Left=0;
|
|
59989
60237
|
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
59990
|
-
rtBG.Top=rtBG.YCenter-rtBG.Height/2;
|
|
59991
|
-
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
59992
|
-
}
|
|
59993
|
-
|
|
59994
|
-
if (rtBG)
|
|
59995
|
-
{
|
|
59996
|
-
this.DrawTextBGRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
|
|
59997
|
-
this.Canvas.textAlign="left";
|
|
59998
|
-
this.Canvas.textBaseline="bottom";
|
|
59999
|
-
this.Canvas.fillStyle=this.TextColor;
|
|
60000
|
-
this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
|
|
60001
60238
|
}
|
|
60239
|
+
|
|
60240
|
+
}
|
|
60241
|
+
else if (this.ShowTextMode.Left==2) //在框架内显示
|
|
60242
|
+
{
|
|
60243
|
+
var rtBG={ Left:left, Width:textWidth+margin.Left+margin.Right, YCenter:y, Height:textHeight+margin.Top+margin.Bottom };
|
|
60244
|
+
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
60245
|
+
rtBG.Top=rtBG.YCenter-rtBG.Height/2;
|
|
60246
|
+
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
60002
60247
|
}
|
|
60003
60248
|
|
|
60004
|
-
|
|
60249
|
+
if (rtBG)
|
|
60250
|
+
{
|
|
60251
|
+
this.DrawTextBGRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
|
|
60252
|
+
this.Canvas.textAlign="left";
|
|
60253
|
+
this.Canvas.textBaseline="bottom";
|
|
60254
|
+
this.Canvas.fillStyle=this.TextColor;
|
|
60255
|
+
this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
|
|
60256
|
+
}
|
|
60005
60257
|
|
|
60006
60258
|
var complexText=
|
|
60007
60259
|
{
|
|
@@ -60191,7 +60443,7 @@ function ChartCorssCursor()
|
|
|
60191
60443
|
this.Canvas.textBaseline="bottom";
|
|
60192
60444
|
this.Canvas.fillStyle=this.TextColor;
|
|
60193
60445
|
this.Canvas.fillText(text,rtBG.Left+textOffset.X,rtBG.Bottom+textOffset.Y,textWidth);
|
|
60194
|
-
|
|
60446
|
+
}
|
|
60195
60447
|
}
|
|
60196
60448
|
|
|
60197
60449
|
//子坐标Y轴
|
|
@@ -64166,33 +64418,40 @@ function DynamicChartTitlePainting()
|
|
|
64166
64418
|
return aryText;
|
|
64167
64419
|
}
|
|
64168
64420
|
|
|
64169
|
-
this.FormatIndexTitle=function(
|
|
64421
|
+
this.FormatIndexTitle=function(kItem, dataInfo)
|
|
64170
64422
|
{
|
|
64171
|
-
|
|
64423
|
+
var result=null;
|
|
64424
|
+
var aryText=[];
|
|
64425
|
+
if (dataInfo.Name)
|
|
64426
|
+
{
|
|
64427
|
+
aryText.push({ Text:dataInfo.Name, Color:dataInfo.Color});
|
|
64428
|
+
result={ Text:null, ArrayText:aryText };
|
|
64429
|
+
}
|
|
64172
64430
|
|
|
64173
|
-
if (
|
|
64431
|
+
if (!kItem) return result;
|
|
64432
|
+
if (!dataInfo.Chart) return result;
|
|
64433
|
+
|
|
64434
|
+
var titleItem=dataInfo.Chart.GetItem(kItem);
|
|
64435
|
+
if (!titleItem || !titleItem.Data) return result;
|
|
64436
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(titleItem.Data.AryText)) return result;
|
|
64174
64437
|
|
|
64175
|
-
if (
|
|
64438
|
+
if (!result) result={ Text:null, ArrayText:aryText };
|
|
64439
|
+
|
|
64440
|
+
for(var i=0;i<titleItem.Data.AryText.length;++i)
|
|
64176
64441
|
{
|
|
64177
|
-
var
|
|
64178
|
-
|
|
64179
|
-
{
|
|
64180
|
-
var item=value[i];
|
|
64181
|
-
if (!item) continue;
|
|
64442
|
+
var item=titleItem.Data.AryText[i];
|
|
64443
|
+
if (!item) continue;
|
|
64182
64444
|
|
|
64183
|
-
|
|
64184
|
-
|
|
64185
|
-
|
|
64186
|
-
|
|
64187
|
-
|
|
64445
|
+
var textItem={ Name:null, Text:null };
|
|
64446
|
+
if (item.Name) textItem.Name=item.Name;
|
|
64447
|
+
if (item.Text) textItem.Text=item.Text;
|
|
64448
|
+
if (item.Color) textItem.Color=item.Color;
|
|
64449
|
+
if (IFrameSplitOperator.IsNumber(item.LeftSpace)) textItem.LeftSpace=item.LeftSpace;
|
|
64188
64450
|
|
|
64189
|
-
|
|
64190
|
-
}
|
|
64191
|
-
|
|
64192
|
-
return { Text:null, ArrayText:aryText }
|
|
64451
|
+
aryText.push(textItem);
|
|
64193
64452
|
}
|
|
64194
64453
|
|
|
64195
|
-
return
|
|
64454
|
+
return result;
|
|
64196
64455
|
}
|
|
64197
64456
|
|
|
64198
64457
|
this.GetColor=function(price,yClose)
|
|
@@ -77641,6 +77900,17 @@ function JSChartResource()
|
|
|
77641
77900
|
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 } },
|
|
77642
77901
|
}
|
|
77643
77902
|
|
|
77903
|
+
this.Minute.BuySellBar=
|
|
77904
|
+
{
|
|
77905
|
+
BuyColor:"rgb(242,54,69)",
|
|
77906
|
+
SellColor:"rgb(8,153,129)",
|
|
77907
|
+
BarWidth:4*GetDevicePixelRatio(),
|
|
77908
|
+
MaxBarWidth:120,
|
|
77909
|
+
YOffset:1,
|
|
77910
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
77911
|
+
TextColor:"rgb(128,128,128)",
|
|
77912
|
+
}
|
|
77913
|
+
|
|
77644
77914
|
this.DefaultTextColor="rgb(43,54,69)"; //图形中默认的字体颜色
|
|
77645
77915
|
this.DefaultTextFont=14*GetDevicePixelRatio() +'px 微软雅黑'; //图形中默认的字体
|
|
77646
77916
|
this.TitleFont=13*GetDevicePixelRatio() +'px 微软雅黑'; //指标显示,tooltip显示字体
|
|
@@ -78756,6 +79026,7 @@ function JSChartResource()
|
|
|
78756
79026
|
{
|
|
78757
79027
|
BorderColor:'rgb(192,192,192)', //边框线
|
|
78758
79028
|
SelectedColor:"rgb(180,240,240)", //选中行
|
|
79029
|
+
SelectedLine:{ Color:"rgb(180,240,240)", Width:2 },
|
|
78759
79030
|
Header:
|
|
78760
79031
|
{
|
|
78761
79032
|
Color:"rgb(60,60,60)", //表头文字颜色
|
|
@@ -79178,6 +79449,19 @@ function JSChartResource()
|
|
|
79178
79449
|
CopyMarginConfig(this.Minute.NightDay.Night.Margin,subItem.Margin);
|
|
79179
79450
|
}
|
|
79180
79451
|
}
|
|
79452
|
+
|
|
79453
|
+
if (style.Minute.BuySellBar)
|
|
79454
|
+
{
|
|
79455
|
+
var item=style.Minute.BuySellBar;
|
|
79456
|
+
var dest=this.Minute.BuySellBar;
|
|
79457
|
+
if (item.BuyColor) dest.BuyColor=item.BuyColor;
|
|
79458
|
+
if (item.SellColor) dest.SellColor=item.SellColor;
|
|
79459
|
+
if (item.Font) dest.Font=item.Font;
|
|
79460
|
+
if (item.TextColor) dest.TextColor=item.TextColor;
|
|
79461
|
+
if (IFrameSplitOperator.IsNumber(item.BarWidth)) dest.BarWidth=item.BarWidth;
|
|
79462
|
+
if (IFrameSplitOperator.IsNumber(item.MaxBarWidth)) dest.MaxBarWidth=item.MaxBarWidth;
|
|
79463
|
+
if (IFrameSplitOperator.IsNumber(item.YOffset)) dest.YOffset=item.YOffset;
|
|
79464
|
+
}
|
|
79181
79465
|
}
|
|
79182
79466
|
|
|
79183
79467
|
if (style.PopMinuteChart)
|
|
@@ -80074,6 +80358,14 @@ function JSChartResource()
|
|
|
80074
80358
|
if (item.DownTextColor) this.Report.DownTextColor=item.DownTextColor;
|
|
80075
80359
|
if (item.UnchagneTextColor) this.Report.UnchagneTextColor=item.UnchagneTextColor;
|
|
80076
80360
|
if (item.BorderColor) this.Report.SelectedColor=item.SelectedColor;
|
|
80361
|
+
|
|
80362
|
+
if (item.SelectedLine)
|
|
80363
|
+
{
|
|
80364
|
+
var subItem=item.SelectedLine;
|
|
80365
|
+
var subDest=this.Report.SelectedLine;
|
|
80366
|
+
if (subItem.Color) subDest.Color=subItem.Color;
|
|
80367
|
+
if (IFrameSplitOperator.IsNumber(subItem.Width)) subDest.Width=subItem.Width;
|
|
80368
|
+
}
|
|
80077
80369
|
|
|
80078
80370
|
|
|
80079
80371
|
if (item.CloseLine)
|
|
@@ -90578,6 +90870,24 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
90578
90870
|
return false;
|
|
90579
90871
|
}
|
|
90580
90872
|
|
|
90873
|
+
this.GetChartMinuteBuySellBar=function()
|
|
90874
|
+
{
|
|
90875
|
+
var chart=this.ChartPaint[3];
|
|
90876
|
+
if (!chart) return null;
|
|
90877
|
+
|
|
90878
|
+
if (chart.Name!="Minute-BuySell-Bar") return null;
|
|
90879
|
+
|
|
90880
|
+
return chart;
|
|
90881
|
+
}
|
|
90882
|
+
|
|
90883
|
+
this.IsShowMinuteBuySellBar=function()
|
|
90884
|
+
{
|
|
90885
|
+
var chart=this.GetChartMinuteBuySellBar();
|
|
90886
|
+
if (!chart) return false;
|
|
90887
|
+
|
|
90888
|
+
return chart.IsShow;
|
|
90889
|
+
}
|
|
90890
|
+
|
|
90581
90891
|
//左右拖拽
|
|
90582
90892
|
this.OnDragMode_One=function(moveData, e)
|
|
90583
90893
|
{
|
|
@@ -92037,7 +92347,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
92037
92347
|
bRButtonSelectRect=this.ChartDragSelectRect.EnableRButton;
|
|
92038
92348
|
bLButtonSelectRect=this.ChartDragSelectRect.EnableLButton;
|
|
92039
92349
|
}
|
|
92040
|
-
|
|
92350
|
+
|
|
92351
|
+
var bShowBuySellBar=this.IsShowMinuteBuySellBar();
|
|
92352
|
+
|
|
92041
92353
|
var minItem=null;
|
|
92042
92354
|
if (frameID>=0 && option && IFrameSplitOperator.IsNumber(option.CursorIndex))
|
|
92043
92355
|
{
|
|
@@ -92134,6 +92446,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
92134
92446
|
SubMenu:
|
|
92135
92447
|
[
|
|
92136
92448
|
{ Name:"画图工具", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID, Args:[]}, Checked:this.IsShowDrawToolDialog()},
|
|
92449
|
+
{ Name:"盘口分析", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_BUYSELL_BAR_ID, Args:[!bShowBuySellBar]}, Checked:bShowBuySellBar },
|
|
92137
92450
|
|
|
92138
92451
|
{ Name:JSPopMenu.SEPARATOR_LINE_NAME },
|
|
92139
92452
|
|
|
@@ -92826,6 +93139,16 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
92826
93139
|
volLine.ShareAfterVol=this.ShareAfterVol;
|
|
92827
93140
|
this.ChartPaint[2]=volLine;
|
|
92828
93141
|
|
|
93142
|
+
var buySellBar=g_ChartPaintFactory.Create("ChartMinuteBuySellBar");
|
|
93143
|
+
buySellBar.Canvas=this.Canvas;
|
|
93144
|
+
buySellBar.ChartBorder=this.Frame.SubFrame[0].Frame.ChartBorder;
|
|
93145
|
+
buySellBar.ChartFrame=this.Frame.SubFrame[0].Frame;
|
|
93146
|
+
buySellBar.Name="Minute-BuySell-Bar";
|
|
93147
|
+
buySellBar.Identify="Minute-BuySell-Bar";
|
|
93148
|
+
buySellBar.BuySellData=this.BuySellData;
|
|
93149
|
+
this.ChartPaint[3]=buySellBar;
|
|
93150
|
+
|
|
93151
|
+
|
|
92829
93152
|
this.TitlePaint[0]=new DynamicMinuteTitlePainting();
|
|
92830
93153
|
this.TitlePaint[0].Frame=this.Frame.SubFrame[0].Frame;
|
|
92831
93154
|
this.TitlePaint[0].Canvas=this.Canvas;
|
|
@@ -93431,7 +93754,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
93431
93754
|
this.AutoUpdateEvent(false, "MinuteChartContainer::ChangeDayCount");
|
|
93432
93755
|
this.DayCount=count;
|
|
93433
93756
|
this.ClearMinuteData();
|
|
93757
|
+
this.ClearStockCache();
|
|
93434
93758
|
this.UnlockCorssCursor();
|
|
93759
|
+
this.Frame.ClearYCoordinateMaxMin();
|
|
93435
93760
|
|
|
93436
93761
|
if (option && option.PageInfo)
|
|
93437
93762
|
{
|
|
@@ -93701,8 +94026,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
93701
94026
|
}
|
|
93702
94027
|
}
|
|
93703
94028
|
|
|
93704
|
-
|
|
94029
|
+
//option={ ClearYCoordinateMaxMin:true }
|
|
94030
|
+
this.RequestData=function(option)
|
|
93705
94031
|
{
|
|
94032
|
+
if (option)
|
|
94033
|
+
{
|
|
94034
|
+
if (option.ClearYCoordinateMaxMin===true) this.Frame.ClearYCoordinateMaxMin();
|
|
94035
|
+
}
|
|
94036
|
+
|
|
93706
94037
|
if (this.DayCount<=1) this.RequestMinuteData();
|
|
93707
94038
|
else this.RequestHistoryMinuteData();
|
|
93708
94039
|
}
|
|
@@ -93774,11 +94105,13 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
93774
94105
|
After:this.IsShowMultiDayAfterData
|
|
93775
94106
|
} //集合竞价
|
|
93776
94107
|
|
|
94108
|
+
var bBuySellBar=this.IsShowMinuteBuySellBar();
|
|
94109
|
+
|
|
93777
94110
|
var obj=
|
|
93778
94111
|
{
|
|
93779
94112
|
Name:'MinuteChartContainer::RequestHistoryMinuteData', //类名::函数
|
|
93780
94113
|
Explain:'多日分时数据',
|
|
93781
|
-
Request:{ Url:self.HistoryMinuteApiUrl, Data:{daycount:self.DayCount, symbol:self.Symbol, callcation:callCation, AryDate:this.AryDate }, Type:'POST' },
|
|
94114
|
+
Request:{ Url:self.HistoryMinuteApiUrl, Data:{daycount:self.DayCount, symbol:self.Symbol, callcation:callCation, AryDate:this.AryDate, IsShowBuySellBar:bBuySellBar }, Type:'POST' },
|
|
93782
94115
|
Self:this,
|
|
93783
94116
|
PreventDefault:false
|
|
93784
94117
|
};
|
|
@@ -93825,6 +94158,10 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
93825
94158
|
|
|
93826
94159
|
this.DataStatus.MultiDay=true;
|
|
93827
94160
|
|
|
94161
|
+
var lastDayData=null;
|
|
94162
|
+
if (IFrameSplitOperator.IsNonEmptyArray(data.data) && data.data[0]) lastDayData=data.data[0];
|
|
94163
|
+
if (lastDayData) this.RecvBuySellData(lastDayData.BuySellData);
|
|
94164
|
+
|
|
93828
94165
|
this.CaclutateCallCationYRange();
|
|
93829
94166
|
this.Symbol=data.symbol;
|
|
93830
94167
|
this.Name=data.name;
|
|
@@ -94144,6 +94481,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
94144
94481
|
this.IsAfterData=true;
|
|
94145
94482
|
}
|
|
94146
94483
|
|
|
94484
|
+
//5档买卖盘
|
|
94485
|
+
var bBuySellBar=this.IsShowMinuteBuySellBar();
|
|
94486
|
+
|
|
94147
94487
|
if (this.NetworkFilter)
|
|
94148
94488
|
{
|
|
94149
94489
|
var dateRange=null;
|
|
@@ -94168,7 +94508,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
94168
94508
|
{
|
|
94169
94509
|
Name:'MinuteChartContainer::RequestMinuteData', //类名::函数名
|
|
94170
94510
|
Explain:'最新分时数据',
|
|
94171
|
-
Request:{ Url:self.MinuteApiUrl, Data:{field:fields, symbol:[self.Symbol], callcation:callCation, AryDate:this.AryDate }, Type:'POST' },
|
|
94511
|
+
Request:{ Url:self.MinuteApiUrl, Data:{field:fields, symbol:[self.Symbol], callcation:callCation, AryDate:this.AryDate, IsShowBuySellBar:bBuySellBar }, Type:'POST' },
|
|
94172
94512
|
Self:this,
|
|
94173
94513
|
PreventDefault:false
|
|
94174
94514
|
};
|
|
@@ -94303,6 +94643,21 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
94303
94643
|
}
|
|
94304
94644
|
}
|
|
94305
94645
|
|
|
94646
|
+
this.RecvBuySellData=function(data)
|
|
94647
|
+
{
|
|
94648
|
+
if (!data) return;
|
|
94649
|
+
|
|
94650
|
+
if (Array.isArray(data.AryBuy))
|
|
94651
|
+
{
|
|
94652
|
+
this.BuySellData.AryBuy=data.AryBuy.slice();
|
|
94653
|
+
}
|
|
94654
|
+
|
|
94655
|
+
if (Array.isArray(data.ArySell))
|
|
94656
|
+
{
|
|
94657
|
+
this.BuySellData.ArySell=data.ArySell.slice();
|
|
94658
|
+
}
|
|
94659
|
+
}
|
|
94660
|
+
|
|
94306
94661
|
this.RecvMinuteData=function(data)
|
|
94307
94662
|
{
|
|
94308
94663
|
if (!data)
|
|
@@ -94337,7 +94692,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
94337
94692
|
|
|
94338
94693
|
var bFirstData=(this.DataStatus.LatestDay==false); //首条单日数据
|
|
94339
94694
|
|
|
94340
|
-
|
|
94695
|
+
if (IFrameSplitOperator.IsNonEmptyArray(data.stock) && data.stock[0])
|
|
94696
|
+
{
|
|
94697
|
+
this.DataStatus.LatestDate=data.stock[0].date; //保存下最后一天的日期
|
|
94698
|
+
this.RecvBuySellData(data.stock[0].BuySellData);
|
|
94699
|
+
}
|
|
94700
|
+
|
|
94341
94701
|
this.DataStatus.LatestDay=true;
|
|
94342
94702
|
|
|
94343
94703
|
if (this.DayCount>1) //多日走势图
|
|
@@ -125729,13 +126089,16 @@ function ScriptIndex(name,script,args,option)
|
|
|
125729
126089
|
chart.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;
|
|
125730
126090
|
chart.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;
|
|
125731
126091
|
chart.Identify=this.Guid;
|
|
126092
|
+
chart.Data=hqChart.GetKData(); //绑定K线
|
|
125732
126093
|
if (varItem.Color) chart.Color=this.GetColor(varItem.Color);
|
|
125733
126094
|
else chart.Color=this.GetDefaultColor(id);
|
|
125734
|
-
chart.
|
|
126095
|
+
chart.AryTitle=varItem.Draw.DrawData.AryTitle;
|
|
126096
|
+
chart.BuildCacheData();
|
|
125735
126097
|
|
|
125736
126098
|
var titleIndex=windowIndex+1;
|
|
125737
126099
|
var titleData=new DynamicTitleData(chart.Data,varItem.Name,chart.Color);
|
|
125738
126100
|
titleData.DataType="ChartIndexTitle";
|
|
126101
|
+
titleData.Chart=chart;
|
|
125739
126102
|
hqChart.TitlePaint[titleIndex].Data[id]=titleData;
|
|
125740
126103
|
|
|
125741
126104
|
this.SetChartIndexName(chart);
|
|
@@ -127553,6 +127916,9 @@ function ScriptIndex(name,script,args,option)
|
|
|
127553
127916
|
case "DRAWSVG":
|
|
127554
127917
|
this.CreateChartDrawSVG(hqChart,windowIndex,item,i);
|
|
127555
127918
|
break;
|
|
127919
|
+
case "DRAWTITLE":
|
|
127920
|
+
this.CreateTitle(hqChart,windowIndex,item,i);
|
|
127921
|
+
break;
|
|
127556
127922
|
case "MULTI_HTMLDOM":
|
|
127557
127923
|
this.CreateMulitHtmlDom(hqChart,windowIndex,item,i);
|
|
127558
127924
|
break;
|
|
@@ -127646,11 +128012,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
127646
128012
|
{
|
|
127647
128013
|
this.CreateArea(hqChart,windowIndex,item,i);
|
|
127648
128014
|
}
|
|
127649
|
-
|
|
127650
|
-
{
|
|
127651
|
-
this.CreateTitle(hqChart,windowIndex,item,i);
|
|
127652
|
-
}
|
|
127653
|
-
|
|
128015
|
+
|
|
127654
128016
|
var titlePaint=hqChart.TitlePaint[windowIndex+1];
|
|
127655
128017
|
if (titlePaint && titlePaint.Data && i<titlePaint.Data.length) //设置标题数值 小数位数和格式
|
|
127656
128018
|
{
|
|
@@ -127927,6 +128289,9 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
127927
128289
|
case "DRAWSVG":
|
|
127928
128290
|
this.CreateChartDrawSVG(hqChart,windowIndex,item,i);
|
|
127929
128291
|
break;
|
|
128292
|
+
case "DRAWTITLE":
|
|
128293
|
+
this.CreateTitle(hqChart,windowIndex,item,i);
|
|
128294
|
+
break;
|
|
127930
128295
|
case "MULTI_HTMLDOM":
|
|
127931
128296
|
this.CreateMulitHtmlDom(hqChart,windowIndex,item,i);
|
|
127932
128297
|
break;
|
|
@@ -128000,11 +128365,6 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
128000
128365
|
{
|
|
128001
128366
|
this.CreateLine(hqChart,windowIndex,item,i, item.Type);
|
|
128002
128367
|
}
|
|
128003
|
-
else if (item.Type==10)
|
|
128004
|
-
{
|
|
128005
|
-
this.CreateTitle(hqChart,windowIndex,item,i);
|
|
128006
|
-
}
|
|
128007
|
-
|
|
128008
128368
|
|
|
128009
128369
|
|
|
128010
128370
|
var titleData=titleInfo.Data[i];
|
|
@@ -128589,22 +128949,25 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
128589
128949
|
{
|
|
128590
128950
|
var overlayIndex=this.OverlayIndex;
|
|
128591
128951
|
var frame=overlayIndex.Frame;
|
|
128592
|
-
|
|
128952
|
+
var chart=new ChartIndexTitle();
|
|
128593
128953
|
chart.Canvas=hqChart.Canvas;
|
|
128594
128954
|
|
|
128595
128955
|
chart.Name=varItem.Name;
|
|
128596
128956
|
chart.ChartBorder=frame.Frame.ChartBorder;
|
|
128597
128957
|
chart.ChartFrame=frame.Frame;
|
|
128598
128958
|
chart.Identify=overlayIndex.Identify;
|
|
128599
|
-
|
|
128959
|
+
chart.Data=hqChart.GetKData(); //绑定K线
|
|
128960
|
+
|
|
128600
128961
|
if (varItem.Color) chart.Color=this.GetColor(varItem.Color);
|
|
128601
128962
|
else chart.Color=this.GetDefaultColor(id);
|
|
128602
|
-
chart.
|
|
128963
|
+
chart.AryTitle=varItem.Draw.DrawData.AryTitle;
|
|
128964
|
+
chart.BuildCacheData();
|
|
128603
128965
|
|
|
128604
128966
|
var titleIndex=windowIndex+1;
|
|
128605
128967
|
var titlePaint=hqChart.TitlePaint[titleIndex];
|
|
128606
128968
|
var titleData=new DynamicTitleData(chart.Data,chart.Name,chart.Color);
|
|
128607
128969
|
titleData.DataType="ChartIndexTitle";
|
|
128970
|
+
titleData.Chart=chart;
|
|
128608
128971
|
titlePaint.OverlayIndex.get(overlayIndex.Identify).Data[id]=titleData;
|
|
128609
128972
|
|
|
128610
128973
|
this.SetChartIndexName(chart);
|
|
@@ -130220,6 +130583,18 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
130220
130583
|
|
|
130221
130584
|
result.push(outVarItem);
|
|
130222
130585
|
}
|
|
130586
|
+
else if (draw.DrawType=="DRAWTITLE")
|
|
130587
|
+
{
|
|
130588
|
+
drawItem.Name=draw.Name;
|
|
130589
|
+
drawItem.Type=draw.Type;
|
|
130590
|
+
|
|
130591
|
+
drawItem.DrawType=draw.DrawType;
|
|
130592
|
+
drawItem.DrawData=draw.DrawData;
|
|
130593
|
+
|
|
130594
|
+
outVarItem.Draw=drawItem;
|
|
130595
|
+
|
|
130596
|
+
result.push(outVarItem);
|
|
130597
|
+
}
|
|
130223
130598
|
else if (draw.DrawType=="MULTI_HTMLDOM") //外部自己创建dom
|
|
130224
130599
|
{
|
|
130225
130600
|
drawItem.Text=draw.Text;
|
|
@@ -130778,6 +131153,18 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
130778
131153
|
|
|
130779
131154
|
result.push(outVarItem);
|
|
130780
131155
|
}
|
|
131156
|
+
else if (draw.DrawType=="DRAWTITLE")
|
|
131157
|
+
{
|
|
131158
|
+
drawItem.Name=draw.Name;
|
|
131159
|
+
drawItem.Type=draw.Type;
|
|
131160
|
+
|
|
131161
|
+
drawItem.DrawType=draw.DrawType;
|
|
131162
|
+
drawItem.DrawData=draw.DrawData;
|
|
131163
|
+
|
|
131164
|
+
outVarItem.Draw=drawItem;
|
|
131165
|
+
|
|
131166
|
+
result.push(outVarItem);
|
|
131167
|
+
}
|
|
130781
131168
|
else
|
|
130782
131169
|
{
|
|
130783
131170
|
var find=g_ScriptIndexChartFactory.Get(draw.DrawType); //外部挂接
|
|
@@ -131568,6 +131955,14 @@ function GetBlackStyle()
|
|
|
131568
131955
|
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
131569
131956
|
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 } },
|
|
131570
131957
|
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 } },
|
|
131958
|
+
},
|
|
131959
|
+
|
|
131960
|
+
BuySellBar:
|
|
131961
|
+
{
|
|
131962
|
+
BuyColor:"rgb(102, 33, 33)",
|
|
131963
|
+
SellColor:"rgb(20, 63, 31)",
|
|
131964
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
131965
|
+
TextColor:"rgb(220,220,220)",
|
|
131571
131966
|
}
|
|
131572
131967
|
},
|
|
131573
131968
|
|
|
@@ -132182,6 +132577,7 @@ function GetBlackStyle()
|
|
|
132182
132577
|
{
|
|
132183
132578
|
BorderColor:'rgb(38,38,41)', //边框线
|
|
132184
132579
|
SelectedColor:"rgb(49,48,56)", //选中行
|
|
132580
|
+
SelectedLine:{ Color:"rgb(250,250,250)" },
|
|
132185
132581
|
Header:
|
|
132186
132582
|
{
|
|
132187
132583
|
Color:"RGB(245,245,245)",
|
|
@@ -134308,6 +134704,7 @@ function JSReportChart(divElement)
|
|
|
134308
134704
|
{
|
|
134309
134705
|
if (IFrameSplitOperator.IsNumber(option.TextOverflowStyle)) reportChart.TextOverflowStyle=option.TextOverflowStyle;
|
|
134310
134706
|
if (IFrameSplitOperator.IsNumber(option.MultiSelectModel)) reportChart.MultiSelectModel=option.MultiSelectModel;
|
|
134707
|
+
if (IFrameSplitOperator.IsNumber(option.SelectedStyle)) reportChart.SelectedStyle=option.SelectedStyle;
|
|
134311
134708
|
}
|
|
134312
134709
|
|
|
134313
134710
|
this.SetChartBorder(chart, option);
|
|
@@ -138818,6 +139215,7 @@ function ChartReport()
|
|
|
138818
139215
|
this.SelectedModel=0; //选中模式 0=SelectedRow表示当前屏索引
|
|
138819
139216
|
this.SelectedRow=-1; //选中行ID
|
|
138820
139217
|
this.SelectedFixedRow=-1; //选中固定行ID
|
|
139218
|
+
this.SelectedStyle=1; //选中行样式 1=整行填充 2=底部绘制直线
|
|
138821
139219
|
this.IsDrawBorder=1; //是否绘制单元格边框
|
|
138822
139220
|
this.HeaderRowCount=1; //表头行数
|
|
138823
139221
|
|
|
@@ -138842,6 +139240,7 @@ function ChartReport()
|
|
|
138842
139240
|
|
|
138843
139241
|
this.BorderColor=g_JSChartResource.Report.BorderColor; //边框线
|
|
138844
139242
|
this.SelectedColor=g_JSChartResource.Report.SelectedColor; //选中行
|
|
139243
|
+
this.SelectedLineConfig={ Color:g_JSChartResource.Report.SelectedLine.Color, Width:g_JSChartResource.Report.SelectedLine.Width }; //选中行底部线段
|
|
138845
139244
|
|
|
138846
139245
|
//表头配置
|
|
138847
139246
|
this.HeaderFontConfig={ Size:g_JSChartResource.Report.Header.Font.Size, Name:g_JSChartResource.Report.Header.Font.Name };
|
|
@@ -138962,6 +139361,8 @@ function ChartReport()
|
|
|
138962
139361
|
this.IsShowAllColumn=false; //是否已显示所有列
|
|
138963
139362
|
this.DevicePixelRatio=GetDevicePixelRatio(); //分辨率
|
|
138964
139363
|
|
|
139364
|
+
this.AryFullSelectedRow=[]; //选中行
|
|
139365
|
+
|
|
138965
139366
|
//{
|
|
138966
139367
|
// Type:列id, Title:标题, TextAlign:文字对齐方式, MaxText:文字最大宽度 , TextColor:文字颜色, Sort:0=不支持排序 1=本地排序 0=远程排序,
|
|
138967
139368
|
// Icon:{ Family:"iconfont", Size:12, Symbol:"", Margin: { Left:, Bottom }}
|
|
@@ -139106,8 +139507,11 @@ function ChartReport()
|
|
|
139106
139507
|
if (IFrameSplitOperator.IsNumber(item.Sort)) colItem.Sort=item.Sort;
|
|
139107
139508
|
if (IFrameSplitOperator.IsNumber(item.FixedWidth)) colItem.FixedWidth=item.FixedWidth;
|
|
139108
139509
|
if (IFrameSplitOperator.IsBool(item.EnableDragWidth)) colItem.EnableDragWidth=item.EnableDragWidth;
|
|
139510
|
+
|
|
139511
|
+
colItem.IsDrawCallback=false;
|
|
139109
139512
|
if (IFrameSplitOperator.IsBool(item.IsDrawCallback)) colItem.IsDrawCallback=item.IsDrawCallback;
|
|
139110
|
-
|
|
139513
|
+
|
|
139514
|
+
if (IFrameSplitOperator.IsBool(item.EnableFormatDrawInfoEvent)) colItem.EnableFormatDrawInfoEvent=item.EnableFormatDrawInfoEvent;
|
|
139111
139515
|
|
|
139112
139516
|
if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) colItem.FloatPrecision=item.FloatPrecision; //小数位数
|
|
139113
139517
|
if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
|
|
@@ -139449,6 +139853,7 @@ function ChartReport()
|
|
|
139449
139853
|
this.ShowSymbol=[];
|
|
139450
139854
|
this.TooltipRect=[];
|
|
139451
139855
|
this.ButtonRect=[];
|
|
139856
|
+
this.AryFullSelectedRow=[];
|
|
139452
139857
|
this.DevicePixelRatio=GetDevicePixelRatio()
|
|
139453
139858
|
this.LastMouseStatus=lastMouseStatus;
|
|
139454
139859
|
|
|
@@ -139473,6 +139878,7 @@ function ChartReport()
|
|
|
139473
139878
|
|
|
139474
139879
|
this.ClipClient();
|
|
139475
139880
|
this.DrawBorder();
|
|
139881
|
+
this.DrawSelectedRow();
|
|
139476
139882
|
this.Canvas.restore();
|
|
139477
139883
|
|
|
139478
139884
|
this.DrawDragRow();
|
|
@@ -139487,6 +139893,7 @@ function ChartReport()
|
|
|
139487
139893
|
|
|
139488
139894
|
this.LastMouseStatus=null;
|
|
139489
139895
|
this.SizeChange=false;
|
|
139896
|
+
this.AryFullSelectedRow=[];
|
|
139490
139897
|
}
|
|
139491
139898
|
|
|
139492
139899
|
this.DrawDragHeaderBG=function()
|
|
@@ -140029,6 +140436,8 @@ function ChartReport()
|
|
|
140029
140436
|
var left=this.RectClient.Left;
|
|
140030
140437
|
var rowWidth=this.RectClient.Right-this.RectClient.Left;
|
|
140031
140438
|
|
|
140439
|
+
var arySelectedRow=[];
|
|
140440
|
+
|
|
140032
140441
|
//固定行
|
|
140033
140442
|
var textTop=top;
|
|
140034
140443
|
this.Canvas.font=this.ItemFixedFont;
|
|
@@ -140120,8 +140529,16 @@ function ChartReport()
|
|
|
140120
140529
|
|
|
140121
140530
|
if (bFillRow)
|
|
140122
140531
|
{
|
|
140123
|
-
|
|
140124
|
-
|
|
140532
|
+
var rtRowBG={ Left:left, Top:textTop, Width:rowWidth, Height:this.RowHeight };
|
|
140533
|
+
rtRowBG.Right=rtRowBG.Left+rtRowBG.Width;
|
|
140534
|
+
rtRowBG.Bottom=rtRowBG.Top+rtRowBG.Height;
|
|
140535
|
+
this.AryFullSelectedRow.push(rtRowBG);
|
|
140536
|
+
|
|
140537
|
+
if (this.SelectedStyle===1)
|
|
140538
|
+
{
|
|
140539
|
+
this.Canvas.fillStyle=this.SelectedColor;
|
|
140540
|
+
this.Canvas.fillRect(rtRowBG.Left,rtRowBG.Top,rtRowBG.Width,rtRowBG.Height);
|
|
140541
|
+
}
|
|
140125
140542
|
}
|
|
140126
140543
|
|
|
140127
140544
|
this.DrawRow(symbol, textTop, i);
|
|
@@ -140130,6 +140547,22 @@ function ChartReport()
|
|
|
140130
140547
|
|
|
140131
140548
|
textTop+=this.RowHeight;
|
|
140132
140549
|
}
|
|
140550
|
+
|
|
140551
|
+
|
|
140552
|
+
}
|
|
140553
|
+
|
|
140554
|
+
this.DrawSelectedRow=function()
|
|
140555
|
+
{
|
|
140556
|
+
if (this.SelectedStyle===2 && IFrameSplitOperator.IsNonEmptyArray(this.AryFullSelectedRow))
|
|
140557
|
+
{
|
|
140558
|
+
this.Canvas.fillStyle=this.SelectedLineConfig.Color;
|
|
140559
|
+
var lineWidth=this.SelectedLineConfig.Width;
|
|
140560
|
+
for(var i=0;i<this.AryFullSelectedRow.length;++i)
|
|
140561
|
+
{
|
|
140562
|
+
var rtBG=this.AryFullSelectedRow[i];
|
|
140563
|
+
this.Canvas.fillRect(rtBG.Left,rtBG.Bottom-lineWidth,rtBG.Width,lineWidth);
|
|
140564
|
+
}
|
|
140565
|
+
}
|
|
140133
140566
|
}
|
|
140134
140567
|
|
|
140135
140568
|
this.GetSelectedSymbol=function()
|
|
@@ -140649,10 +141082,12 @@ function ChartReport()
|
|
|
140649
141082
|
else if (this.IsReserveNumber(column.Type))
|
|
140650
141083
|
{
|
|
140651
141084
|
this.FormatReserveNumber(column, stock, drawInfo);
|
|
141085
|
+
this.FormatDrawInfoEvent(stock, data, column, drawInfo);
|
|
140652
141086
|
}
|
|
140653
141087
|
else if (this.IsReserveString(column.Type))
|
|
140654
141088
|
{
|
|
140655
141089
|
this.FormatReserveString(column, stock, drawInfo);
|
|
141090
|
+
this.FormatDrawInfoEvent(stock, data, column, drawInfo);
|
|
140656
141091
|
}
|
|
140657
141092
|
else if (this.IsReserveProgressBarColumn(column.Type))
|
|
140658
141093
|
{
|
|
@@ -140757,8 +141192,22 @@ function ChartReport()
|
|
|
140757
141192
|
var buttonData={ Stock:stock, Index:index, ColumnIndex:columnIndex, Column:column, Rect:drawInfo.Botton.Rect, Type:drawInfo.Botton.Type, Data:drawInfo.Data };
|
|
140758
141193
|
this.ButtonRect.push(buttonData);
|
|
140759
141194
|
}
|
|
141195
|
+
}
|
|
140760
141196
|
|
|
140761
|
-
|
|
141197
|
+
this.FormatDrawInfoEvent=function(stock, data, column, drawInfo)
|
|
141198
|
+
{
|
|
141199
|
+
if (!column.EnableFormatDrawInfoEvent) return;
|
|
141200
|
+
|
|
141201
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_FORMAT_DRAW_INFO);
|
|
141202
|
+
if (!event || !event.Callback) return;
|
|
141203
|
+
|
|
141204
|
+
var sendData=
|
|
141205
|
+
{
|
|
141206
|
+
Stock:stock, Column:column, Data:data,
|
|
141207
|
+
DrawInfo:drawInfo
|
|
141208
|
+
};
|
|
141209
|
+
|
|
141210
|
+
event.Callback(event, sendData, this);
|
|
140762
141211
|
}
|
|
140763
141212
|
|
|
140764
141213
|
this.IsReserveProgressBarColumn=function(value)
|
|
@@ -141418,9 +141867,13 @@ function ChartReport()
|
|
|
141418
141867
|
|
|
141419
141868
|
this.DrawItemBG=function(drawInfo)
|
|
141420
141869
|
{
|
|
141421
|
-
if (drawInfo.BGColor
|
|
141870
|
+
if (!drawInfo.BGColor) return;
|
|
141871
|
+
|
|
141872
|
+
var rtItem=drawInfo.Rect; //绘制背景色
|
|
141873
|
+
if (drawInfo.RectBG) rtItem=drawInfo.RectBG;
|
|
141874
|
+
|
|
141875
|
+
if (rtItem)
|
|
141422
141876
|
{
|
|
141423
|
-
var rtItem=drawInfo.Rect;
|
|
141424
141877
|
this.Canvas.fillStyle=drawInfo.BGColor;
|
|
141425
141878
|
this.Canvas.fillRect(rtItem.Left,rtItem.Top,rtItem.Width,rtItem.Height); //画一个背景色, 不然是一个黑的背景
|
|
141426
141879
|
}
|
|
@@ -147125,7 +147578,7 @@ function ScrollBarBGChart()
|
|
|
147125
147578
|
|
|
147126
147579
|
|
|
147127
147580
|
|
|
147128
|
-
var HQCHART_VERSION="1.1.
|
|
147581
|
+
var HQCHART_VERSION="1.1.14687";
|
|
147129
147582
|
|
|
147130
147583
|
function PrintHQChartVersion()
|
|
147131
147584
|
{
|