hqchart 1.1.12786 → 1.1.12790
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 +9 -8
- package/package.json +1 -1
- package/src/jscommon/umychart.js +8 -6
- package/src/jscommon/umychart.scrollbar.js +7 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +16 -7
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +16 -7
package/lib/umychart.vue.js
CHANGED
|
@@ -8028,11 +8028,11 @@ this.Frame.SetSizeChage(true);this.Draw();this.BindAllOverlayIndexData(this.Sour
|
|
|
8028
8028
|
if(limitData&&limitData.max>0&&limitData.min>0)//API里带涨停价格 直接使用
|
|
8029
8029
|
{this.LimitPrice={Max:limitData.max,Min:limitData.min};return;}var range=MARKET_SUFFIX_NAME.GetLimitPriceRange(this.Symbol,this.Name);//通过规则获取涨停价格
|
|
8030
8030
|
if(!range){JSConsole.Chart.Log('[MinuteChartContainer::CaclutateLimitPrice] '+this.Symbol+' no limit price.');return;}//var yClose=data.stock[0].yclose;
|
|
8031
|
-
if(yClose<=0)return;this.LimitPrice={Max:yClose*(1+range.Max),Min:yClose*(1+range.Min)};JSConsole.Chart.Log('[MinuteChartContainer::CaclutateLimitPrice] '+this.Symbol+' yClose:'+yClose+' max:'+this.LimitPrice.Max+' min:'+this.LimitPrice.Min);this.LimitPrice.Max=parseFloat(this.LimitPrice.Max.toFixed(2));this.LimitPrice.Min=parseFloat(this.LimitPrice.Min.toFixed(2));JSConsole.Chart.Log('[MinuteChartContainer::CaclutateLimitPrice] '+this.Symbol+' tofixed(2) max:'+this.LimitPrice.Max+' min:'+this.LimitPrice.Min);};this.RequestSingleOverlayMinuteData=function(symbol,date,item){item.Status=OVERLAY_STATUS_ID.STATUS_REQUESTDATA_ID;if(this.NetworkFilter){var obj={Name:'MinuteChartContainer::RequestOverlayMinuteData',//类名::函数名
|
|
8032
|
-
Explain:'叠加股票最新分时数据',Request:{Url:this.HistoryMinuteApiUrl,Data:{days:[date],symbol:symbol},Type:'POST'},Self:this,PreventDefault:false};this.NetworkFilter(obj,function(data){item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;
|
|
8031
|
+
if(yClose<=0)return;this.LimitPrice={Max:yClose*(1+range.Max),Min:yClose*(1+range.Min)};JSConsole.Chart.Log('[MinuteChartContainer::CaclutateLimitPrice] '+this.Symbol+' yClose:'+yClose+' max:'+this.LimitPrice.Max+' min:'+this.LimitPrice.Min);this.LimitPrice.Max=parseFloat(this.LimitPrice.Max.toFixed(2));this.LimitPrice.Min=parseFloat(this.LimitPrice.Min.toFixed(2));JSConsole.Chart.Log('[MinuteChartContainer::CaclutateLimitPrice] '+this.Symbol+' tofixed(2) max:'+this.LimitPrice.Max+' min:'+this.LimitPrice.Min);};this.RequestSingleOverlayMinuteData=function(symbol,date,item){var self=this;item.Status=OVERLAY_STATUS_ID.STATUS_REQUESTDATA_ID;if(this.NetworkFilter){var obj={Name:'MinuteChartContainer::RequestOverlayMinuteData',//类名::函数名
|
|
8032
|
+
Explain:'叠加股票最新分时数据',Request:{Url:this.HistoryMinuteApiUrl,Data:{days:[date],symbol:symbol},Type:'POST'},Self:this,PreventDefault:false};this.NetworkFilter(obj,function(data){item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;self.RecvOverlayMinuteData(data,item);});if(obj.PreventDefault==true)return;//已被上层替换,不调用默认的网络请求
|
|
8033
8033
|
}//请求数据
|
|
8034
8034
|
JSNetwork.HttpRequest({url:this.HistoryMinuteApiUrl,data:{"symbol":symbol,"days":[date]},type:"post",dataType:"json",async:true,success:function success(data){item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;//self.RecvMultiOverlayMinuteData([data]);
|
|
8035
|
-
|
|
8035
|
+
self.RecvOverlayMinuteData(data,item);}});};//请求叠加数据 (主数据下载完再下载))
|
|
8036
8036
|
this.RequestOverlayMinuteData=function(){var self=this;var date=this.TradeDate;//最后一个交易日期
|
|
8037
8037
|
for(var i=0;i<this.OverlayChartPaint.length;++i){var _item10=this.OverlayChartPaint[i];if(!_item10.MainData)continue;if(_item10.Status!=OVERLAY_STATUS_ID.STATUS_NONE_ID)continue;var symbol=_item10.Symbol;if(!symbol)continue;this.RequestSingleOverlayMinuteData(symbol,date,_item10);/*
|
|
8038
8038
|
item.Status=OVERLAY_STATUS_ID.STATUS_REQUESTDATA_ID;
|
|
@@ -8078,9 +8078,9 @@ for(var i=0;i<this.OverlayChartPaint.length;++i){var _item10=this.OverlayChartPa
|
|
|
8078
8078
|
this.RecvMultiOverlayMinuteData=function(aryData){if(!IFrameSplitOperator.IsNonEmptyArray(aryData))return;var bUpdate=false;for(var i=0;i<aryData.length;++i){var overlayData=aryData[i];if(!overlayData.symbol)continue;for(var j=0;j<this.OverlayChartPaint.length;++j){var item=this.OverlayChartPaint[j];if(!item.MainData)continue;if(overlayData.symbol==item.Symbol){this.RecvOverlayMinuteData(overlayData,item,{Redraw:false});bUpdate=true;break;}}}if(bUpdate){this.UpdateFrameMaxMin();//调整坐标最大 最小值
|
|
8079
8079
|
this.Frame.SetSizeChage(true);this.Draw();}};this.RecvOverlayMinuteData=function(data,paint,option){if(paint.IsDelete)return;if(this.EnableVerifyRecvData&&data.symbol!=paint.Symbol){JSConsole.Chart.Warn('[MinuteChartContainer::RecvOverlayMinuteData] recv data symbol not match. paint['+paint.Symbol+'] , Recv['+data.symbol+']');return;}var aryMinuteData=MinuteChartContainer.JsonDataToMinuteDataArray(data);var sourceData=null;var yClose;if(this.DayCount>1)//多日数据
|
|
8080
8080
|
{if(aryMinuteData.length<=0)return;var minuteData=aryMinuteData[0];for(var i in paint.SourceData){var item=paint.SourceData[i];if(item.Date==minuteData.Date){paint.SourceData[i]=minuteData;var allMinuteData=this.HistoryMinuteDataToArray(paint.SourceData);var sourceData=new ChartData();sourceData.Data=allMinuteData;yClose=minuteData.YClose;break;}}if(sourceData==null)return;}else{if(aryMinuteData.length>0)sourceData=aryMinuteData[0];else sourceData=new ChartData();yClose=sourceData.YClose;}paint.Data=sourceData;paint.Title=data.name;paint.Symbol=data.symbol;paint.YClose=yClose;paint.Status=OVERLAY_STATUS_ID.STATUS_FINISHED_ID;var bRedraw=true;if(option&&option.Redraw==false)bRedraw=false;if(bRedraw){this.UpdateFrameMaxMin();//调整坐标最大 最小值
|
|
8081
|
-
this.Frame.SetSizeChage(true);this.Draw();}};this.RequestSingleOverlayHistoryMinuteData=function(symbol,days,item){item.Status=OVERLAY_STATUS_ID.STATUS_REQUESTDATA_ID;if(this.NetworkFilter){var obj={Name:'MinuteChartContainer::RequestOverlayHistoryMinuteData',//类名::函数名
|
|
8082
|
-
Explain:'叠加股票多日分时数据',Request:{Url:
|
|
8083
|
-
}JSNetwork.HttpRequest({url:
|
|
8081
|
+
this.Frame.SetSizeChage(true);this.Draw();}};this.RequestSingleOverlayHistoryMinuteData=function(symbol,days,item){var self=this;item.Status=OVERLAY_STATUS_ID.STATUS_REQUESTDATA_ID;if(this.NetworkFilter){var obj={Name:'MinuteChartContainer::RequestOverlayHistoryMinuteData',//类名::函数名
|
|
8082
|
+
Explain:'叠加股票多日分时数据',Request:{Url:self.HistoryMinuteApiUrl,Data:{days:days,symbol:symbol},Type:'POST'},Self:this,PreventDefault:false};this.NetworkFilter(obj,function(data){item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;self.RecvOverlayHistoryMinuteData(data,item);});if(obj.PreventDefault==true)return;//已被上层替换,不调用默认的网络请求
|
|
8083
|
+
}JSNetwork.HttpRequest({url:self.HistoryMinuteApiUrl,data:{"symbol":symbol,"days":days},type:"post",dataType:"json",async:true,success:function success(data){item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;self.RecvOverlayHistoryMinuteData(data,item);}});};this.RequestOverlayHistoryMinuteData=function(){if(!IFrameSplitOperator.IsNonEmptyArray(this.DayData))return;var self=this;var days=[];for(var i=0;i<this.DayData.length;++i){var item=this.DayData[i];days.push(item.Date);}if(days.length<=0)return;for(var i=0;i<this.OverlayChartPaint.length;++i){var item=this.OverlayChartPaint[i];var symbol=item.Symbol;if(!symbol)continue;if(item.Status!=OVERLAY_STATUS_ID.STATUS_NONE_ID)continue;this.RequestSingleOverlayHistoryMinuteData(symbol,days,item);/*
|
|
8084
8084
|
item.Status=OVERLAY_STATUS_ID.STATUS_REQUESTDATA_ID;
|
|
8085
8085
|
|
|
8086
8086
|
if (this.NetworkFilter)
|
|
@@ -12974,7 +12974,8 @@ this.ClassName='SliderChart';//类名
|
|
|
12974
12974
|
this.OffsetData;this.Color=g_JSChartResource.ScrollBar.Slider.BarAreaColor;this.BarColor=g_JSChartResource.ScrollBar.Slider.BarColor;this.BarWidth=10;this.BarPadding=10;//上下留白
|
|
12975
12975
|
this.DateFont=g_JSChartResource.ScrollBar.Slider.DateFont;this.DateColor=g_JSChartResource.ScrollBar.Slider.DateColor;this.AryRect=[];//[{ Rect:{Left, Top, Right:, Bottom:, Width, Height:}, Type:0中间 1=左 2=右 }]
|
|
12976
12976
|
this.XStart;this.XEnd;this.SizeChange=true;this.DragMode=false;this.ReloadResource=function(resource){this.Color=g_JSChartResource.ScrollBar.Slider.BarAreaColor;this.BarColor=g_JSChartResource.ScrollBar.Slider.BarColor;this.DateFont=g_JSChartResource.ScrollBar.Slider.DateFont;this.DateColor=g_JSChartResource.ScrollBar.Slider.DateColor;};this.Draw=function(){this.AryRect=[];if(!this.OffsetData||!IFrameSplitOperator.IsPlusNumber(this.OffsetData.Count))return;if(!IFrameSplitOperator.IsNumber(this.OffsetData.Start)||!IFrameSplitOperator.IsNumber(this.OffsetData.End))return;var top=this.ChartBorder.GetTop();var bottom=this.ChartBorder.GetBottom();var startData,endData;if(this.DragMode){var xStart=this.XStart;var xEnd=this.XEnd;var startIndex=this.ChartFrame.GetXData(xStart);var endIndx=this.ChartFrame.GetXData(xEnd);startIndex=parseInt(startIndex);endIndx=parseInt(endIndx);startData={Data:this.Data.Data[this.OffsetData.Start],X:xStart,Type:startIndex<endIndx?0:1};endData={Data:this.Data.Data[this.OffsetData.End],X:xEnd,Type:endIndx>startIndex?1:0};}else{var start=this.OffsetData.Start,end=this.OffsetData.End;var xStart=this.ChartFrame.GetXFromIndex(start);var xEnd=this.ChartFrame.GetXFromIndex(end);this.XStart=xStart;this.XEnd=xEnd;startData={Data:this.Data.Data[this.OffsetData.Start],X:xStart,Type:xStart<xEnd?0:1};endData={Data:this.Data.Data[this.OffsetData.End],X:xEnd,Type:xEnd>xStart?1:0};}this.Canvas.fillStyle=this.Color;var rtBar={Left:Math.min(xStart,xEnd),Top:top,Width:Math.abs(xEnd-xStart),Height:bottom-top};rtBar.Right=rtBar.Left+rtBar.Width;rtBar.Bottom=rtBar.Top+rtBar.Height;this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);this.AryRect.push({Rect:rtBar,Type:0});//左右拖拽块
|
|
12977
|
-
var pixelRatio=GetDevicePixelRatio();var barWidth=this.BarWidth*pixelRatio;var barHeight=bottom-top-this.BarPadding*2*pixelRatio;var xBar=xStart-this.BarWidth/2;var yBar=top+this.BarPadding*pixelRatio;this.Canvas.fillStyle=this.BarColor;var rtBar={Left:xBar,Top:yBar,Width:barWidth,Height:barHeight};rtBar.Right=rtBar.Left+rtBar.Width;rtBar.Bottom=rtBar.Top+rtBar.Height;this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);this.AryRect.push({Rect:rtBar,Type:1});var xBar=xEnd-this.BarWidth/2;var rtBar={Left:xBar,Top:yBar,Width:barWidth,Height:barHeight};rtBar.Right=rtBar.Left+rtBar.Width;rtBar.Bottom=rtBar.Top+rtBar.Height;this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);this.AryRect.push({Rect:rtBar,Type:2})
|
|
12977
|
+
var pixelRatio=GetDevicePixelRatio();var barWidth=this.BarWidth*pixelRatio;var barHeight=bottom-top-this.BarPadding*2*pixelRatio;var xBar=xStart-this.BarWidth/2;var yBar=top+this.BarPadding*pixelRatio;this.Canvas.fillStyle=this.BarColor;var rtBar={Left:xBar,Top:yBar,Width:barWidth,Height:barHeight};rtBar.Right=rtBar.Left+rtBar.Width;rtBar.Bottom=rtBar.Top+rtBar.Height;this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);this.AryRect.push({Rect:rtBar,Type:1});var xBar=xEnd-this.BarWidth/2;var rtBar={Left:xBar,Top:yBar,Width:barWidth,Height:barHeight};rtBar.Right=rtBar.Left+rtBar.Width;rtBar.Bottom=rtBar.Top+rtBar.Height;this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);this.AryRect.push({Rect:rtBar,Type:2});//最右边可能是空白区 要处理下
|
|
12978
|
+
if(endData.Type==1){var dataIndex=this.OffsetData.End;if(dataIndex>=this.Data.Data.length)endData.Data=this.Data.Data[this.Data.Data.length-1];}this.DrawDateTime(startData);this.DrawDateTime(endData);};this.DrawDateTime=function(data){if(!data||!data.Data)return;var text=IFrameSplitOperator.FormatDateString(data.Data.Date);var top=this.ChartBorder.GetTop();var bottom=this.ChartBorder.GetBottom();var timeText=null;if(ChartData.IsMilliSecondPeriod(this.Data.Period)){var time=parseInt(data.Data.Time/1000);text=IFrameSplitOperator.FormatTimeString(time,"HH:MM:SS");}else if(ChartData.IsMinutePeriod(this.Data.Period,true)){timeText=IFrameSplitOperator.FormatTimeString(data.Data.Time,"HH:MM");}if(data.Type==0){this.Canvas.textAlign="right";var x=data.X-this.BarWidth/2;}else if(data.Type==1){this.Canvas.textAlign="left";var x=data.X+this.BarWidth/2;}this.Canvas.font=this.DateFont;var fontHeight=this.Canvas.measureText("擎").width;this.Canvas.textBaseline="middle";this.Canvas.fillStyle=this.DateColor;var yText=top+(bottom-top)/2;this.Canvas.fillText(text,x,yText);if(timeText){yText+=fontHeight;this.Canvas.fillText(timeText,x,yText);}};this.PtInChart=function(x,y){if(!IFrameSplitOperator.IsNonEmptyArray(this.AryRect))return null;for(var i=this.AryRect.length-1;i>=0;--i){var item=this.AryRect[i];var rt=item.Rect;if(x>=rt.Left&&x<=rt.Right&&y>=rt.Top&&y<=rt.Bottom){return{Data:item};}}return null;};}///////////////////////////////////////////////////////////////////////////////////////////////
|
|
12978
12979
|
// 滚动条K线背景色
|
|
12979
12980
|
//
|
|
12980
12981
|
//
|
|
@@ -13002,7 +13003,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
13002
13003
|
this.ExecuteScript(item,data);}this.Status=0;}};this.OnExecuteFinish=function(data,indexInfo,jsExectute,jobInfo){var message={Data:data,IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.FINISH_EXECUTE_SCRIPT,JobInfo:jobInfo};postMessage(message);};this.OnExecuteError=function(error,indexInfo,jobData){var message={IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.ERROR_EXECUTE_SCRIPT,Error:error};postMessage(message);};}/********************************************************************************
|
|
13003
13004
|
* 版本信息输出
|
|
13004
13005
|
*
|
|
13005
|
-
*/var HQCHART_VERSION="1.1.
|
|
13006
|
+
*/var HQCHART_VERSION="1.1.12789";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();//把给外界调用的方法暴露出来
|
|
13006
13007
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
13007
13008
|
// BaseIndex:BaseIndex,
|
|
13008
13009
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -76293,6 +76293,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
76293
76293
|
|
|
76294
76294
|
this.RequestSingleOverlayMinuteData=function(symbol, date, item)
|
|
76295
76295
|
{
|
|
76296
|
+
var self = this;
|
|
76296
76297
|
item.Status=OVERLAY_STATUS_ID.STATUS_REQUESTDATA_ID;
|
|
76297
76298
|
|
|
76298
76299
|
if (this.NetworkFilter)
|
|
@@ -76308,7 +76309,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
76308
76309
|
this.NetworkFilter(obj, function(data)
|
|
76309
76310
|
{
|
|
76310
76311
|
item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;
|
|
76311
|
-
|
|
76312
|
+
self.RecvOverlayMinuteData(data,item);
|
|
76312
76313
|
});
|
|
76313
76314
|
|
|
76314
76315
|
if (obj.PreventDefault==true) return; //已被上层替换,不调用默认的网络请求
|
|
@@ -76329,7 +76330,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
76329
76330
|
{
|
|
76330
76331
|
item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;
|
|
76331
76332
|
//self.RecvMultiOverlayMinuteData([data]);
|
|
76332
|
-
|
|
76333
|
+
self.RecvOverlayMinuteData(data,item);
|
|
76333
76334
|
}
|
|
76334
76335
|
});
|
|
76335
76336
|
}
|
|
@@ -76485,6 +76486,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
76485
76486
|
|
|
76486
76487
|
this.RequestSingleOverlayHistoryMinuteData=function(symbol, days, item)
|
|
76487
76488
|
{
|
|
76489
|
+
var self = this;
|
|
76488
76490
|
item.Status=OVERLAY_STATUS_ID.STATUS_REQUESTDATA_ID;
|
|
76489
76491
|
|
|
76490
76492
|
if (this.NetworkFilter)
|
|
@@ -76493,21 +76495,21 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
76493
76495
|
{
|
|
76494
76496
|
Name:'MinuteChartContainer::RequestOverlayHistoryMinuteData', //类名::函数名
|
|
76495
76497
|
Explain:'叠加股票多日分时数据',
|
|
76496
|
-
Request:{ Url:
|
|
76498
|
+
Request:{ Url:self.HistoryMinuteApiUrl, Data:{days:days, symbol:symbol}, Type:'POST' },
|
|
76497
76499
|
Self:this,
|
|
76498
76500
|
PreventDefault:false
|
|
76499
76501
|
};
|
|
76500
76502
|
this.NetworkFilter(obj, function(data)
|
|
76501
76503
|
{
|
|
76502
76504
|
item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;
|
|
76503
|
-
|
|
76505
|
+
self.RecvOverlayHistoryMinuteData(data,item);
|
|
76504
76506
|
});
|
|
76505
76507
|
|
|
76506
76508
|
if (obj.PreventDefault==true) return; //已被上层替换,不调用默认的网络请求
|
|
76507
76509
|
}
|
|
76508
76510
|
|
|
76509
76511
|
JSNetwork.HttpRequest({
|
|
76510
|
-
url:
|
|
76512
|
+
url: self.HistoryMinuteApiUrl,
|
|
76511
76513
|
data:{ "symbol": symbol, "days": days },
|
|
76512
76514
|
type:"post",
|
|
76513
76515
|
dataType: "json",
|
|
@@ -76515,7 +76517,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
76515
76517
|
success: function (data)
|
|
76516
76518
|
{
|
|
76517
76519
|
item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;
|
|
76518
|
-
|
|
76520
|
+
self.RecvOverlayHistoryMinuteData(data,item);
|
|
76519
76521
|
}
|
|
76520
76522
|
});
|
|
76521
76523
|
}
|
|
@@ -1175,6 +1175,13 @@ function SliderChart()
|
|
|
1175
1175
|
this.Canvas.fillRect(rtBar.Left, rtBar.Top, rtBar.Width, rtBar.Height);
|
|
1176
1176
|
this.AryRect.push({ Rect:rtBar, Type:2});
|
|
1177
1177
|
|
|
1178
|
+
//最右边可能是空白区 要处理下
|
|
1179
|
+
if (endData.Type==1)
|
|
1180
|
+
{
|
|
1181
|
+
var dataIndex=this.OffsetData.End;
|
|
1182
|
+
if (dataIndex>=this.Data.Data.length) endData.Data=this.Data.Data[this.Data.Data.length-1];
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1178
1185
|
this.DrawDateTime(startData);
|
|
1179
1186
|
this.DrawDateTime(endData);
|
|
1180
1187
|
}
|
|
@@ -80437,6 +80437,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80437
80437
|
|
|
80438
80438
|
this.RequestSingleOverlayMinuteData=function(symbol, date, item)
|
|
80439
80439
|
{
|
|
80440
|
+
var self = this;
|
|
80440
80441
|
item.Status=OVERLAY_STATUS_ID.STATUS_REQUESTDATA_ID;
|
|
80441
80442
|
|
|
80442
80443
|
if (this.NetworkFilter)
|
|
@@ -80452,7 +80453,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80452
80453
|
this.NetworkFilter(obj, function(data)
|
|
80453
80454
|
{
|
|
80454
80455
|
item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;
|
|
80455
|
-
|
|
80456
|
+
self.RecvOverlayMinuteData(data,item);
|
|
80456
80457
|
});
|
|
80457
80458
|
|
|
80458
80459
|
if (obj.PreventDefault==true) return; //已被上层替换,不调用默认的网络请求
|
|
@@ -80473,7 +80474,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80473
80474
|
{
|
|
80474
80475
|
item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;
|
|
80475
80476
|
//self.RecvMultiOverlayMinuteData([data]);
|
|
80476
|
-
|
|
80477
|
+
self.RecvOverlayMinuteData(data,item);
|
|
80477
80478
|
}
|
|
80478
80479
|
});
|
|
80479
80480
|
}
|
|
@@ -80629,6 +80630,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80629
80630
|
|
|
80630
80631
|
this.RequestSingleOverlayHistoryMinuteData=function(symbol, days, item)
|
|
80631
80632
|
{
|
|
80633
|
+
var self = this;
|
|
80632
80634
|
item.Status=OVERLAY_STATUS_ID.STATUS_REQUESTDATA_ID;
|
|
80633
80635
|
|
|
80634
80636
|
if (this.NetworkFilter)
|
|
@@ -80637,21 +80639,21 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80637
80639
|
{
|
|
80638
80640
|
Name:'MinuteChartContainer::RequestOverlayHistoryMinuteData', //类名::函数名
|
|
80639
80641
|
Explain:'叠加股票多日分时数据',
|
|
80640
|
-
Request:{ Url:
|
|
80642
|
+
Request:{ Url:self.HistoryMinuteApiUrl, Data:{days:days, symbol:symbol}, Type:'POST' },
|
|
80641
80643
|
Self:this,
|
|
80642
80644
|
PreventDefault:false
|
|
80643
80645
|
};
|
|
80644
80646
|
this.NetworkFilter(obj, function(data)
|
|
80645
80647
|
{
|
|
80646
80648
|
item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;
|
|
80647
|
-
|
|
80649
|
+
self.RecvOverlayHistoryMinuteData(data,item);
|
|
80648
80650
|
});
|
|
80649
80651
|
|
|
80650
80652
|
if (obj.PreventDefault==true) return; //已被上层替换,不调用默认的网络请求
|
|
80651
80653
|
}
|
|
80652
80654
|
|
|
80653
80655
|
JSNetwork.HttpRequest({
|
|
80654
|
-
url:
|
|
80656
|
+
url: self.HistoryMinuteApiUrl,
|
|
80655
80657
|
data:{ "symbol": symbol, "days": days },
|
|
80656
80658
|
type:"post",
|
|
80657
80659
|
dataType: "json",
|
|
@@ -80659,7 +80661,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80659
80661
|
success: function (data)
|
|
80660
80662
|
{
|
|
80661
80663
|
item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;
|
|
80662
|
-
|
|
80664
|
+
self.RecvOverlayHistoryMinuteData(data,item);
|
|
80663
80665
|
}
|
|
80664
80666
|
});
|
|
80665
80667
|
}
|
|
@@ -131312,6 +131314,13 @@ function SliderChart()
|
|
|
131312
131314
|
this.Canvas.fillRect(rtBar.Left, rtBar.Top, rtBar.Width, rtBar.Height);
|
|
131313
131315
|
this.AryRect.push({ Rect:rtBar, Type:2});
|
|
131314
131316
|
|
|
131317
|
+
//最右边可能是空白区 要处理下
|
|
131318
|
+
if (endData.Type==1)
|
|
131319
|
+
{
|
|
131320
|
+
var dataIndex=this.OffsetData.End;
|
|
131321
|
+
if (dataIndex>=this.Data.Data.length) endData.Data=this.Data.Data[this.Data.Data.length-1];
|
|
131322
|
+
}
|
|
131323
|
+
|
|
131315
131324
|
this.DrawDateTime(startData);
|
|
131316
131325
|
this.DrawDateTime(endData);
|
|
131317
131326
|
}
|
|
@@ -131487,7 +131496,7 @@ function ScrollBarBGChart()
|
|
|
131487
131496
|
|
|
131488
131497
|
|
|
131489
131498
|
|
|
131490
|
-
var HQCHART_VERSION="1.1.
|
|
131499
|
+
var HQCHART_VERSION="1.1.12789";
|
|
131491
131500
|
|
|
131492
131501
|
function PrintHQChartVersion()
|
|
131493
131502
|
{
|
|
@@ -80481,6 +80481,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80481
80481
|
|
|
80482
80482
|
this.RequestSingleOverlayMinuteData=function(symbol, date, item)
|
|
80483
80483
|
{
|
|
80484
|
+
var self = this;
|
|
80484
80485
|
item.Status=OVERLAY_STATUS_ID.STATUS_REQUESTDATA_ID;
|
|
80485
80486
|
|
|
80486
80487
|
if (this.NetworkFilter)
|
|
@@ -80496,7 +80497,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80496
80497
|
this.NetworkFilter(obj, function(data)
|
|
80497
80498
|
{
|
|
80498
80499
|
item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;
|
|
80499
|
-
|
|
80500
|
+
self.RecvOverlayMinuteData(data,item);
|
|
80500
80501
|
});
|
|
80501
80502
|
|
|
80502
80503
|
if (obj.PreventDefault==true) return; //已被上层替换,不调用默认的网络请求
|
|
@@ -80517,7 +80518,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80517
80518
|
{
|
|
80518
80519
|
item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;
|
|
80519
80520
|
//self.RecvMultiOverlayMinuteData([data]);
|
|
80520
|
-
|
|
80521
|
+
self.RecvOverlayMinuteData(data,item);
|
|
80521
80522
|
}
|
|
80522
80523
|
});
|
|
80523
80524
|
}
|
|
@@ -80673,6 +80674,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80673
80674
|
|
|
80674
80675
|
this.RequestSingleOverlayHistoryMinuteData=function(symbol, days, item)
|
|
80675
80676
|
{
|
|
80677
|
+
var self = this;
|
|
80676
80678
|
item.Status=OVERLAY_STATUS_ID.STATUS_REQUESTDATA_ID;
|
|
80677
80679
|
|
|
80678
80680
|
if (this.NetworkFilter)
|
|
@@ -80681,21 +80683,21 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80681
80683
|
{
|
|
80682
80684
|
Name:'MinuteChartContainer::RequestOverlayHistoryMinuteData', //类名::函数名
|
|
80683
80685
|
Explain:'叠加股票多日分时数据',
|
|
80684
|
-
Request:{ Url:
|
|
80686
|
+
Request:{ Url:self.HistoryMinuteApiUrl, Data:{days:days, symbol:symbol}, Type:'POST' },
|
|
80685
80687
|
Self:this,
|
|
80686
80688
|
PreventDefault:false
|
|
80687
80689
|
};
|
|
80688
80690
|
this.NetworkFilter(obj, function(data)
|
|
80689
80691
|
{
|
|
80690
80692
|
item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;
|
|
80691
|
-
|
|
80693
|
+
self.RecvOverlayHistoryMinuteData(data,item);
|
|
80692
80694
|
});
|
|
80693
80695
|
|
|
80694
80696
|
if (obj.PreventDefault==true) return; //已被上层替换,不调用默认的网络请求
|
|
80695
80697
|
}
|
|
80696
80698
|
|
|
80697
80699
|
JSNetwork.HttpRequest({
|
|
80698
|
-
url:
|
|
80700
|
+
url: self.HistoryMinuteApiUrl,
|
|
80699
80701
|
data:{ "symbol": symbol, "days": days },
|
|
80700
80702
|
type:"post",
|
|
80701
80703
|
dataType: "json",
|
|
@@ -80703,7 +80705,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80703
80705
|
success: function (data)
|
|
80704
80706
|
{
|
|
80705
80707
|
item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;
|
|
80706
|
-
|
|
80708
|
+
self.RecvOverlayHistoryMinuteData(data,item);
|
|
80707
80709
|
}
|
|
80708
80710
|
});
|
|
80709
80711
|
}
|
|
@@ -131356,6 +131358,13 @@ function SliderChart()
|
|
|
131356
131358
|
this.Canvas.fillRect(rtBar.Left, rtBar.Top, rtBar.Width, rtBar.Height);
|
|
131357
131359
|
this.AryRect.push({ Rect:rtBar, Type:2});
|
|
131358
131360
|
|
|
131361
|
+
//最右边可能是空白区 要处理下
|
|
131362
|
+
if (endData.Type==1)
|
|
131363
|
+
{
|
|
131364
|
+
var dataIndex=this.OffsetData.End;
|
|
131365
|
+
if (dataIndex>=this.Data.Data.length) endData.Data=this.Data.Data[this.Data.Data.length-1];
|
|
131366
|
+
}
|
|
131367
|
+
|
|
131359
131368
|
this.DrawDateTime(startData);
|
|
131360
131369
|
this.DrawDateTime(endData);
|
|
131361
131370
|
}
|
|
@@ -131645,7 +131654,7 @@ function HQChartScriptWorker()
|
|
|
131645
131654
|
|
|
131646
131655
|
|
|
131647
131656
|
|
|
131648
|
-
var HQCHART_VERSION="1.1.
|
|
131657
|
+
var HQCHART_VERSION="1.1.12789";
|
|
131649
131658
|
|
|
131650
131659
|
function PrintHQChartVersion()
|
|
131651
131660
|
{
|