hqchart 1.1.12453 → 1.1.12455
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
CHANGED
|
@@ -2859,17 +2859,20 @@ this.Time;//时间
|
|
|
2859
2859
|
this.Date;//日期
|
|
2860
2860
|
this.Position=null;//持仓量
|
|
2861
2861
|
this.YClearing;//昨结算价
|
|
2862
|
+
this.YClose;//昨收价
|
|
2862
2863
|
this.ExtendData;//扩展数据
|
|
2863
2864
|
}//盘前集合竞价
|
|
2864
2865
|
function BeforeOpenData(){this.Time;this.Date;this.Price;//匹配的价格
|
|
2865
2866
|
this.AvPrice;//均价
|
|
2866
2867
|
this.Vol=[];//[0]=匹配量 [1]=未匹配量
|
|
2867
|
-
this.ColorID;//0=平盘 1=红 2=绿 3 ...自定义颜色
|
|
2868
|
+
this.ColorID;//0=平盘 1=红 2=绿 3 ...自定义颜色
|
|
2869
|
+
this.YClose;//昨收价
|
|
2868
2870
|
}//收盘集合竞价
|
|
2869
2871
|
function AfterCloseData(){this.Time;this.Date;this.Price;//匹配的价格
|
|
2870
2872
|
this.AvPrice;//均价
|
|
2871
2873
|
this.Vol=[];//[0]=匹配量 [1]=未匹配量
|
|
2872
|
-
this.ColorID;//0=平盘 1=红 2=绿 3 ...自定义颜色
|
|
2874
|
+
this.ColorID;//0=平盘 1=红 2=绿 3 ...自定义颜色
|
|
2875
|
+
this.YClose;//昨收价
|
|
2873
2876
|
}//单指标数据
|
|
2874
2877
|
function SingleData(){this.Date;//日期
|
|
2875
2878
|
this.Time;//时间
|
|
@@ -5338,7 +5341,7 @@ var emptyData={ClientPos:this.PointInfo.ClientPos,X:this.PointInfo.Point.X,Y:thi
|
|
|
5338
5341
|
var item=data.Data;var isLastOne=data.IsLastOne;var aryText=[];//{Color:, Text: }
|
|
5339
5342
|
if(this.IsShowName)aryText.push({Text:this.Name,Color:this.NameColor});if(this.IsShowDate||this.IsShowTime){var bShowUpdateTime=false;//是否显示了更新时间
|
|
5340
5343
|
if(isLastOne&&this.ShowLastDataFormat==1){if(this.Data&&this.Data.UpdateTime&&IFrameSplitOperator.IsNumber(this.Data.UpdateTime.Date)&&IFrameSplitOperator.IsNumber(this.Data.UpdateTime.Time)){var text=IFrameSplitOperator.FormatTimeString(this.Data.UpdateTime.Time,"HH:MM:SS");aryText.push({Text:text,Color:this.DateTimeColor});bShowUpdateTime=true;}}if(!bShowUpdateTime){if(this.TimeFormat)//指定时间格式
|
|
5341
|
-
{var strDate=null,strTime=null,text=null;if(this.IsShowDate)strDate=IFrameSplitOperator.FormatDateString("YYYY-MM-DD",item.Date);if(this.IsShowTime)strTime=IFrameSplitOperator.FormatTimeString(item.Time,this.TimeFormat);if(strDate&&strTime)text=strDate+' '+strTime;else if(strDate)text=strDate;else if(strTime)text=strTime;if(text)aryText.push({Text:text,Color:this.DateTimeColor});}else{var text=IFrameSplitOperator.FormatDateTimeString(item.DateTime,this.IsShowDate,this.IsShowTime);aryText.push({Text:text,Color:this.DateTimeColor});}}}var close=item.Close;var increase=item.Increase;var vol=item.Vol;var amount=item.Amount;if(IFrameSplitOperator.IsNumber(close)){var color=this.GetColor(close,
|
|
5344
|
+
{var strDate=null,strTime=null,text=null;if(this.IsShowDate)strDate=IFrameSplitOperator.FormatDateString("YYYY-MM-DD",item.Date);if(this.IsShowTime)strTime=IFrameSplitOperator.FormatTimeString(item.Time,this.TimeFormat);if(strDate&&strTime)text=strDate+' '+strTime;else if(strDate)text=strDate;else if(strTime)text=strTime;if(text)aryText.push({Text:text,Color:this.DateTimeColor});}else{var text=IFrameSplitOperator.FormatDateTimeString(item.DateTime,this.IsShowDate,this.IsShowTime);aryText.push({Text:text,Color:this.DateTimeColor});}}}var close=item.Close;var increase=item.Increase;var vol=item.Vol;var amount=item.Amount;var yClose=item.YClose;if(!IFrameSplitOperator.IsNumber(yClose))yClose=this.YClose;if(IFrameSplitOperator.IsNumber(close)){var color=this.GetColor(close,yClose);var text=g_JSChartLocalization.GetText('MTitle-Close',this.LanguageID)+close.toFixed(defaultfloatPrecision);aryText.push({Text:text,Color:color});}if(IFrameSplitOperator.IsNumber(increase)){var color=this.GetColor(increase,0);var text=g_JSChartLocalization.GetText('MTitle-Increase',this.LanguageID)+increase.toFixed(2)+'%';aryText.push({Text:text,Color:color});}var isShowAvPrice=true;var upperSymbol=this.Symbol.toUpperCase();if(MARKET_SUFFIX_NAME.IsET(upperSymbol)&&!MARKET_SUFFIX_NAME.IsETShowAvPrice(upperSymbol))isShowAvPrice=false;else if(MARKET_SUFFIX_NAME.IsShowAvPrice&&!MARKET_SUFFIX_NAME.IsShowAvPrice(upperSymbol))isShowAvPrice=false;if(IFrameSplitOperator.IsNumber(item.AvPrice)&&isShowAvPrice&&this.IsShowAveragePrice){var color=this.GetColor(item.AvPrice,yClose);var text=g_JSChartLocalization.GetText('MTitle-AvPrice',this.LanguageID)+item.AvPrice.toFixed(defaultfloatPrecision);aryText.push({Text:text,Color:color});}if(IFrameSplitOperator.IsNumber(vol)){var text=g_JSChartLocalization.GetText('MTitle-Vol',this.LanguageID)+IFrameSplitOperator.FromatIntegerString(vol,2,this.LanguageID);aryText.push({Text:text,Color:this.VolColor});}if(IFrameSplitOperator.IsNumber(amount)){var text=g_JSChartLocalization.GetText('MTitle-Amount',this.LanguageID)+IFrameSplitOperator.FormatValueString(amount,2,this.LanguageID);aryText.push({Text:text,Color:this.AmountColor});}if(IFrameSplitOperator.IsNumber(item.Position)){var text=g_JSChartLocalization.GetText('MTitle-Position',this.LanguageID)+IFrameSplitOperator.FromatIntegerString(item.Position,2,this.LanguageID);aryText.push({Text:text,Color:this.VolColor});}if(isLastOne&&this.ShowLastDataFormat==0)//显示数据最后的更新时间
|
|
5342
5345
|
{if(this.Data&&this.Data.UpdateTime&&IFrameSplitOperator.IsNumber(this.Data.UpdateTime.Date)&&IFrameSplitOperator.IsNumber(this.Data.UpdateTime.Time)){var text=g_JSChartLocalization.GetText('MTitle-UpdateTime',this.LanguageID)+IFrameSplitOperator.FormatTimeString(this.Data.UpdateTime.Time,"HH:MM:SS");aryText.push({Text:text,Color:this.DateTimeColor});}}//叠加股票的名字
|
|
5343
5346
|
if(IFrameSplitOperator.IsNonEmptyArray(this.OverlayChartPaint)){for(var i=0;i<this.OverlayChartPaint.length;++i){var item=this.OverlayChartPaint[i];if(!item.Symbol||!item.Title)continue;var clrText=item.Color;var text='['+item.Title+']';aryText.push({Text:text,Color:clrText});}}return{AryText:aryText};};this.DrawItem=function(item,isLastOne)//isLastOne 是否是最后一个数据
|
|
5344
5347
|
{if(!item)return;var pixelRatio=GetDevicePixelRatio();var isHScreen=this.Frame.IsHScreen===true;var border=this.Frame.GetBorder();var left=border.Left;var bottom=border.Top-this.Frame.ChartBorder.Top/2;var defaultfloatPrecision=GetfloatPrecision(this.Symbol);//价格小数位数
|
|
@@ -5350,11 +5353,11 @@ var xText=border.ChartWidth;var yText=border.Top;this.Canvas.translate(xText,yTe
|
|
|
5350
5353
|
this.FormatCallAuctionTitle=function(data){var aryText=[];//{ Color: Text: }
|
|
5351
5354
|
var defaultfloatPrecision=GetfloatPrecision(this.Symbol);//价格小数位数
|
|
5352
5355
|
//股票名称
|
|
5353
|
-
if(this.IsShowName)aryText.push({Text:this.Name,Color:this.NameColor});if(data&&data.Data){var item=data.Data;var text,strTime,strDate;strDate=IFrameSplitOperator.FormatDateString(item.Date);//时间
|
|
5356
|
+
if(this.IsShowName)aryText.push({Text:this.Name,Color:this.NameColor});if(data&&data.Data){var item=data.Data;var text,strTime,strDate;strDate=IFrameSplitOperator.FormatDateString(item.Date);var yClose=item.YClose;//时间
|
|
5354
5357
|
if(data.Ver==1.0)strTime=IFrameSplitOperator.FormatTimeString(item.Time,"HH:MM");else strTime=IFrameSplitOperator.FormatTimeString(item.Time,"HH:MM:SS");if(data.Explain=="MultiDayBeforeOpen"||data.Explain=="MultiDayAfterClose")text=strDate+' '+strTime;else text=strTime;aryText.push({Text:text,Color:this.DateTimeColor});//匹配价
|
|
5355
|
-
if(IFrameSplitOperator.IsNumber(item.Price)&&this.CallAuctionShowTitle.has("MTitle-AC-Price")){var color=this.GetColor(item.Price,
|
|
5356
|
-
if(IFrameSplitOperator.IsPlusNumber(
|
|
5357
|
-
if(IFrameSplitOperator.IsNumber(item.AvPrice)&&this.CallAuctionShowTitle.has("MTitle-AC-AvPrice")){var color=this.GetColor(item.AvPrice,
|
|
5358
|
+
if(IFrameSplitOperator.IsNumber(item.Price)&&this.CallAuctionShowTitle.has("MTitle-AC-Price")){var color=this.GetColor(item.Price,yClose);var filedName='MTitle-AC-Price';if(data.Ver==1.0)filedName="MTitle-Close";var text=g_JSChartLocalization.GetText(filedName,this.LanguageID)+item.Price.toFixed(defaultfloatPrecision);aryText.push({Text:text,Color:color});}//竞价涨幅
|
|
5359
|
+
if(IFrameSplitOperator.IsPlusNumber(yClose)&&IFrameSplitOperator.IsNumber(item.Price)&&this.CallAuctionShowTitle.has("MTitle-AC-Increase")){var value=(item.Price-yClose)/yClose*100;var color=this.GetColor(value,0);var filedName='MTitle-AC-Increase';if(data.Ver==1.0)filedName="MTitle-Increase";var text=g_JSChartLocalization.GetText(filedName,this.LanguageID)+value.toFixed(2)+"%";aryText.push({Text:text,Color:color});}//均价
|
|
5360
|
+
if(IFrameSplitOperator.IsNumber(item.AvPrice)&&this.CallAuctionShowTitle.has("MTitle-AC-AvPrice")){var color=this.GetColor(item.AvPrice,yClose);var text=g_JSChartLocalization.GetText('MTitle-AC-AvPrice',this.LanguageID)+item.AvPrice.toFixed(defaultfloatPrecision);aryText.push({Text:text,Color:color});}//匹配量
|
|
5358
5361
|
if(IFrameSplitOperator.IsNumber(item.Vol[0])&&this.CallAuctionShowTitle.has("MTitle-AC-Vol")){var filedName='MTitle-AC-Vol';if(data.Ver==1.0)filedName="MTitle-Vol";var text=g_JSChartLocalization.GetText(filedName,this.LanguageID)+IFrameSplitOperator.FromatIntegerString(item.Vol[0],2);aryText.push({Text:text,Color:this.VolColor});}//未匹配量
|
|
5359
5362
|
if(IFrameSplitOperator.IsNumber(item.Vol[1])&&this.CallAuctionShowTitle.has("MTitle-AC-NotMatchVol")){var text=g_JSChartLocalization.GetText('MTitle-AC-NotMatchVol',this.LanguageID)+IFrameSplitOperator.FromatIntegerString(item.Vol[1],2);aryText.push({Text:text,Color:this.VolColor});}if(item.ExtendData&&IFrameSplitOperator.IsNonEmptyArray(item.ExtendData.Amount)){var aryAmount=item.ExtendData.Amount;if(IFrameSplitOperator.IsNumber(aryAmount[0])&&this.CallAuctionShowTitle.has("MTitle-AC-Amount"))//匹配量金额
|
|
5360
5363
|
{var text=g_JSChartLocalization.GetText('MTitle-AC-Amount',this.LanguageID)+IFrameSplitOperator.FromatIntegerString(aryAmount[0],2);aryText.push({Text:text,Color:this.AmountColor});}if(IFrameSplitOperator.IsNumber(aryAmount[1])&&this.CallAuctionShowTitle.has("MTitle-AC-NotMatchAmount"))//未匹配量金额
|
|
@@ -7725,27 +7728,27 @@ this.GetSelectRectData=function(selectData){if(Math.abs(selectData.XStart-select
|
|
|
7725
7728
|
{var subFrame=this.Frame.SubFrame[1];if(subFrame.Frame)subFrame.Frame.XYSplit=true;}};this.ExportMainData=function(data,option){var aryData=data.ExportMinuteData(option);//导出K线
|
|
7726
7729
|
return aryData;};this.DisplayLatest=function(){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DISPLAY_LATEST);//选中画图工具事件
|
|
7727
7730
|
if(event){var sendData={PreventDefault:false};event.Callback(event,sendData,this);if(sendData.PreventDefault)return;}this.CursorIndex=null;this.LastPoint.X=0;this.LastPoint.Y=0;this.GlobalOption.IsDisplayLatest=true;this.DrawDynamicInfo();};this.TryClickIndexTitle=function(x,y){for(var i=0;i<this.TitlePaint.length;++i){var item=this.TitlePaint[i];if(!item.IsClickTitle)continue;if(!item.IsClickTitle(x,y))continue;var data={Point:{X:x,Y:y},Title:item.Title,FrameID:item.Frame.Identify};JSConsole.Chart.Log('[MinuteChartContainer::TryClickIndexTitle] click title ',data);var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_INDEXTITLE);if(event&&event.Callback)event.Callback(event,data,this);return true;}return false;};}//盘前数据
|
|
7728
|
-
MinuteChartContainer.JsonDataToBeforeOpenData=function(data){var symbol=data.stock[0].symbol;var upperSymbol=symbol.toUpperCase();var isSHSZ=MARKET_SUFFIX_NAME.IsSHSZ(upperSymbol);var preClose=data.stock[0].yclose;//前一个数据价格
|
|
7731
|
+
MinuteChartContainer.JsonDataToBeforeOpenData=function(data){var symbol=data.stock[0].symbol;var upperSymbol=symbol.toUpperCase();var isSHSZ=MARKET_SUFFIX_NAME.IsSHSZ(upperSymbol);var yClose=data.stock[0].yclos;var preClose=data.stock[0].yclose;//前一个数据价格
|
|
7729
7732
|
var stockData=data.stock[0];var date=stockData.date;//日期
|
|
7730
7733
|
var beforeOpenData={Data:[],TotalCount:15,Ver:1.0,Date:date};var extendDataIndex=JSCHART_DATA_FIELD_ID.MINUTE_BEFOREOPEN_EXTENDDATA;//扩展数据序号
|
|
7731
|
-
if(stockData.beforeinfo){if(IFrameSplitOperator.IsNumber(stockData.beforeinfo.totalcount))beforeOpenData.TotalCount=stockData.beforeinfo.totalcount;if(IFrameSplitOperator.IsNumber(stockData.beforeinfo.ver))beforeOpenData.Ver=stockData.beforeinfo.ver;}if(beforeOpenData.Ver==1.0){if(IFrameSplitOperator.IsNonEmptyArray(stockData.before)){for(var i=0;i<stockData.before.length;++i){var item=new BeforeOpenData();var jsData=stockData.before[i];item.Time=jsData[0];item.Date=date;item.Price=jsData[1];if(!item.Price)item.Price=preClose;else preClose=item.Price;if(isSHSZ)item.Vol[0]=jsData[2]/100;//沪深股票原始单位股
|
|
7734
|
+
if(stockData.beforeinfo){if(IFrameSplitOperator.IsNumber(stockData.beforeinfo.totalcount))beforeOpenData.TotalCount=stockData.beforeinfo.totalcount;if(IFrameSplitOperator.IsNumber(stockData.beforeinfo.ver))beforeOpenData.Ver=stockData.beforeinfo.ver;}if(beforeOpenData.Ver==1.0){if(IFrameSplitOperator.IsNonEmptyArray(stockData.before)){for(var i=0;i<stockData.before.length;++i){var item=new BeforeOpenData();var jsData=stockData.before[i];item.YClose=yClose;item.Time=jsData[0];item.Date=date;item.Price=jsData[1];if(!item.Price)item.Price=preClose;else preClose=item.Price;if(isSHSZ)item.Vol[0]=jsData[2]/100;//沪深股票原始单位股
|
|
7732
7735
|
else item.Vol[0]=jsData[2];item.Amount=jsData[3];if(IFrameSplitOperator.IsNumber(jsData[4])&&jsData[4]>19000101)//日期
|
|
7733
|
-
item.Date=jsData[4];item.DateTime=item.Date+' '+item.Time;beforeOpenData.Data.push(item);}}}else if(beforeOpenData.Ver==2.0){var max=0;for(var i in stockData.before){var item=new BeforeOpenData();var jsData=stockData.before[i];item.Time=jsData[0];item.Date=date;item.Price=jsData[1];item.Vol[0]=jsData[2];//匹配量
|
|
7736
|
+
item.Date=jsData[4];item.DateTime=item.Date+' '+item.Time;beforeOpenData.Data.push(item);}}}else if(beforeOpenData.Ver==2.0){var max=0;for(var i in stockData.before){var item=new BeforeOpenData();var jsData=stockData.before[i];item.YClose=yClose;item.Time=jsData[0];item.Date=date;item.Price=jsData[1];item.Vol[0]=jsData[2];//匹配量
|
|
7734
7737
|
item.Vol[1]=jsData[3];//未匹配量
|
|
7735
7738
|
item.ColorID=jsData[4];//柱子颜色ID
|
|
7736
7739
|
if(IFrameSplitOperator.IsNumber(jsData[6]))item.Date=jsData[6];//日期
|
|
7737
|
-
item.DateTime=item.Date+' '+item.Time+')';var totalVol=item.Vol[0]+item.Vol[1];if(IFrameSplitOperator.IsNumber(jsData[5]))totalVol=jsData[5];if(totalVol>max)max=totalVol;if(jsData[extendDataIndex])item.ExtendData=jsData[extendDataIndex];beforeOpenData.Data.push(item);}beforeOpenData.VolMax=max;beforeOpenData.VolMin=0;}else if(beforeOpenData.Ver==3.0){var max=0;for(var i in stockData.before){var item=new BeforeOpenData();var jsData=stockData.before[i];item.Time=jsData[0];item.Date=date;item.Price=jsData[1];item.AvPrice=jsData[2];//均价
|
|
7740
|
+
item.DateTime=item.Date+' '+item.Time+')';var totalVol=item.Vol[0]+item.Vol[1];if(IFrameSplitOperator.IsNumber(jsData[5]))totalVol=jsData[5];if(totalVol>max)max=totalVol;if(jsData[extendDataIndex])item.ExtendData=jsData[extendDataIndex];beforeOpenData.Data.push(item);}beforeOpenData.VolMax=max;beforeOpenData.VolMin=0;}else if(beforeOpenData.Ver==3.0){var max=0;for(var i in stockData.before){var item=new BeforeOpenData();var jsData=stockData.before[i];item.YClose=yClose;item.Time=jsData[0];item.Date=date;item.Price=jsData[1];item.AvPrice=jsData[2];//均价
|
|
7738
7741
|
item.Vol[0]=jsData[3];//匹配量
|
|
7739
7742
|
item.ColorID=jsData[4];//柱子颜色ID
|
|
7740
7743
|
item.DateTime=date.toString()+" "+item.Time.toString();var totalVol=item.Vol[0];if(IFrameSplitOperator.IsNumber(jsData[5]))totalVol=jsData[5];if(totalVol>max)max=totalVol;if(jsData[extendDataIndex])item.ExtendData=jsData[extendDataIndex];beforeOpenData.Data.push(item);}beforeOpenData.VolMax=max;beforeOpenData.VolMin=0;}return beforeOpenData;};//收盘集合竞价
|
|
7741
|
-
MinuteChartContainer.JsonDataToAfterCloseData=function(data){var preClose=data.stock[0].yclose;//前一个数据价格
|
|
7744
|
+
MinuteChartContainer.JsonDataToAfterCloseData=function(data){var yClose=data.stock[0].yclose;var preClose=data.stock[0].yclose;//前一个数据价格
|
|
7742
7745
|
var stockData=data.stock[0];var date=stockData.date;//日期
|
|
7743
7746
|
if(!stockData.afterinfo)return null;var afterCloseData={Data:[],TotalCount:3*60,Ver:2.0,Date:date};var item=stockData.afterinfo;if(IFrameSplitOperator.IsNumber(item.totalcount))afterCloseData.TotalCount=item.totalcount;if(IFrameSplitOperator.IsNumber(item.ver))afterCloseData.Ver=item.ver;var extendDataIndex=JSCHART_DATA_FIELD_ID.MINUTE_AFTERCLOSE_EXTENDDATA;//扩展数据序号
|
|
7744
|
-
if(afterCloseData.Ver==1.0){for(var i=0;i<stockData.after.length;++i){var item=new AfterCloseData();var jsData=stockData.after[i];item.Time=jsData[0];item.Date=date;item.Price=jsData[1];item.Vol[0]=jsData[2];item.Amount=jsData[3];if(IFrameSplitOperator.IsNumber(jsData[4]))//日期
|
|
7745
|
-
item.Date=jsData[4];item.DateTime=item.Date+' '+item.Time;afterCloseData.Data.push(item);}}else if(afterCloseData.Ver==2.0){var max=0;for(var i in stockData.after){var item=new AfterCloseData();var jsData=stockData.after[i];item.Time=jsData[0];item.Date=date;item.Price=jsData[1];item.Vol[0]=jsData[2];//匹配量
|
|
7747
|
+
if(afterCloseData.Ver==1.0){for(var i=0;i<stockData.after.length;++i){var item=new AfterCloseData();var jsData=stockData.after[i];item.YClose=yClose;item.Time=jsData[0];item.Date=date;item.Price=jsData[1];item.Vol[0]=jsData[2];item.Amount=jsData[3];if(IFrameSplitOperator.IsNumber(jsData[4]))//日期
|
|
7748
|
+
item.Date=jsData[4];item.DateTime=item.Date+' '+item.Time;afterCloseData.Data.push(item);}}else if(afterCloseData.Ver==2.0){var max=0;for(var i in stockData.after){var item=new AfterCloseData();var jsData=stockData.after[i];item.YClose=yClose;item.Time=jsData[0];item.Date=date;item.Price=jsData[1];item.Vol[0]=jsData[2];//匹配量
|
|
7746
7749
|
item.Vol[1]=jsData[3];//未匹配量
|
|
7747
7750
|
item.ColorID=jsData[4];//柱子颜色ID
|
|
7748
|
-
item.DateTime=date.toString()+" "+item.Time.toString();var totalVol=item.Vol[0]+item.Vol[1];if(IFrameSplitOperator.IsNumber(jsData[5]))totalVol=jsData[5];if(totalVol>max)max=totalVol;if(jsData[extendDataIndex])item.ExtendData=jsData[extendDataIndex];afterCloseData.Data.push(item);}afterCloseData.VolMax=max;afterCloseData.VolMin=0;}else if(afterCloseData.Ver==3.0){var max=0;for(var i in stockData.after){var item=new AfterCloseData();var jsData=stockData.after[i];item.Time=jsData[0];item.Date=date;item.Price=jsData[1];item.AvPrice=jsData[2];//均价
|
|
7751
|
+
item.DateTime=date.toString()+" "+item.Time.toString();var totalVol=item.Vol[0]+item.Vol[1];if(IFrameSplitOperator.IsNumber(jsData[5]))totalVol=jsData[5];if(totalVol>max)max=totalVol;if(jsData[extendDataIndex])item.ExtendData=jsData[extendDataIndex];afterCloseData.Data.push(item);}afterCloseData.VolMax=max;afterCloseData.VolMin=0;}else if(afterCloseData.Ver==3.0){var max=0;for(var i in stockData.after){var item=new AfterCloseData();var jsData=stockData.after[i];item.YClose=yClose;item.Time=jsData[0];item.Date=date;item.Price=jsData[1];item.AvPrice=jsData[2];//均价
|
|
7749
7752
|
item.Vol[0]=jsData[3];//匹配量
|
|
7750
7753
|
item.ColorID=jsData[4];//柱子颜色ID
|
|
7751
7754
|
item.DateTime=date.toString()+" "+item.Time.toString();var totalVol=item.Vol[0];if(IFrameSplitOperator.IsNumber(jsData[5]))totalVol=jsData[5];if(totalVol>max)max=totalVol;if(jsData[extendDataIndex])item.ExtendData=jsData[extendDataIndex];afterCloseData.Data.push(item);}afterCloseData.VolMax=max;afterCloseData.VolMin=0;}return afterCloseData;};//API 返回数据 转化为array[]
|
|
@@ -7756,7 +7759,7 @@ var aryMinuteData=[];var preClose=data.stock[0].yclose;//前一个数据价格
|
|
|
7756
7759
|
var preAvPrice=data.stock[0].yclose;//前一个均价
|
|
7757
7760
|
var yClose=data.stock[0].yclose;if(isFutures&&data.stock[0].yclearing)yClose=preClose=preAvPrice=data.stock[0].yclearing;//期货使用昨结算价
|
|
7758
7761
|
if(!IFrameSplitOperator.IsNonEmptyArray(data.stock[0].minute))return aryMinuteData;var date=data.stock[0].date;//默认使用外部日期, 但跨天的 走势图使用内部的日期
|
|
7759
|
-
for(var i=0;i<data.stock[0].minute.length;++i){var jsData=data.stock[0].minute[i];var item=new MinuteData();item.Close=jsData.price;item.Open=jsData.open;item.High=jsData.high;item.Low=jsData.low;if(isSHSZ)item.Vol=jsData.vol/100;//沪深股票原始单位股
|
|
7762
|
+
for(var i=0;i<data.stock[0].minute.length;++i){var jsData=data.stock[0].minute[i];var item=new MinuteData();item.YClose=yClose;item.Close=jsData.price;item.Open=jsData.open;item.High=jsData.high;item.Low=jsData.low;if(isSHSZ)item.Vol=jsData.vol/100;//沪深股票原始单位股
|
|
7760
7763
|
else item.Vol=jsData.vol;item.Amount=jsData.amount;if(jsData.date>0)date=jsData.date;//分钟数据中有日期 优先使用
|
|
7761
7764
|
item.DateTime=date.toString()+" "+jsData.time.toString();item.Date=date;item.Time=jsData.time;if(isFutures||isSHO||isSZO)item.Position=jsData.position;//期货 期权有持仓
|
|
7762
7765
|
else if(IFrameSplitOperator.IsNumber(jsData.position))item.Position=jsData.position;item.Increase=jsData.increase;item.Risefall=jsData.risefall;item.AvPrice=jsData.avprice;if(IFrameSplitOperator.IsNumber(jsData.lead))item.Lead=jsData.lead;//领先指标 指数才有
|
|
@@ -7789,7 +7792,7 @@ var preAvPrice=null;//上一个均价
|
|
|
7789
7792
|
var yClearing=dayData.yclearing;//昨结算价
|
|
7790
7793
|
//var preAvPrice=data.stock[0].yclose; //前一个均价
|
|
7791
7794
|
for(var j in dayData.minute){var jsData=dayData.minute[j];if(jsData[2])preClose=jsData[2];//保存上一个收盘数据
|
|
7792
|
-
var item=new MinuteData();item.Close=jsData[2];item.Open=jsData[1];item.High=jsData[3];item.Low=jsData[4];if(isSHSZ)item.Vol=jsData[5]/100;//原始单位股
|
|
7795
|
+
var item=new MinuteData();item.YClose=yClose;item.Close=jsData[2];item.Open=jsData[1];item.High=jsData[3];item.Low=jsData[4];if(isSHSZ)item.Vol=jsData[5]/100;//原始单位股
|
|
7793
7796
|
else item.Vol=jsData[5];item.Amount=jsData[6];if(7<jsData.length&&jsData[7]>0)item.AvPrice=jsData[7];//均价
|
|
7794
7797
|
item.DateTime=date.toString()+" "+jsData[0].toString();item.Date=date;item.Time=jsData[0];if(8<jsData.length&&jsData[8]>0){item.Date=jsData[8];//日期
|
|
7795
7798
|
item.DateTime=item.Date.toString()+" "+jsData[0].toString();}if((isFutures||isSHO||isSZO)&&9<jsData.length)item.Position=jsData[9];//持仓
|
|
@@ -7802,16 +7805,16 @@ if(!IFrameSplitOperator.IsNumber(item.Close))//当前没有价格 使用上一
|
|
|
7802
7805
|
//if (item.Low<=0) item.Low=null;
|
|
7803
7806
|
//if (item.AvPrice<=0) item.AvPrice=null;
|
|
7804
7807
|
//均价太大 可能是后台算错了
|
|
7805
|
-
if(item.AvPrice&&isSHSZ){var checkValue=Math.abs(item.AvPrice-item.Close);if(checkValue>item.Close*0.13)item.AvPrice=preAvPrice;}if(jsData.length>7&&jsData[7]>0&&item.AvPrice===jsData[7])preAvPrice=jsData[7];if(jsData[extendDataIndex])item.ExtendData=jsData[extendDataIndex];minuteData[j]=item;}var newData=new ChartData();newData.Data=minuteData;newData.YClose=yClose;newData.Close=dayData.close;newData.Date=date;if(IFrameSplitOperator.IsNumber(yClearing))newData.YClearing=yClearing;result.push(newData);}return result;};MinuteChartContainer.JsonDataToHistoryMinuteLineColorData=function(data){if(!data)return null;var aryLineColor=[];for(var i in data.data){var dayData=data.data[i];if(!dayData.linecolor)continue;for(var j in dayData.linecolor.data){var item=dayData.linecolor.data[j];if(!IFrameSplitOperator.IsNumber(item.type)||!IFrameSplitOperator.IsNumber(item.date)||!IFrameSplitOperator.IsNumber(item.start)||!IFrameSplitOperator.IsNumber(item.end)||!item.color)continue;if(item.start>=item.end)continue;var newItem={Type:item.type,Date:item.date,Start:item.start,End:item.end,Color:item.color};if(IFrameSplitOperator.IsPlusNumber(item.linewidth))newItem.LineWidth=item.linewidth;aryLineColor.push(newItem);}}return aryLineColor.length>0?aryLineColor:null;};MinuteChartContainer.JsonDataToCallAuctionItem=function(data,callAuctionData,isBeforeOpen,symbol){var isSHSZ=false;if(symbol){var upperSymbol=symbol.toUpperCase();isSHSZ=MARKET_SUFFIX_NAME.IsSHSZ(upperSymbol);}var date=callAuctionData.Date;var extendDataIndex=isBeforeOpen?JSCHART_DATA_FIELD_ID.MINUTE_BEFOREOPEN_EXTENDDATA:JSCHART_DATA_FIELD_ID.MINUTE_AFTERCLOSE_EXTENDDATA;//扩展数据序号
|
|
7806
|
-
if(callAuctionData.Ver==1.0){var preClose=null;for(var i in data){var item=isBeforeOpen?new BeforeOpenData():new AfterCloseData();var jsData=data[i];item.Time=jsData[0];item.Date=date;item.Price=jsData[1];if(!item.Price)item.Price=preClose;else preClose=item.Price;item.Vol[0]=isSHSZ?jsData[2]/100:jsData[2];//沪深股票原始单位股
|
|
7808
|
+
if(item.AvPrice&&isSHSZ){var checkValue=Math.abs(item.AvPrice-item.Close);if(checkValue>item.Close*0.13)item.AvPrice=preAvPrice;}if(jsData.length>7&&jsData[7]>0&&item.AvPrice===jsData[7])preAvPrice=jsData[7];if(jsData[extendDataIndex])item.ExtendData=jsData[extendDataIndex];minuteData[j]=item;}var newData=new ChartData();newData.Data=minuteData;newData.YClose=yClose;newData.Close=dayData.close;newData.Date=date;if(IFrameSplitOperator.IsNumber(yClearing))newData.YClearing=yClearing;result.push(newData);}return result;};MinuteChartContainer.JsonDataToHistoryMinuteLineColorData=function(data){if(!data)return null;var aryLineColor=[];for(var i in data.data){var dayData=data.data[i];if(!dayData.linecolor)continue;for(var j in dayData.linecolor.data){var item=dayData.linecolor.data[j];if(!IFrameSplitOperator.IsNumber(item.type)||!IFrameSplitOperator.IsNumber(item.date)||!IFrameSplitOperator.IsNumber(item.start)||!IFrameSplitOperator.IsNumber(item.end)||!item.color)continue;if(item.start>=item.end)continue;var newItem={Type:item.type,Date:item.date,Start:item.start,End:item.end,Color:item.color};if(IFrameSplitOperator.IsPlusNumber(item.linewidth))newItem.LineWidth=item.linewidth;aryLineColor.push(newItem);}}return aryLineColor.length>0?aryLineColor:null;};MinuteChartContainer.JsonDataToCallAuctionItem=function(data,callAuctionData,isBeforeOpen,symbol){var isSHSZ=false;if(symbol){var upperSymbol=symbol.toUpperCase();isSHSZ=MARKET_SUFFIX_NAME.IsSHSZ(upperSymbol);}var date=callAuctionData.Date;var yClose=callAuctionData.YClose;var extendDataIndex=isBeforeOpen?JSCHART_DATA_FIELD_ID.MINUTE_BEFOREOPEN_EXTENDDATA:JSCHART_DATA_FIELD_ID.MINUTE_AFTERCLOSE_EXTENDDATA;//扩展数据序号
|
|
7809
|
+
if(callAuctionData.Ver==1.0){var preClose=null;for(var i in data){var item=isBeforeOpen?new BeforeOpenData():new AfterCloseData();var jsData=data[i];item.YClose=yClose;item.Time=jsData[0];item.Date=date;item.Price=jsData[1];if(!item.Price)item.Price=preClose;else preClose=item.Price;item.Vol[0]=isSHSZ?jsData[2]/100:jsData[2];//沪深股票原始单位股
|
|
7807
7810
|
item.Amount=jsData[3];if(IFrameSplitOperator.IsNumber(jsData[4]))//日期
|
|
7808
|
-
item.Date=jsData[4];item.DateTime=item.Date+' '+item.Time;callAuctionData.Data.push(item);}}else if(callAuctionData.Ver==2.0){var max=0;for(var i in data){var item=isBeforeOpen?new BeforeOpenData():new AfterCloseData();var jsData=data[i];item.Time=jsData[0];item.Date=date;item.Price=jsData[1];item.Vol[0]=jsData[2];//匹配量
|
|
7811
|
+
item.Date=jsData[4];item.DateTime=item.Date+' '+item.Time;callAuctionData.Data.push(item);}}else if(callAuctionData.Ver==2.0){var max=0;for(var i in data){var item=isBeforeOpen?new BeforeOpenData():new AfterCloseData();var jsData=data[i];item.YClose=yClose;item.Time=jsData[0];item.Date=date;item.Price=jsData[1];item.Vol[0]=jsData[2];//匹配量
|
|
7809
7812
|
item.Vol[1]=jsData[3];//未匹配量
|
|
7810
7813
|
item.ColorID=jsData[4];//柱子颜色ID
|
|
7811
|
-
item.DateTime=date.toString()+" "+item.Time.toString();var totalVol=item.Vol[0]+item.Vol[1];if(IFrameSplitOperator.IsNumber(jsData[5]))totalVol=jsData[5];if(totalVol>max)max=totalVol;if(jsData[extendDataIndex])item.ExtendData=jsData[extendDataIndex];callAuctionData.Data.push(item);}callAuctionData.VolMax=max;callAuctionData.VolMin=0;}else if(beforeOpenData.Ver==3.0){var max=0;for(var i in data){var item=isBeforeOpen?new BeforeOpenData():new AfterCloseData();var jsData=data[i];item.Time=jsData[0];item.Date=date;item.Price=jsData[1];item.AvPrice=jsData[2];//均价
|
|
7814
|
+
item.DateTime=date.toString()+" "+item.Time.toString();var totalVol=item.Vol[0]+item.Vol[1];if(IFrameSplitOperator.IsNumber(jsData[5]))totalVol=jsData[5];if(totalVol>max)max=totalVol;if(jsData[extendDataIndex])item.ExtendData=jsData[extendDataIndex];callAuctionData.Data.push(item);}callAuctionData.VolMax=max;callAuctionData.VolMin=0;}else if(beforeOpenData.Ver==3.0){var max=0;for(var i in data){var item=isBeforeOpen?new BeforeOpenData():new AfterCloseData();var jsData=data[i];item.YClose=yClose;item.Time=jsData[0];item.Date=date;item.Price=jsData[1];item.AvPrice=jsData[2];//均价
|
|
7812
7815
|
item.Vol[0]=jsData[3];//匹配量
|
|
7813
7816
|
item.ColorID=jsData[4];//柱子颜色ID
|
|
7814
|
-
item.DateTime=date.toString()+" "+item.Time.toString();var totalVol=item.Vol[0];if(IFrameSplitOperator.IsNumber(jsData[5]))totalVol=jsData[5];if(totalVol>max)max=totalVol;if(jsData[extendDataIndex])item.ExtendData=jsData[extendDataIndex];callAuctionData.Data.push(item);}callAuctionData.VolMax=max;callAuctionData.VolMin=0;}};MinuteChartContainer.JosnDataToBeforeOpenDataArray=function(data){if(!data||!data.data)return null;var aryDay=[];for(var i in data.data){var dayItem=data.data[i];var beforeOpenData={Data:[],TotalCount:15,Ver:1.0,Date:dayItem.date};if(dayItem.beforeinfo){if(IFrameSplitOperator.IsNumber(dayItem.beforeinfo.totalcount))beforeOpenData.TotalCount=dayItem.beforeinfo.totalcount;if(IFrameSplitOperator.IsNumber(dayItem.beforeinfo.ver))beforeOpenData.Ver=dayItem.beforeinfo.ver;}MinuteChartContainer.JsonDataToCallAuctionItem(dayItem.before,beforeOpenData,true,data.symbol);aryDay.push(beforeOpenData);}aryDay.sort(function(left,right){return left.Date-right.Date;});return aryDay;};MinuteChartContainer.JosnDataToAfterCloseDataArray=function(data){if(!data||!data.data)return null;var aryDay=[];for(var i in data.data){var dayItem=data.data[i];var afterCloseData={Data:[],TotalCount:15,Ver:1.0,Date:dayItem.date};if(dayItem.afterinfo){if(IFrameSplitOperator.IsNumber(dayItem.afterinfo.totalcount))afterCloseData.TotalCount=dayItem.afterinfo.totalcount;if(IFrameSplitOperator.IsNumber(dayItem.afterinfo.ver))afterCloseData.Ver=dayItem.afterinfo.ver;}MinuteChartContainer.JsonDataToCallAuctionItem(dayItem.after,afterCloseData,false,data.symbol);aryDay.push(afterCloseData);}aryDay.sort(function(left,right){return left.Date-right.Date;});return aryDay;};/*
|
|
7817
|
+
item.DateTime=date.toString()+" "+item.Time.toString();var totalVol=item.Vol[0];if(IFrameSplitOperator.IsNumber(jsData[5]))totalVol=jsData[5];if(totalVol>max)max=totalVol;if(jsData[extendDataIndex])item.ExtendData=jsData[extendDataIndex];callAuctionData.Data.push(item);}callAuctionData.VolMax=max;callAuctionData.VolMin=0;}};MinuteChartContainer.JosnDataToBeforeOpenDataArray=function(data){if(!data||!data.data)return null;var aryDay=[];for(var i in data.data){var dayItem=data.data[i];var beforeOpenData={Data:[],TotalCount:15,Ver:1.0,Date:dayItem.date,YClose:dayItem.yclose};if(dayItem.beforeinfo){if(IFrameSplitOperator.IsNumber(dayItem.beforeinfo.totalcount))beforeOpenData.TotalCount=dayItem.beforeinfo.totalcount;if(IFrameSplitOperator.IsNumber(dayItem.beforeinfo.ver))beforeOpenData.Ver=dayItem.beforeinfo.ver;}MinuteChartContainer.JsonDataToCallAuctionItem(dayItem.before,beforeOpenData,true,data.symbol);aryDay.push(beforeOpenData);}aryDay.sort(function(left,right){return left.Date-right.Date;});return aryDay;};MinuteChartContainer.JosnDataToAfterCloseDataArray=function(data){if(!data||!data.data)return null;var aryDay=[];for(var i in data.data){var dayItem=data.data[i];var afterCloseData={Data:[],TotalCount:15,Ver:1.0,Date:dayItem.date,YClose:dayItem.yclose};if(dayItem.afterinfo){if(IFrameSplitOperator.IsNumber(dayItem.afterinfo.totalcount))afterCloseData.TotalCount=dayItem.afterinfo.totalcount;if(IFrameSplitOperator.IsNumber(dayItem.afterinfo.ver))afterCloseData.Ver=dayItem.afterinfo.ver;}MinuteChartContainer.JsonDataToCallAuctionItem(dayItem.after,afterCloseData,false,data.symbol);aryDay.push(afterCloseData);}aryDay.sort(function(left,right){return left.Date-right.Date;});return aryDay;};/*
|
|
7815
7818
|
历史分钟走势图
|
|
7816
7819
|
*/function HistoryMinuteChartContainer(uielement){this.newMethod=MinuteChartContainer;//派生
|
|
7817
7820
|
this.newMethod(uielement);delete this.newMethod;this.HistoryMinuteApiUrl="http://127.0.0.1:8080/cache/minuteday/day/";this.ClassName='HistoryMinuteChartContainer';//创建主图K线画法
|
|
@@ -12475,7 +12478,7 @@ this.AreaColor=g_JSChartResource.ScrollBar.BGChart.AreaColor;//面积图颜色
|
|
|
12475
12478
|
};this.Draw=function(){if(!this.Data||!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return;this.Canvas.save();if(this.LineWidth>0)this.Canvas.lineWidth=this.LineWidth*GetDevicePixelRatio();var bottom=this.ChartBorder.GetBottom();this.Canvas.strokeStyle=this.Color;var bFirstPoint=true;var drawCount=0,x,y;var firstPoint={};for(var i=0;i<this.Data.Data.length;++i){var item=this.Data.Data[i];var value=item.Close;if(!IFrameSplitOperator.IsNumber(value))continue;x=this.ChartFrame.GetXFromIndex(i);y=this.ChartFrame.GetYFromData(value);if(bFirstPoint){this.Canvas.beginPath();this.Canvas.moveTo(x,y);bFirstPoint=false;firstPoint={X:x,Y:y};}else{this.Canvas.lineTo(x,y);}++drawCount;}if(drawCount>0){this.Canvas.stroke();this.Canvas.lineTo(x,bottom);this.Canvas.lineTo(firstPoint.X,bottom);this.Canvas.closePath();this.Canvas.fillStyle=this.AreaColor;this.Canvas.fill();}this.Canvas.restore();};this.GetMaxMin=function(){var range={Max:null,Min:null};if(!this.Data||!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return range;for(var i=0;i<this.Data.Data.length;++i){var item=this.Data.Data[i];var value=item.Close;if(!IFrameSplitOperator.IsNumber(value))continue;if(range.Max==null||range.Max<value)range.Max=value;if(range.Min==null||range.Min>value)range.Min=value;}return range;};}/********************************************************************************
|
|
12476
12479
|
* 版本信息输出
|
|
12477
12480
|
*
|
|
12478
|
-
*/var HQCHART_VERSION="1.1.
|
|
12481
|
+
*/var HQCHART_VERSION="1.1.12454";function PrintHQChartVersion(){var log='*************************************************************************************************************\n*\n* HQChart Ver: '+HQCHART_VERSION+' \n* \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n*************************************************************************************************************\n';console.log(log);}PrintHQChartVersion();//把给外界调用的方法暴露出来
|
|
12479
12482
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
12480
12483
|
// BaseIndex:BaseIndex,
|
|
12481
12484
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -17645,6 +17645,7 @@ function MinuteData()
|
|
|
17645
17645
|
this.Date; //日期
|
|
17646
17646
|
this.Position=null; //持仓量
|
|
17647
17647
|
this.YClearing; //昨结算价
|
|
17648
|
+
this.YClose; //昨收价
|
|
17648
17649
|
|
|
17649
17650
|
this.ExtendData; //扩展数据
|
|
17650
17651
|
}
|
|
@@ -17657,7 +17658,8 @@ function BeforeOpenData()
|
|
|
17657
17658
|
this.Price; //匹配的价格
|
|
17658
17659
|
this.AvPrice; //均价
|
|
17659
17660
|
this.Vol=[]; //[0]=匹配量 [1]=未匹配量
|
|
17660
|
-
this.ColorID; //0=平盘 1=红 2=绿 3 ...自定义颜色
|
|
17661
|
+
this.ColorID; //0=平盘 1=红 2=绿 3 ...自定义颜色
|
|
17662
|
+
this.YClose; //昨收价
|
|
17661
17663
|
}
|
|
17662
17664
|
|
|
17663
17665
|
//收盘集合竞价
|
|
@@ -17668,7 +17670,8 @@ function AfterCloseData()
|
|
|
17668
17670
|
this.Price; //匹配的价格
|
|
17669
17671
|
this.AvPrice; //均价
|
|
17670
17672
|
this.Vol=[]; //[0]=匹配量 [1]=未匹配量
|
|
17671
|
-
this.ColorID; //0=平盘 1=红 2=绿 3 ...自定义颜色
|
|
17673
|
+
this.ColorID; //0=平盘 1=红 2=绿 3 ...自定义颜色
|
|
17674
|
+
this.YClose; //昨收价
|
|
17672
17675
|
}
|
|
17673
17676
|
|
|
17674
17677
|
//单指标数据
|
|
@@ -48124,10 +48127,12 @@ function DynamicMinuteTitlePainting()
|
|
|
48124
48127
|
var increase=item.Increase;
|
|
48125
48128
|
var vol=item.Vol;
|
|
48126
48129
|
var amount=item.Amount;
|
|
48130
|
+
var yClose=item.YClose;
|
|
48131
|
+
if (!IFrameSplitOperator.IsNumber(yClose)) yClose=this.YClose;
|
|
48127
48132
|
|
|
48128
48133
|
if (IFrameSplitOperator.IsNumber(close))
|
|
48129
48134
|
{
|
|
48130
|
-
var color=this.GetColor(close,
|
|
48135
|
+
var color=this.GetColor(close,yClose);
|
|
48131
48136
|
var text=g_JSChartLocalization.GetText('MTitle-Close',this.LanguageID)+close.toFixed(defaultfloatPrecision);
|
|
48132
48137
|
aryText.push({Text:text, Color:color});
|
|
48133
48138
|
}
|
|
@@ -48146,7 +48151,7 @@ function DynamicMinuteTitlePainting()
|
|
|
48146
48151
|
|
|
48147
48152
|
if (IFrameSplitOperator.IsNumber(item.AvPrice) && isShowAvPrice && this.IsShowAveragePrice)
|
|
48148
48153
|
{
|
|
48149
|
-
var color=this.GetColor(item.AvPrice,
|
|
48154
|
+
var color=this.GetColor(item.AvPrice,yClose);
|
|
48150
48155
|
var text=g_JSChartLocalization.GetText('MTitle-AvPrice',this.LanguageID)+item.AvPrice.toFixed(defaultfloatPrecision);
|
|
48151
48156
|
aryText.push({Text:text, Color:color});
|
|
48152
48157
|
}
|
|
@@ -48269,7 +48274,8 @@ function DynamicMinuteTitlePainting()
|
|
|
48269
48274
|
var item=data.Data;
|
|
48270
48275
|
var text, strTime, strDate;
|
|
48271
48276
|
strDate=IFrameSplitOperator.FormatDateString(item.Date);
|
|
48272
|
-
|
|
48277
|
+
var yClose=item.YClose;
|
|
48278
|
+
|
|
48273
48279
|
//时间
|
|
48274
48280
|
if (data.Ver==1.0) strTime=IFrameSplitOperator.FormatTimeString(item.Time,"HH:MM");
|
|
48275
48281
|
else strTime=IFrameSplitOperator.FormatTimeString(item.Time,"HH:MM:SS");
|
|
@@ -48280,17 +48286,17 @@ function DynamicMinuteTitlePainting()
|
|
|
48280
48286
|
//匹配价
|
|
48281
48287
|
if(IFrameSplitOperator.IsNumber(item.Price) && this.CallAuctionShowTitle.has("MTitle-AC-Price"))
|
|
48282
48288
|
{
|
|
48283
|
-
var color=this.GetColor(item.Price,
|
|
48289
|
+
var color=this.GetColor(item.Price,yClose);
|
|
48284
48290
|
var filedName='MTitle-AC-Price';
|
|
48285
48291
|
if (data.Ver==1.0) filedName="MTitle-Close";
|
|
48286
48292
|
var text=g_JSChartLocalization.GetText(filedName,this.LanguageID)+item.Price.toFixed(defaultfloatPrecision);
|
|
48287
48293
|
aryText.push({Text:text, Color:color});
|
|
48288
48294
|
}
|
|
48289
48295
|
|
|
48290
|
-
|
|
48291
|
-
if (IFrameSplitOperator.IsPlusNumber(
|
|
48296
|
+
//竞价涨幅
|
|
48297
|
+
if (IFrameSplitOperator.IsPlusNumber(yClose) && IFrameSplitOperator.IsNumber(item.Price) && this.CallAuctionShowTitle.has("MTitle-AC-Increase"))
|
|
48292
48298
|
{
|
|
48293
|
-
var value=(item.Price-
|
|
48299
|
+
var value=(item.Price-yClose)/yClose*100;
|
|
48294
48300
|
var color=this.GetColor(value,0);
|
|
48295
48301
|
var filedName='MTitle-AC-Increase';
|
|
48296
48302
|
if (data.Ver==1.0) filedName="MTitle-Increase";
|
|
@@ -48301,7 +48307,7 @@ function DynamicMinuteTitlePainting()
|
|
|
48301
48307
|
//均价
|
|
48302
48308
|
if (IFrameSplitOperator.IsNumber(item.AvPrice) && this.CallAuctionShowTitle.has("MTitle-AC-AvPrice"))
|
|
48303
48309
|
{
|
|
48304
|
-
var color=this.GetColor(item.AvPrice,
|
|
48310
|
+
var color=this.GetColor(item.AvPrice,yClose);
|
|
48305
48311
|
var text=g_JSChartLocalization.GetText('MTitle-AC-AvPrice',this.LanguageID)+item.AvPrice.toFixed(defaultfloatPrecision);
|
|
48306
48312
|
aryText.push({Text:text, Color:color});
|
|
48307
48313
|
}
|
|
@@ -74726,6 +74732,7 @@ MinuteChartContainer.JsonDataToBeforeOpenData=function(data)
|
|
|
74726
74732
|
var upperSymbol=symbol.toUpperCase();
|
|
74727
74733
|
var isSHSZ=MARKET_SUFFIX_NAME.IsSHSZ(upperSymbol);
|
|
74728
74734
|
|
|
74735
|
+
var yClose=data.stock[0].yclos;
|
|
74729
74736
|
var preClose=data.stock[0].yclose; //前一个数据价格
|
|
74730
74737
|
var stockData=data.stock[0];
|
|
74731
74738
|
var date=stockData.date; //日期
|
|
@@ -74745,6 +74752,7 @@ MinuteChartContainer.JsonDataToBeforeOpenData=function(data)
|
|
|
74745
74752
|
{
|
|
74746
74753
|
var item=new BeforeOpenData();
|
|
74747
74754
|
var jsData=stockData.before[i];
|
|
74755
|
+
item.YClose=yClose;
|
|
74748
74756
|
item.Time=jsData[0];
|
|
74749
74757
|
item.Date=date;
|
|
74750
74758
|
item.Price=jsData[1];
|
|
@@ -74769,6 +74777,7 @@ MinuteChartContainer.JsonDataToBeforeOpenData=function(data)
|
|
|
74769
74777
|
{
|
|
74770
74778
|
var item=new BeforeOpenData();
|
|
74771
74779
|
var jsData=stockData.before[i];
|
|
74780
|
+
item.YClose=yClose;
|
|
74772
74781
|
item.Time=jsData[0];
|
|
74773
74782
|
item.Date=date;
|
|
74774
74783
|
item.Price=jsData[1];
|
|
@@ -74797,6 +74806,7 @@ MinuteChartContainer.JsonDataToBeforeOpenData=function(data)
|
|
|
74797
74806
|
{
|
|
74798
74807
|
var item=new BeforeOpenData();
|
|
74799
74808
|
var jsData=stockData.before[i];
|
|
74809
|
+
item.YClose=yClose;
|
|
74800
74810
|
item.Time=jsData[0];
|
|
74801
74811
|
item.Date=date;
|
|
74802
74812
|
item.Price=jsData[1];
|
|
@@ -74823,6 +74833,7 @@ MinuteChartContainer.JsonDataToBeforeOpenData=function(data)
|
|
|
74823
74833
|
//收盘集合竞价
|
|
74824
74834
|
MinuteChartContainer.JsonDataToAfterCloseData=function(data)
|
|
74825
74835
|
{
|
|
74836
|
+
var yClose=data.stock[0].yclose;
|
|
74826
74837
|
var preClose=data.stock[0].yclose; //前一个数据价格
|
|
74827
74838
|
var stockData=data.stock[0];
|
|
74828
74839
|
var date=stockData.date; //日期
|
|
@@ -74840,6 +74851,7 @@ MinuteChartContainer.JsonDataToAfterCloseData=function(data)
|
|
|
74840
74851
|
{
|
|
74841
74852
|
var item=new AfterCloseData();
|
|
74842
74853
|
var jsData=stockData.after[i];
|
|
74854
|
+
item.YClose=yClose;
|
|
74843
74855
|
item.Time=jsData[0];
|
|
74844
74856
|
item.Date=date;
|
|
74845
74857
|
item.Price=jsData[1];
|
|
@@ -74860,6 +74872,7 @@ MinuteChartContainer.JsonDataToAfterCloseData=function(data)
|
|
|
74860
74872
|
{
|
|
74861
74873
|
var item=new AfterCloseData();
|
|
74862
74874
|
var jsData=stockData.after[i];
|
|
74875
|
+
item.YClose=yClose;
|
|
74863
74876
|
item.Time=jsData[0];
|
|
74864
74877
|
item.Date=date;
|
|
74865
74878
|
item.Price=jsData[1];
|
|
@@ -74886,6 +74899,7 @@ MinuteChartContainer.JsonDataToAfterCloseData=function(data)
|
|
|
74886
74899
|
{
|
|
74887
74900
|
var item=new AfterCloseData();
|
|
74888
74901
|
var jsData=stockData.after[i];
|
|
74902
|
+
item.YClose=yClose;
|
|
74889
74903
|
item.Time=jsData[0];
|
|
74890
74904
|
item.Date=date;
|
|
74891
74905
|
item.Price=jsData[1];
|
|
@@ -74932,6 +74946,7 @@ MinuteChartContainer.JsonDataToMinuteData=function(data,isBeforeData)
|
|
|
74932
74946
|
var jsData=data.stock[0].minute[i];
|
|
74933
74947
|
var item=new MinuteData();
|
|
74934
74948
|
|
|
74949
|
+
item.YClose=yClose;
|
|
74935
74950
|
item.Close=jsData.price;
|
|
74936
74951
|
item.Open=jsData.open;
|
|
74937
74952
|
item.High=jsData.high;
|
|
@@ -75113,6 +75128,7 @@ MinuteChartContainer.JsonDataToMinuteDataArray=function(data)
|
|
|
75113
75128
|
var jsData=dayData.minute[j];
|
|
75114
75129
|
if (jsData[2]) preClose=jsData[2]; //保存上一个收盘数据
|
|
75115
75130
|
var item=new MinuteData();
|
|
75131
|
+
item.YClose=yClose;
|
|
75116
75132
|
item.Close=jsData[2];
|
|
75117
75133
|
item.Open=jsData[1];
|
|
75118
75134
|
item.High=jsData[3];
|
|
@@ -75216,6 +75232,7 @@ MinuteChartContainer.JsonDataToCallAuctionItem=function(data, callAuctionData, i
|
|
|
75216
75232
|
}
|
|
75217
75233
|
|
|
75218
75234
|
var date=callAuctionData.Date;
|
|
75235
|
+
var yClose=callAuctionData.YClose;
|
|
75219
75236
|
var extendDataIndex=isBeforeOpen? JSCHART_DATA_FIELD_ID.MINUTE_BEFOREOPEN_EXTENDDATA:JSCHART_DATA_FIELD_ID.MINUTE_AFTERCLOSE_EXTENDDATA; //扩展数据序号
|
|
75220
75237
|
if (callAuctionData.Ver==1.0)
|
|
75221
75238
|
{
|
|
@@ -75224,6 +75241,7 @@ MinuteChartContainer.JsonDataToCallAuctionItem=function(data, callAuctionData, i
|
|
|
75224
75241
|
{
|
|
75225
75242
|
var item=isBeforeOpen? new BeforeOpenData() : new AfterCloseData();
|
|
75226
75243
|
var jsData=data[i];
|
|
75244
|
+
item.YClose=yClose;
|
|
75227
75245
|
item.Time=jsData[0];
|
|
75228
75246
|
item.Date=date;
|
|
75229
75247
|
item.Price=jsData[1];
|
|
@@ -75246,6 +75264,7 @@ MinuteChartContainer.JsonDataToCallAuctionItem=function(data, callAuctionData, i
|
|
|
75246
75264
|
{
|
|
75247
75265
|
var item=isBeforeOpen? new BeforeOpenData() : new AfterCloseData();
|
|
75248
75266
|
var jsData=data[i];
|
|
75267
|
+
item.YClose=yClose;
|
|
75249
75268
|
item.Time=jsData[0];
|
|
75250
75269
|
item.Date=date;
|
|
75251
75270
|
item.Price=jsData[1];
|
|
@@ -75272,6 +75291,7 @@ MinuteChartContainer.JsonDataToCallAuctionItem=function(data, callAuctionData, i
|
|
|
75272
75291
|
{
|
|
75273
75292
|
var item=isBeforeOpen? new BeforeOpenData() : new AfterCloseData();
|
|
75274
75293
|
var jsData=data[i];
|
|
75294
|
+
item.YClose=yClose;
|
|
75275
75295
|
item.Time=jsData[0];
|
|
75276
75296
|
item.Date=date;
|
|
75277
75297
|
item.Price=jsData[1];
|
|
@@ -75301,7 +75321,7 @@ MinuteChartContainer.JosnDataToBeforeOpenDataArray=function(data)
|
|
|
75301
75321
|
for(var i in data.data)
|
|
75302
75322
|
{
|
|
75303
75323
|
var dayItem=data.data[i];
|
|
75304
|
-
var beforeOpenData={ Data:[], TotalCount:15, Ver:1.0, Date:dayItem.date };
|
|
75324
|
+
var beforeOpenData={ Data:[], TotalCount:15, Ver:1.0, Date:dayItem.date, YClose:dayItem.yclose };
|
|
75305
75325
|
if (dayItem.beforeinfo)
|
|
75306
75326
|
{
|
|
75307
75327
|
if (IFrameSplitOperator.IsNumber(dayItem.beforeinfo.totalcount)) beforeOpenData.TotalCount=dayItem.beforeinfo.totalcount;
|
|
@@ -75326,7 +75346,7 @@ MinuteChartContainer.JosnDataToAfterCloseDataArray=function(data)
|
|
|
75326
75346
|
for(var i in data.data)
|
|
75327
75347
|
{
|
|
75328
75348
|
var dayItem=data.data[i];
|
|
75329
|
-
var afterCloseData={ Data:[], TotalCount:15, Ver:1.0, Date:dayItem.date };
|
|
75349
|
+
var afterCloseData={ Data:[], TotalCount:15, Ver:1.0, Date:dayItem.date, YClose:dayItem.yclose };
|
|
75330
75350
|
|
|
75331
75351
|
if (dayItem.afterinfo)
|
|
75332
75352
|
{
|
|
@@ -21725,6 +21725,7 @@ function MinuteData()
|
|
|
21725
21725
|
this.Date; //日期
|
|
21726
21726
|
this.Position=null; //持仓量
|
|
21727
21727
|
this.YClearing; //昨结算价
|
|
21728
|
+
this.YClose; //昨收价
|
|
21728
21729
|
|
|
21729
21730
|
this.ExtendData; //扩展数据
|
|
21730
21731
|
}
|
|
@@ -21737,7 +21738,8 @@ function BeforeOpenData()
|
|
|
21737
21738
|
this.Price; //匹配的价格
|
|
21738
21739
|
this.AvPrice; //均价
|
|
21739
21740
|
this.Vol=[]; //[0]=匹配量 [1]=未匹配量
|
|
21740
|
-
this.ColorID; //0=平盘 1=红 2=绿 3 ...自定义颜色
|
|
21741
|
+
this.ColorID; //0=平盘 1=红 2=绿 3 ...自定义颜色
|
|
21742
|
+
this.YClose; //昨收价
|
|
21741
21743
|
}
|
|
21742
21744
|
|
|
21743
21745
|
//收盘集合竞价
|
|
@@ -21748,7 +21750,8 @@ function AfterCloseData()
|
|
|
21748
21750
|
this.Price; //匹配的价格
|
|
21749
21751
|
this.AvPrice; //均价
|
|
21750
21752
|
this.Vol=[]; //[0]=匹配量 [1]=未匹配量
|
|
21751
|
-
this.ColorID; //0=平盘 1=红 2=绿 3 ...自定义颜色
|
|
21753
|
+
this.ColorID; //0=平盘 1=红 2=绿 3 ...自定义颜色
|
|
21754
|
+
this.YClose; //昨收价
|
|
21752
21755
|
}
|
|
21753
21756
|
|
|
21754
21757
|
//单指标数据
|
|
@@ -52204,10 +52207,12 @@ function DynamicMinuteTitlePainting()
|
|
|
52204
52207
|
var increase=item.Increase;
|
|
52205
52208
|
var vol=item.Vol;
|
|
52206
52209
|
var amount=item.Amount;
|
|
52210
|
+
var yClose=item.YClose;
|
|
52211
|
+
if (!IFrameSplitOperator.IsNumber(yClose)) yClose=this.YClose;
|
|
52207
52212
|
|
|
52208
52213
|
if (IFrameSplitOperator.IsNumber(close))
|
|
52209
52214
|
{
|
|
52210
|
-
var color=this.GetColor(close,
|
|
52215
|
+
var color=this.GetColor(close,yClose);
|
|
52211
52216
|
var text=g_JSChartLocalization.GetText('MTitle-Close',this.LanguageID)+close.toFixed(defaultfloatPrecision);
|
|
52212
52217
|
aryText.push({Text:text, Color:color});
|
|
52213
52218
|
}
|
|
@@ -52226,7 +52231,7 @@ function DynamicMinuteTitlePainting()
|
|
|
52226
52231
|
|
|
52227
52232
|
if (IFrameSplitOperator.IsNumber(item.AvPrice) && isShowAvPrice && this.IsShowAveragePrice)
|
|
52228
52233
|
{
|
|
52229
|
-
var color=this.GetColor(item.AvPrice,
|
|
52234
|
+
var color=this.GetColor(item.AvPrice,yClose);
|
|
52230
52235
|
var text=g_JSChartLocalization.GetText('MTitle-AvPrice',this.LanguageID)+item.AvPrice.toFixed(defaultfloatPrecision);
|
|
52231
52236
|
aryText.push({Text:text, Color:color});
|
|
52232
52237
|
}
|
|
@@ -52349,7 +52354,8 @@ function DynamicMinuteTitlePainting()
|
|
|
52349
52354
|
var item=data.Data;
|
|
52350
52355
|
var text, strTime, strDate;
|
|
52351
52356
|
strDate=IFrameSplitOperator.FormatDateString(item.Date);
|
|
52352
|
-
|
|
52357
|
+
var yClose=item.YClose;
|
|
52358
|
+
|
|
52353
52359
|
//时间
|
|
52354
52360
|
if (data.Ver==1.0) strTime=IFrameSplitOperator.FormatTimeString(item.Time,"HH:MM");
|
|
52355
52361
|
else strTime=IFrameSplitOperator.FormatTimeString(item.Time,"HH:MM:SS");
|
|
@@ -52360,17 +52366,17 @@ function DynamicMinuteTitlePainting()
|
|
|
52360
52366
|
//匹配价
|
|
52361
52367
|
if(IFrameSplitOperator.IsNumber(item.Price) && this.CallAuctionShowTitle.has("MTitle-AC-Price"))
|
|
52362
52368
|
{
|
|
52363
|
-
var color=this.GetColor(item.Price,
|
|
52369
|
+
var color=this.GetColor(item.Price,yClose);
|
|
52364
52370
|
var filedName='MTitle-AC-Price';
|
|
52365
52371
|
if (data.Ver==1.0) filedName="MTitle-Close";
|
|
52366
52372
|
var text=g_JSChartLocalization.GetText(filedName,this.LanguageID)+item.Price.toFixed(defaultfloatPrecision);
|
|
52367
52373
|
aryText.push({Text:text, Color:color});
|
|
52368
52374
|
}
|
|
52369
52375
|
|
|
52370
|
-
|
|
52371
|
-
if (IFrameSplitOperator.IsPlusNumber(
|
|
52376
|
+
//竞价涨幅
|
|
52377
|
+
if (IFrameSplitOperator.IsPlusNumber(yClose) && IFrameSplitOperator.IsNumber(item.Price) && this.CallAuctionShowTitle.has("MTitle-AC-Increase"))
|
|
52372
52378
|
{
|
|
52373
|
-
var value=(item.Price-
|
|
52379
|
+
var value=(item.Price-yClose)/yClose*100;
|
|
52374
52380
|
var color=this.GetColor(value,0);
|
|
52375
52381
|
var filedName='MTitle-AC-Increase';
|
|
52376
52382
|
if (data.Ver==1.0) filedName="MTitle-Increase";
|
|
@@ -52381,7 +52387,7 @@ function DynamicMinuteTitlePainting()
|
|
|
52381
52387
|
//均价
|
|
52382
52388
|
if (IFrameSplitOperator.IsNumber(item.AvPrice) && this.CallAuctionShowTitle.has("MTitle-AC-AvPrice"))
|
|
52383
52389
|
{
|
|
52384
|
-
var color=this.GetColor(item.AvPrice,
|
|
52390
|
+
var color=this.GetColor(item.AvPrice,yClose);
|
|
52385
52391
|
var text=g_JSChartLocalization.GetText('MTitle-AC-AvPrice',this.LanguageID)+item.AvPrice.toFixed(defaultfloatPrecision);
|
|
52386
52392
|
aryText.push({Text:text, Color:color});
|
|
52387
52393
|
}
|
|
@@ -78806,6 +78812,7 @@ MinuteChartContainer.JsonDataToBeforeOpenData=function(data)
|
|
|
78806
78812
|
var upperSymbol=symbol.toUpperCase();
|
|
78807
78813
|
var isSHSZ=MARKET_SUFFIX_NAME.IsSHSZ(upperSymbol);
|
|
78808
78814
|
|
|
78815
|
+
var yClose=data.stock[0].yclos;
|
|
78809
78816
|
var preClose=data.stock[0].yclose; //前一个数据价格
|
|
78810
78817
|
var stockData=data.stock[0];
|
|
78811
78818
|
var date=stockData.date; //日期
|
|
@@ -78825,6 +78832,7 @@ MinuteChartContainer.JsonDataToBeforeOpenData=function(data)
|
|
|
78825
78832
|
{
|
|
78826
78833
|
var item=new BeforeOpenData();
|
|
78827
78834
|
var jsData=stockData.before[i];
|
|
78835
|
+
item.YClose=yClose;
|
|
78828
78836
|
item.Time=jsData[0];
|
|
78829
78837
|
item.Date=date;
|
|
78830
78838
|
item.Price=jsData[1];
|
|
@@ -78849,6 +78857,7 @@ MinuteChartContainer.JsonDataToBeforeOpenData=function(data)
|
|
|
78849
78857
|
{
|
|
78850
78858
|
var item=new BeforeOpenData();
|
|
78851
78859
|
var jsData=stockData.before[i];
|
|
78860
|
+
item.YClose=yClose;
|
|
78852
78861
|
item.Time=jsData[0];
|
|
78853
78862
|
item.Date=date;
|
|
78854
78863
|
item.Price=jsData[1];
|
|
@@ -78877,6 +78886,7 @@ MinuteChartContainer.JsonDataToBeforeOpenData=function(data)
|
|
|
78877
78886
|
{
|
|
78878
78887
|
var item=new BeforeOpenData();
|
|
78879
78888
|
var jsData=stockData.before[i];
|
|
78889
|
+
item.YClose=yClose;
|
|
78880
78890
|
item.Time=jsData[0];
|
|
78881
78891
|
item.Date=date;
|
|
78882
78892
|
item.Price=jsData[1];
|
|
@@ -78903,6 +78913,7 @@ MinuteChartContainer.JsonDataToBeforeOpenData=function(data)
|
|
|
78903
78913
|
//收盘集合竞价
|
|
78904
78914
|
MinuteChartContainer.JsonDataToAfterCloseData=function(data)
|
|
78905
78915
|
{
|
|
78916
|
+
var yClose=data.stock[0].yclose;
|
|
78906
78917
|
var preClose=data.stock[0].yclose; //前一个数据价格
|
|
78907
78918
|
var stockData=data.stock[0];
|
|
78908
78919
|
var date=stockData.date; //日期
|
|
@@ -78920,6 +78931,7 @@ MinuteChartContainer.JsonDataToAfterCloseData=function(data)
|
|
|
78920
78931
|
{
|
|
78921
78932
|
var item=new AfterCloseData();
|
|
78922
78933
|
var jsData=stockData.after[i];
|
|
78934
|
+
item.YClose=yClose;
|
|
78923
78935
|
item.Time=jsData[0];
|
|
78924
78936
|
item.Date=date;
|
|
78925
78937
|
item.Price=jsData[1];
|
|
@@ -78940,6 +78952,7 @@ MinuteChartContainer.JsonDataToAfterCloseData=function(data)
|
|
|
78940
78952
|
{
|
|
78941
78953
|
var item=new AfterCloseData();
|
|
78942
78954
|
var jsData=stockData.after[i];
|
|
78955
|
+
item.YClose=yClose;
|
|
78943
78956
|
item.Time=jsData[0];
|
|
78944
78957
|
item.Date=date;
|
|
78945
78958
|
item.Price=jsData[1];
|
|
@@ -78966,6 +78979,7 @@ MinuteChartContainer.JsonDataToAfterCloseData=function(data)
|
|
|
78966
78979
|
{
|
|
78967
78980
|
var item=new AfterCloseData();
|
|
78968
78981
|
var jsData=stockData.after[i];
|
|
78982
|
+
item.YClose=yClose;
|
|
78969
78983
|
item.Time=jsData[0];
|
|
78970
78984
|
item.Date=date;
|
|
78971
78985
|
item.Price=jsData[1];
|
|
@@ -79012,6 +79026,7 @@ MinuteChartContainer.JsonDataToMinuteData=function(data,isBeforeData)
|
|
|
79012
79026
|
var jsData=data.stock[0].minute[i];
|
|
79013
79027
|
var item=new MinuteData();
|
|
79014
79028
|
|
|
79029
|
+
item.YClose=yClose;
|
|
79015
79030
|
item.Close=jsData.price;
|
|
79016
79031
|
item.Open=jsData.open;
|
|
79017
79032
|
item.High=jsData.high;
|
|
@@ -79193,6 +79208,7 @@ MinuteChartContainer.JsonDataToMinuteDataArray=function(data)
|
|
|
79193
79208
|
var jsData=dayData.minute[j];
|
|
79194
79209
|
if (jsData[2]) preClose=jsData[2]; //保存上一个收盘数据
|
|
79195
79210
|
var item=new MinuteData();
|
|
79211
|
+
item.YClose=yClose;
|
|
79196
79212
|
item.Close=jsData[2];
|
|
79197
79213
|
item.Open=jsData[1];
|
|
79198
79214
|
item.High=jsData[3];
|
|
@@ -79296,6 +79312,7 @@ MinuteChartContainer.JsonDataToCallAuctionItem=function(data, callAuctionData, i
|
|
|
79296
79312
|
}
|
|
79297
79313
|
|
|
79298
79314
|
var date=callAuctionData.Date;
|
|
79315
|
+
var yClose=callAuctionData.YClose;
|
|
79299
79316
|
var extendDataIndex=isBeforeOpen? JSCHART_DATA_FIELD_ID.MINUTE_BEFOREOPEN_EXTENDDATA:JSCHART_DATA_FIELD_ID.MINUTE_AFTERCLOSE_EXTENDDATA; //扩展数据序号
|
|
79300
79317
|
if (callAuctionData.Ver==1.0)
|
|
79301
79318
|
{
|
|
@@ -79304,6 +79321,7 @@ MinuteChartContainer.JsonDataToCallAuctionItem=function(data, callAuctionData, i
|
|
|
79304
79321
|
{
|
|
79305
79322
|
var item=isBeforeOpen? new BeforeOpenData() : new AfterCloseData();
|
|
79306
79323
|
var jsData=data[i];
|
|
79324
|
+
item.YClose=yClose;
|
|
79307
79325
|
item.Time=jsData[0];
|
|
79308
79326
|
item.Date=date;
|
|
79309
79327
|
item.Price=jsData[1];
|
|
@@ -79326,6 +79344,7 @@ MinuteChartContainer.JsonDataToCallAuctionItem=function(data, callAuctionData, i
|
|
|
79326
79344
|
{
|
|
79327
79345
|
var item=isBeforeOpen? new BeforeOpenData() : new AfterCloseData();
|
|
79328
79346
|
var jsData=data[i];
|
|
79347
|
+
item.YClose=yClose;
|
|
79329
79348
|
item.Time=jsData[0];
|
|
79330
79349
|
item.Date=date;
|
|
79331
79350
|
item.Price=jsData[1];
|
|
@@ -79352,6 +79371,7 @@ MinuteChartContainer.JsonDataToCallAuctionItem=function(data, callAuctionData, i
|
|
|
79352
79371
|
{
|
|
79353
79372
|
var item=isBeforeOpen? new BeforeOpenData() : new AfterCloseData();
|
|
79354
79373
|
var jsData=data[i];
|
|
79374
|
+
item.YClose=yClose;
|
|
79355
79375
|
item.Time=jsData[0];
|
|
79356
79376
|
item.Date=date;
|
|
79357
79377
|
item.Price=jsData[1];
|
|
@@ -79381,7 +79401,7 @@ MinuteChartContainer.JosnDataToBeforeOpenDataArray=function(data)
|
|
|
79381
79401
|
for(var i in data.data)
|
|
79382
79402
|
{
|
|
79383
79403
|
var dayItem=data.data[i];
|
|
79384
|
-
var beforeOpenData={ Data:[], TotalCount:15, Ver:1.0, Date:dayItem.date };
|
|
79404
|
+
var beforeOpenData={ Data:[], TotalCount:15, Ver:1.0, Date:dayItem.date, YClose:dayItem.yclose };
|
|
79385
79405
|
if (dayItem.beforeinfo)
|
|
79386
79406
|
{
|
|
79387
79407
|
if (IFrameSplitOperator.IsNumber(dayItem.beforeinfo.totalcount)) beforeOpenData.TotalCount=dayItem.beforeinfo.totalcount;
|
|
@@ -79406,7 +79426,7 @@ MinuteChartContainer.JosnDataToAfterCloseDataArray=function(data)
|
|
|
79406
79426
|
for(var i in data.data)
|
|
79407
79427
|
{
|
|
79408
79428
|
var dayItem=data.data[i];
|
|
79409
|
-
var afterCloseData={ Data:[], TotalCount:15, Ver:1.0, Date:dayItem.date };
|
|
79429
|
+
var afterCloseData={ Data:[], TotalCount:15, Ver:1.0, Date:dayItem.date, YClose:dayItem.yclose };
|
|
79410
79430
|
|
|
79411
79431
|
if (dayItem.afterinfo)
|
|
79412
79432
|
{
|
|
@@ -127775,7 +127795,7 @@ function ScrollBarBGChart()
|
|
|
127775
127795
|
|
|
127776
127796
|
|
|
127777
127797
|
|
|
127778
|
-
var HQCHART_VERSION="1.1.
|
|
127798
|
+
var HQCHART_VERSION="1.1.12454";
|
|
127779
127799
|
|
|
127780
127800
|
function PrintHQChartVersion()
|
|
127781
127801
|
{
|
|
@@ -21769,6 +21769,7 @@ function MinuteData()
|
|
|
21769
21769
|
this.Date; //日期
|
|
21770
21770
|
this.Position=null; //持仓量
|
|
21771
21771
|
this.YClearing; //昨结算价
|
|
21772
|
+
this.YClose; //昨收价
|
|
21772
21773
|
|
|
21773
21774
|
this.ExtendData; //扩展数据
|
|
21774
21775
|
}
|
|
@@ -21781,7 +21782,8 @@ function BeforeOpenData()
|
|
|
21781
21782
|
this.Price; //匹配的价格
|
|
21782
21783
|
this.AvPrice; //均价
|
|
21783
21784
|
this.Vol=[]; //[0]=匹配量 [1]=未匹配量
|
|
21784
|
-
this.ColorID; //0=平盘 1=红 2=绿 3 ...自定义颜色
|
|
21785
|
+
this.ColorID; //0=平盘 1=红 2=绿 3 ...自定义颜色
|
|
21786
|
+
this.YClose; //昨收价
|
|
21785
21787
|
}
|
|
21786
21788
|
|
|
21787
21789
|
//收盘集合竞价
|
|
@@ -21792,7 +21794,8 @@ function AfterCloseData()
|
|
|
21792
21794
|
this.Price; //匹配的价格
|
|
21793
21795
|
this.AvPrice; //均价
|
|
21794
21796
|
this.Vol=[]; //[0]=匹配量 [1]=未匹配量
|
|
21795
|
-
this.ColorID; //0=平盘 1=红 2=绿 3 ...自定义颜色
|
|
21797
|
+
this.ColorID; //0=平盘 1=红 2=绿 3 ...自定义颜色
|
|
21798
|
+
this.YClose; //昨收价
|
|
21796
21799
|
}
|
|
21797
21800
|
|
|
21798
21801
|
//单指标数据
|
|
@@ -52248,10 +52251,12 @@ function DynamicMinuteTitlePainting()
|
|
|
52248
52251
|
var increase=item.Increase;
|
|
52249
52252
|
var vol=item.Vol;
|
|
52250
52253
|
var amount=item.Amount;
|
|
52254
|
+
var yClose=item.YClose;
|
|
52255
|
+
if (!IFrameSplitOperator.IsNumber(yClose)) yClose=this.YClose;
|
|
52251
52256
|
|
|
52252
52257
|
if (IFrameSplitOperator.IsNumber(close))
|
|
52253
52258
|
{
|
|
52254
|
-
var color=this.GetColor(close,
|
|
52259
|
+
var color=this.GetColor(close,yClose);
|
|
52255
52260
|
var text=g_JSChartLocalization.GetText('MTitle-Close',this.LanguageID)+close.toFixed(defaultfloatPrecision);
|
|
52256
52261
|
aryText.push({Text:text, Color:color});
|
|
52257
52262
|
}
|
|
@@ -52270,7 +52275,7 @@ function DynamicMinuteTitlePainting()
|
|
|
52270
52275
|
|
|
52271
52276
|
if (IFrameSplitOperator.IsNumber(item.AvPrice) && isShowAvPrice && this.IsShowAveragePrice)
|
|
52272
52277
|
{
|
|
52273
|
-
var color=this.GetColor(item.AvPrice,
|
|
52278
|
+
var color=this.GetColor(item.AvPrice,yClose);
|
|
52274
52279
|
var text=g_JSChartLocalization.GetText('MTitle-AvPrice',this.LanguageID)+item.AvPrice.toFixed(defaultfloatPrecision);
|
|
52275
52280
|
aryText.push({Text:text, Color:color});
|
|
52276
52281
|
}
|
|
@@ -52393,7 +52398,8 @@ function DynamicMinuteTitlePainting()
|
|
|
52393
52398
|
var item=data.Data;
|
|
52394
52399
|
var text, strTime, strDate;
|
|
52395
52400
|
strDate=IFrameSplitOperator.FormatDateString(item.Date);
|
|
52396
|
-
|
|
52401
|
+
var yClose=item.YClose;
|
|
52402
|
+
|
|
52397
52403
|
//时间
|
|
52398
52404
|
if (data.Ver==1.0) strTime=IFrameSplitOperator.FormatTimeString(item.Time,"HH:MM");
|
|
52399
52405
|
else strTime=IFrameSplitOperator.FormatTimeString(item.Time,"HH:MM:SS");
|
|
@@ -52404,17 +52410,17 @@ function DynamicMinuteTitlePainting()
|
|
|
52404
52410
|
//匹配价
|
|
52405
52411
|
if(IFrameSplitOperator.IsNumber(item.Price) && this.CallAuctionShowTitle.has("MTitle-AC-Price"))
|
|
52406
52412
|
{
|
|
52407
|
-
var color=this.GetColor(item.Price,
|
|
52413
|
+
var color=this.GetColor(item.Price,yClose);
|
|
52408
52414
|
var filedName='MTitle-AC-Price';
|
|
52409
52415
|
if (data.Ver==1.0) filedName="MTitle-Close";
|
|
52410
52416
|
var text=g_JSChartLocalization.GetText(filedName,this.LanguageID)+item.Price.toFixed(defaultfloatPrecision);
|
|
52411
52417
|
aryText.push({Text:text, Color:color});
|
|
52412
52418
|
}
|
|
52413
52419
|
|
|
52414
|
-
|
|
52415
|
-
if (IFrameSplitOperator.IsPlusNumber(
|
|
52420
|
+
//竞价涨幅
|
|
52421
|
+
if (IFrameSplitOperator.IsPlusNumber(yClose) && IFrameSplitOperator.IsNumber(item.Price) && this.CallAuctionShowTitle.has("MTitle-AC-Increase"))
|
|
52416
52422
|
{
|
|
52417
|
-
var value=(item.Price-
|
|
52423
|
+
var value=(item.Price-yClose)/yClose*100;
|
|
52418
52424
|
var color=this.GetColor(value,0);
|
|
52419
52425
|
var filedName='MTitle-AC-Increase';
|
|
52420
52426
|
if (data.Ver==1.0) filedName="MTitle-Increase";
|
|
@@ -52425,7 +52431,7 @@ function DynamicMinuteTitlePainting()
|
|
|
52425
52431
|
//均价
|
|
52426
52432
|
if (IFrameSplitOperator.IsNumber(item.AvPrice) && this.CallAuctionShowTitle.has("MTitle-AC-AvPrice"))
|
|
52427
52433
|
{
|
|
52428
|
-
var color=this.GetColor(item.AvPrice,
|
|
52434
|
+
var color=this.GetColor(item.AvPrice,yClose);
|
|
52429
52435
|
var text=g_JSChartLocalization.GetText('MTitle-AC-AvPrice',this.LanguageID)+item.AvPrice.toFixed(defaultfloatPrecision);
|
|
52430
52436
|
aryText.push({Text:text, Color:color});
|
|
52431
52437
|
}
|
|
@@ -78850,6 +78856,7 @@ MinuteChartContainer.JsonDataToBeforeOpenData=function(data)
|
|
|
78850
78856
|
var upperSymbol=symbol.toUpperCase();
|
|
78851
78857
|
var isSHSZ=MARKET_SUFFIX_NAME.IsSHSZ(upperSymbol);
|
|
78852
78858
|
|
|
78859
|
+
var yClose=data.stock[0].yclos;
|
|
78853
78860
|
var preClose=data.stock[0].yclose; //前一个数据价格
|
|
78854
78861
|
var stockData=data.stock[0];
|
|
78855
78862
|
var date=stockData.date; //日期
|
|
@@ -78869,6 +78876,7 @@ MinuteChartContainer.JsonDataToBeforeOpenData=function(data)
|
|
|
78869
78876
|
{
|
|
78870
78877
|
var item=new BeforeOpenData();
|
|
78871
78878
|
var jsData=stockData.before[i];
|
|
78879
|
+
item.YClose=yClose;
|
|
78872
78880
|
item.Time=jsData[0];
|
|
78873
78881
|
item.Date=date;
|
|
78874
78882
|
item.Price=jsData[1];
|
|
@@ -78893,6 +78901,7 @@ MinuteChartContainer.JsonDataToBeforeOpenData=function(data)
|
|
|
78893
78901
|
{
|
|
78894
78902
|
var item=new BeforeOpenData();
|
|
78895
78903
|
var jsData=stockData.before[i];
|
|
78904
|
+
item.YClose=yClose;
|
|
78896
78905
|
item.Time=jsData[0];
|
|
78897
78906
|
item.Date=date;
|
|
78898
78907
|
item.Price=jsData[1];
|
|
@@ -78921,6 +78930,7 @@ MinuteChartContainer.JsonDataToBeforeOpenData=function(data)
|
|
|
78921
78930
|
{
|
|
78922
78931
|
var item=new BeforeOpenData();
|
|
78923
78932
|
var jsData=stockData.before[i];
|
|
78933
|
+
item.YClose=yClose;
|
|
78924
78934
|
item.Time=jsData[0];
|
|
78925
78935
|
item.Date=date;
|
|
78926
78936
|
item.Price=jsData[1];
|
|
@@ -78947,6 +78957,7 @@ MinuteChartContainer.JsonDataToBeforeOpenData=function(data)
|
|
|
78947
78957
|
//收盘集合竞价
|
|
78948
78958
|
MinuteChartContainer.JsonDataToAfterCloseData=function(data)
|
|
78949
78959
|
{
|
|
78960
|
+
var yClose=data.stock[0].yclose;
|
|
78950
78961
|
var preClose=data.stock[0].yclose; //前一个数据价格
|
|
78951
78962
|
var stockData=data.stock[0];
|
|
78952
78963
|
var date=stockData.date; //日期
|
|
@@ -78964,6 +78975,7 @@ MinuteChartContainer.JsonDataToAfterCloseData=function(data)
|
|
|
78964
78975
|
{
|
|
78965
78976
|
var item=new AfterCloseData();
|
|
78966
78977
|
var jsData=stockData.after[i];
|
|
78978
|
+
item.YClose=yClose;
|
|
78967
78979
|
item.Time=jsData[0];
|
|
78968
78980
|
item.Date=date;
|
|
78969
78981
|
item.Price=jsData[1];
|
|
@@ -78984,6 +78996,7 @@ MinuteChartContainer.JsonDataToAfterCloseData=function(data)
|
|
|
78984
78996
|
{
|
|
78985
78997
|
var item=new AfterCloseData();
|
|
78986
78998
|
var jsData=stockData.after[i];
|
|
78999
|
+
item.YClose=yClose;
|
|
78987
79000
|
item.Time=jsData[0];
|
|
78988
79001
|
item.Date=date;
|
|
78989
79002
|
item.Price=jsData[1];
|
|
@@ -79010,6 +79023,7 @@ MinuteChartContainer.JsonDataToAfterCloseData=function(data)
|
|
|
79010
79023
|
{
|
|
79011
79024
|
var item=new AfterCloseData();
|
|
79012
79025
|
var jsData=stockData.after[i];
|
|
79026
|
+
item.YClose=yClose;
|
|
79013
79027
|
item.Time=jsData[0];
|
|
79014
79028
|
item.Date=date;
|
|
79015
79029
|
item.Price=jsData[1];
|
|
@@ -79056,6 +79070,7 @@ MinuteChartContainer.JsonDataToMinuteData=function(data,isBeforeData)
|
|
|
79056
79070
|
var jsData=data.stock[0].minute[i];
|
|
79057
79071
|
var item=new MinuteData();
|
|
79058
79072
|
|
|
79073
|
+
item.YClose=yClose;
|
|
79059
79074
|
item.Close=jsData.price;
|
|
79060
79075
|
item.Open=jsData.open;
|
|
79061
79076
|
item.High=jsData.high;
|
|
@@ -79237,6 +79252,7 @@ MinuteChartContainer.JsonDataToMinuteDataArray=function(data)
|
|
|
79237
79252
|
var jsData=dayData.minute[j];
|
|
79238
79253
|
if (jsData[2]) preClose=jsData[2]; //保存上一个收盘数据
|
|
79239
79254
|
var item=new MinuteData();
|
|
79255
|
+
item.YClose=yClose;
|
|
79240
79256
|
item.Close=jsData[2];
|
|
79241
79257
|
item.Open=jsData[1];
|
|
79242
79258
|
item.High=jsData[3];
|
|
@@ -79340,6 +79356,7 @@ MinuteChartContainer.JsonDataToCallAuctionItem=function(data, callAuctionData, i
|
|
|
79340
79356
|
}
|
|
79341
79357
|
|
|
79342
79358
|
var date=callAuctionData.Date;
|
|
79359
|
+
var yClose=callAuctionData.YClose;
|
|
79343
79360
|
var extendDataIndex=isBeforeOpen? JSCHART_DATA_FIELD_ID.MINUTE_BEFOREOPEN_EXTENDDATA:JSCHART_DATA_FIELD_ID.MINUTE_AFTERCLOSE_EXTENDDATA; //扩展数据序号
|
|
79344
79361
|
if (callAuctionData.Ver==1.0)
|
|
79345
79362
|
{
|
|
@@ -79348,6 +79365,7 @@ MinuteChartContainer.JsonDataToCallAuctionItem=function(data, callAuctionData, i
|
|
|
79348
79365
|
{
|
|
79349
79366
|
var item=isBeforeOpen? new BeforeOpenData() : new AfterCloseData();
|
|
79350
79367
|
var jsData=data[i];
|
|
79368
|
+
item.YClose=yClose;
|
|
79351
79369
|
item.Time=jsData[0];
|
|
79352
79370
|
item.Date=date;
|
|
79353
79371
|
item.Price=jsData[1];
|
|
@@ -79370,6 +79388,7 @@ MinuteChartContainer.JsonDataToCallAuctionItem=function(data, callAuctionData, i
|
|
|
79370
79388
|
{
|
|
79371
79389
|
var item=isBeforeOpen? new BeforeOpenData() : new AfterCloseData();
|
|
79372
79390
|
var jsData=data[i];
|
|
79391
|
+
item.YClose=yClose;
|
|
79373
79392
|
item.Time=jsData[0];
|
|
79374
79393
|
item.Date=date;
|
|
79375
79394
|
item.Price=jsData[1];
|
|
@@ -79396,6 +79415,7 @@ MinuteChartContainer.JsonDataToCallAuctionItem=function(data, callAuctionData, i
|
|
|
79396
79415
|
{
|
|
79397
79416
|
var item=isBeforeOpen? new BeforeOpenData() : new AfterCloseData();
|
|
79398
79417
|
var jsData=data[i];
|
|
79418
|
+
item.YClose=yClose;
|
|
79399
79419
|
item.Time=jsData[0];
|
|
79400
79420
|
item.Date=date;
|
|
79401
79421
|
item.Price=jsData[1];
|
|
@@ -79425,7 +79445,7 @@ MinuteChartContainer.JosnDataToBeforeOpenDataArray=function(data)
|
|
|
79425
79445
|
for(var i in data.data)
|
|
79426
79446
|
{
|
|
79427
79447
|
var dayItem=data.data[i];
|
|
79428
|
-
var beforeOpenData={ Data:[], TotalCount:15, Ver:1.0, Date:dayItem.date };
|
|
79448
|
+
var beforeOpenData={ Data:[], TotalCount:15, Ver:1.0, Date:dayItem.date, YClose:dayItem.yclose };
|
|
79429
79449
|
if (dayItem.beforeinfo)
|
|
79430
79450
|
{
|
|
79431
79451
|
if (IFrameSplitOperator.IsNumber(dayItem.beforeinfo.totalcount)) beforeOpenData.TotalCount=dayItem.beforeinfo.totalcount;
|
|
@@ -79450,7 +79470,7 @@ MinuteChartContainer.JosnDataToAfterCloseDataArray=function(data)
|
|
|
79450
79470
|
for(var i in data.data)
|
|
79451
79471
|
{
|
|
79452
79472
|
var dayItem=data.data[i];
|
|
79453
|
-
var afterCloseData={ Data:[], TotalCount:15, Ver:1.0, Date:dayItem.date };
|
|
79473
|
+
var afterCloseData={ Data:[], TotalCount:15, Ver:1.0, Date:dayItem.date, YClose:dayItem.yclose };
|
|
79454
79474
|
|
|
79455
79475
|
if (dayItem.afterinfo)
|
|
79456
79476
|
{
|
|
@@ -127819,7 +127839,7 @@ function ScrollBarBGChart()
|
|
|
127819
127839
|
|
|
127820
127840
|
|
|
127821
127841
|
|
|
127822
|
-
var HQCHART_VERSION="1.1.
|
|
127842
|
+
var HQCHART_VERSION="1.1.12454";
|
|
127823
127843
|
|
|
127824
127844
|
function PrintHQChartVersion()
|
|
127825
127845
|
{
|