hqchart 1.1.14811 → 1.1.14814
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 +13 -13
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogDrawTool.js +5 -1
- package/src/jscommon/umychart.DialogSearchIndex.js +1 -1
- package/src/jscommon/umychart.DialogSelectRect.js +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +1 -1
- package/src/jscommon/umychart.PopKLineChart.js +6 -1
- package/src/jscommon/umychart.PopKeyboard.js +5 -1
- package/src/jscommon/umychart.PopMinuteChart.js +5 -1
- package/src/jscommon/umychart.js +14 -1
- package/src/jscommon/umychart.report.js +26 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +41 -2
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +65 -9
package/lib/umychart.vue.js
CHANGED
|
@@ -5475,7 +5475,7 @@ return IFrameSplitOperator.FormatValueString(value,floatPrecision,languageID);};
|
|
|
5475
5475
|
IFrameSplitOperator.MillisecondToString=function(value){if(value<10)return'00'+value.toString();else if(value<100)return'0'+value.toString();else return value.toString();};IFrameSplitOperator.FormatDateString=function(value,format,languageID){var year=parseInt(value/10000);var month=parseInt(value/100)%100;var day=value%100;switch(format){case'MM-DD':return IFrameSplitOperator.NumberToString(month)+'-'+IFrameSplitOperator.NumberToString(day);case"MM-DD/W":var date=new Date(year,month-1,day);var week=g_JSChartLocalization.GetText(WEEK_NAME[date.getDay()],languageID);return IFrameSplitOperator.NumberToString(month)+'-'+IFrameSplitOperator.NumberToString(day)+'/'+week;case"MM/DD":return IFrameSplitOperator.NumberToString(month)+'/'+IFrameSplitOperator.NumberToString(day);case"MM/DD/W":var date=new Date(year,month-1,day);var week=g_JSChartLocalization.GetText(WEEK_NAME[date.getDay()],languageID);return IFrameSplitOperator.NumberToString(month)+'/'+IFrameSplitOperator.NumberToString(day)+'/'+week;case"YYYY-MM":return year+'-'+IFrameSplitOperator.NumberToString(month);case"YYYY/MM/DD":return year.toString()+'/'+IFrameSplitOperator.NumberToString(month)+'/'+IFrameSplitOperator.NumberToString(day);case"YYYY/MM/DD/W":{var date=new Date(year,month-1,day);var week=g_JSChartLocalization.GetText(WEEK_NAME[date.getDay()],languageID);return year.toString()+'/'+IFrameSplitOperator.NumberToString(month)+'/'+IFrameSplitOperator.NumberToString(day)+"/"+week.toString();}case"DD/MM/YYYY":return IFrameSplitOperator.NumberToString(day)+'/'+IFrameSplitOperator.NumberToString(month)+'/'+year.toString();default://YYYY-MM-DD
|
|
5476
5476
|
return year.toString()+'-'+IFrameSplitOperator.NumberToString(month)+'-'+IFrameSplitOperator.NumberToString(day);}};IFrameSplitOperator.FormatTimeString=function(value,format)//format hh:mm:ss
|
|
5477
5477
|
{if(format=='HH:MM:SS'){var hour=parseInt(value/10000);var minute=parseInt(value%10000/100);var second=value%100;return IFrameSplitOperator.NumberToString(hour)+':'+IFrameSplitOperator.NumberToString(minute)+':'+IFrameSplitOperator.NumberToString(second);}else if(format=="hh:mm"){var hour=parseInt(value/10000);var minute=parseInt(value%10000/100);var second=value%100;return IFrameSplitOperator.NumberToString(hour)+':'+IFrameSplitOperator.NumberToString(minute);}else if(format=='HH:MM'){var hour=parseInt(value/100);var minute=value%100;return IFrameSplitOperator.NumberToString(hour)+':'+IFrameSplitOperator.NumberToString(minute);}else if(format=="HH:MM:SS.fff"){var millisecond=value%1000;var dateTime=parseInt(value/1000);var hour=parseInt(dateTime/10000);var minute=parseInt(dateTime%10000/100);var second=dateTime%100;return IFrameSplitOperator.NumberToString(hour)+':'+IFrameSplitOperator.NumberToString(minute)+':'+IFrameSplitOperator.NumberToString(second)+'.'+IFrameSplitOperator.MillisecondToString(millisecond);}else{if(value<10000){var hour=parseInt(value/100);var minute=value%100;return IFrameSplitOperator.NumberToString(hour)+':'+IFrameSplitOperator.NumberToString(minute);}else{var hour=parseInt(value/10000);var minute=parseInt(value%10000/100);var second=value%100;return IFrameSplitOperator.NumberToString(hour)+':'+IFrameSplitOperator.NumberToString(minute)+':'+IFrameSplitOperator.NumberToString(second);}}};//报告格式化
|
|
5478
|
-
IFrameSplitOperator.FormatReportDateString=function(value){var year=parseInt(value/10000);var month=parseInt(value/100)%100;var monthText;switch(month){case 3:monthText="一季度报";break;case 6:monthText="半年报";break;case 9:monthText="三季度报";break;case 12:monthText="年报";break;}return year.toString()+monthText;};IFrameSplitOperator.FormatDateTimeString=function(value,isShowDate,isShowTime){var aryValue=value.split(' ');if(aryValue.length<2)return"";var result="";if(isShowDate){var date=parseInt(aryValue[0]);var year=parseInt(date/10000);var month=parseInt(date%10000/100);var day=date%100;var text=year.toString()+'-'+(month<10?'0'+month.toString():month.toString())+'-'+(day<10?'0'+day.toString():day.toString());result+=text;}if(isShowTime){var time=parseInt(aryValue[1]);if(time<10000){var minute=time%100;var hour=parseInt(time/100);var text=IFrameSplitOperator.NumberToString(hour)+':'+IFrameSplitOperator.NumberToString(minute);if(result.length>0)result+=" ";result+=text;}else{var hour=parseInt(time/10000);var minute=parseInt(time%10000/100);var second=time%100;var text=IFrameSplitOperator.NumberToString(hour)+':'+IFrameSplitOperator.NumberToString(minute)+':'+IFrameSplitOperator.NumberToString(second);if(result.length>0)result+=" ";result+=text;}}return result;};IFrameSplitOperator.FormatDateTimeStringV2=function(datetime,format,languageID){if(!datetime)return null;switch(format){case"YYYY-MM-DD":return datetime.getFullYear()+'-'+IFrameSplitOperator.NumberToString(datetime.getMonth()+1)+'-'+IFrameSplitOperator.NumberToString(datetime.getDate());case"HH:MM:SS":return IFrameSplitOperator.NumberToString(datetime.getHours())+':'+IFrameSplitOperator.NumberToString(datetime.getMinutes())+':'+IFrameSplitOperator.NumberToString(datetime.getSeconds());case"HH:MM":return IFrameSplitOperator.NumberToString(datetime.getHours())+':'+IFrameSplitOperator.NumberToString(datetime.getMinutes());default:return null;}};//字段颜色格式化
|
|
5478
|
+
IFrameSplitOperator.FormatReportDateString=function(value){var year=parseInt(value/10000);var month=parseInt(value/100)%100;var monthText;switch(month){case 3:monthText="一季度报";break;case 6:monthText="半年报";break;case 9:monthText="三季度报";break;case 12:monthText="年报";break;}return year.toString()+monthText;};IFrameSplitOperator.FormatDateTimeString=function(value,isShowDate,isShowTime){var aryValue=value.split(' ');if(aryValue.length<2)return"";var result="";if(isShowDate){var date=parseInt(aryValue[0]);var year=parseInt(date/10000);var month=parseInt(date%10000/100);var day=date%100;var text=year.toString()+'-'+(month<10?'0'+month.toString():month.toString())+'-'+(day<10?'0'+day.toString():day.toString());result+=text;}if(isShowTime){var time=parseInt(aryValue[1]);if(time<10000){var minute=time%100;var hour=parseInt(time/100);var text=IFrameSplitOperator.NumberToString(hour)+':'+IFrameSplitOperator.NumberToString(minute);if(result.length>0)result+=" ";result+=text;}else{var hour=parseInt(time/10000);var minute=parseInt(time%10000/100);var second=time%100;var text=IFrameSplitOperator.NumberToString(hour)+':'+IFrameSplitOperator.NumberToString(minute)+':'+IFrameSplitOperator.NumberToString(second);if(result.length>0)result+=" ";result+=text;}}return result;};IFrameSplitOperator.FormatDateTimeStringV2=function(datetime,format,languageID){if(!datetime)return null;switch(format){case"YYYY-MM-DD":return datetime.getFullYear()+'-'+IFrameSplitOperator.NumberToString(datetime.getMonth()+1)+'-'+IFrameSplitOperator.NumberToString(datetime.getDate());case'MM-DD':return IFrameSplitOperator.NumberToString(datetime.getMonth()+1)+'-'+IFrameSplitOperator.NumberToString(datetime.getDate());case"MM/DD":return IFrameSplitOperator.NumberToString(datetime.getMonth()+1)+'/'+IFrameSplitOperator.NumberToString(datetime.getDate());case"YYYY-MM":return datetime.getFullYear()+'-'+IFrameSplitOperator.NumberToString(datetime.getMonth()+1);case"YYYY/MM/DD":return datetime.getFullYear()+'/'+IFrameSplitOperator.NumberToString(datetime.getMonth()+1)+'/'+IFrameSplitOperator.NumberToString(datetime.getDate());case"DD/MM/YYYY":return IFrameSplitOperator.NumberToString(datetime.getDate())+'/'+IFrameSplitOperator.NumberToString(datetime.getMonth()+1)+'/'+datetime.getFullYear();case"HH:MM:SS":return IFrameSplitOperator.NumberToString(datetime.getHours())+':'+IFrameSplitOperator.NumberToString(datetime.getMinutes())+':'+IFrameSplitOperator.NumberToString(datetime.getSeconds());case"HH:MM":return IFrameSplitOperator.NumberToString(datetime.getHours())+':'+IFrameSplitOperator.NumberToString(datetime.getMinutes());case"HH:MM:SS.fff":return IFrameSplitOperator.NumberToString(datetime.getHours())+':'+IFrameSplitOperator.NumberToString(datetime.getMinutes())+':'+IFrameSplitOperator.NumberToString(datetime.getSeconds())+'.'+IFrameSplitOperator.MillisecondToString(datetime.getMilliseconds());default:return null;}};//字段颜色格式化
|
|
5479
5479
|
IFrameSplitOperator.FormatValueColor=function(value,value2){if(value!=null&&value2==null)//只传一个值的 就判断value正负
|
|
5480
5480
|
{if(value==0)return'PriceNull';else if(value>0)return'PriceUp';else return'PriceDown';}//2个数值对比 返回颜色
|
|
5481
5481
|
if(value==null||value2==null)return'PriceNull';if(value==value2)return'PriceNull';else if(value>value2)return'PriceUp';else return'PriceDown';};IFrameSplitOperator.IsNumber=function(value){if(value==null)return false;if(isNaN(value))return false;return typeof value=='number';};//批量判断是否是数值类型
|
|
@@ -13615,7 +13615,7 @@ var columnLeft=left;for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){va
|
|
|
13615
13615
|
this.UpdateCacheData=function(){this.RectClient.Left=this.ChartBorder.GetLeft();this.RectClient.Right=this.ChartBorder.GetRight();this.RectClient.Top=this.ChartBorder.GetTop();this.RectClient.Bottom=this.ChartBorder.GetBottom()-this.BottomToolbarHeight;};this.GetPageSize=function(recalculate)//recalculate 是否重新计算
|
|
13616
13616
|
{if(recalculate)this.CalculateSize();var size=this.RowCount;return size;};this.GetCurrentPageStatus=function()//{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
|
|
13617
13617
|
{var result={Start:this.Data.YOffset,PageSize:this.RowCount,IsEnd:false,SelectedRow:this.SelectedRow,IsSinglePage:false,DataCount:0,MultiSelectModel:this.MultiSelectModel};if(this.MultiSelectModel==1){result.SelectedRow=-1;result.MultiSelectedRow=this.MultiSelectedRow.slice();result.MultiSelectedRow.sort(function(left,right){return left>right;});}if(IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)){result.End=this.Data.YOffset+this.RowCount-1;result.IsSinglePage=this.Data.Data.length<=this.RowCount;result.DataCount=this.Data.Data.length;if(result.End>=this.Data.Data.length-1)result.IsEnd=true;if(result.End>=this.Data.Data.length)result.End=this.Data.Data.length-1;}else{result.Start=0;result.End=0;result.IsEnd=true;result.IsSinglePage=true;}return result;};this.CalculateSize=function()//计算大小
|
|
13618
|
-
{if(this.Tab&&this.Tab.IsShow){this.Tab.CalculateSize();this.BottomToolbarHeight=this.Tab.Height;}else{this.BottomToolbarHeight=0;}if(this.VScrollbar&&this.VScrollbar.Enable)this.VScrollbar.CalculateSize();this.UpdateCacheData();var pixelRatio=GetDevicePixelRatio();this.HeaderFont=this.HeaderFontConfig.Size*pixelRatio+'px '+this.HeaderFontConfig.Name;this.ItemFont=this.ItemFontConfig.Size*pixelRatio+'px '+this.ItemFontConfig.Name;this.ItemFixedFont=this.ItemFixedFontConfg.Size*pixelRatio+'px '+this.ItemFixedFontConfg.Name;this.ItemSymbolFont=this.ItemSymbolFontConfig.Size*pixelRatio+'px '+this.ItemSymbolFontConfig.Name;this.ItemNameFont=this.ItemNameFontConfg.Size*pixelRatio+'px '+this.ItemNameFontConfg.Name;this.NameSymbolFont.Symbol=this.NameSymbolV2Config.Symbol.Size*pixelRatio+'px '+this.NameSymbolV2Config.Symbol.Name;this.NameSymbolFont.Name=this.ItemSymbolFontConfig.Name.Size*pixelRatio+'px '+this.NameSymbolV2Config.Name.Name;this.ItemFontHeight=this.GetFontHeight(this.ItemFont,"擎");this.RowHeight=this.ItemFontHeight+this.ItemMergin.Top+this.ItemMergin.Bottom;this.ItemTextLines=1;this.FixedRowHeight=this.GetFontHeight(this.ItemFixedFont,"擎")+this.ItemMergin.Top+this.ItemMergin.Bottom;this.SortFont=this.SortConfig.Size*pixelRatio+'px '+this.SortConfig.Family;this.Canvas.font=this.ItemFont;var itemWidth=0;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];if(item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_ID){this.Canvas.font=this.ItemNameFont;var nameWidth=this.Canvas.measureText(item.MaxText).width;var nameHeight=this.GetFontHeight(this.ItemNameFont,"擎");this.ItemNameHeight=nameHeight;this.Canvas.font=this.ItemSymbolFont;var symbolWidth=this.Canvas.measureText(item.MaxText).width;var symboHeight=this.GetFontHeight(this.ItemSymbolFont,"擎");this.ItemSymbolHeight=symboHeight;this.Canvas.font=this.ItemFont;itemWidth=Math.max(nameWidth,symbolWidth);item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;var rowHeight=nameHeight+symboHeight+this.ItemMergin.Top+this.ItemMergin.Bottom;this.ItemTextLines=2;if(rowHeight>this.RowHeight)this.RowHeight=rowHeight;if(rowHeight>this.FixedRowHeight)this.FixedRowHeight=rowHeight;}else if(item.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER){if(IFrameSplitOperator.IsNumber(item.FixedWidth))itemWidth=item.FixedWidth;else itemWidth=this.Canvas.measureText(item.MaxText).width;item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;this.ItemTextLines=item.AryField.length;var rowHeight=this.ItemFontHeight*item.AryField.length+this.ItemMergin.Top+this.ItemMergin.Bottom;if(rowHeight>this.RowHeight)this.RowHeight=rowHeight;if(rowHeight>this.FixedRowHeight)this.FixedRowHeight=rowHeight;}else if(item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID)//单行显示
|
|
13618
|
+
{if(this.Tab&&this.Tab.IsShow){this.Tab.CalculateSize();this.BottomToolbarHeight=this.Tab.Height;}else{this.BottomToolbarHeight=0;}if(this.VScrollbar&&this.VScrollbar.Enable)this.VScrollbar.CalculateSize();this.UpdateCacheData();var pixelRatio=GetDevicePixelRatio();this.HeaderFont=this.HeaderFontConfig.Size*pixelRatio+'px '+this.HeaderFontConfig.Name;this.ItemFont=this.ItemFontConfig.Size*pixelRatio+'px '+this.ItemFontConfig.Name;this.ItemFixedFont=this.ItemFixedFontConfg.Size*pixelRatio+'px '+this.ItemFixedFontConfg.Name;this.ItemSymbolFont=this.ItemSymbolFontConfig.Size*pixelRatio+'px '+this.ItemSymbolFontConfig.Name;this.ItemNameFont=this.ItemNameFontConfg.Size*pixelRatio+'px '+this.ItemNameFontConfg.Name;this.NameSymbolFont.Symbol=this.NameSymbolV2Config.Symbol.Size*pixelRatio+'px '+this.NameSymbolV2Config.Symbol.Name;this.NameSymbolFont.Name=this.ItemSymbolFontConfig.Name.Size*pixelRatio+'px '+this.NameSymbolV2Config.Name.Name;this.ItemFontHeight=this.GetFontHeight(this.ItemFont,"擎");this.RowHeight=this.ItemFontHeight+this.ItemMergin.Top+this.ItemMergin.Bottom;this.ItemTextLines=1;this.FixedRowHeight=this.GetFontHeight(this.ItemFixedFont,"擎")+this.ItemMergin.Top+this.ItemMergin.Bottom;this.SortFont=this.SortConfig.Size*pixelRatio+'px '+this.SortConfig.Family;this.Canvas.font=this.ItemFont;var itemWidth=0;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];this.Canvas.font=this.ItemFont;if(item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_ID){this.Canvas.font=this.ItemNameFont;var nameWidth=this.Canvas.measureText(item.MaxText).width;var nameHeight=this.GetFontHeight(this.ItemNameFont,"擎");this.ItemNameHeight=nameHeight;this.Canvas.font=this.ItemSymbolFont;var symbolWidth=this.Canvas.measureText(item.MaxText).width;var symboHeight=this.GetFontHeight(this.ItemSymbolFont,"擎");this.ItemSymbolHeight=symboHeight;this.Canvas.font=this.ItemFont;itemWidth=Math.max(nameWidth,symbolWidth);item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;var rowHeight=nameHeight+symboHeight+this.ItemMergin.Top+this.ItemMergin.Bottom;this.ItemTextLines=2;if(rowHeight>this.RowHeight)this.RowHeight=rowHeight;if(rowHeight>this.FixedRowHeight)this.FixedRowHeight=rowHeight;}else if(item.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER){if(IFrameSplitOperator.IsNumber(item.FixedWidth))itemWidth=item.FixedWidth;else itemWidth=this.Canvas.measureText(item.MaxText).width;item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;this.ItemTextLines=item.AryField.length;var rowHeight=this.ItemFontHeight*item.AryField.length+this.ItemMergin.Top+this.ItemMergin.Bottom;if(rowHeight>this.RowHeight)this.RowHeight=rowHeight;if(rowHeight>this.FixedRowHeight)this.FixedRowHeight=rowHeight;}else if(item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID)//单行显示
|
|
13619
13619
|
{this.Canvas.font==this.NameSymbolFont.Name;var nameWidth=this.Canvas.measureText(item.MaxText).width;var nameHeight=this.GetFontHeight(this.ItemNameFont,"擎");this.Canvas.font==this.NameSymbolFont.Symbol;var symbolWidth=this.Canvas.measureText(item.MaxText2).width;var symboHeight=this.GetFontHeight(this.ItemSymbolFont,"擎");this.ItemNameHeight=Math.abs(nameHeight,symboHeight);var space=2;if(IFrameSplitOperator.IsNumber(item.Space))space=item.Space;itemWidth=nameWidth+symbolWidth+space;item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;}else{if(IFrameSplitOperator.IsNumber(item.FixedWidth))itemWidth=item.FixedWidth;else itemWidth=this.Canvas.measureText(item.MaxText).width;item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;}if(item.Icon&&item.Icon.Symbol){item.Width+=item.Icon.Size;if(item.Icon.Margin){var margin=item.Icon.Margin;if(IFrameSplitOperator.IsNumber(margin.Left))item.Width+=margin.Left;if(IFrameSplitOperator.IsNumber(margin.Right))item.Width+=margin.Right;}}}this.Canvas.font=this.HeaderFont;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];if(!item.Title||item.Title.length<=0)continue;var text=item.Title;itemWidth=this.Canvas.measureText(text).width;if(item.Sort>0)itemWidth+=this.SortConfig.Size*pixelRatio;itemWidth+=4+this.HeaderMergin.Left+this.HeaderMergin.Right;if(item.Width<itemWidth)item.Width=itemWidth;}this.HeaderFontHeight=this.GetFontHeight(this.HeaderFont,"擎");if(this.HeaderRowCount<=1)//单行
|
|
13620
13620
|
{this.HeaderHeight=this.HeaderFontHeight+(this.HeaderMergin.Top+this.HeaderMergin.Bottom);}else{this.HeaderHeight=this.HeaderFontHeight*this.HeaderRowCount+(this.HeaderMergin.Top+this.HeaderMergin.Bottom);}if(!this.IsShowHeader)this.HeaderHeight=0;if(this.FixedRowCount<=0)this.FixedRowHeight=0;this.RowCount=parseInt((this.RectClient.Bottom-this.RectClient.Top-this.HeaderHeight-this.FixedRowHeight*this.FixedRowCount)/this.RowHeight);var subWidth=0;var reportWidth=this.RectClient.Right-this.RectClient.Left;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];subWidth+=item.Width;}this.IsShowAllColumn=subWidth<reportWidth;};this.DrawHeaderItem=function(column,rtCell,index,option){if(column.HeaderBGColor)//背景色
|
|
13621
13621
|
{this.DrawItemBG({Rect:rtCell,BGColor:column.HeaderBGColor});}var textWidth=rtCell.Width-this.HeaderMergin.Left-this.HeaderMergin.Right;//AryText=[ { Text:标题, Sort:{Type:排序}, Icon:图标 }]
|
|
@@ -13639,9 +13639,9 @@ var columnLeft=left;for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){va
|
|
|
13639
13639
|
this.GetAllRowCount=function(){var count=this.Data.Data.length;if(this.Data.Virtual&&this.Data.Virtual.Enable)count=this.Data.Virtual.Count;return count;};this.DrawBody=function(){if(!this.Data)return;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)&&!this.Data.Virtual.Enable)return;this.Canvas.font=this.ItemFont;var top=this.RectClient.Top+this.HeaderHeight;var left=this.RectClient.Left;var rowWidth=this.RectClient.Right-this.RectClient.Left;var arySelectedRow=[];//固定行
|
|
13640
13640
|
var textTop=top;this.Canvas.font=this.ItemFixedFont;for(var i=0;i<this.FixedRowCount;++i){if(this.SelectedFixedRow==i){this.Canvas.fillStyle=this.SelectedColor;;this.Canvas.fillRect(left,textTop,rowWidth,this.FixedRowHeight);}if(this.FixedRowData.Type==1)this.DrawFixedSymbolRow(textTop,i);else this.DrawFixedRow(textTop,i);textTop+=this.FixedRowHeight;}textTop=top+this.FixedRowHeight*this.FixedRowCount;this.Canvas.font=this.ItemFont;var eventDrawBG=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_REPORT_ROW_BG);var selectedSymbol=this.GetSelectedSymbol();var setSelected;if(this.MultiSelectModel==1)setSelected=new _set2.default(this.MultiSelectedRow);var dataCount=this.GetAllRowCount();for(var i=this.Data.YOffset,j=0;i<dataCount&&j<this.RowCount;++i,++j){var symbol=this.Data.Data[i];var rtRowBG={Left:left,Top:textTop,Width:rowWidth,Height:this.RowHeight};rtRowBG.Right=rtRowBG.Left+rtRowBG.Width;rtRowBG.Bottom=rtRowBG.Top+rtRowBG.Height;var bFillRow=false;if(this.MultiSelectModel==1){if(setSelected.has(i))bFillRow=true;}else{if(this.SelectedModel==0){if(j==this.SelectedRow)bFillRow=true;//选中行
|
|
13641
13641
|
}else{if(i==this.SelectedRow)bFillRow=true;//选中行
|
|
13642
|
-
}}if(this.DragRow){if(this.DragRow.Data){var dataIndex=this.DragRow.Data.Row.DataIndex;if(dataIndex==i){this.Canvas.fillStyle=this.DragSrcRowColor;this.Canvas.fillRect(left,textTop,rowWidth,this.RowHeight);}}if(this.DragRow.MoveRow){var dataIndex=this.DragRow.MoveRow.Data.DataIndex;if(dataIndex==i){this.Canvas.fillStyle=this.DragMoveRowColor;this.Canvas.fillRect(left,textTop,rowWidth,this.RowHeight);}}bFillRow=false;}this.DrawFullRowBGColor(symbol,eventDrawBG,i,rtRowBG,{Selected:selectedSymbol});if(bFillRow){this.AryFullSelectedRow.push(rtRowBG);if(this.SelectedStyle===1){this.Canvas.fillStyle=this.SelectedColor;this.Canvas.fillRect(rtRowBG.Left,rtRowBG.Top,rtRowBG.Width,rtRowBG.Height);}}this.DrawRow(symbol,textTop,i);this.ShowSymbol.push({Index:i,Symbol:symbol});textTop+=this.RowHeight;}};//绘制整行背景色
|
|
13642
|
+
}}if(this.DragRow){if(this.DragRow.Data){var dataIndex=this.DragRow.Data.Row.DataIndex;if(dataIndex==i){this.Canvas.fillStyle=this.DragSrcRowColor;this.Canvas.fillRect(left,textTop,rowWidth,this.RowHeight);}}if(this.DragRow.MoveRow){var dataIndex=this.DragRow.MoveRow.Data.DataIndex;if(dataIndex==i){this.Canvas.fillStyle=this.DragMoveRowColor;this.Canvas.fillRect(left,textTop,rowWidth,this.RowHeight);}}bFillRow=false;}this.DrawFullRowBGColor(symbol,eventDrawBG,i,rtRowBG,{Selected:selectedSymbol});this.DrawFlashFullRowBGColor(symbol,rtRowBG);if(bFillRow){this.AryFullSelectedRow.push(rtRowBG);if(this.SelectedStyle===1){this.Canvas.fillStyle=this.SelectedColor;this.Canvas.fillRect(rtRowBG.Left,rtRowBG.Top,rtRowBG.Width,rtRowBG.Height);}}this.DrawRow(symbol,textTop,i);this.ShowSymbol.push({Index:i,Symbol:symbol});textTop+=this.RowHeight;}};//绘制整行背景色
|
|
13643
13643
|
this.DrawFullRowBGColor=function(symbol,event,index,rtBG,option){var data={Symbol:symbol,Stock:null};if(this.GetStockDataCallback)data.Stock=this.GetStockDataCallback(symbol);if(data.Stock&&data.Stock.BGColor){this.Canvas.fillStyle=data.Stock.BGColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}if(event&&event.Callback){//Out:{ BGColor: }
|
|
13644
|
-
var sendData={RowIndex:index,Symbol:symbol,Out:null,MultiSelectModel:this.MultiSelectModel};if(option){if(option.Selected)sendData.Selected=option.Selected;}event.Callback(event,sendData,this);if(sendData.Out&&sendData.Out.BGColor){this.Canvas.fillStyle=sendData.Out.BGColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}}};this.DrawSelectedRow=function(){if(this.SelectedStyle===2&&IFrameSplitOperator.IsNonEmptyArray(this.AryFullSelectedRow)){this.Canvas.fillStyle=this.SelectedLineConfig.Color;var lineWidth=this.SelectedLineConfig.Width;for(var i=0;i<this.AryFullSelectedRow.length;++i){var rtBG=this.AryFullSelectedRow[i];this.Canvas.fillRect(rtBG.Left,rtBG.Bottom-lineWidth,rtBG.Width,lineWidth);}}};this.GetSelectedSymbol=function(){if(this.MultiSelectModel==1){if(!IFrameSplitOperator.IsNonEmptyArray(this.MultiSelectedRow))return null;var aryData=[];for(var i=0;i<this.MultiSelectedRow.length;++i){var item=this.Data.Data[this.MultiSelectedRow[i]];if(!item)continue;aryData.push(item);}return aryData;}else{if(this.SelectedRow<0)return null;var index=this.SelectedRow;if(this.SelectedModel==0)//当前屏选中
|
|
13644
|
+
var sendData={RowIndex:index,Symbol:symbol,Out:null,MultiSelectModel:this.MultiSelectModel};if(option){if(option.Selected)sendData.Selected=option.Selected;}event.Callback(event,sendData,this);if(sendData.Out&&sendData.Out.BGColor){this.Canvas.fillStyle=sendData.Out.BGColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}}};this.DrawFlashFullRowBGColor=function(symbol,rtBG){var data={Symbol:symbol,FlashBG:null};if(this.GetFlashBGDataCallback)data.FlashBG=this.GetFlashBGDataCallback(symbol,Date.now());if(!data.FlashBG)return;var id=-1;if(!data.FlashBG.Data.has(id))return;var flashItem=data.FlashBG.Data.get(id);if(flashItem&&flashItem.Count){this.Canvas.fillStyle=flashItem.Color;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}--flashItem.Count;if(this.GlobalOption)++this.GlobalOption.FlashBGCount;};this.DrawSelectedRow=function(){if(this.SelectedStyle===2&&IFrameSplitOperator.IsNonEmptyArray(this.AryFullSelectedRow)){this.Canvas.fillStyle=this.SelectedLineConfig.Color;var lineWidth=this.SelectedLineConfig.Width;for(var i=0;i<this.AryFullSelectedRow.length;++i){var rtBG=this.AryFullSelectedRow[i];this.Canvas.fillRect(rtBG.Left,rtBG.Bottom-lineWidth,rtBG.Width,lineWidth);}}};this.GetSelectedSymbol=function(){if(this.MultiSelectModel==1){if(!IFrameSplitOperator.IsNonEmptyArray(this.MultiSelectedRow))return null;var aryData=[];for(var i=0;i<this.MultiSelectedRow.length;++i){var item=this.Data.Data[this.MultiSelectedRow[i]];if(!item)continue;aryData.push(item);}return aryData;}else{if(this.SelectedRow<0)return null;var index=this.SelectedRow;if(this.SelectedModel==0)//当前屏选中
|
|
13645
13645
|
index=this.Data.YOffset+this.SelectedRow;var symbol=this.Data.Data[index];return[symbol];}};//单行选中模式选中股票
|
|
13646
13646
|
this.GetSelectedSingleSymbol=function(){if(this.MultiSelectModel==1)return null;//多选
|
|
13647
13647
|
if(this.SelectedModel==0)return null;//当前屏选中
|
|
@@ -13683,7 +13683,7 @@ this.Canvas.clip();if(this.TextOverflowStyle==1){var count=text.length+5;text=""
|
|
|
13683
13683
|
{var yOffset=(this.RowHeight-this.ItemMergin.Bottom-this.ItemMergin.Top-this.ItemFontHeight)/2;var yBottom=top+this.RowHeight-this.ItemMergin.Bottom-yOffset;this.Canvas.fillText(text,x,yBottom);}else{this.Canvas.fillText(text,x,top+this.RowHeight-this.ItemMergin.Bottom);}if(bClip)this.Canvas.restore();};//{ Text:, Symbol:{ Family:'iconfont', Size:, Data:[ { Text:'\ue631', Color:'#1c65db'}, ...] } ]}
|
|
13684
13684
|
this.DrawItemTextEx=function(drawInfo,left,top,width){var text=drawInfo.Text;var clrText=drawInfo.TextColor;var symbol=drawInfo.Symbol;//符号
|
|
13685
13685
|
var textAlign=drawInfo.TextAlign;var textWidth=this.Canvas.measureText(text).width+1;;var totalWidth=textWidth;var font=symbol.Size*GetDevicePixelRatio()+'px '+symbol.Family;this.Canvas.font=font;var aryIconWidth=[];for(var i=0;i<symbol.Data.length;++i){var item=symbol.Data[i];var iconWidth=this.Canvas.measureText(item.Text).width+1;if(totalWidth+iconWidth>width)break;totalWidth+=iconWidth;aryIconWidth[i]=iconWidth;}var x=left;var y=top+this.ItemMergin.Top+this.RowHeight/2;if(textAlign=='center'){x=left+(width-totalWidth)/2;}else if(textAlign=='right'){x=left+(width-totalWidth);}else{x+=2;}this.Canvas.textBaseline="middle";this.Canvas.textAlign="left";this.Canvas.font=this.ItemFont;this.Canvas.fillStyle=clrText;this.Canvas.fillText(text,x,y);x+=textWidth;this.Canvas.font=font;for(var i=0;i<aryIconWidth.length;++i){var item=symbol.Data[i];this.Canvas.fillStyle=item.Color;this.Canvas.fillText(item.Text,x,y);x+=aryIconWidth[i];}this.Canvas.font=this.ItemFont;};this.DrawIconItem=function(drawInfo,left,top,width){if(!drawInfo||!drawInfo.Font||!drawInfo.Text)return;var text=drawInfo.Text;var clrText=drawInfo.TextColor;var textAlign=drawInfo.TextAlign;this.Canvas.font=drawInfo.Font;var textWidth=this.Canvas.measureText(text).width+1;;var x=left;var y=top+this.ItemMergin.Top+this.RowHeight/2;if(textAlign=='center'){x=left+(width-textWidth)/2;}else if(textAlign=='right'){x=left+(width-textWidth);}else{x+=2;}this.Canvas.textBaseline="middle";this.Canvas.textAlign="left";this.Canvas.fillStyle=clrText;this.Canvas.fillText(text,x,y);this.Canvas.font=this.ItemFont;};this.DrawCheckbox=function(drawInfo,left,top,width){if(!IFrameSplitOperator.IsBool(drawInfo.Checked))return;if(!drawInfo.CheckBox)return;var config=drawInfo.CheckBox;drawInfo.Font=config.Size*this.DevicePixelRatio+'px '+config.Family;var textAlign=drawInfo.TextAlign;var size=drawInfo.CheckBox.Size*this.DevicePixelRatio;var x=left+drawInfo.CheckBox.Margin.Left;var y=top+this.RowHeight-drawInfo.CheckBox.Margin.Bottom;if(textAlign=='center')x=left+width/2-size/2;else if(textAlign=='right')x=left+width-config.Margin.Right;var rtBox={Left:x,Bottom:y,Width:size,Height:size};rtBox.Right=rtBox.Left+rtBox.Width;rtBox.Top=rtBox.Bottom-rtBox.Height;//鼠标在上面
|
|
13686
|
-
var bMouseOn=false;if(drawInfo.Enable&&this.LastMouseStatus&&this.LastMouseStatus.OnMouseMove){var xMouse=this.LastMouseStatus.OnMouseMove.X;var yMouse=this.LastMouseStatus.OnMouseMove.Y;if(xMouse>rtBox.Left&&xMouse<rtBox.Right&&yMouse>rtBox.Top&&yMouse<rtBox.Bottom){bMouseOn=true;this.LastMouseStatus.MouseOnStatus={Index:drawInfo.Index,ColumnIndex:drawInfo.ColumnIndex,Type:0};}}this.Canvas.font=drawInfo.Font;this.Canvas.textBaseline="bottom";this.Canvas.textAlign="left";if(drawInfo.Checked===true){var textColor=config.Checked.Color;if(drawInfo.Enable===false)textColor=config.Checked.DisableColor;else if(bMouseOn)textColor=config.Checked.MouseOnColor;this.Canvas.fillStyle=textColor;this.Canvas.fillText(config.Checked.Symbol,x,y);}else if(drawInfo.Checked===false){var textColor=config.Unchecked.Color;if(drawInfo.Enable===false)textColor=config.Unchecked.DisableColor;else if(bMouseOn)textColor=config.Unchecked.MouseOnColor;this.Canvas.fillStyle=textColor;this.Canvas.fillText(config.Unchecked.Symbol,x,y);}if(drawInfo.Enable){drawInfo.Botton={Rect:rtBox,Type:0};}};this.DrawButton=function(drawInfo,left,top,width){if(!drawInfo.Button)return;var config=drawInfo.Button;var rtBG={Left:left+drawInfo.Button.Margin.Left,Top:top+drawInfo.Button.Margin.Top,Height:this.RowHeight-drawInfo.Button.Margin.Top-drawInfo.Button.Margin.Bottom,Width:width-drawInfo.Button.Margin.Left-drawInfo.Button.Margin.Right};rtBG.Right=rtBG.Left+rtBG.Width;rtBG.Bottom=rtBG.Top+rtBG.Height;var bgColor=config.BGColor,textColor=config.TextColor;if(drawInfo.Enable===false){bgColor=config.Disable.BGColor;textColor=config.Disable.TextColor;}else{if(this.LastMouseStatus&&this.LastMouseStatus.OnMouseMove&&config.MouseOn){var x=this.LastMouseStatus.OnMouseMove.X;var y=this.LastMouseStatus.OnMouseMove.Y;if(x>rtBG.Left&&x<rtBG.Right&&y>rtBG.Top&&y<rtBG.Bottom){bgColor=config.MouseOn.BGColor;textColor=config.MouseOn.TextColor;this.LastMouseStatus.MouseOnStatus={Index:drawInfo.Index,ColumnIndex:drawInfo.ColumnIndex,Type:1};}}}this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);this.Canvas.font=drawInfo.Font;this.Canvas.textBaseline="bottom";this.Canvas.textAlign="left";this.Canvas.fillStyle=textColor;var textWidth=this.Canvas.measureText(drawInfo.Text).width;var x=rtBG.Left;if(textWidth<rtBG.Width)x+=(rtBG.Width-textWidth)/2;var y=rtBG.Bottom-drawInfo.Button.TextMargin.Bottom;this.Canvas.fillText(drawInfo.Text,x,y);if(drawInfo.Enable){drawInfo.Botton={Rect:rtBG,Type:1};}};this.DrawProgressBar=function(drawInfo,left,top,width){if(!drawInfo.ProgressBar)return;var config=drawInfo.ProgressBar;var rtBG={Left:left+config.Margin.Left,Top:top+config.Margin.Top,Height:this.RowHeight-config.Margin.Top-config.Margin.Bottom,Width:width-config.Margin.Left-config.Margin.Right};rtBG.Right=rtBG.Left+rtBG.Width;rtBG.Bottom=rtBG.Top+rtBG.Height;var bgColor=config.BGColor;var barColor=config.BarColor;var textColor=config.TextColor;if(drawInfo.Enable===false){bgColor=config.Disable.BGColor;barColor=config.Disable.BarColor;textColor=config.Disable.TextColor;}if(drawInfo.BGColor)bgColor=drawInfo.BGColor;if(drawInfo.TextColor)textColor=drawInfo.TextColor;if(drawInfo.BarColor)barColor=drawInfo.BarColor;if(bgColor){this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}var fullBarWidth=rtBG.Width-config.BarMargin.Left-config.BarMargin.Right;var value=drawInfo.Value;// 0-1 进度条
|
|
13686
|
+
var bMouseOn=false;if(drawInfo.Enable&&this.LastMouseStatus&&this.LastMouseStatus.OnMouseMove){var xMouse=this.LastMouseStatus.OnMouseMove.X;var yMouse=this.LastMouseStatus.OnMouseMove.Y;if(xMouse>rtBox.Left&&xMouse<rtBox.Right&&yMouse>rtBox.Top&&yMouse<rtBox.Bottom){bMouseOn=true;this.LastMouseStatus.MouseOnStatus={Index:drawInfo.Index,ColumnIndex:drawInfo.ColumnIndex,Type:0};}}this.Canvas.font=drawInfo.Font;this.Canvas.textBaseline="bottom";this.Canvas.textAlign="left";if(drawInfo.Checked===true){var textColor=config.Checked.Color;if(drawInfo.Enable===false)textColor=config.Checked.DisableColor;else if(bMouseOn)textColor=config.Checked.MouseOnColor;this.Canvas.fillStyle=textColor;this.Canvas.fillText(config.Checked.Symbol,x,y);}else if(drawInfo.Checked===false){var textColor=config.Unchecked.Color;if(drawInfo.Enable===false)textColor=config.Unchecked.DisableColor;else if(bMouseOn)textColor=config.Unchecked.MouseOnColor;this.Canvas.fillStyle=textColor;this.Canvas.fillText(config.Unchecked.Symbol,x,y);}if(drawInfo.Enable){drawInfo.Botton={Rect:rtBox,Type:0};}};this.DrawButton=function(drawInfo,left,top,width){if(!drawInfo.Button)return;var config=drawInfo.Button;var rtBG={Left:left+drawInfo.Button.Margin.Left,Top:top+drawInfo.Button.Margin.Top,Height:this.RowHeight-drawInfo.Button.Margin.Top-drawInfo.Button.Margin.Bottom,Width:width-drawInfo.Button.Margin.Left-drawInfo.Button.Margin.Right};rtBG.Right=rtBG.Left+rtBG.Width;rtBG.Bottom=rtBG.Top+rtBG.Height;var bgColor=config.BGColor,textColor=config.TextColor;if(drawInfo.Enable===false){bgColor=config.Disable.BGColor;textColor=config.Disable.TextColor;}else{if(this.LastMouseStatus&&this.LastMouseStatus.OnMouseMove&&config.MouseOn){var x=this.LastMouseStatus.OnMouseMove.X;var y=this.LastMouseStatus.OnMouseMove.Y;if(x>rtBG.Left&&x<rtBG.Right&&y>rtBG.Top&&y<rtBG.Bottom){bgColor=config.MouseOn.BGColor;textColor=config.MouseOn.TextColor;this.LastMouseStatus.MouseOnStatus={Index:drawInfo.Index,ColumnIndex:drawInfo.ColumnIndex,Type:1};}}}this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);this.Canvas.font=drawInfo.Font;this.Canvas.textBaseline="bottom";this.Canvas.textAlign="left";this.Canvas.fillStyle=textColor;var textWidth=this.Canvas.measureText(drawInfo.Text).width;var x=rtBG.Left;if(textWidth<rtBG.Width)x+=(rtBG.Width-textWidth)/2;var y=rtBG.Bottom-drawInfo.Button.TextMargin.Bottom;this.Canvas.fillText(drawInfo.Text,x,y);if(drawInfo.Enable){drawInfo.Botton={Rect:rtBG,Type:1};}this.Canvas.font=this.ItemFont;};this.DrawProgressBar=function(drawInfo,left,top,width){if(!drawInfo.ProgressBar)return;var config=drawInfo.ProgressBar;var rtBG={Left:left+config.Margin.Left,Top:top+config.Margin.Top,Height:this.RowHeight-config.Margin.Top-config.Margin.Bottom,Width:width-config.Margin.Left-config.Margin.Right};rtBG.Right=rtBG.Left+rtBG.Width;rtBG.Bottom=rtBG.Top+rtBG.Height;var bgColor=config.BGColor;var barColor=config.BarColor;var textColor=config.TextColor;if(drawInfo.Enable===false){bgColor=config.Disable.BGColor;barColor=config.Disable.BarColor;textColor=config.Disable.TextColor;}if(drawInfo.BGColor)bgColor=drawInfo.BGColor;if(drawInfo.TextColor)textColor=drawInfo.TextColor;if(drawInfo.BarColor)barColor=drawInfo.BarColor;if(bgColor){this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}var fullBarWidth=rtBG.Width-config.BarMargin.Left-config.BarMargin.Right;var value=drawInfo.Value;// 0-1 进度条
|
|
13687
13687
|
var rtBar={Left:rtBG.Left+config.BarMargin.Left,Top:rtBG.Top+config.BarMargin.Top,Bottom:rtBG.Bottom-config.BarMargin.Bottom,Width:0};if(value>0){if(value>1)value=1;rtBar.Width=fullBarWidth*value;rtBar.Height=rtBar.Bottom-rtBar.Top;if(rtBar.Width<1)rtBG.Width=1;if(Array.isArray(barColor))this.Canvas.fillStyle=this.CreateLinearGradient(barColor,rtBG.Left,rtBG.Top,rtBG.Right,rtBG.Top);else this.Canvas.fillStyle=barColor;this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);}if(textColor&&drawInfo.Text){this.Canvas.font=config.Font;this.Canvas.textBaseline="bottom";this.Canvas.textAlign="left";this.Canvas.fillStyle=textColor;var xText=rtBar.Left+config.TextMargin.Left;var yText=rtBar.Bottom-config.TextMargin.Bottom;this.Canvas.fillText(drawInfo.Text,xText,yText);}};//创建渐近色
|
|
13688
13688
|
this.CreateLinearGradient=function(aryColor,x0,y0,x1,y1){var gradient=this.Canvas.createLinearGradient(x0,y0,x1,y1);var offset=1/(aryColor.length-1);for(var i=0;i<aryColor.length;++i){var value=i*offset;gradient.addColorStop(value,aryColor[i]);}return gradient;};this.DrawLinkText=function(drawInfo,left,top,width){if(!drawInfo.Link||!drawInfo.Text)return;var config=drawInfo.Link;var text=drawInfo.Text;var textAlign=drawInfo.TextAlign;var font=config.Font;var color=config.TextColor;this.Canvas.font=font;var textWidth=this.Canvas.measureText(text).width;var textHeight=this.Canvas.measureText("擎").width;var x=left;if(width>=textWidth){if(textAlign=='center')x=left+(width-textWidth)/2;else if(textAlign=='right')x=left+width-textWidth;}else{text=this.TextEllipsis(text,width,drawInfo.MaxText);textWidth=this.Canvas.measureText(text).width;//数据截断提示信息
|
|
13689
13689
|
drawInfo.Tooltip={Type:2,Data:{AryText:[{Text:drawInfo.Text}]}};}var rtText={Left:x,Bottom:top+this.RowHeight-this.ItemMergin.Bottom,Height:textHeight,Width:textWidth};rtText.Right=rtText.Left+rtText.Width;rtText.Top=rtText.Bottom-rtText.Height;var drawLine=false;//下划线
|
|
@@ -14592,7 +14592,7 @@ CMD_ZOOM_OUT_FONT_ID:12,//字体缩小
|
|
|
14592
14592
|
CMD_MODIFY_TEXT_ID:13,//随机生成文字内容
|
|
14593
14593
|
CMD_ADVANCED_SETTING_ID:14//高级设置
|
|
14594
14594
|
};function JSDialogDrawTool(){this.AryChartGroup=[{Title:"线段",AryChart:[{Title:'线段',ClassName:'hqchart_drawtool icon-draw_line',Type:0,Data:{ID:"线段"}},{Title:'线段信息',ClassName:'hqchart_drawtool icon-infoline',Type:0,Data:{ID:"InfoLine"}},{Title:'射线',ClassName:'hqchart_drawtool icon-draw_rays',Type:0,Data:{ID:"射线"}},{Title:"趋势线角度",ClassName:"hqchart_drawtool icon-qushixianjiaodu",Type:0,Data:{ID:"TrendAngle"}},{Title:'标价线',ClassName:'hqchart_drawtool icon-price_line',Type:0,Data:{ID:"标价线"}},{Title:'垂直线',ClassName:'hqchart_drawtool icon-vertical_line',Type:0,Data:{ID:"垂直线"}},{Title:'十字线',ClassName:'hqchart_drawtool icon-tubiao_shizixian',Type:0,Data:{ID:"十字线"}},{Title:'箭头',ClassName:'hqchart_drawtool icon-bottom-arrow-solid',Type:0,Data:{ID:"箭头"}},{Title:'大箭头',ClassName:'hqchart_drawtool icon-big_arrow',Type:0,Data:{ID:"ArrowMarker"}},{Title:'趋势线',ClassName:'hqchart_drawtool icon-draw_trendline',Type:0,Data:{ID:"趋势线"}},{Title:'水平线',ClassName:'hqchart_drawtool icon-draw_hline',Type:0,Data:{ID:"水平线"}},{Title:'水平射线',ClassName:'hqchart_drawtool icon-tubiao_shuipingshexian',Type:0,Data:{ID:"水平射线"}},{Title:'涂鸦线段',ClassName:'hqchart_drawtool icon-draw_line',Type:0,Data:{ID:"涂鸦线段"}},{Title:'阻速线',ClassName:'hqchart_drawtool icon-draw_resline',Type:0,Data:{ID:"阻速线"}},{Title:'通达信阻速线',ClassName:'hqchart_drawtool icon-draw_resline',Type:0,Data:{ID:"阻速线2"}},{Title:'江恩角度线',ClassName:'hqchart_drawtool icon-jiangenjiaoduxian',Type:0,Data:{ID:"江恩角度线"}},{Title:'通达信江恩角度线',ClassName:'hqchart_drawtool icon-jiangenjiaoduxian',Type:0,Data:{ID:"江恩角度线2"}}]},{Title:"通道",AryChart:[{Title:'平行线',ClassName:'hqchart_drawtool icon-draw_parallel_lines',Type:0,Data:{ID:"平行线"}},{Title:'水平线段',ClassName:'hqchart_drawtool icon-draw_hlinesegment',Type:0,Data:{ID:"水平线段"}},{Title:'平行射线',ClassName:'hqchart_drawtool icon-draw_p_rays_lines',Type:0,Data:{ID:"平行射线"}},{Title:'平行通道',ClassName:'hqchart_drawtool icon-draw_parallelchannel',Type:0,Data:{ID:"平行通道"}},{Title:'价格通道线',ClassName:'hqchart_drawtool icon-draw_pricechannel',Type:0,Data:{ID:"价格通道线"}},{Title:'箱型线',ClassName:'hqchart_drawtool icon-draw_box',Type:0,Data:{ID:"箱型线"}},{Title:"不相交通道",ClassName:"hqchart_drawtool icon-buxiangjiaojiao",Type:0,Data:{ID:"DisjointChannel"}},{Title:"平滑顶/底",ClassName:"hqchart_drawtool icon-tubiao_buxiangjiaotongdao",Type:0,Data:{ID:"FlatTop"}},{Title:"波段线",ClassName:'hqchart_drawtool icon-draw_waveband',Type:0,Data:{ID:"波段线"}},{Title:"百分比线",ClassName:'hqchart_drawtool icon-PercentageLine',Type:0,Data:{ID:"百分比线"}},{Title:"黄金分割",ClassName:'hqchart_drawtool icon-GoldenSection',Type:0,Data:{ID:"黄金分割"}},{Title:"线形回归线",ClassName:'hqchart_drawtool icon-linear_3',Type:0,Data:{ID:"线形回归线"}},{Title:"线形回归带",ClassName:'hqchart_drawtool icon-linear_1',Type:0,Data:{ID:"线形回归带"}},{Title:"延长线形回归带",ClassName:'hqchart_drawtool icon-linear_2',Type:0,Data:{ID:"延长线形回归带"}}]},{Title:"形状",AryChart:[{Title:'圆弧线',ClassName:'hqchart_drawtool icon-draw_arc',Type:0,Data:{ID:"圆弧线"}},{Title:'矩形',ClassName:'hqchart_drawtool icon-rectangle',Type:0,Data:{ID:"矩形"}},{Title:'平行四边形',ClassName:'hqchart_drawtool icon-draw_quadrangle',Type:0,Data:{ID:"平行四边形"}},{Title:'三角形',ClassName:'hqchart_drawtool icon-draw_triangle',Type:0,Data:{ID:"三角形"}},{Title:'圆',ClassName:'hqchart_drawtool icon-draw_circle',Type:0,Data:{ID:"圆"}},{Title:'对称角度',ClassName:'hqchart_drawtool icon-draw_symangle',Type:0,Data:{ID:"对称角度"}}]},{Title:"波浪线",AryChart:[{Title:'M头W底',ClassName:'hqchart_drawtool icon-draw_wavemw',Type:0,Data:{ID:"M头W底"}},{Title:'头肩型',ClassName:'hqchart_drawtool icon-draw_head_shoulders_bt',Type:0,Data:{ID:"头肩型"}},{Title:'波浪尺',ClassName:'hqchart_drawtool icon-waveruler',Type:0,Data:{ID:"波浪尺"}},{Title:'AB波浪尺',ClassName:'hqchart_drawtool icon-waveruler',Type:0,Data:{ID:"AB波浪尺"}}]},{Title:"斐波那契",AryChart:[{Title:'斐波那契周期线',ClassName:'hqchart_drawtool icon-feibonaqizhouqixian',Type:0,Data:{ID:"斐波那契周期线"}},{Title:'斐波那契楔形',ClassName:'hqchart_drawtool icon-feibonaqiqixing',Type:0,Data:{ID:"FibWedge"}},{Title:'斐波那契回撤',ClassName:'hqchart_drawtool icon-feibonaqihuiche',Type:0,Data:{ID:"FibRetracement"}},{Title:'斐波那契速度阻力扇',ClassName:'hqchart_drawtool icon-feibonaqisuduzulishan',Type:0,Data:{ID:"FibSpeedResistanceFan"}}]},{Title:"测量工具",AryChart:[{Title:'价格范围',ClassName:'hqchart_drawtool icon-shijianfanwei',Type:0,Data:{ID:"PriceRange"}},{Title:'时间范围',ClassName:'hqchart_drawtool icon-jiagefanwei',Type:0,Data:{ID:"DateRange"}},{Title:"价格和时间范围",ClassName:"hqchart_drawtool icon-jiagefanwei",Type:0,Data:{ID:"DatePriceRange"}},{Title:"监测线",ClassName:"hqchart_drawtool icon-jiance",Type:0,Data:{ID:"MonitorLine"}},{Title:"固定范围成交量分布图",ClassName:"hqchart_drawtool icon-tubiao_gudingfanweichengjiaoliangfenbutu",Type:0,Data:{ID:"固定范围成交量分布图"}}]},{Title:"文字",AryChart:[{Title:"文字",ClassName:'hqchart_drawtool icon-draw_text',Type:0,Data:{ID:"文本"}},{Title:"锚点文字",ClassName:'hqchart_drawtool icon-maodianwenzi',Type:0,Data:{ID:"AnchoredText"}},{Title:"注释",ClassName:'hqchart_drawtool icon-maodian ',Type:0,Data:{ID:"Note"}},{Title:'价格标签',ClassName:'hqchart_drawtool icon-Tooltip',Type:0,Data:{ID:"PriceLabel"}},{Title:'价格注释',ClassName:'hqchart_drawtool icon-tooltiptext',Type:0,Data:{ID:"PriceNote"}},{Title:'向上箭头',ClassName:'iconfont icon-arrow_up',Type:0,Data:{ID:"icon-arrow_up"}},{Title:'向下箭头',ClassName:'iconfont icon-arrow_down',Type:0,Data:{ID:"icon-arrow_down"}},{Title:'向左箭头',ClassName:'iconfont icon-arrow_left',Type:0,Data:{ID:"icon-arrow_left"}},{Title:'向右箭头',ClassName:'iconfont icon-arrow_right',Type:0,Data:{ID:"icon-arrow_right"}}]}];this.ToolConfig={Title:"工具",AryTool:[{Title:"选中",ClassName:'hqchart_drawtool icon-arrow',Type:1,Data:{ID:JS_DRAWTOOL_MENU_ID.CMD_SELECTED_ID}},{Title:'尺子',ClassName:'hqchart_drawtool icon-ruler',Type:0,Data:{ID:"尺子"}},{Title:"磁铁",ClassName:'hqchart_drawtool icon-xifu',Type:2,Data:{ID:JS_DRAWTOOL_MENU_ID.CMD_ENABLE_MAGNET_ID}},{Title:"点击切换颜色",ClassName:'hqchart_drawtool icon-fangkuai',Type:2,Data:{ID:JS_DRAWTOOL_MENU_ID.CMD_CHANGE_LINE_COLOR_ID}},{Title:"擦除画线",ClassName:'hqchart_drawtool icon-a-xiangpicachuxiangpica',Type:2,Data:{ID:JS_DRAWTOOL_MENU_ID.CMD_ERASE_DRAW_CHART_ID}},{Title:"删除所有画线",ClassName:'hqchart_drawtool icon-recycle_bin',Type:2,Data:{ID:JS_DRAWTOOL_MENU_ID.CMD_DELETE_ALL_DRAW_CHART_ID}}]};this.DivDialog=null;this.AryDivChart=[];this.HQChart=null;this.LineColor='rgb(255,140,0)';this.LineColorIndex=0;this.RandomLineColor=["rgb(255,69,0)","rgb(0,191,255)","rgb(255,0,255)","rgb(255,105,180)"];this.LineWidth=1*GetDevicePixelRatio();this.ColumnCount=5;this.DragTitle=null;this.RestoreFocusDelay=800;this.Inital=function(hqchart){this.LineColor=g_JSChartResource.DrawPicture.LineColor[0];this.RandomLineColor.splice(0,0,this.LineColor);this.HQChart=hqchart;};this.Create=function(){var _this83=this;var divDom=document.createElement("div");divDom.className='UMyChart_DrawTool_Dialog_Div';var divTitle=document.createElement("div");divTitle.className='UMyChart_DrawTool_Title_Div';divTitle.innerText="画图工具";divTitle.onmousedown=function(e){_this83.OnMouseDownTitle(e);};var divClose=document.createElement("div");divClose.className='UMyChart_DrawTool_Close_Div';divClose.innerText="x";divClose.onmousedown=function(e){_this83.Close(e);};divTitle.appendChild(divClose);divDom.appendChild(divTitle);var table=document.createElement("table");table.className="UMyChart_DrawTool_Table";divDom.appendChild(table);var tbody=document.createElement("tbody");tbody.className="UMyChart_DrawTool_Tbody";table.appendChild(tbody);for(var i=0;i<this.AryChartGroup.length;++i){var item=this.AryChartGroup[i];if(!IFrameSplitOperator.IsNonEmptyArray(item.AryChart))continue;this.CreateChartGroupItem(item,tbody);var trDom=document.createElement("tr");trDom.className='UMyChart_DrawTool_Group_End_Tr';tbody.appendChild(trDom);}//工具栏
|
|
14595
|
-
this.CreateToolGroup(tbody);this.DivDialog=divDom;document.body.appendChild(divDom);};this.Destroy=function(){this.AryDivChart=[];if(this.DivDialog)document.body.removeChild(this.DivDialog);this.DivDialog=null;};this.CreateChartGroupItem=function(groupItem,tbody){var trDom=document.createElement("tr");trDom.className='UMyChart_DrawTool_Group_Tr';tbody.appendChild(trDom);var tdDom=document.createElement("td");tdDom.className="UMyChart_DrawTool_Group_Td";tdDom.innerText=groupItem.Title;tdDom.colSpan=this.ColumnCount;trDom.appendChild(tdDom);var chartCount=groupItem.AryChart.length;for(var i=0,j=0;i<chartCount;){var trDom=document.createElement("tr");trDom.className='UMyChart_DrawTool_Tr';for(j=0;j<this.ColumnCount&&i<chartCount;++j,++i){var item=groupItem.AryChart[i];this.CreateChartItem(item,trDom);}tbody.appendChild(trDom);}};this.CreateChartItem=function(item,trDom){var _this84=this;var tdDom=document.createElement("td");tdDom.className="UMyChart_DrawTool_Td";tdDom.title=item.Title;trDom.appendChild(tdDom);var spanDom=document.createElement("span");spanDom.className=item.ClassName;spanDom.classList.add("UMyChart_DrawTool_Span");tdDom.appendChild(spanDom);var data={Item:item,TD:tdDom,Span:spanDom};tdDom.onmousedown=function(e){_this84.OnClickItem(e,data);};//点击
|
|
14595
|
+
this.CreateToolGroup(tbody);this.DivDialog=divDom;document.body.appendChild(divDom);};this.Destroy=function(){this.AryDivChart=[];if(this.DivDialog){if(document&&document.body&&document.body.removeChild)document.body.removeChild(this.DivDialog);}this.DivDialog=null;};this.CreateChartGroupItem=function(groupItem,tbody){var trDom=document.createElement("tr");trDom.className='UMyChart_DrawTool_Group_Tr';tbody.appendChild(trDom);var tdDom=document.createElement("td");tdDom.className="UMyChart_DrawTool_Group_Td";tdDom.innerText=groupItem.Title;tdDom.colSpan=this.ColumnCount;trDom.appendChild(tdDom);var chartCount=groupItem.AryChart.length;for(var i=0,j=0;i<chartCount;){var trDom=document.createElement("tr");trDom.className='UMyChart_DrawTool_Tr';for(j=0;j<this.ColumnCount&&i<chartCount;++j,++i){var item=groupItem.AryChart[i];this.CreateChartItem(item,trDom);}tbody.appendChild(trDom);}};this.CreateChartItem=function(item,trDom){var _this84=this;var tdDom=document.createElement("td");tdDom.className="UMyChart_DrawTool_Td";tdDom.title=item.Title;trDom.appendChild(tdDom);var spanDom=document.createElement("span");spanDom.className=item.ClassName;spanDom.classList.add("UMyChart_DrawTool_Span");tdDom.appendChild(spanDom);var data={Item:item,TD:tdDom,Span:spanDom};tdDom.onmousedown=function(e){_this84.OnClickItem(e,data);};//点击
|
|
14596
14596
|
this.AryDivChart.push(data);};this.OnClickItem=function(e,data){console.log('[JSDialogDrawTool::OnClickChartItem] ',data);if(!data.Item||!data.Item.Data)return;var type=data.Item.Type;var id=data.Item.Data.ID;if(type==2&&id==JS_DRAWTOOL_MENU_ID.CMD_CHANGE_LINE_COLOR_ID){this.OnChangeLineColor(data);}else if(type==2&&id==JS_DRAWTOOL_MENU_ID.CMD_DELETE_ALL_DRAW_CHART_ID){this.DeleteAllChart();}else if(type==2&&id==JS_DRAWTOOL_MENU_ID.CMD_ERASE_DRAW_CHART_ID){this.ClearAllSelectedChart();this.ClearCurrnetDrawPicture();this.EnableEraseChart(true);}else if(type==1&&id==JS_DRAWTOOL_MENU_ID.CMD_SELECTED_ID){this.ClearAllSelectedChart();this.ClearCurrnetDrawPicture();this.EnableEraseChart(false);}else if(type==2&&id==JS_DRAWTOOL_MENU_ID.CMD_ENABLE_MAGNET_ID){this.ChangeMagnet(data);}else if(type==0){this.ClearAllSelectedChart();this.EnableEraseChart(false);data.Span.classList.remove("UMyChart_DrawTool_Span");data.Span.classList.add("UMyChart_DrawTool_Span_Selected");this.CreateDrawPicture(data);}};//清空选中状态
|
|
14597
14597
|
this.ClearAllSelectedChart=function(){for(var i=0;i<this.AryDivChart.length;++i){var item=this.AryDivChart[i];if(item.Item.Type==2)continue;item.Span.classList.remove("UMyChart_DrawTool_Span_Selected");item.Span.classList.add("UMyChart_DrawTool_Span");}};this.CreateToolGroup=function(tbody){var trDom=document.createElement("tr");trDom.className='UMyChart_DrawTool_Group_Tr';tbody.appendChild(trDom);var tdDom=document.createElement("td");tdDom.className="UMyChart_DrawTool_Group_Td";tdDom.innerText=this.ToolConfig.Title;tdDom.colSpan=this.ColumnCount;trDom.appendChild(tdDom);var chartCount=this.ToolConfig.AryTool.length;for(var i=0,j=0;i<chartCount;){var trDom=document.createElement("tr");trDom.className='UMyChart_DrawTool_Tr';for(j=0;j<this.ColumnCount&&i<chartCount;++j,++i){var item=this.ToolConfig.AryTool[i];this.CreateToolItem(item,trDom);}tbody.appendChild(trDom);}};this.CreateToolItem=function(item,trDom){var _this85=this;var tdDom=document.createElement("td");tdDom.className="UMyChart_DrawTool_Td";tdDom.title=item.Title;trDom.appendChild(tdDom);var spanDom=document.createElement("span");spanDom.className=item.ClassName;spanDom.classList.add("UMyChart_DrawTool_Span");tdDom.appendChild(spanDom);var data={Item:item,TD:tdDom,Span:spanDom};if(item.Type==2&&item.Data.ID==JS_DRAWTOOL_MENU_ID.CMD_CHANGE_LINE_COLOR_ID)//颜色
|
|
14598
14598
|
{spanDom.style['color']=this.LineColor;}tdDom.onmousedown=function(e){_this85.OnClickItem(e,data);};//点击
|
|
@@ -14639,7 +14639,7 @@ if(this.HQChart)this.Minute.Option.Language=g_JSChartLocalization.GetLanguageNam
|
|
|
14639
14639
|
callback:function callback(event,data,obj){_this91.OnKeyDown(event,data,obj);}};if(Array.isArray(this.Minute.Option.EventCallback)){this.Minute.Option.EventCallback.push(keyDownEvent);}else{this.Minute.Option.EventCallback=[keyDownEvent];}chart.SetOption(this.Minute.Option);//设置K线配置
|
|
14640
14640
|
document.body.appendChild(divDom);this.UpdateStyle();};this.UpdateStyle=function(){if(!this.DivDialog)return;if(this.BGColor)this.DivDialog.style['background-color']=this.BGColor;if(this.BorderColor)this.DivDialog.style['border-color']=this.BorderColor;if(this.TitleBGColor)this.TitleBox.DivTitle.style['background-color']=this.TitleBGColor;if(this.TitleColor)this.TitleBox.DivName.style['color']=this.TitleColor;};this.NetworkFilter=function(data,callback){if(!this.HQChart||!this.HQChart.NetworkFilter)return;if(data)data.PopMinuteData={Date:this.Date};//弹出分时图额外数据
|
|
14641
14641
|
if(data.Name=='MinuteChartContainer::RequestMinuteData')//分时图数据对接
|
|
14642
|
-
{data.Request.Data.date=this.Date;data.Name="MinuteChartContainer::RequestPopMinuteData";data.Explain="指定日期分时数据";};this.HQChart.NetworkFilter(data,callback);};this.OnCreateHQChart=function(chart){};this.Destroy=function(){if(this.DivDialog)document.body.removeChild(this.DivDialog);this.DivDialog=null;this.TitleBox=null;this.Minute.JSChart=null;};this.IsShow=function(){if(!this.DivDialog)return false;return this.DivDialog.style.visibility==='visible';};this.Show=function(data,x,y){if(!this.DivDialog)this.Create();if(!data.Symbol||!IFrameSplitOperator.IsPlusNumber(data.Date))return;this.Date=data.Date;this.Symbol=this.Name=data.Symbol;if(data.Name)this.Name=data.Name;this.Chart=data.Chart;this.UpdateDialogTitle();if(this.Minute.JSChart){this.Minute.JSChart.ChangeSymbol(this.Symbol);this.MarkKLineBG();}if(!this.Minute.Option.EnableResize){if(this.Minute.JSChart)this.Minute.JSChart.OnSize();}//超出窗口调整位置
|
|
14642
|
+
{data.Request.Data.date=this.Date;data.Name="MinuteChartContainer::RequestPopMinuteData";data.Explain="指定日期分时数据";};this.HQChart.NetworkFilter(data,callback);};this.OnCreateHQChart=function(chart){};this.Destroy=function(){if(this.DivDialog){if(document&&document.body&&document.body.removeChild)document.body.removeChild(this.DivDialog);}this.DivDialog=null;this.TitleBox=null;this.Minute.JSChart=null;};this.IsShow=function(){if(!this.DivDialog)return false;return this.DivDialog.style.visibility==='visible';};this.Show=function(data,x,y){if(!this.DivDialog)this.Create();if(!data.Symbol||!IFrameSplitOperator.IsPlusNumber(data.Date))return;this.Date=data.Date;this.Symbol=this.Name=data.Symbol;if(data.Name)this.Name=data.Name;this.Chart=data.Chart;this.UpdateDialogTitle();if(this.Minute.JSChart){this.Minute.JSChart.ChangeSymbol(this.Symbol);this.MarkKLineBG();}if(!this.Minute.Option.EnableResize){if(this.Minute.JSChart)this.Minute.JSChart.OnSize();}//超出窗口调整位置
|
|
14643
14643
|
var height=this.DivDialog.offsetHeight;var width=this.DivDialog.offsetWidth;var xRight=window.innerWidth-5;var ybottom=window.innerHeight-5;if(x+width>xRight)x=xRight-width;if(y+height>ybottom)y=ybottom-height;this.DivDialog.style.visibility='visible';this.DivDialog.style.top=y+"px";this.DivDialog.style.left=x+"px";};this.UpdateDialogTitle=function(){var title=this.Name+' '+IFrameSplitOperator.FormatDateString(this.Date)+' \u5206\u65F6\u56FE PageUp/PageDown\u7FFB\u9875';this.TitleBox.DivName.innerText=title;};this.Close=function(e){if(!this.DivDialog)return;this.ClearCache();this.DivDialog.style.visibility='hidden';this.ClearMarkKLineBG();};this.OnMouseDownTitle=function(e){var _this92=this;if(!this.DivDialog)return;var dragData={X:e.clientX,Y:e.clientY};dragData.YOffset=e.clientX-this.DivDialog.offsetLeft;dragData.XOffset=e.clientY-this.DivDialog.offsetTop;this.DragTitle=dragData;document.onmousemove=function(e){_this92.DocOnMouseMoveTitle(e);};document.onmouseup=function(e){_this92.DocOnMouseUpTitle(e);};};this.DocOnMouseMoveTitle=function(e){if(!this.DragTitle)return;var left=e.clientX-this.DragTitle.YOffset;var top=e.clientY-this.DragTitle.XOffset;var right=left+this.DivDialog.offsetWidth;var bottom=top+this.DivDialog.offsetHeight;if(right+5>=window.innerWidth)left=window.innerWidth-this.DivDialog.offsetWidth-5;if(bottom+5>=window.innerHeight)top=window.innerHeight-this.DivDialog.offsetHeight-5;this.DivDialog.style.left=left+'px';this.DivDialog.style.top=top+'px';if(e.preventDefault)e.preventDefault();};this.DocOnMouseUpTitle=function(e){this.DragTitle=null;this.onmousemove=null;this.onmouseup=null;};this.ReloadResource=function(option){this.TitleColor=g_JSChartResource.PopMinuteChart.TitleColor;this.TitleBGColor=g_JSChartResource.PopMinuteChart.TitleBGColor;this.BGColor=g_JSChartResource.PopMinuteChart.BGColor;this.BorderColor=g_JSChartResource.PopMinuteChart.BorderColor;if(!this.DivDialog)return;this.UpdateStyle();if(this.Minute.JSChart)this.Minute.JSChart.ReloadResource(option);};this.SetLanguage=function(language){if(!this.DivDialog)return;if(this.Minute.JSChart)this.Minute.JSChart.SetLanguage(language);};this.OnKeyDown=function(event,data,obj){switch(data.KeyID){case 33://page up
|
|
14644
14644
|
data.PreventDefault=true;var item=this.GetNextData(1);if(item)this.ChangeSymbol(item.Symbol,item.Date);break;case 34://page down
|
|
14645
14645
|
data.PreventDefault=true;var item=this.GetNextData(-1);if(item)this.ChangeSymbol(item.Symbol,item.Date);break;default:return;}};this.GetNextData=function(step){if(!this.Chart)return null;if(!IFrameSplitOperator.IsNumber(this.Date))return null;if(step==0)return null;var kData=this.Chart.Data;if(!kData||!IFrameSplitOperator.IsNonEmptyArray(kData.Data))return null;var index=-1;for(var i=0;i<kData.Data.length;++i){var kItem=kData.Data[i];if(!kItem)continue;if(kItem.Date==this.Date){index=i;break;}}if(index<0)return null;var date=null;var symbol=null;if(step>0){for(var i=1,j=0;j<step&&index+i<kData.Data.length;++i){var kItem=kData.Data[index+i];if(!kItem||!IFrameSplitOperator.IsNumber(kItem.Date))continue;date=kItem.Date;if(kItem.Symbol)symbol=kItem.Symbol;else symbol=null;++j;}}else{step=Math.abs(step);for(var i=1,j=0;j<step&&index-i>=0;++i){var kItem=kData.Data[index-i];if(!kItem||!IFrameSplitOperator.IsNumber(kItem.Date))continue;date=kItem.Date;if(kItem.Symbol)symbol=kItem.Symbol;else symbol=null;++j;}}if(date==this.Date)return null;return{Date:date,Symbol:symbol};};//修改日期
|
|
@@ -14714,7 +14714,7 @@ this.BGColor="rgba(100,100,100,0.2)";this.LineWidth=g_JSChartResource.PopMinuteC
|
|
|
14714
14714
|
function JSTooltipKLineChart(){this.DivDialog=null;this.HQChart=null;this.ID=Guid();this.BGColor=g_JSChartResource.PopMinuteChart.BGColor;this.BorderColor=g_JSChartResource.PopMinuteChart.BorderColor;this.OnCreatedCallback=null;this.KLine={Option:JSTooltipKLineChart.GetKLineOption(),JSChart:null,Symbol:null};this.Inital=function(hqchart,option){this.HQChart=hqchart;if(option){if(IFrameSplitOperator.IsObject(option.Option)){var item=CloneData(option.Option);//复制一份出来
|
|
14715
14715
|
this.KLine.Option=(0,_assign2.default)(this.KLine.Option,item);if(IFrameSplitOperator.IsNonEmptyArray(option.Option.EventCallback))this.KLine.Option.EventCallback=option.Option.EventCallback;}if(option.OnCreatedCallback)this.OnCreatedCallback=option.OnCreatedCallback;}};this.Create=function(){var _this94=this;var divDom=document.createElement('div');divDom.className='UMyChart_Tooltip_KLine_Div';divDom.id=this.ID;var divChart=document.createElement('div');divChart.className='UMyChart_Tooltip_KLine_Chart_Div';divDom.appendChild(divChart);this.DivDialog=divDom;var chart=JSChart.Init(divChart);this.KLine.JSChart=chart;//语言跟主图保持一致
|
|
14716
14716
|
if(this.HQChart)this.KLine.Option.Language=g_JSChartLocalization.GetLanguageName(this.HQChart.LanguageID);this.KLine.Option.OnCreatedCallback=function(chart){_this94.OnCreateHQChart(chart);};this.KLine.Option.NetworkFilter=function(data,callback){_this94.NetworkFilter(data,callback);};chart.SetOption(this.KLine.Option);//设置K线配置
|
|
14717
|
-
document.body.appendChild(divDom);this.UpdateStyle();if(!this.KLine.Option.EnableResize){if(this.KLine.JSChart)this.KLine.JSChart.OnSize({Type:1});}};this.UpdateStyle=function(){if(!this.DivDialog)return;if(this.BGColor)this.DivDialog.style['background-color']=this.BGColor;if(this.BorderColor)this.DivDialog.style['border-color']=this.BorderColor;};this.NetworkFilter=function(data,callback){if(!this.HQChart||!this.HQChart.NetworkFilter)return;this.HQChart.NetworkFilter(data,callback);};this.OnCreateHQChart=function(chart){if(this.OnCreatedCallback)this.OnCreatedCallback(chart);};this.Destroy=function(){if(this.DivDialog)document.body.removeChild(this.DivDialog);this.DivDialog=null;this.TitleBox=null;if(!this.KLine.JSChart)this.KLine.JSChart.ChartDestory();this.KLine.JSChart=null;};this.IsShow=function(){if(!this.DivDialog)return false;return this.DivDialog.style.visibility==='visible';};this.Show=function(data,x,y){if(!this.DivDialog)this.Create();if(!data||!data.Symbol)return;var symbol=data.Symbol;if(this.KLine.JSChart){if(this.KLine.Symbol!=symbol){this.KLine.Symbol=symbol;this.KLine.JSChart.ChangeSymbol(symbol);}}if(IFrameSplitOperator.IsNumberV2(x,y)){}else if(data.Rect){var rtCell=data.Rect;var pixelRatio=GetDevicePixelRatio();var rtItem={Left:rtCell.Left/pixelRatio,Right:rtCell.Right/pixelRatio,Bottom:rtCell.Bottom/pixelRatio,Top:rtCell.Top/pixelRatio};rtItem.Width=rtItem.Right-rtItem.Left;rtItem.Height=rtItem.Bottom-rtItem.Top;//超出窗口调整位置
|
|
14717
|
+
document.body.appendChild(divDom);this.UpdateStyle();if(!this.KLine.Option.EnableResize){if(this.KLine.JSChart)this.KLine.JSChart.OnSize({Type:1});}};this.UpdateStyle=function(){if(!this.DivDialog)return;if(this.BGColor)this.DivDialog.style['background-color']=this.BGColor;if(this.BorderColor)this.DivDialog.style['border-color']=this.BorderColor;};this.NetworkFilter=function(data,callback){if(!this.HQChart||!this.HQChart.NetworkFilter)return;this.HQChart.NetworkFilter(data,callback);};this.OnCreateHQChart=function(chart){if(this.OnCreatedCallback)this.OnCreatedCallback(chart);};this.Destroy=function(){if(this.DivDialog){if(document&&document.body&&document.body.removeChild)document.body.removeChild(this.DivDialog);}this.DivDialog=null;this.TitleBox=null;if(!this.KLine.JSChart)this.KLine.JSChart.ChartDestory();this.KLine.JSChart=null;};this.IsShow=function(){if(!this.DivDialog)return false;return this.DivDialog.style.visibility==='visible';};this.Show=function(data,x,y){if(!this.DivDialog)this.Create();if(!data||!data.Symbol)return;var symbol=data.Symbol;if(this.KLine.JSChart){if(this.KLine.Symbol!=symbol){this.KLine.Symbol=symbol;this.KLine.JSChart.ChangeSymbol(symbol);}}if(IFrameSplitOperator.IsNumberV2(x,y)){}else if(data.Rect){var rtCell=data.Rect;var pixelRatio=GetDevicePixelRatio();var rtItem={Left:rtCell.Left/pixelRatio,Right:rtCell.Right/pixelRatio,Bottom:rtCell.Bottom/pixelRatio,Top:rtCell.Top/pixelRatio};rtItem.Width=rtItem.Right-rtItem.Left;rtItem.Height=rtItem.Bottom-rtItem.Top;//超出窗口调整位置
|
|
14718
14718
|
var height=this.DivDialog.offsetHeight;var width=this.DivDialog.offsetWidth;var x=rtItem.Right+data.Offset.Left;var y=rtItem.Bottom+data.Offset.Top;var xRight=window.innerWidth-5;var ybottom=window.innerHeight-5;if(x+width>xRight)x=rtItem.Left+data.Offset.Left-width;if(y+height>ybottom)y=rtItem.Top+data.Offset.Top-height;this.DivDialog.style.visibility='visible';this.DivDialog.style.top=y+"px";this.DivDialog.style.left=x+"px";}};this.Hide=function(){if(!this.DivDialog)return;if(this.DivDialog.style.visibility!='hidden')this.DivDialog.style.visibility='hidden';};this.ReloadResource=function(option){this.BGColor=g_JSChartResource.PopMinuteChart.BGColor;this.BorderColor=g_JSChartResource.PopMinuteChart.BorderColor;if(!this.DivDialog)return;this.UpdateStyle();if(this.KLine.JSChart)this.KLine.JSChart.ReloadResource(option);};}JSTooltipKLineChart.GetKLineOption=function(){var option={Type:'历史K线图',//创建图形类型
|
|
14719
14719
|
Windows://窗口指标
|
|
14720
14720
|
[{Index:"MA",Change:false,Modify:false},{Index:"MACD",Close:false,Change:false,Modify:false,MaxMin:false,TitleWindow:false}],//Language:'EN',
|
|
@@ -14752,7 +14752,7 @@ AutoLeft:{Blank:10,MinWidth:30},AutoRight:{Blank:5,MinWidth:30}},Frame://子框
|
|
|
14752
14752
|
*/function JSPopKeyboard(){this.DivDialog=null;this.DragTitle=null;this.TitleBox=null;//{ DivTitle, DivName, }
|
|
14753
14753
|
this.InputDOM=null;this.Title="HQChart 键盘精灵";this.ID=Guid();this.ActiveDOM=null;//启动键盘精灵是的控件
|
|
14754
14754
|
this.InputStatus=0;//0=空闲 1=输入中
|
|
14755
|
-
this.BGColor=g_JSChartResource.DialogPopKeyboard.BGColor;this.TitleColor=g_JSChartResource.DialogPopKeyboard.TitleColor;this.TitleBGColor=g_JSChartResource.DialogPopKeyboard.TitleBGColor;this.BorderColor=g_JSChartResource.DialogPopKeyboard.BorderColor;this.InputBGColor=g_JSChartResource.DialogPopKeyboard.Input.BGColor;this.InputTextColor=g_JSChartResource.DialogPopKeyboard.Input.TextColor;this.Keyboard={Option:JSPopKeyboard.GetOption(),JSChart:null};this.Inital=function(option){var _this95=this;if(option){if(IFrameSplitOperator.IsBool(option.EnableResize))this.Keyboard.Option.EnableResize=option.EnableResize;}window.addEventListener('mousedown',function(e){_this95.OnWindowMouseDown(e);});};this.OnWindowMouseDown=function(e){if(!this.DivDialog)return;console.log("[JSPopKeyboard::OnWindowMouseDown] e=",e);if(!this.DivDialog.contains(e.target)){this.Hide();}};this.Destroy=function(){var _this96=this;if(this.DivDialog)document.body.removeChild(this.DivDialog);this.DivDialog=null;this.TitleBox=null;if(!this.Keyboard.JSChart)this.Keyboard.JSChart.ChartDestory();this.Keyboard.JSChart=null;window.removeEventListener('mousedown',function(e){_this96.OnWindowMouseDown(e);});//注销监听
|
|
14755
|
+
this.BGColor=g_JSChartResource.DialogPopKeyboard.BGColor;this.TitleColor=g_JSChartResource.DialogPopKeyboard.TitleColor;this.TitleBGColor=g_JSChartResource.DialogPopKeyboard.TitleBGColor;this.BorderColor=g_JSChartResource.DialogPopKeyboard.BorderColor;this.InputBGColor=g_JSChartResource.DialogPopKeyboard.Input.BGColor;this.InputTextColor=g_JSChartResource.DialogPopKeyboard.Input.TextColor;this.Keyboard={Option:JSPopKeyboard.GetOption(),JSChart:null};this.Inital=function(option){var _this95=this;if(option){if(IFrameSplitOperator.IsBool(option.EnableResize))this.Keyboard.Option.EnableResize=option.EnableResize;}window.addEventListener('mousedown',function(e){_this95.OnWindowMouseDown(e);});};this.OnWindowMouseDown=function(e){if(!this.DivDialog)return;console.log("[JSPopKeyboard::OnWindowMouseDown] e=",e);if(!this.DivDialog.contains(e.target)){this.Hide();}};this.Destroy=function(){var _this96=this;if(this.DivDialog){if(document&&document.body&&document.body.removeChild)document.body.removeChild(this.DivDialog);}this.DivDialog=null;this.TitleBox=null;if(!this.Keyboard.JSChart)this.Keyboard.JSChart.ChartDestory();this.Keyboard.JSChart=null;window.removeEventListener('mousedown',function(e){_this96.OnWindowMouseDown(e);});//注销监听
|
|
14756
14756
|
};this.Create=function(){var _this97=this;var divDom=document.createElement('div');divDom.className='jchart_pop_keyboard_dailog';divDom.id=this.ID;var divTitle=document.createElement("div");divTitle.className='jschart_keyboard_Title_Div';divTitle.onmousedown=function(e){_this97.OnMouseDownTitle(e);};divDom.appendChild(divTitle);var divInfoText=document.createElement("div");divInfoText.className="jschart_keyboard_Title";divInfoText.innerText=this.Title;this.DivInfoText=divInfoText;divTitle.appendChild(divInfoText);var divClose=document.createElement("div");divClose.className='jschart_keyboard_Close_Div';divClose.innerText="x";divClose.onmousedown=function(e){_this97.Hide();};divTitle.appendChild(divClose);this.TitleBox={DivTitle:divTitle,DivName:divInfoText,DivClose:divClose};var divInput=document.createElement("div");divInput.className='jschart_keyboard_Input_Div';divDom.appendChild(divInput);var input=document.createElement("input");input.className="jschart_keyboard_input";input.addEventListener("keydown",function(event){_this97.OnKeydown(event);});input.addEventListener("keyup",function(event){_this97.OnKeyup(event);});input.addEventListener("compositionstart",function(event){_this97.OnCompositionStart(event);});input.addEventListener("compositionupdate",function(event){_this97.OnCompositionUpdate(event);});input.addEventListener("compositionend",function(event){_this97.OnCompositionEnd(event);});divInput.appendChild(input);var divChart=document.createElement("div");divChart.className="jschart_keyboard_Chart_Div";divDom.appendChild(divChart);this.DivDialog=divDom;this.InputDOM=input;var chart=JSKeyboardChart.Init(divChart);this.Keyboard.JSChart=chart;this.Keyboard.Option.OnCreatedCallback=function(chart){_this97.OnCreateHQChart(chart);};chart.SetOption(this.Keyboard.Option);//设置K线配置
|
|
14757
14757
|
chart.AddEventCallback({event:JSCHART_EVENT_ID.ON_KEYBOARD_MOUSEUP,callback:function callback(event,data,chart){_this97.OnChartMouseUp(event,data,chart);}});this.UpdateStyle();document.body.appendChild(divDom);};this.OnCreateHQChart=function(chart){};this.OnCompositionStart=function(event){this.InputStatus=1;};this.OnCompositionUpdate=function(event){};this.OnCompositionEnd=function(event){this.InputStatus=0;};this.OnKeydown=function(event){if(this.InputStatus!=0)return;var aryKey=new _set2.default([40,38,13,33,34]);if(aryKey.has(event.keyCode)){this.Keyboard.JSChart.OnKeyDown(event);}if(event.keyCode==27){this.Hide();}};this.OnKeyup=function(event){if(this.InputStatus!=0)return;var code=event.keyCode;if(code==8)//删除
|
|
14758
14758
|
{var strText=this.InputDOM.value;if(strText.length==0){this.Hide();//只有按了删除 才能隐藏
|
|
@@ -14784,7 +14784,7 @@ this.KItemCacheID=null;this.IndexTitle={Enable:false,MaxCount:3};//是否显示
|
|
|
14784
14784
|
this.LastValueCache=null;//最后的鼠标位置对应的数值
|
|
14785
14785
|
this.LastValueCacheID=null;//鼠标信息
|
|
14786
14786
|
this.DataID=null;//当前显示的数据时间{ Symbol:, Date:, Time: }
|
|
14787
|
-
this.RestoreFocusDelay=800;this.Inital=function(hqchart,option){this.HQChart=hqchart;if(option){if(IFrameSplitOperator.IsNumber(option.Style))this.Style=option.Style;if(IFrameSplitOperator.IsPlusNumber(option.MaxRowCount))this.MaxRowCount=option.MaxRowCount;if(option.IndexTitle){var item=option.IndexTitle;if(IFrameSplitOperator.IsBool(item.Enable))this.IndexTitle.Enable=item.Enable;if(IFrameSplitOperator.IsPlusNumber(item.MaxCount))this.IndexTitle.MaxCount=item.MaxCount;}}};this.Destroy=function(){this.AryData=[];this.AryText=[];this.KItemCache=null;this.KItemCache2=null;this.KItemCacheID=null;if(this.DivDialog){document.body.removeChild(this.DivDialog);this.DivDialog=null;}};this.OnClickColseButton=function(e){this.Close(e);if(this.HQChart&&this.HQChart.ChartCorssCursor){var chart=this.HQChart.ChartCorssCursor;if(!chart.IsShowCorss)return;chart.IsShowCorss=false;this.HQChart.Draw();this.HQChart.SetFocus();}};//data={ Symbol, Date, Time}
|
|
14787
|
+
this.RestoreFocusDelay=800;this.Inital=function(hqchart,option){this.HQChart=hqchart;if(option){if(IFrameSplitOperator.IsNumber(option.Style))this.Style=option.Style;if(IFrameSplitOperator.IsPlusNumber(option.MaxRowCount))this.MaxRowCount=option.MaxRowCount;if(option.IndexTitle){var item=option.IndexTitle;if(IFrameSplitOperator.IsBool(item.Enable))this.IndexTitle.Enable=item.Enable;if(IFrameSplitOperator.IsPlusNumber(item.MaxCount))this.IndexTitle.MaxCount=item.MaxCount;}}};this.Destroy=function(){this.AryData=[];this.AryText=[];this.KItemCache=null;this.KItemCache2=null;this.KItemCacheID=null;if(this.DivDialog){if(document&&document.body&&document.body.removeChild)document.body.removeChild(this.DivDialog);this.DivDialog=null;}};this.OnClickColseButton=function(e){this.Close(e);if(this.HQChart&&this.HQChart.ChartCorssCursor){var chart=this.HQChart.ChartCorssCursor;if(!chart.IsShowCorss)return;chart.IsShowCorss=false;this.HQChart.Draw();this.HQChart.SetFocus();}};//data={ Symbol, Date, Time}
|
|
14788
14788
|
this.IsEqualDataID=function(data){if(!this.DataID)return false;if(!data)return false;if(this.DataID.Symbol!=data.Symbol)return false;if(this.DataID.Date!=data.Date)return false;if(IFrameSplitOperator.IsNumber(this.DataID.Time)){if(this.DataID.Time!=data.Time)return false;}return true;};this.Create=function(){var _this99=this;var divDom=document.createElement("div");divDom.className='UMyChart_Tooltip_Dialog_Div';var divTitle=document.createElement("div");divTitle.className='UMyChart_Tooltip_Title_Div';divTitle.onmousedown=function(e){_this99.OnMouseDownTitle(e);};var divName=document.createElement("div");divName.className='UMyChart_Tooltip_Name_Div';divName.innerText="----";divTitle.appendChild(divName);var divClose=document.createElement("div");divClose.className='UMyChart_Tooltip_Close_Div';divClose.innerText="x";divClose.onmousedown=function(e){_this99.OnClickColseButton(e);};divTitle.appendChild(divClose);divDom.appendChild(divTitle);var table=document.createElement("table");table.className="UMyChart_Tooltip_Table";divDom.appendChild(table);var tbody=document.createElement("tbody");tbody.className="UMyChart_Tooltip_Tbody";table.appendChild(tbody);this.AryData=[];if(this.Style==1){for(var i=0;i<this.MaxRowCount;++i){var rowItem={Tr:null,TitleSpan:null,TextSpan:null,Tr2:null};var trDom=document.createElement("tr");trDom.className='UMyChart_Tooltip_Group_Tr';tbody.appendChild(trDom);rowItem.Tr=trDom;var tdDom=document.createElement("td");tdDom.className="UMyChart_Tooltip_Text_Sinlge_Td";//标题
|
|
14789
14789
|
trDom.appendChild(tdDom);var spanDom=document.createElement("span");spanDom.className='UMyChart_Tooltip_Title_Left_Span';spanDom.innerText='标题';tdDom.appendChild(spanDom);rowItem.TitleSpan=spanDom;var trDom=document.createElement("tr");trDom.className='UMyChart_Tooltip_Group_Tr';tbody.appendChild(trDom);rowItem.Tr2=trDom;var tdDom=document.createElement("td");tdDom.className="UMyChart_Tooltip_Text_Sinlge_Td";//数值
|
|
14790
14790
|
trDom.appendChild(tdDom);var spanDom=document.createElement("span");spanDom.className='UMyChart_Tooltip_Text_Span';spanDom.innerText='数值';tdDom.appendChild(spanDom);rowItem.TextSpan=spanDom;this.AryData.push(rowItem);}}else{for(var i=0;i<this.MaxRowCount;++i){var rowItem={Tr:null,TitleSpan:null,TextSpan:null,TitleTd:null,TextTd:null};var trDom=document.createElement("tr");trDom.className='UMyChart_Tooltip_Group_Tr';tbody.appendChild(trDom);rowItem.Tr=trDom;var tdDom=document.createElement("td");tdDom.className="UMyChart_Tooltip_Title_Td";//标题
|
|
@@ -14914,7 +14914,7 @@ this.ReloadResource=function(option){this.UpColor=g_JSChartResource.UpTextColor;
|
|
|
14914
14914
|
jones_2000@163.com
|
|
14915
14915
|
|
|
14916
14916
|
内置区间统计框 设置框
|
|
14917
|
-
*/function JSDialogSelectRect(){this.DivDialog=null;this.DragTitle=null;this.HQChart=null;this.UpColor=g_JSChartResource.UpTextColor;this.DownColor=g_JSChartResource.DownTextColor;this.UnchangeColor=g_JSChartResource.UnchagneTextColor;this.TitleColor=g_JSChartResource.DialogSelectRect.TitleColor;this.TitleBGColor=g_JSChartResource.DialogSelectRect.TitleBGColor;this.BGColor=g_JSChartResource.DialogSelectRect.BGColor;this.BorderColor=g_JSChartResource.DialogSelectRect.BorderColor;this.TextColor=g_JSChartResource.DialogSelectRect.TextColor;this.ValueColor=g_JSChartResource.DialogSelectRect.ValueColor;this.VolColor=g_JSChartResource.DialogSelectRect.VolColor;this.AmountColor=g_JSChartResource.DialogSelectRect.AmountColor;this.TurnoverRateColor=g_JSChartResource.DialogSelectRect.TurnoverRateColor;this.PositionColor=g_JSChartResource.DialogSelectRect.PositionColor;this.MaxRowCount=10;this.AryData=[];this.DateTimeBox={Start:{SpanText:null,SpanValue:null},End:{SpanText:null,SpanValue:null}};this.ShowData;this.SelectData;this.RestoreFocusDelay=800;this.Inital=function(hqchart,option){this.HQChart=hqchart;if(option){}};this.Destroy=function(){this.AryData=[];this.ShowData=null;this.DateTimeBox={Start:{SpanText:null,SpanValue:null},End:{SpanText:null,SpanValue:null}};if(this.DivDialog){document.body.removeChild(this.DivDialog);this.DivDialog=null;}};this.Create=function(){var _this101=this;var divDom=document.createElement("div");divDom.className='UMyChart_SelectRect_Dialog_Div';var divTitle=document.createElement("div");divTitle.className='UMyChart_SelectRect_Title_Div';divTitle.onmousedown=function(e){_this101.OnMouseDownTitle(e);};var divName=document.createElement("div");divName.className='UMyChart_SelectRect_Name_Div';divName.innerText="区间统计";divTitle.appendChild(divName);var divClose=document.createElement("div");divClose.className='UMyChart_SelectRect_Close_Div';divClose.innerText="x";divClose.onmousedown=function(e){_this101.Close(e);};divTitle.appendChild(divClose);divDom.appendChild(divTitle);var divDateTime=document.createElement("div");divDateTime.className='UMyChart_SelectRect_DateTime_Div';//起始日期
|
|
14917
|
+
*/function JSDialogSelectRect(){this.DivDialog=null;this.DragTitle=null;this.HQChart=null;this.UpColor=g_JSChartResource.UpTextColor;this.DownColor=g_JSChartResource.DownTextColor;this.UnchangeColor=g_JSChartResource.UnchagneTextColor;this.TitleColor=g_JSChartResource.DialogSelectRect.TitleColor;this.TitleBGColor=g_JSChartResource.DialogSelectRect.TitleBGColor;this.BGColor=g_JSChartResource.DialogSelectRect.BGColor;this.BorderColor=g_JSChartResource.DialogSelectRect.BorderColor;this.TextColor=g_JSChartResource.DialogSelectRect.TextColor;this.ValueColor=g_JSChartResource.DialogSelectRect.ValueColor;this.VolColor=g_JSChartResource.DialogSelectRect.VolColor;this.AmountColor=g_JSChartResource.DialogSelectRect.AmountColor;this.TurnoverRateColor=g_JSChartResource.DialogSelectRect.TurnoverRateColor;this.PositionColor=g_JSChartResource.DialogSelectRect.PositionColor;this.MaxRowCount=10;this.AryData=[];this.DateTimeBox={Start:{SpanText:null,SpanValue:null},End:{SpanText:null,SpanValue:null}};this.ShowData;this.SelectData;this.RestoreFocusDelay=800;this.Inital=function(hqchart,option){this.HQChart=hqchart;if(option){}};this.Destroy=function(){this.AryData=[];this.ShowData=null;this.DateTimeBox={Start:{SpanText:null,SpanValue:null},End:{SpanText:null,SpanValue:null}};if(this.DivDialog){if(document&&document.body&&document.body.removeChild)document.body.removeChild(this.DivDialog);this.DivDialog=null;}};this.Create=function(){var _this101=this;var divDom=document.createElement("div");divDom.className='UMyChart_SelectRect_Dialog_Div';var divTitle=document.createElement("div");divTitle.className='UMyChart_SelectRect_Title_Div';divTitle.onmousedown=function(e){_this101.OnMouseDownTitle(e);};var divName=document.createElement("div");divName.className='UMyChart_SelectRect_Name_Div';divName.innerText="区间统计";divTitle.appendChild(divName);var divClose=document.createElement("div");divClose.className='UMyChart_SelectRect_Close_Div';divClose.innerText="x";divClose.onmousedown=function(e){_this101.Close(e);};divTitle.appendChild(divClose);divDom.appendChild(divTitle);var divDateTime=document.createElement("div");divDateTime.className='UMyChart_SelectRect_DateTime_Div';//起始日期
|
|
14918
14918
|
var divStartDate=document.createElement("div");divDateTime.append(divStartDate);var spanText=document.createElement("span");spanText.className="UMyChart_SelectRect_DateTitle_Span";spanText.innerText="开始:";divStartDate.appendChild(spanText);this.DateTimeBox.Start.SpanText=spanText;var spanDate=document.createElement("span");spanDate.className="UMyChart_SelectRect_DateValue_Span";spanDate.innerText="--/--";divStartDate.appendChild(spanDate);this.DateTimeBox.Start.SpanValue=spanDate;var spanArrow=document.createElement("span");spanArrow.className="UMyChart_SelectRect_ArrowButton_Span";spanArrow.innerText="<";spanArrow.onmousedown=function(e){_this101.MoveStartDate(-1);};divStartDate.appendChild(spanArrow);var spanArrow=document.createElement("span");spanArrow.className="UMyChart_SelectRect_ArrowButton_Span";spanArrow.innerText=">";spanArrow.onmousedown=function(e){_this101.MoveStartDate(1);};divStartDate.appendChild(spanArrow);//结束日期
|
|
14919
14919
|
var divEndDate=document.createElement("div");divDateTime.append(divEndDate);var spanText=document.createElement("span");spanText.className="UMyChart_SelectRect_DateTitle_Span";spanText.innerText="结束:";divEndDate.appendChild(spanText);this.DateTimeBox.End.SpanText=spanText;var spanDate=document.createElement("span");spanDate.className="UMyChart_SelectRect_DateValue_Span";spanDate.innerText="--/--";divEndDate.appendChild(spanDate);this.DateTimeBox.SpanEnd=spanDate;this.DateTimeBox.End.SpanValue=spanDate;var spanArrow=document.createElement("span");spanArrow.className="UMyChart_SelectRect_ArrowButton_Span";spanArrow.innerText="<";spanArrow.onmousedown=function(e){_this101.MoveEndDate(-1);};divEndDate.appendChild(spanArrow);var spanArrow=document.createElement("span");spanArrow.className="UMyChart_SelectRect_ArrowButton_Span";spanArrow.innerText=">";spanArrow.onmousedown=function(e){_this101.MoveEndDate(1);};divEndDate.appendChild(spanArrow);divDom.appendChild(divDateTime);var table=document.createElement("table");table.className="UMyChart_SelectRect_Table";divDom.appendChild(table);var tbody=document.createElement("tbody");tbody.className="UMyChart_SelectRect_Tbody";table.appendChild(tbody);for(var i=0;i<this.MaxRowCount;++i){var rowItem={Tr:null,AryItem:[]};var trDom=document.createElement("tr");trDom.className='UMyChart_SelectRect_Tr';tbody.appendChild(trDom);rowItem.Tr=trDom;for(var j=0;j<3;++j){var item={Td:null,LeftSpan:null,RightSpan:null};var tdDom=document.createElement("td");tdDom.className="UMyChart_SelectRect_Td";//标题+数值
|
|
14920
14920
|
item.Td=tdDom;trDom.appendChild(tdDom);var spanDom=document.createElement("span");spanDom.className='UMyChart_SelectRect_Item_Left_Span';spanDom.innerText='数值';item.LeftSpan=spanDom;tdDom.appendChild(spanDom);var spanDom=document.createElement("span");spanDom.className='UMyChart_SelectRect_Item_Right_Span';spanDom.innerText='--';item.RightSpan=spanDom;tdDom.appendChild(spanDom);rowItem.AryItem.push(item);}this.AryData.push(rowItem);}document.body.appendChild(divDom);this.DivDialog=divDom;this.UpdateStyle();};this.Close=function(e){if(!this.DivDialog)return;this.DivDialog.style.visibility='hidden';this.ShowData=null;this.SelectData=null;if(this.HQChart)this.HQChart.RestoreFocus(this.RestoreFocusDelay);};this.MoveStartDate=function(step){if(!this.DivDialog||!this.HQChart)return;if(step==0)return;if(!this.SelectData)return;var selectData=this.SelectData;var bUpdate=false;if(step>0){var index=selectData.Start;var endIndex=selectData.End;for(i=0;i<step&&index<endIndex;++i){++index;}if(selectData.Start!=index){selectData.Start=index;bUpdate=true;}}else{step=Math.abs(step);var index=selectData.Start;var endIndex=selectData.End;for(var i=0;i<step&&index>0;++i){--index;}if(selectData.Start!=index){selectData.Start=index;bUpdate=true;}}if(bUpdate)this.UpdateSelectRect(selectData);};this.MoveEndDate=function(step){if(!this.DivDialog)return;if(step==0)return;if(!this.SelectData)return;var selectData=this.SelectData;var bUpdate=false;if(step>0){var index=selectData.End;var startIndex=selectData.Start;for(i=0;i<step&&index<this.ShowData.DataCount;++i){++index;}if(selectData.End!=index){selectData.End=index;bUpdate=true;}}else{step=Math.abs(step);var index=selectData.End;var startIndex=selectData.Start;for(var i=0;i<step&&index>startIndex;++i){--index;}if(selectData.End!=index){selectData.End=index;bUpdate=true;}}if(bUpdate)this.UpdateSelectRect(selectData);};this.Show=function(x,y){if(!this.DivDialog)return;if(!this.HQChart)return;/*
|
|
@@ -14952,7 +14952,7 @@ this.OpData=null;this.TitleColor=g_JSChartResource.DialogSearchIndex.TitleColor;
|
|
|
14952
14952
|
this.ColCount=3;//列
|
|
14953
14953
|
this.MaxGroupCount=10;//分类最多个数
|
|
14954
14954
|
this.AryData=[];this.AryGroup=[];//分类
|
|
14955
|
-
this.IndexData=JSDialogSearchIndex.GetDefaultIndexData();this.RestoreFocusDelay=800;this.Inital=function(hqchart,option){this.HQChart=hqchart;if(option){if(IFrameSplitOperator.IsNumber(option.Style))this.Style=option.Style;if(option.IndexData)this.IndexData=option.IndexData;if(IFrameSplitOperator.IsNumber(option.MaxRowCount))this.MaxRowCount=option.MaxRowCount;}};this.Destroy=function(){this.AryData=[];this.AryGroup=[];this.IndexData=null;this.InputDom=null;this.HQChart=null;if(this.DivDialog){document.body.removeChild(this.DivDialog);this.DivDialog=null;}};this.OnClickColseButton=function(e){this.Close(e);};//设置当前窗口数据
|
|
14955
|
+
this.IndexData=JSDialogSearchIndex.GetDefaultIndexData();this.RestoreFocusDelay=800;this.Inital=function(hqchart,option){this.HQChart=hqchart;if(option){if(IFrameSplitOperator.IsNumber(option.Style))this.Style=option.Style;if(option.IndexData)this.IndexData=option.IndexData;if(IFrameSplitOperator.IsNumber(option.MaxRowCount))this.MaxRowCount=option.MaxRowCount;}};this.Destroy=function(){this.AryData=[];this.AryGroup=[];this.IndexData=null;this.InputDom=null;this.HQChart=null;if(this.DivDialog){if(document&&document.body&&document.body.removeChild)document.body.removeChild(this.DivDialog);this.DivDialog=null;}};this.OnClickColseButton=function(e){this.Close(e);};//设置当前窗口数据
|
|
14956
14956
|
this.SetOpData=function(data){this.OpData=data;};this.Close=function(e){this.OpData=null;if(!this.DivDialog)return;this.DivDialog.style.visibility='hidden';if(this.HQChart)this.HQChart.RestoreFocus(this.RestoreFocusDelay);};this.OnMouseDownTitle=function(e){var _this103=this;if(!this.DivDialog)return;var dragData={X:e.clientX,Y:e.clientY};dragData.YOffset=e.clientX-this.DivDialog.offsetLeft;dragData.XOffset=e.clientY-this.DivDialog.offsetTop;this.DragTitle=dragData;document.onmousemove=function(e){_this103.DocOnMouseMoveTitle(e);};document.onmouseup=function(e){_this103.DocOnMouseUpTitle(e);};};this.DocOnMouseMoveTitle=function(e){if(!this.DragTitle)return;var left=e.clientX-this.DragTitle.YOffset;var top=e.clientY-this.DragTitle.XOffset;var right=left+this.DivDialog.offsetWidth;var bottom=top+this.DivDialog.offsetHeight;if(right+5>=window.innerWidth)left=window.innerWidth-this.DivDialog.offsetWidth-5;if(bottom+5>=window.innerHeight)top=window.innerHeight-this.DivDialog.offsetHeight-5;this.DivDialog.style.left=left+'px';this.DivDialog.style.top=top+'px';if(e.preventDefault)e.preventDefault();};this.DocOnMouseUpTitle=function(e){this.DragTitle=null;this.onmousemove=null;this.onmouseup=null;};this.Show=function(x,y,groupID){if(!this.DivDialog)return;if(this.HQChart)this.HQChart.ClearRestoreFocusTimer();if(!groupID)groupID=this.IndexData.Data[0].Group.ID;this.UpdateGroupData();this.ChangeGroup(groupID);if(this.OpData&&this.OpData.Title)this.TitleBox.DivName.innerText=this.OpData.Title;if(!IFrameSplitOperator.IsNumber(x)||!IFrameSplitOperator.IsNumber(y))//默认居中显示
|
|
14957
14957
|
{var rtClient=this.HQChart.UIElement.getBoundingClientRect();x=rtClient.left+(rtClient.right-rtClient.left-this.DivDialog.offsetWidth)/2;y=rtClient.top+(rtClient.bottom-rtClient.top-this.DivDialog.offsetHeight)/2;}this.InputDom.value="";this.DivDialog.style.visibility='visible';this.DivDialog.style.top=y+"px";this.DivDialog.style.left=x+"px";};this.Create=function(){var _this104=this;var divDom=document.createElement("div");divDom.className='UMyChart_SearchIndex_Dialog_Div';//对话框标题栏
|
|
14958
14958
|
var divTitle=document.createElement("div");divTitle.className='UMyChart_SearchIndex_Title_Div';divTitle.onmousedown=function(e){_this104.OnMouseDownTitle(e);};divDom.appendChild(divTitle);var divName=document.createElement("div");divName.className='UMyChart_SearchIndex_Name_Div';divName.innerText="指标搜索";divTitle.appendChild(divName);var divClose=document.createElement("div");divClose.className='UMyChart_SearchIndex_Close_Div';divClose.innerText="x";divClose.onmousedown=function(e){_this104.OnClickColseButton(e);};divTitle.appendChild(divClose);//整个框子
|
|
@@ -15021,7 +15021,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
15021
15021
|
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);};}/********************************************************************************
|
|
15022
15022
|
* 版本信息输出
|
|
15023
15023
|
*
|
|
15024
|
-
*/var HQCHART_VERSION="1.1.
|
|
15024
|
+
*/var HQCHART_VERSION="1.1.14813";function PrintHQChartVersion(){var logo='\n\n*************************************************************************************************************************************************************************** \n* \n* :%@@- \n* :@@@@- \n* =@@@@ :#@@@ .:+#@@@#=: :=*@@@@@@#+-. *@@@@. \n* :@@@@@ .@@@@@ .#@@@@@@@@@@@- +@@@@@@@@@@@@@+ @@@@@ -%@@* \n* +@@@@% #@@@@# *@@@@@@@@@@@@@@%. =@@@@@@@@@@@@@@@- @@@@@ -@@@@+ \n* %@@@@* @@@@@+ .%@@@@@@@@@@@@@@@@%: #@@@@@@@@@@@@@@@% @@@@# *@@@@= \n* @@@@@= @@@@@- .%@@@@@@@*++*%@@@@@@% .%@@@@@@@%*+==+**= -@@@@+ #@@@@- \n* @@@@@. @@@@@. #@@@@@%= =@@@@@@* %@@@@@@#: *@@@@- :::. .-+*###+: ::: .+##+: -%%@@@@@%%%% \n* .@@@@@ .@@@@@. +@@@@@% .@@@@@@ *@@@@@@: %@@@@: +@@@@@%. :%@@@@@@@@@@: *@@@ :@@@@@* @@@@@@@@@@@@ \n* :@@@@@ :@@@@@ @@@@@% :@@@@@+ @@@@@@: %@@@@-@@@@@@@@@. @@@@@@@@@@@@@. :@@@%-@@@@@@.:@@@@@@@@@@@# \n* -@@@@% -@@@@@ =@@@@@. %@@@@% %@@@@@- %@@@@@@@@@@@@@@* %@@@@@@@@@@@@+ -@@@@@@@@@@# -@@@@@@@@@@@. \n* +@@@@%=========#@@@@% @@@@@# :@@@@@ .@@@@@% @@@@@@@@%@@@@@@@ -%+:. .#@@@@* +@@@@@@@%%@. .::+@@@@#:: \n* #@@@@@@@@@@@@@@@@@@@# .@@@@@ .@@@@@ :@@@@@. @@@@@@#. #@@@@@. -@@@@* #@@@@@@: *@@@@+ \n* %@@@@@@@@@@@@@@@@@@@+ :@@@@@ .@@@@@ -@@@@@ @@@@@+ @@@@@. :@@@@* @@@@@% #@@@@- \n* @@@@@@@@@@@@@@@@@@@@: :@@@@% :@@@@@ +@@@@% -@@@@+ @@@@@ -@@@@+ @@@@@. @@@@@. \n* .@@@@@@@@@@@@@@@@@@@@ :@@@@% -@@@@% *@@@@% #@@@@. @@@@@ .=*#%%%@@@@@= :@@@@# @@@@@. \n* -@@@@@:::::::::=@@@@@ :@@@@@ @@@@@* +@@@@% @@@@@ @@@@% -#@@@@@@@@@@@@: -@@@@* @@@@@ \n* =@@@@% =@@@@% .@@@@@ :@@@@@. -@@@@% @@@@@ .@@@@* +@@@@@@@@@@@@@@. =@@@@+ .@@@@@ \n* +@@@@# +@@@@# @@@@@# %@@@@% :@@@@@ .@@@@% =@@@@= -@@@@@*-:..%@@@@ +@@@@= :@@@@# \n* *@@@@* *@@@@* +@@@@@: #@@@@@+ .@@@@@@ :@@@@% *@@@@- @@@@@. @@@@% #@@@@: =@@@@+ \n* %@@@@= %@@@@+ @@@@@@- .%@@@@@# #@@@@@# :@@@@% #@@@@: @@@@% @@@@* %@@@@. #@@@@- \n* @@@@@- @@@@@= =@@@@@@#=...-*@@@@@@@: @@@@@@%=. :+**. :@@@@* %@@@@. .@@@@* *@@@@= @@@@@ %@@@@+ \n* .@@@@@: .@@@@@: *@@@@@@@@@@@@@@@@@@@# =@@@@@@@@%%%@@@@@@ +@@@@- @@@@@ .@@@@@: :%@@@@@- .@@@@% %@@@@@*+- \n* :@@@@@ :@@@@@ +@@@@@@@@@@@@@@@@@@@# =@@@@@@@@@@@@@@@@% %@@@@ @@@@@ @@@@@@@@@@@@@@@: -@@@@* *@@@@@@@@- \n* =@@@@@ -@@@@@ :@@@@@@@@@@@@@@@@@@@# :@@@@@@@@@@@@@@@% @@@@@ %@@@% #@@@@@@@@@#@@@@. +@@@@- .@@@@@@@@# \n* *@@@@# =@@@@% :#@@@@@@@#: :@@@@@= =@@@@@@@@@@@+. @@@@@ :@@@+ *@@@@@@@- %@@@ *@@@= =@@@@@@@* \n* =++++- -++++= .:::. .=*+: :-=+++=:. ****= .=+. .-++=: :+++ -+=: .-=+=:. \n* \n* \n* HQChart \n* Ver: '+HQCHART_VERSION+' \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n************************************************************************************************************************************************************************** \n ';console.log(logo);}PrintHQChartVersion();//把给外界调用的方法暴露出来
|
|
15025
15025
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
15026
15026
|
// BaseIndex:BaseIndex,
|
|
15027
15027
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
|
@@ -226,7 +226,11 @@ function JSDialogDrawTool()
|
|
|
226
226
|
this.Destroy=function()
|
|
227
227
|
{
|
|
228
228
|
this.AryDivChart=[];
|
|
229
|
-
if (this.DivDialog)
|
|
229
|
+
if (this.DivDialog)
|
|
230
|
+
{
|
|
231
|
+
if (document && document.body && document.body.removeChild)
|
|
232
|
+
document.body.removeChild(this.DivDialog);
|
|
233
|
+
}
|
|
230
234
|
this.DivDialog=null;
|
|
231
235
|
}
|
|
232
236
|
|
|
@@ -103,7 +103,12 @@ function JSTooltipKLineChart()
|
|
|
103
103
|
|
|
104
104
|
this.Destroy=function()
|
|
105
105
|
{
|
|
106
|
-
if (this.DivDialog)
|
|
106
|
+
if (this.DivDialog)
|
|
107
|
+
{
|
|
108
|
+
if (document && document.body && document.body.removeChild)
|
|
109
|
+
document.body.removeChild(this.DivDialog);
|
|
110
|
+
}
|
|
111
|
+
|
|
107
112
|
this.DivDialog=null;
|
|
108
113
|
this.TitleBox=null;
|
|
109
114
|
if (!this.KLine.JSChart) this.KLine.JSChart.ChartDestory();
|
|
@@ -60,7 +60,11 @@ function JSPopKeyboard()
|
|
|
60
60
|
|
|
61
61
|
this.Destroy=function()
|
|
62
62
|
{
|
|
63
|
-
if (this.DivDialog)
|
|
63
|
+
if (this.DivDialog)
|
|
64
|
+
{
|
|
65
|
+
if (document && document.body && document.body.removeChild)
|
|
66
|
+
document.body.removeChild(this.DivDialog);
|
|
67
|
+
}
|
|
64
68
|
|
|
65
69
|
this.DivDialog=null;
|
|
66
70
|
this.TitleBox=null;
|
|
@@ -156,7 +156,11 @@ function JSPopMinuteChart()
|
|
|
156
156
|
|
|
157
157
|
this.Destroy=function()
|
|
158
158
|
{
|
|
159
|
-
if (this.DivDialog)
|
|
159
|
+
if (this.DivDialog)
|
|
160
|
+
{
|
|
161
|
+
if (document && document.body && document.body.removeChild)
|
|
162
|
+
document.body.removeChild(this.DivDialog);
|
|
163
|
+
}
|
|
160
164
|
this.DivDialog=null;
|
|
161
165
|
this.TitleBox=null;
|
|
162
166
|
this.Minute.JSChart=null;
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -53195,11 +53195,24 @@ IFrameSplitOperator.FormatDateTimeStringV2=function(datetime, format, languageID
|
|
|
53195
53195
|
{
|
|
53196
53196
|
case "YYYY-MM-DD":
|
|
53197
53197
|
return `${datetime.getFullYear()}-${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}-${IFrameSplitOperator.NumberToString(datetime.getDate())}`;
|
|
53198
|
-
|
|
53198
|
+
case 'MM-DD':
|
|
53199
|
+
return `${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}-${IFrameSplitOperator.NumberToString(datetime.getDate())}`;
|
|
53200
|
+
case "MM/DD":
|
|
53201
|
+
return `${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}/${IFrameSplitOperator.NumberToString(datetime.getDate())}`;
|
|
53202
|
+
case "YYYY-MM":
|
|
53203
|
+
return `${datetime.getFullYear()}-${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}`;
|
|
53204
|
+
case "YYYY/MM/DD":
|
|
53205
|
+
return `${datetime.getFullYear()}/${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}/${IFrameSplitOperator.NumberToString(datetime.getDate())}`;
|
|
53206
|
+
case "DD/MM/YYYY":
|
|
53207
|
+
return `${IFrameSplitOperator.NumberToString(datetime.getDate())}/${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}/${datetime.getFullYear()}`;
|
|
53208
|
+
|
|
53209
|
+
|
|
53199
53210
|
case "HH:MM:SS":
|
|
53200
53211
|
return `${IFrameSplitOperator.NumberToString(datetime.getHours())}:${IFrameSplitOperator.NumberToString(datetime.getMinutes())}:${IFrameSplitOperator.NumberToString(datetime.getSeconds())}`;
|
|
53201
53212
|
case "HH:MM":
|
|
53202
53213
|
return `${IFrameSplitOperator.NumberToString(datetime.getHours())}:${IFrameSplitOperator.NumberToString(datetime.getMinutes())}`;
|
|
53214
|
+
case "HH:MM:SS.fff":
|
|
53215
|
+
return `${IFrameSplitOperator.NumberToString(datetime.getHours())}:${IFrameSplitOperator.NumberToString(datetime.getMinutes())}:${IFrameSplitOperator.NumberToString(datetime.getSeconds())}.${IFrameSplitOperator.MillisecondToString(datetime.getMilliseconds())}`;
|
|
53203
53216
|
default:
|
|
53204
53217
|
return null;
|
|
53205
53218
|
}
|
|
@@ -5617,6 +5617,8 @@ function ChartReport()
|
|
|
5617
5617
|
for(var i=0;i<this.Column.length;++i)
|
|
5618
5618
|
{
|
|
5619
5619
|
var item=this.Column[i];
|
|
5620
|
+
this.Canvas.font=this.ItemFont;
|
|
5621
|
+
|
|
5620
5622
|
if (item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_ID)
|
|
5621
5623
|
{
|
|
5622
5624
|
this.Canvas.font=this.ItemNameFont;
|
|
@@ -6104,6 +6106,7 @@ function ChartReport()
|
|
|
6104
6106
|
}
|
|
6105
6107
|
|
|
6106
6108
|
this.DrawFullRowBGColor(symbol, eventDrawBG, i, rtRowBG, { Selected:selectedSymbol } );
|
|
6109
|
+
this.DrawFlashFullRowBGColor(symbol, rtRowBG);
|
|
6107
6110
|
|
|
6108
6111
|
if (bFillRow)
|
|
6109
6112
|
{
|
|
@@ -6153,6 +6156,27 @@ function ChartReport()
|
|
|
6153
6156
|
}
|
|
6154
6157
|
}
|
|
6155
6158
|
|
|
6159
|
+
this.DrawFlashFullRowBGColor=function(symbol, rtBG)
|
|
6160
|
+
{
|
|
6161
|
+
var data= { Symbol:symbol, FlashBG:null };
|
|
6162
|
+
if (this.GetFlashBGDataCallback) data.FlashBG=this.GetFlashBGDataCallback(symbol, Date.now());
|
|
6163
|
+
if (!data.FlashBG) return;
|
|
6164
|
+
|
|
6165
|
+
var id=-1;
|
|
6166
|
+
if (!data.FlashBG.Data.has(id)) return;
|
|
6167
|
+
|
|
6168
|
+
var flashItem=data.FlashBG.Data.get(id);
|
|
6169
|
+
if (flashItem && flashItem.Count)
|
|
6170
|
+
{
|
|
6171
|
+
this.Canvas.fillStyle=flashItem.Color;
|
|
6172
|
+
this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
|
|
6173
|
+
}
|
|
6174
|
+
|
|
6175
|
+
--flashItem.Count;
|
|
6176
|
+
|
|
6177
|
+
if (this.GlobalOption) ++this.GlobalOption.FlashBGCount;
|
|
6178
|
+
}
|
|
6179
|
+
|
|
6156
6180
|
this.DrawSelectedRow=function()
|
|
6157
6181
|
{
|
|
6158
6182
|
if (this.SelectedStyle===2 && IFrameSplitOperator.IsNonEmptyArray(this.AryFullSelectedRow))
|
|
@@ -7792,6 +7816,8 @@ function ChartReport()
|
|
|
7792
7816
|
{
|
|
7793
7817
|
drawInfo.Botton={ Rect:rtBG, Type:1 };
|
|
7794
7818
|
}
|
|
7819
|
+
|
|
7820
|
+
this.Canvas.font=this.ItemFont;
|
|
7795
7821
|
}
|
|
7796
7822
|
|
|
7797
7823
|
this.DrawProgressBar=function(drawInfo, left, top, width)
|
|
@@ -57291,11 +57291,24 @@ IFrameSplitOperator.FormatDateTimeStringV2=function(datetime, format, languageID
|
|
|
57291
57291
|
{
|
|
57292
57292
|
case "YYYY-MM-DD":
|
|
57293
57293
|
return `${datetime.getFullYear()}-${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}-${IFrameSplitOperator.NumberToString(datetime.getDate())}`;
|
|
57294
|
-
|
|
57294
|
+
case 'MM-DD':
|
|
57295
|
+
return `${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}-${IFrameSplitOperator.NumberToString(datetime.getDate())}`;
|
|
57296
|
+
case "MM/DD":
|
|
57297
|
+
return `${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}/${IFrameSplitOperator.NumberToString(datetime.getDate())}`;
|
|
57298
|
+
case "YYYY-MM":
|
|
57299
|
+
return `${datetime.getFullYear()}-${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}`;
|
|
57300
|
+
case "YYYY/MM/DD":
|
|
57301
|
+
return `${datetime.getFullYear()}/${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}/${IFrameSplitOperator.NumberToString(datetime.getDate())}`;
|
|
57302
|
+
case "DD/MM/YYYY":
|
|
57303
|
+
return `${IFrameSplitOperator.NumberToString(datetime.getDate())}/${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}/${datetime.getFullYear()}`;
|
|
57304
|
+
|
|
57305
|
+
|
|
57295
57306
|
case "HH:MM:SS":
|
|
57296
57307
|
return `${IFrameSplitOperator.NumberToString(datetime.getHours())}:${IFrameSplitOperator.NumberToString(datetime.getMinutes())}:${IFrameSplitOperator.NumberToString(datetime.getSeconds())}`;
|
|
57297
57308
|
case "HH:MM":
|
|
57298
57309
|
return `${IFrameSplitOperator.NumberToString(datetime.getHours())}:${IFrameSplitOperator.NumberToString(datetime.getMinutes())}`;
|
|
57310
|
+
case "HH:MM:SS.fff":
|
|
57311
|
+
return `${IFrameSplitOperator.NumberToString(datetime.getHours())}:${IFrameSplitOperator.NumberToString(datetime.getMinutes())}:${IFrameSplitOperator.NumberToString(datetime.getSeconds())}.${IFrameSplitOperator.MillisecondToString(datetime.getMilliseconds())}`;
|
|
57299
57312
|
default:
|
|
57300
57313
|
return null;
|
|
57301
57314
|
}
|
|
@@ -141760,6 +141773,8 @@ function ChartReport()
|
|
|
141760
141773
|
for(var i=0;i<this.Column.length;++i)
|
|
141761
141774
|
{
|
|
141762
141775
|
var item=this.Column[i];
|
|
141776
|
+
this.Canvas.font=this.ItemFont;
|
|
141777
|
+
|
|
141763
141778
|
if (item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_ID)
|
|
141764
141779
|
{
|
|
141765
141780
|
this.Canvas.font=this.ItemNameFont;
|
|
@@ -142247,6 +142262,7 @@ function ChartReport()
|
|
|
142247
142262
|
}
|
|
142248
142263
|
|
|
142249
142264
|
this.DrawFullRowBGColor(symbol, eventDrawBG, i, rtRowBG, { Selected:selectedSymbol } );
|
|
142265
|
+
this.DrawFlashFullRowBGColor(symbol, rtRowBG);
|
|
142250
142266
|
|
|
142251
142267
|
if (bFillRow)
|
|
142252
142268
|
{
|
|
@@ -142296,6 +142312,27 @@ function ChartReport()
|
|
|
142296
142312
|
}
|
|
142297
142313
|
}
|
|
142298
142314
|
|
|
142315
|
+
this.DrawFlashFullRowBGColor=function(symbol, rtBG)
|
|
142316
|
+
{
|
|
142317
|
+
var data= { Symbol:symbol, FlashBG:null };
|
|
142318
|
+
if (this.GetFlashBGDataCallback) data.FlashBG=this.GetFlashBGDataCallback(symbol, Date.now());
|
|
142319
|
+
if (!data.FlashBG) return;
|
|
142320
|
+
|
|
142321
|
+
var id=-1;
|
|
142322
|
+
if (!data.FlashBG.Data.has(id)) return;
|
|
142323
|
+
|
|
142324
|
+
var flashItem=data.FlashBG.Data.get(id);
|
|
142325
|
+
if (flashItem && flashItem.Count)
|
|
142326
|
+
{
|
|
142327
|
+
this.Canvas.fillStyle=flashItem.Color;
|
|
142328
|
+
this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
|
|
142329
|
+
}
|
|
142330
|
+
|
|
142331
|
+
--flashItem.Count;
|
|
142332
|
+
|
|
142333
|
+
if (this.GlobalOption) ++this.GlobalOption.FlashBGCount;
|
|
142334
|
+
}
|
|
142335
|
+
|
|
142299
142336
|
this.DrawSelectedRow=function()
|
|
142300
142337
|
{
|
|
142301
142338
|
if (this.SelectedStyle===2 && IFrameSplitOperator.IsNonEmptyArray(this.AryFullSelectedRow))
|
|
@@ -143935,6 +143972,8 @@ function ChartReport()
|
|
|
143935
143972
|
{
|
|
143936
143973
|
drawInfo.Botton={ Rect:rtBG, Type:1 };
|
|
143937
143974
|
}
|
|
143975
|
+
|
|
143976
|
+
this.Canvas.font=this.ItemFont;
|
|
143938
143977
|
}
|
|
143939
143978
|
|
|
143940
143979
|
this.DrawProgressBar=function(drawInfo, left, top, width)
|
|
@@ -149339,7 +149378,7 @@ function ScrollBarBGChart()
|
|
|
149339
149378
|
|
|
149340
149379
|
|
|
149341
149380
|
|
|
149342
|
-
var HQCHART_VERSION="1.1.
|
|
149381
|
+
var HQCHART_VERSION="1.1.14813";
|
|
149343
149382
|
|
|
149344
149383
|
function PrintHQChartVersion()
|
|
149345
149384
|
{
|
|
@@ -57335,11 +57335,24 @@ IFrameSplitOperator.FormatDateTimeStringV2=function(datetime, format, languageID
|
|
|
57335
57335
|
{
|
|
57336
57336
|
case "YYYY-MM-DD":
|
|
57337
57337
|
return `${datetime.getFullYear()}-${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}-${IFrameSplitOperator.NumberToString(datetime.getDate())}`;
|
|
57338
|
-
|
|
57338
|
+
case 'MM-DD':
|
|
57339
|
+
return `${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}-${IFrameSplitOperator.NumberToString(datetime.getDate())}`;
|
|
57340
|
+
case "MM/DD":
|
|
57341
|
+
return `${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}/${IFrameSplitOperator.NumberToString(datetime.getDate())}`;
|
|
57342
|
+
case "YYYY-MM":
|
|
57343
|
+
return `${datetime.getFullYear()}-${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}`;
|
|
57344
|
+
case "YYYY/MM/DD":
|
|
57345
|
+
return `${datetime.getFullYear()}/${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}/${IFrameSplitOperator.NumberToString(datetime.getDate())}`;
|
|
57346
|
+
case "DD/MM/YYYY":
|
|
57347
|
+
return `${IFrameSplitOperator.NumberToString(datetime.getDate())}/${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}/${datetime.getFullYear()}`;
|
|
57348
|
+
|
|
57349
|
+
|
|
57339
57350
|
case "HH:MM:SS":
|
|
57340
57351
|
return `${IFrameSplitOperator.NumberToString(datetime.getHours())}:${IFrameSplitOperator.NumberToString(datetime.getMinutes())}:${IFrameSplitOperator.NumberToString(datetime.getSeconds())}`;
|
|
57341
57352
|
case "HH:MM":
|
|
57342
57353
|
return `${IFrameSplitOperator.NumberToString(datetime.getHours())}:${IFrameSplitOperator.NumberToString(datetime.getMinutes())}`;
|
|
57354
|
+
case "HH:MM:SS.fff":
|
|
57355
|
+
return `${IFrameSplitOperator.NumberToString(datetime.getHours())}:${IFrameSplitOperator.NumberToString(datetime.getMinutes())}:${IFrameSplitOperator.NumberToString(datetime.getSeconds())}.${IFrameSplitOperator.MillisecondToString(datetime.getMilliseconds())}`;
|
|
57343
57356
|
default:
|
|
57344
57357
|
return null;
|
|
57345
57358
|
}
|
|
@@ -141804,6 +141817,8 @@ function ChartReport()
|
|
|
141804
141817
|
for(var i=0;i<this.Column.length;++i)
|
|
141805
141818
|
{
|
|
141806
141819
|
var item=this.Column[i];
|
|
141820
|
+
this.Canvas.font=this.ItemFont;
|
|
141821
|
+
|
|
141807
141822
|
if (item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_ID)
|
|
141808
141823
|
{
|
|
141809
141824
|
this.Canvas.font=this.ItemNameFont;
|
|
@@ -142291,6 +142306,7 @@ function ChartReport()
|
|
|
142291
142306
|
}
|
|
142292
142307
|
|
|
142293
142308
|
this.DrawFullRowBGColor(symbol, eventDrawBG, i, rtRowBG, { Selected:selectedSymbol } );
|
|
142309
|
+
this.DrawFlashFullRowBGColor(symbol, rtRowBG);
|
|
142294
142310
|
|
|
142295
142311
|
if (bFillRow)
|
|
142296
142312
|
{
|
|
@@ -142340,6 +142356,27 @@ function ChartReport()
|
|
|
142340
142356
|
}
|
|
142341
142357
|
}
|
|
142342
142358
|
|
|
142359
|
+
this.DrawFlashFullRowBGColor=function(symbol, rtBG)
|
|
142360
|
+
{
|
|
142361
|
+
var data= { Symbol:symbol, FlashBG:null };
|
|
142362
|
+
if (this.GetFlashBGDataCallback) data.FlashBG=this.GetFlashBGDataCallback(symbol, Date.now());
|
|
142363
|
+
if (!data.FlashBG) return;
|
|
142364
|
+
|
|
142365
|
+
var id=-1;
|
|
142366
|
+
if (!data.FlashBG.Data.has(id)) return;
|
|
142367
|
+
|
|
142368
|
+
var flashItem=data.FlashBG.Data.get(id);
|
|
142369
|
+
if (flashItem && flashItem.Count)
|
|
142370
|
+
{
|
|
142371
|
+
this.Canvas.fillStyle=flashItem.Color;
|
|
142372
|
+
this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
|
|
142373
|
+
}
|
|
142374
|
+
|
|
142375
|
+
--flashItem.Count;
|
|
142376
|
+
|
|
142377
|
+
if (this.GlobalOption) ++this.GlobalOption.FlashBGCount;
|
|
142378
|
+
}
|
|
142379
|
+
|
|
142343
142380
|
this.DrawSelectedRow=function()
|
|
142344
142381
|
{
|
|
142345
142382
|
if (this.SelectedStyle===2 && IFrameSplitOperator.IsNonEmptyArray(this.AryFullSelectedRow))
|
|
@@ -143979,6 +144016,8 @@ function ChartReport()
|
|
|
143979
144016
|
{
|
|
143980
144017
|
drawInfo.Botton={ Rect:rtBG, Type:1 };
|
|
143981
144018
|
}
|
|
144019
|
+
|
|
144020
|
+
this.Canvas.font=this.ItemFont;
|
|
143982
144021
|
}
|
|
143983
144022
|
|
|
143984
144023
|
this.DrawProgressBar=function(drawInfo, left, top, width)
|
|
@@ -153252,7 +153291,11 @@ function JSDialogDrawTool()
|
|
|
153252
153291
|
this.Destroy=function()
|
|
153253
153292
|
{
|
|
153254
153293
|
this.AryDivChart=[];
|
|
153255
|
-
if (this.DivDialog)
|
|
153294
|
+
if (this.DivDialog)
|
|
153295
|
+
{
|
|
153296
|
+
if (document && document.body && document.body.removeChild)
|
|
153297
|
+
document.body.removeChild(this.DivDialog);
|
|
153298
|
+
}
|
|
153256
153299
|
this.DivDialog=null;
|
|
153257
153300
|
}
|
|
153258
153301
|
|
|
@@ -154384,7 +154427,11 @@ function JSPopMinuteChart()
|
|
|
154384
154427
|
|
|
154385
154428
|
this.Destroy=function()
|
|
154386
154429
|
{
|
|
154387
|
-
if (this.DivDialog)
|
|
154430
|
+
if (this.DivDialog)
|
|
154431
|
+
{
|
|
154432
|
+
if (document && document.body && document.body.removeChild)
|
|
154433
|
+
document.body.removeChild(this.DivDialog);
|
|
154434
|
+
}
|
|
154388
154435
|
this.DivDialog=null;
|
|
154389
154436
|
this.TitleBox=null;
|
|
154390
154437
|
this.Minute.JSChart=null;
|
|
@@ -155189,7 +155236,12 @@ function JSTooltipKLineChart()
|
|
|
155189
155236
|
|
|
155190
155237
|
this.Destroy=function()
|
|
155191
155238
|
{
|
|
155192
|
-
if (this.DivDialog)
|
|
155239
|
+
if (this.DivDialog)
|
|
155240
|
+
{
|
|
155241
|
+
if (document && document.body && document.body.removeChild)
|
|
155242
|
+
document.body.removeChild(this.DivDialog);
|
|
155243
|
+
}
|
|
155244
|
+
|
|
155193
155245
|
this.DivDialog=null;
|
|
155194
155246
|
this.TitleBox=null;
|
|
155195
155247
|
if (!this.KLine.JSChart) this.KLine.JSChart.ChartDestory();
|
|
@@ -155421,7 +155473,11 @@ function JSPopKeyboard()
|
|
|
155421
155473
|
|
|
155422
155474
|
this.Destroy=function()
|
|
155423
155475
|
{
|
|
155424
|
-
if (this.DivDialog)
|
|
155476
|
+
if (this.DivDialog)
|
|
155477
|
+
{
|
|
155478
|
+
if (document && document.body && document.body.removeChild)
|
|
155479
|
+
document.body.removeChild(this.DivDialog);
|
|
155480
|
+
}
|
|
155425
155481
|
|
|
155426
155482
|
this.DivDialog=null;
|
|
155427
155483
|
this.TitleBox=null;
|
|
@@ -155862,7 +155918,7 @@ function JSDialogTooltip()
|
|
|
155862
155918
|
|
|
155863
155919
|
if (this.DivDialog)
|
|
155864
155920
|
{
|
|
155865
|
-
document.body.removeChild(this.DivDialog);
|
|
155921
|
+
if (document && document.body && document.body.removeChild) document.body.removeChild(this.DivDialog);
|
|
155866
155922
|
this.DivDialog=null;
|
|
155867
155923
|
}
|
|
155868
155924
|
}
|
|
@@ -158105,7 +158161,7 @@ function JSDialogSelectRect()
|
|
|
158105
158161
|
|
|
158106
158162
|
if (this.DivDialog)
|
|
158107
158163
|
{
|
|
158108
|
-
document.body.removeChild(this.DivDialog);
|
|
158164
|
+
if (document && document.body && document.body.removeChild) document.body.removeChild(this.DivDialog);
|
|
158109
158165
|
this.DivDialog=null;
|
|
158110
158166
|
}
|
|
158111
158167
|
}
|
|
@@ -158978,7 +159034,7 @@ function JSDialogSearchIndex()
|
|
|
158978
159034
|
|
|
158979
159035
|
if (this.DivDialog)
|
|
158980
159036
|
{
|
|
158981
|
-
document.body.removeChild(this.DivDialog);
|
|
159037
|
+
if (document && document.body && document.body.removeChild) document.body.removeChild(this.DivDialog);
|
|
158982
159038
|
this.DivDialog=null;
|
|
158983
159039
|
}
|
|
158984
159040
|
}
|
|
@@ -160333,7 +160389,7 @@ function HQChartScriptWorker()
|
|
|
160333
160389
|
|
|
160334
160390
|
|
|
160335
160391
|
|
|
160336
|
-
var HQCHART_VERSION="1.1.
|
|
160392
|
+
var HQCHART_VERSION="1.1.14813";
|
|
160337
160393
|
|
|
160338
160394
|
function PrintHQChartVersion()
|
|
160339
160395
|
{
|