hqchart 1.1.14100 → 1.1.14108
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 +29 -14
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogSearchIndex.js +9 -0
- package/src/jscommon/umychart.js +2 -0
- package/src/jscommon/umychart.report.js +104 -4
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +107 -5
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +116 -5
package/lib/umychart.vue.js
CHANGED
|
@@ -1508,7 +1508,8 @@ ON_CLICK_HORIZONTAL_LABEL:158,//点击Y轴刻度标签
|
|
|
1508
1508
|
ON_FORMAT_DIALOG_TOOLTIP:159,//格式化Tooltip对话框显示文字
|
|
1509
1509
|
ON_CHANGE_KLINE_RIGHT:160,//切换复权
|
|
1510
1510
|
ON_FORMAT_KLINE_FLOAT_TOOLTIP:161,//格式化k线浮动框显示文字
|
|
1511
|
-
ON_FORMAT_KLINE_INFO_FLOAT_TOOLTIP:162
|
|
1511
|
+
ON_FORMAT_KLINE_INFO_FLOAT_TOOLTIP:162,//格式化信息地雷显示文字
|
|
1512
|
+
SEARCH_DIALOG_ON_CLICK_INDEX:163//切换指标-指标对话框
|
|
1512
1513
|
};var JSCHART_OPERATOR_ID={OP_SCROLL_LEFT:1,//往左移动
|
|
1513
1514
|
OP_SCROLL_RIGHT:2,//往右移动
|
|
1514
1515
|
OP_ZOOM_OUT:3,//缩小
|
|
@@ -12695,7 +12696,8 @@ if(IFrameSplitOperator.IsNumber(item[42]))stock.ClosePosition=item[42];//平仓
|
|
|
12695
12696
|
if(IFrameSplitOperator.IsNumber(item[43]))stock.RSpeed1M=item[43];if(IFrameSplitOperator.IsNumber(item[44]))stock.RSpeed3M=item[44];if(IFrameSplitOperator.IsNumber(item[45]))stock.RSpeed5M=item[45];if(IFrameSplitOperator.IsNumber(item[46]))stock.RSpeed10M=item[46];if(IFrameSplitOperator.IsNumber(item[47]))stock.RSpeed15M=item[47];//10个数值型 101-199
|
|
12696
12697
|
if(IFrameSplitOperator.IsNumber(item[101]))stock.ReserveNumber1=item[101];if(IFrameSplitOperator.IsNumber(item[102]))stock.ReserveNumber2=item[102];if(IFrameSplitOperator.IsNumber(item[103]))stock.ReserveNumber3=item[103];if(IFrameSplitOperator.IsNumber(item[104]))stock.ReserveNumber4=item[104];if(IFrameSplitOperator.IsNumber(item[105]))stock.ReserveNumber5=item[105];if(IFrameSplitOperator.IsNumber(item[106]))stock.ReserveNumber6=item[106];if(IFrameSplitOperator.IsNumber(item[107]))stock.ReserveNumber7=item[107];if(IFrameSplitOperator.IsNumber(item[108]))stock.ReserveNumber8=item[108];if(IFrameSplitOperator.IsNumber(item[109]))stock.ReserveNumber9=item[109];if(IFrameSplitOperator.IsNumber(item[110]))stock.ReserveNumber10=item[110];//10个字符型 201-299
|
|
12697
12698
|
if(IFrameSplitOperator.IsString(item[201]))stock.ReserveString1=item[201];if(IFrameSplitOperator.IsString(item[202]))stock.ReserveString2=item[202];if(IFrameSplitOperator.IsString(item[203]))stock.ReserveString3=item[203];if(IFrameSplitOperator.IsString(item[204]))stock.ReserveString4=item[204];if(IFrameSplitOperator.IsString(item[205]))stock.ReserveString5=item[205];if(IFrameSplitOperator.IsString(item[206]))stock.ReserveString6=item[206];if(IFrameSplitOperator.IsString(item[207]))stock.ReserveString7=item[207];if(IFrameSplitOperator.IsString(item[208]))stock.ReserveString8=item[208];if(IFrameSplitOperator.IsString(item[209]))stock.ReserveString9=item[209];if(IFrameSplitOperator.IsString(item[210]))stock.ReserveString10=item[210];//10个进度条 301-350 { Value:, BGColor: }
|
|
12698
|
-
if(IFrameSplitOperator.IsNumber(item[301])||IFrameSplitOperator.IsObject(item[301]))stock.ReserveProgressBar1=item[301];if(IFrameSplitOperator.IsNumber(item[302])||IFrameSplitOperator.IsObject(item[302]))stock.ReserveProgressBar2=item[302];if(IFrameSplitOperator.IsNumber(item[303])||IFrameSplitOperator.IsObject(item[303]))stock.ReserveProgressBar3=item[303];if(IFrameSplitOperator.IsNumber(item[304])||IFrameSplitOperator.IsObject(item[304]))stock.ReserveProgressBar4=item[304];if(IFrameSplitOperator.IsNumber(item[305])||IFrameSplitOperator.IsObject(item[305]))stock.ReserveProgressBar5=item[305];if(IFrameSplitOperator.IsNumber(item[306])||IFrameSplitOperator.IsObject(item[306]))stock.ReserveProgressBar6=item[306];if(IFrameSplitOperator.IsNumber(item[307])||IFrameSplitOperator.IsObject(item[307]))stock.ReserveProgressBar7=item[307];if(IFrameSplitOperator.IsNumber(item[308])||IFrameSplitOperator.IsObject(item[308]))stock.ReserveProgressBar8=item[308];if(IFrameSplitOperator.IsNumber(item[309])||IFrameSplitOperator.IsObject(item[309]))stock.ReserveProgressBar9=item[309];if(IFrameSplitOperator.IsNumber(item[310])||IFrameSplitOperator.IsObject(item[310]))stock.ReserveProgressBar10=item[310]
|
|
12699
|
+
if(IFrameSplitOperator.IsNumber(item[301])||IFrameSplitOperator.IsObject(item[301]))stock.ReserveProgressBar1=item[301];if(IFrameSplitOperator.IsNumber(item[302])||IFrameSplitOperator.IsObject(item[302]))stock.ReserveProgressBar2=item[302];if(IFrameSplitOperator.IsNumber(item[303])||IFrameSplitOperator.IsObject(item[303]))stock.ReserveProgressBar3=item[303];if(IFrameSplitOperator.IsNumber(item[304])||IFrameSplitOperator.IsObject(item[304]))stock.ReserveProgressBar4=item[304];if(IFrameSplitOperator.IsNumber(item[305])||IFrameSplitOperator.IsObject(item[305]))stock.ReserveProgressBar5=item[305];if(IFrameSplitOperator.IsNumber(item[306])||IFrameSplitOperator.IsObject(item[306]))stock.ReserveProgressBar6=item[306];if(IFrameSplitOperator.IsNumber(item[307])||IFrameSplitOperator.IsObject(item[307]))stock.ReserveProgressBar7=item[307];if(IFrameSplitOperator.IsNumber(item[308])||IFrameSplitOperator.IsObject(item[308]))stock.ReserveProgressBar8=item[308];if(IFrameSplitOperator.IsNumber(item[309])||IFrameSplitOperator.IsObject(item[309]))stock.ReserveProgressBar9=item[309];if(IFrameSplitOperator.IsNumber(item[310])||IFrameSplitOperator.IsObject(item[310]))stock.ReserveProgressBar10=item[310];//10个按钮 351-400 { Title, Enable:, BGColor, TextColor: }
|
|
12700
|
+
if(IFrameSplitOperator.IsObject(item[351]))stock.ReserveButton1=item[351];if(IFrameSplitOperator.IsObject(item[352]))stock.ReserveButton2=item[352];if(IFrameSplitOperator.IsObject(item[353]))stock.ReserveButton3=item[353];if(IFrameSplitOperator.IsObject(item[354]))stock.ReserveButton4=item[354];if(IFrameSplitOperator.IsObject(item[355]))stock.ReserveButton5=item[355];if(IFrameSplitOperator.IsObject(item[356]))stock.ReserveButton6=item[356];if(IFrameSplitOperator.IsObject(item[357]))stock.ReserveButton7=item[357];if(IFrameSplitOperator.IsObject(item[358]))stock.ReserveButton8=item[358];if(IFrameSplitOperator.IsObject(item[359]))stock.ReserveButton9=item[359];if(IFrameSplitOperator.IsObject(item[360]))stock.ReserveButton10=item[360];};this.GetSymbolNoSuffix=function(symbol){var index=symbol.lastIndexOf(".");if(index>0)return symbol.substring(0,index);else return symbol;};this.CancelAutoUpdate=function()//关闭停止更新
|
|
12699
12701
|
{if(typeof this.AutoUpdateTimer=='number'){clearTimeout(this.AutoUpdateTimer);this.AutoUpdateTimer=null;}};this.AutoUpdate=function(waitTime)//waitTime 更新时间
|
|
12700
12702
|
{this.CancelAutoUpdate();if(!this.IsAutoUpdate)return;var self=this;var marketStatus=2;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_MARKET_STATUS);if(event&&event.Callback){var sendData={MarketStatus:2};event.Callback(event,sendData,this);if(IFrameSplitOperator.IsNumber(sendData.MarketStatus))marketStatus=sendData.MarketStatus;}if(marketStatus==0||marketStatus==3)return;//闭市,盘后
|
|
12701
12703
|
var frequency=this.AutoUpdateFrequency;if(marketStatus==1)//盘前
|
|
@@ -12737,7 +12739,7 @@ this.UIOnContextMenu=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint
|
|
|
12737
12739
|
};this.OnRightMenu=function(x,y,e){e.preventDefault();};this.UIOnMouseMove=function(e){var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;var oldMouseOnStatus=this.LastMouseStatus.MouseOnStatus;this.LastMouseStatus.OnMouseMove=null;var bDrawTooltip=false;if(this.LastMouseStatus.TooltipStatus)bDrawTooltip=true;this.LastMouseStatus.TooltipStatus=null;if(this.DragRow)return;if(this.DrawHeader)return;if(this.DragColumnWidth)return;var tabChart=this.GetTabChart();var bDrawTab=false;if(tabChart){var tabData=tabChart.PtInTab(x,y);if(tabData){var index=tabData.Index;if(tabChart.MoveOnTabIndex!=index){tabChart.MoveOnTabIndex=index;bDrawTab=true;}}else{if(tabChart.MoveOnTabIndex>=0){tabChart.MoveOnTabIndex=-1;bDrawTab=true;}}}this.LastMouseStatus.OnMouseMove={X:x,Y:y};var mouseStatus={Cursor:"default",Name:"Default"};;//鼠标状态
|
|
12738
12740
|
var report=this.GetReportChart();var bDraw=false;if(report){var dragHeaderWidth=report.PtInHeaderDragBorder(x,y);if(dragHeaderWidth){mouseStatus={Cursor:"col-resize",Name:"DragHeaderWidth"};JSConsole.Chart.Log("[JSReportChartContainer::UIOnMouseMove] drag column width ",dragHeaderWidth);}else{var buttonData=report.GetButtonData(x,y);var mouseOnStatus=null;if(buttonData){mouseStatus={Cursor:"pointer",Name:"Botton"};if(buttonData.Type==1||buttonData.Type==0||buttonData.Type==2){mouseOnStatus={Index:buttonData.Index,ColumnIndex:buttonData.ColumnIndex};}}//console.log("[UIOnMouseMove] ", oldMouseOnStatus, mouseOnStatus)
|
|
12739
12741
|
if(!oldMouseOnStatus&&mouseOnStatus||oldMouseOnStatus&&!mouseOnStatus){bDraw=true;}else if(oldMouseOnStatus&&mouseOnStatus){if(oldMouseOnStatus.Index!=mouseOnStatus.Index||oldMouseOnStatus.ColumnIndex!=mouseOnStatus.ColumnIndex)bDraw=true;}var tooltipData=report.GetTooltipData(x,y);//单元格提示信息
|
|
12740
|
-
if(tooltipData){this.LastMouseStatus.TooltipStatus={X:e.clientX,
|
|
12742
|
+
if(tooltipData){this.LastMouseStatus.TooltipStatus={X:x,Y:y,Data:tooltipData,ClientX:e.clientX,ClientY:e.clientY};bDrawTooltip=true;}}var scrollbar=report.VScrollbar;if(scrollbar.Enable){var bShowScrollbar=report.PtInClient(x,y);this.IsShowVScrollbar=bShowScrollbar;if(!this.DragYScroll){if(bShowScrollbar&&!scrollbar.LastStatus.Draw)bDraw=true;else if(!bShowScrollbar&&scrollbar.LastStatus.Draw)bDraw=true;}}}/* 目前没有用到
|
|
12741
12743
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_MOUSE_MOVE);
|
|
12742
12744
|
if (event)
|
|
12743
12745
|
{
|
|
@@ -12868,8 +12870,19 @@ RESERVE_NUMBER2_ID:202,RESERVE_NUMBER3_ID:203,RESERVE_NUMBER4_ID:204,RESERVE_NUM
|
|
|
12868
12870
|
RESERVE_STRING1_ID:301,//ReserveString1:
|
|
12869
12871
|
RESERVE_STRING2_ID:302,RESERVE_STRING3_ID:303,RESERVE_STRING4_ID:304,RESERVE_STRING5_ID:305,RESERVE_STRING6_ID:306,RESERVE_STRING7_ID:307,RESERVE_STRING8_ID:308,RESERVE_STRING9_ID:309,RESERVE_STRING10_ID:310,//预留进度条类型 10个 401-450
|
|
12870
12872
|
RESERVE_PROGRESS_BAR1_ID:401,//ReserveProgressBar1:
|
|
12871
|
-
RESERVE_PROGRESS_BAR2_ID:402,RESERVE_PROGRESS_BAR3_ID:403,RESERVE_PROGRESS_BAR4_ID:404,RESERVE_PROGRESS_BAR5_ID:405,RESERVE_PROGRESS_BAR6_ID:406,RESERVE_PROGRESS_BAR7_ID:407,RESERVE_PROGRESS_BAR8_ID:408,RESERVE_PROGRESS_BAR9_ID:409,RESERVE_PROGRESS_BAR10_ID:410
|
|
12872
|
-
|
|
12873
|
+
RESERVE_PROGRESS_BAR2_ID:402,RESERVE_PROGRESS_BAR3_ID:403,RESERVE_PROGRESS_BAR4_ID:404,RESERVE_PROGRESS_BAR5_ID:405,RESERVE_PROGRESS_BAR6_ID:406,RESERVE_PROGRESS_BAR7_ID:407,RESERVE_PROGRESS_BAR8_ID:408,RESERVE_PROGRESS_BAR9_ID:409,RESERVE_PROGRESS_BAR10_ID:410,//留按钮类型 10个 451-500
|
|
12874
|
+
RESERVE_BUTTON1_ID:451,//ReserveButton1:
|
|
12875
|
+
RESERVE_BUTTON2_ID:452,//ReserveButton2:
|
|
12876
|
+
RESERVE_BUTTON3_ID:453,//ReserveButton3:
|
|
12877
|
+
RESERVE_BUTTON4_ID:454,//ReserveButton4:
|
|
12878
|
+
RESERVE_BUTTON5_ID:455,//ReserveButton5:
|
|
12879
|
+
RESERVE_BUTTON6_ID:456,//ReserveButton6:
|
|
12880
|
+
RESERVE_BUTTON7_ID:457,//ReserveButton7:
|
|
12881
|
+
RESERVE_BUTTON8_ID:458,//ReserveButton8:
|
|
12882
|
+
RESERVE_BUTTON9_ID:459,//ReserveButton9:
|
|
12883
|
+
RESERVE_BUTTON10_ID:460//ReserveButton10:
|
|
12884
|
+
//数据对应字段名对照表
|
|
12885
|
+
};var MAP_COLUMN_FIELD=new _map2.default([[REPORT_COLUMN_ID.SYMBOL_ID,"Symbol"],[REPORT_COLUMN_ID.NAME_ID,"Name"],[REPORT_COLUMN_ID.PRICE_ID,"Price"],[REPORT_COLUMN_ID.INCREASE_ID,"Increase"],[REPORT_COLUMN_ID.UPDOWN_ID,"UpDown"],[REPORT_COLUMN_ID.VOL_ID,"Vol"],[REPORT_COLUMN_ID.BUY_PRICE_ID,"BuyPrice"],[REPORT_COLUMN_ID.SELL_PRICE_ID,"SellPrice"],[REPORT_COLUMN_ID.AMOUNT_ID,"Amount"],[REPORT_COLUMN_ID.BUY_VOL_ID,"BuyVol"],[REPORT_COLUMN_ID.SELL_VOL_ID,"SellVol"],[REPORT_COLUMN_ID.YCLOSE_ID,"YClose"],[REPORT_COLUMN_ID.OPEN_ID,"Open"],[REPORT_COLUMN_ID.HIGH_ID,"High"],[REPORT_COLUMN_ID.LOW_ID,"Low"],[REPORT_COLUMN_ID.AVERAGE_PRICE_ID,"AvPrice"],[REPORT_COLUMN_ID.OUTSTANDING_SHARES_ID,"OutShares"],[REPORT_COLUMN_ID.TOTAL_SHARES_ID,"TotalShares"],[REPORT_COLUMN_ID.CIRC_MARKET_VALUE_ID,"CircMarketValue"],[REPORT_COLUMN_ID.MARKET_VALUE_ID,"MarketValue"],[REPORT_COLUMN_ID.EXCHANGE_RATE_ID,"Exchange"],[REPORT_COLUMN_ID.AMPLITUDE_ID,"Amplitude"],[REPORT_COLUMN_ID.LIMIT_HIGH_ID,"LimitHigh"],[REPORT_COLUMN_ID.LIMIT_LOW_ID,"LimitLow"],[REPORT_COLUMN_ID.VOL_IN_ID,"VolIn"],[REPORT_COLUMN_ID.VOL_OUT_ID,"VolOut"],[REPORT_COLUMN_ID.NAME_EX_ID,"NameEx"],[REPORT_COLUMN_ID.DATE_ID,"Date"],[REPORT_COLUMN_ID.FUTURES_POSITION_ID,"Position"],[REPORT_COLUMN_ID.FUTURES_CLOSE_ID,"FClose"],[REPORT_COLUMN_ID.FUTURES_YCLOSE_ID,"YFClose"],[REPORT_COLUMN_ID.FUTURES_OPEN_POSITION_ID,"OpenPosition"],[REPORT_COLUMN_ID.FUTURES_CLOSE_POSITION_ID,"ClosePosition"],[REPORT_COLUMN_ID.RISING_SPEED_1M_ID,"RSpeed1M"],[REPORT_COLUMN_ID.RISING_SPEED_3M_ID,"RSpeed3M"],[REPORT_COLUMN_ID.RISING_SPEED_5M_ID,"RSpeed5M"],[REPORT_COLUMN_ID.RISING_SPEED_10M_ID,"RSpeed10M"],[REPORT_COLUMN_ID.RISING_SPEED_15M_ID,"RSpeed15M"],[REPORT_COLUMN_ID.RESERVE_NUMBER1_ID,"ReserveNumber1"],[REPORT_COLUMN_ID.RESERVE_NUMBER2_ID,"ReserveNumber2"],[REPORT_COLUMN_ID.RESERVE_NUMBER3_ID,"ReserveNumber3"],[REPORT_COLUMN_ID.RESERVE_NUMBER4_ID,"ReserveNumber4"],[REPORT_COLUMN_ID.RESERVE_NUMBER5_ID,"ReserveNumber5"],[REPORT_COLUMN_ID.RESERVE_NUMBER6_ID,"ReserveNumber6"],[REPORT_COLUMN_ID.RESERVE_NUMBER7_ID,"ReserveNumber7"],[REPORT_COLUMN_ID.RESERVE_NUMBER8_ID,"ReserveNumber8"],[REPORT_COLUMN_ID.RESERVE_NUMBER9_ID,"ReserveNumber9"],[REPORT_COLUMN_ID.RESERVE_NUMBER10_ID,"ReserveNumber10"],[REPORT_COLUMN_ID.RESERVE_STRING1_ID,"ReserveString1"],[REPORT_COLUMN_ID.RESERVE_STRING2_ID,"ReserveString2"],[REPORT_COLUMN_ID.RESERVE_STRING3_ID,"ReserveString3"],[REPORT_COLUMN_ID.RESERVE_STRING4_ID,"ReserveString4"],[REPORT_COLUMN_ID.RESERVE_STRING5_ID,"ReserveString5"],[REPORT_COLUMN_ID.RESERVE_STRING6_ID,"ReserveString6"],[REPORT_COLUMN_ID.RESERVE_STRING7_ID,"ReserveString7"],[REPORT_COLUMN_ID.RESERVE_STRING8_ID,"ReserveString8"],[REPORT_COLUMN_ID.RESERVE_STRING9_ID,"ReserveString9"],[REPORT_COLUMN_ID.RESERVE_STRING10_ID,"ReserveString10"],[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR1_ID,"ReserveProgressBar1"],[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR2_ID,"ReserveProgressBar2"],[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR3_ID,"ReserveProgressBar3"],[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR4_ID,"ReserveProgressBar4"],[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR5_ID,"ReserveProgressBar5"],[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR6_ID,"ReserveProgressBar6"],[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR7_ID,"ReserveProgressBar7"],[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR8_ID,"ReserveProgressBar8"],[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR9_ID,"ReserveProgressBar9"],[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR10_ID,"ReserveProgressBar10"],[REPORT_COLUMN_ID.RESERVE_BUTTON1_ID,"ReserveButton1"],[REPORT_COLUMN_ID.RESERVE_BUTTON2_ID,"ReserveButton2"],[REPORT_COLUMN_ID.RESERVE_BUTTON3_ID,"ReserveButton3"],[REPORT_COLUMN_ID.RESERVE_BUTTON4_ID,"ReserveButton4"],[REPORT_COLUMN_ID.RESERVE_BUTTON5_ID,"ReserveButton5"],[REPORT_COLUMN_ID.RESERVE_BUTTON6_ID,"ReserveButton6"],[REPORT_COLUMN_ID.RESERVE_BUTTON7_ID,"ReserveButton7"],[REPORT_COLUMN_ID.RESERVE_BUTTON8_ID,"ReserveButton8"],[REPORT_COLUMN_ID.RESERVE_BUTTON9_ID,"ReserveButton9"],[REPORT_COLUMN_ID.RESERVE_BUTTON10_ID,"ReserveButton10"]]);function ChartReport(){this.Canvas;//画布
|
|
12873
12886
|
this.ChartBorder;//边框信息
|
|
12874
12887
|
this.ChartFrame;//框架画法
|
|
12875
12888
|
this.Name;//名称
|
|
@@ -12951,11 +12964,11 @@ if(IFrameSplitOperator.IsNumber(item.FormatType))colItem.FormatType=item.FormatT
|
|
|
12951
12964
|
if(IFrameSplitOperator.IsNumber(item.ValueType))colItem.FormatType=item.ValueType;//输出样式
|
|
12952
12965
|
}else if(item.Type==REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID){if(!IFrameSplitOperator.IsNumber(item.DataIndex)&&!IFrameSplitOperator.IsNumber(item.BlockIndex))continue;if(IFrameSplitOperator.IsNumber(item.DataIndex))colItem.DataIndex=item.DataIndex;//数据在扩展数据索引列
|
|
12953
12966
|
if(IFrameSplitOperator.IsNumber(item.BlockIndex))colItem.BlockIndex=item.BlockIndex;if(item.CheckBox)colItem.CheckBox=CloneData(item.CheckBox);else colItem.CheckBox=this.CheckBoxConfig;}else if(item.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID){if(!IFrameSplitOperator.IsNumber(item.DataIndex)&&!IFrameSplitOperator.IsNumber(item.BlockIndex))continue;if(IFrameSplitOperator.IsNumber(item.DataIndex))colItem.DataIndex=item.DataIndex;//数据在扩展数据索引列
|
|
12954
|
-
if(IFrameSplitOperator.IsNumber(item.BlockIndex))colItem.BlockIndex=item.BlockIndex;if(item.Button)colItem.Button=CloneData(item.Button);else colItem.Button=this.ButtonConfig;}else if(item.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID){if(!IFrameSplitOperator.IsNumber(item.DataIndex)&&!IFrameSplitOperator.IsNumber(item.BlockIndex))continue;if(IFrameSplitOperator.IsNumber(item.DataIndex))colItem.DataIndex=item.DataIndex;//数据在扩展数据索引列
|
|
12967
|
+
if(IFrameSplitOperator.IsNumber(item.BlockIndex))colItem.BlockIndex=item.BlockIndex;if(item.Button)colItem.Button=CloneData(item.Button);else colItem.Button=this.ButtonConfig;}else if(this.IsReserveButtonColumn(item.Type)){if(item.Button)colItem.Button=CloneData(item.Button);else colItem.Button=this.ButtonConfig;}else if(item.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID){if(!IFrameSplitOperator.IsNumber(item.DataIndex)&&!IFrameSplitOperator.IsNumber(item.BlockIndex))continue;if(IFrameSplitOperator.IsNumber(item.DataIndex))colItem.DataIndex=item.DataIndex;//数据在扩展数据索引列
|
|
12955
12968
|
if(IFrameSplitOperator.IsNumber(item.BlockIndex))colItem.BlockIndex=item.BlockIndex;if(item.ProgressBar)colItem.ProgressBar=CloneData(item.ProgressBar);else colItem.ProgressBar=this.ProgressBarConfig;}else if(this.IsReserveProgressBarColumn(item.Type)){if(item.ProgressBar)colItem.ProgressBar=CloneData(item.ProgressBar);else colItem.ProgressBar=this.ProgressBarConfig;}else if(item.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID){if(!IFrameSplitOperator.IsNumber(item.DataIndex)&&!IFrameSplitOperator.IsNumber(item.BlockIndex))continue;if(IFrameSplitOperator.IsNumber(item.DataIndex))colItem.DataIndex=item.DataIndex;//数据在扩展数据索引列
|
|
12956
12969
|
if(IFrameSplitOperator.IsNumber(item.BlockIndex))colItem.BlockIndex=item.BlockIndex;if(item.Link)colItem.Link=CloneData(item.Link);else colItem.Link=this.LinkConfig;}else if(item.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID){}else if(item.Type==REPORT_COLUMN_ID.CLOSE_LINE_ID){if(IFrameSplitOperator.IsBool(item.IsDrawArea))colItem.IsDrawArea=item.IsDrawArea;}else if(item.Type==REPORT_COLUMN_ID.TIME_ID){if(IFrameSplitOperator.IsNumber(item.ValueType))colItem.ValueType=item.ValueType;}else if(item.Type==REPORT_COLUMN_ID.DATE_ID){if(IFrameSplitOperator.IsNumber(item.FormatType))colItem.FormatType=item.FormatType;}this.Column.push(colItem);}};this.SwapColumn=function(leftIndex,rightIndex){if(!IFrameSplitOperator.IsNumber(leftIndex)||!IFrameSplitOperator.IsNumber(rightIndex))return false;var count=this.Column.length;if(leftIndex<0||leftIndex>=count)return false;if(rightIndex<0||rightIndex>=count)return false;if(leftIndex==rightIndex)return;var tempItem=this.Column[leftIndex];this.Column[leftIndex]=this.Column[rightIndex];this.Column[rightIndex]=tempItem;return true;};this.DeleteColumn=function(index){if(!IFrameSplitOperator.IsNonEmptyArray(this.Column))return false;if(index<0||index>=this.Column.length)return false;this.Column.splice(index,1);return true;};this.GetXScrollPos=function(){return this.Data.XOffset;};this.GetXScrollRange=function(){var maxOffset=this.Column.length-this.FixedColumn-3;if(maxOffset<0)return 0;return maxOffset;};this.GetYScrollRange=function(){if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return 0;var dataCount=this.GetAllRowCount();var maxOffset=dataCount-this.RowCount;return maxOffset;};this.GetDefaultColunm=function(id){var DEFAULT_COLUMN=[{Type:REPORT_COLUMN_ID.INDEX_ID,Title:"序号",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Index,MaxText:"8888"},{Type:REPORT_COLUMN_ID.SYMBOL_ID,Title:"代码",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Symbol,MaxText:"888888"},{Type:REPORT_COLUMN_ID.NAME_ID,Title:"名称",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Name,MaxText:"擎擎擎擎0"},{Type:REPORT_COLUMN_ID.NAME_EX_ID,Title:"名称",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Name,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.SYMBOL_NAME_ID,Title:"股票名称",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Name,MaxText:"擎擎擎擎0"},{Type:REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID,Title:"名称/代码",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.NameSymbolV2.Name.Color,MaxText:"擎擎擎擎*",MaxText2:"999999",Space:5,TextColor2:g_JSChartResource.Report.NameSymbolV2.Symbol.Color},{Type:REPORT_COLUMN_ID.INCREASE_ID,Title:"涨幅%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.PRICE_ID,Title:"现价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.UPDOWN_ID,Title:"涨跌",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.AMPLITUDE_ID,Title:"振幅%",TextAlign:"right",Width:null,MaxText:"888.88"},{Type:REPORT_COLUMN_ID.BUY_PRICE_ID,Title:"买价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.SELL_PRICE_ID,Title:"卖价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.AVERAGE_PRICE_ID,Title:"均价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.OPEN_ID,Title:"今开",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.HIGH_ID,Title:"最高",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.LOW_ID,Title:"最低",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.YCLOSE_ID,Title:"昨收",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.VOL_ID,Title:"总量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Vol,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.AMOUNT_ID,Title:"总金额",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Amount,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.EXCHANGE_RATE_ID,Title:"换手%",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"88.88擎"},{Type:REPORT_COLUMN_ID.OUTSTANDING_SHARES_ID,Title:"流通股本",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.TOTAL_SHARES_ID,Title:"总股本",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.CIRC_MARKET_VALUE_ID,Title:"流通市值",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.MARKET_VALUE_ID,Title:"总市值",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.VOL_IN_ID,Title:"内盘",TextAlign:"right",TextColor:g_JSChartResource.Report.DownTextColor,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.VOL_OUT_ID,Title:"外盘",TextAlign:"right",TextColor:g_JSChartResource.Report.UpTextColor,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.CLOSE_LINE_ID,Title:"走势",TextAlign:"center",TextColor:g_JSChartResource.Report.CloseLineColor,Width:null,MaxText:"88888.88888"},{Type:REPORT_COLUMN_ID.BUY_VOL_ID,Title:"买量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Vol,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.SELL_VOL_ID,Title:"卖量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Vol,Width:null,MaxText:"8888.8擎"},//{ Type:REPORT_COLUMN_ID.MULTI_BAR_ID, Title:"柱子", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
12957
12970
|
//{ Type:REPORT_COLUMN_ID.CENTER_BAR_ID, Title:"柱子2", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
12958
|
-
{Type:REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID,Title:"自定义",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.CUSTOM_NUMBER_TEXT_ID,Title:"自定义",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.CUSTOM_DATETIME_TEXT_ID,Title:"自定义",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999-99-99"},{Type:REPORT_COLUMN_ID.CUSTOM_ICON_ID,Title:" ",TextAlign:"left",FixedWidth:20,TextColor:g_JSChartResource.Report.FieldColor.Text},{Type:REPORT_COLUMN_ID.KLINE_ID,Title:"K线",TextAlign:"left",FixedWidth:50,TextColor:g_JSChartResource.Report.FieldColor.Text},{Type:REPORT_COLUMN_ID.TIME_ID,Title:"时间",TextAlign:"left",ValueType:0,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"99:99:99.999"},{Type:REPORT_COLUMN_ID.DATE_ID,Title:"日期",TextAlign:"left",FormatType:0,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999-99-99"},{Type:REPORT_COLUMN_ID.CHECKBOX_ID,Title:"",TextAlign:"center",FixedWidth:20*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID,Title:"",TextAlign:"center",FixedWidth:20*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.CUSTOM_BUTTON_ID,Title:"",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID,Title:"进度条",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.CUSTOM_LINK_ID,Title:"链接地址",TextAlign:"center",MaxText:"擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.FUTURES_POSITION_ID,Title:"持仓量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Vol,Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.FUTURES_CLOSE_ID,Title:"结算价",TextAlign:"right",Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.FUTURES_YCLOSE_ID,Title:"昨结算价",TextAlign:"right",Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.FUTURES_OPEN_POSITION_ID,Title:"开仓量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.FUTURES_CLOSE_POSITION_ID,Title:"平仓量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.RISING_SPEED_1M_ID,Title:"涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.RISING_SPEED_3M_ID,Title:"3分涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.RISING_SPEED_5M_ID,Title:"5分涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.RISING_SPEED_10M_ID,Title:"10分涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.RISING_SPEED_15M_ID,Title:"15分涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER1_ID,Title:"数值1",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER2_ID,Title:"数值2",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER3_ID,Title:"数值3",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER4_ID,Title:"数值4",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER5_ID,Title:"数值5",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER6_ID,Title:"数值6",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER7_ID,Title:"数值7",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER8_ID,Title:"数值8",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER9_ID,Title:"数值9",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER10_ID,Title:"数值10",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_STRING1_ID,Title:"文字1",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING2_ID,Title:"文字2",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING3_ID,Title:"文字3",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING4_ID,Title:"文字4",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING5_ID,Title:"文字5",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING6_ID,Title:"文字6",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING7_ID,Title:"文字7",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING8_ID,Title:"文字8",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING9_ID,Title:"文字9",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING10_ID,Title:"文字10",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR1_ID,Title:"进度条1",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR2_ID,Title:"进度条2",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR3_ID,Title:"进度条3",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR4_ID,Title:"进度条4",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR5_ID,Title:"进度条5",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR6_ID,Title:"进度条6",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR7_ID,Title:"进度条7",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR8_ID,Title:"进度条8",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR9_ID,Title:"进度条9",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR10_ID,Title:"进度条10",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()}];for(var i=0;i<DEFAULT_COLUMN.length;++i){var item=DEFAULT_COLUMN[i];if(item.Type==id)return item;}return null;};this.ClipClient=function(){this.Canvas.save();this.Canvas.beginPath();this.Canvas.rect(this.RectClient.Left,this.RectClient.Top,this.RectClient.Right-this.RectClient.Left,this.RectClient.Bottom-this.RectClient.Top);//this.Canvas.stroke(); //调试用
|
|
12971
|
+
{Type:REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID,Title:"自定义",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.CUSTOM_NUMBER_TEXT_ID,Title:"自定义",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.CUSTOM_DATETIME_TEXT_ID,Title:"自定义",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999-99-99"},{Type:REPORT_COLUMN_ID.CUSTOM_ICON_ID,Title:" ",TextAlign:"left",FixedWidth:20,TextColor:g_JSChartResource.Report.FieldColor.Text},{Type:REPORT_COLUMN_ID.KLINE_ID,Title:"K线",TextAlign:"left",FixedWidth:50,TextColor:g_JSChartResource.Report.FieldColor.Text},{Type:REPORT_COLUMN_ID.TIME_ID,Title:"时间",TextAlign:"left",ValueType:0,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"99:99:99.999"},{Type:REPORT_COLUMN_ID.DATE_ID,Title:"日期",TextAlign:"left",FormatType:0,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999-99-99"},{Type:REPORT_COLUMN_ID.CHECKBOX_ID,Title:"",TextAlign:"center",FixedWidth:20*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID,Title:"",TextAlign:"center",FixedWidth:20*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.CUSTOM_BUTTON_ID,Title:"",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID,Title:"进度条",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.CUSTOM_LINK_ID,Title:"链接地址",TextAlign:"center",MaxText:"擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.FUTURES_POSITION_ID,Title:"持仓量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Vol,Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.FUTURES_CLOSE_ID,Title:"结算价",TextAlign:"right",Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.FUTURES_YCLOSE_ID,Title:"昨结算价",TextAlign:"right",Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.FUTURES_OPEN_POSITION_ID,Title:"开仓量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.FUTURES_CLOSE_POSITION_ID,Title:"平仓量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.RISING_SPEED_1M_ID,Title:"涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.RISING_SPEED_3M_ID,Title:"3分涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.RISING_SPEED_5M_ID,Title:"5分涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.RISING_SPEED_10M_ID,Title:"10分涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.RISING_SPEED_15M_ID,Title:"15分涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER1_ID,Title:"数值1",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER2_ID,Title:"数值2",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER3_ID,Title:"数值3",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER4_ID,Title:"数值4",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER5_ID,Title:"数值5",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER6_ID,Title:"数值6",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER7_ID,Title:"数值7",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER8_ID,Title:"数值8",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER9_ID,Title:"数值9",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER10_ID,Title:"数值10",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_STRING1_ID,Title:"文字1",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING2_ID,Title:"文字2",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING3_ID,Title:"文字3",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING4_ID,Title:"文字4",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING5_ID,Title:"文字5",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING6_ID,Title:"文字6",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING7_ID,Title:"文字7",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING8_ID,Title:"文字8",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING9_ID,Title:"文字9",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING10_ID,Title:"文字10",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR1_ID,Title:"进度条1",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR2_ID,Title:"进度条2",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR3_ID,Title:"进度条3",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR4_ID,Title:"进度条4",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR5_ID,Title:"进度条5",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR6_ID,Title:"进度条6",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR7_ID,Title:"进度条7",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR8_ID,Title:"进度条8",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR9_ID,Title:"进度条9",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR10_ID,Title:"进度条10",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON1_ID,Title:"按钮1",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON2_ID,Title:"按钮2",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON3_ID,Title:"按钮3",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON4_ID,Title:"按钮4",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON5_ID,Title:"按钮5",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON6_ID,Title:"按钮6",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON7_ID,Title:"按钮7",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON8_ID,Title:"按钮8",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON9_ID,Title:"按钮9",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON10_ID,Title:"按钮10",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()}];for(var i=0;i<DEFAULT_COLUMN.length;++i){var item=DEFAULT_COLUMN[i];if(item.Type==id)return item;}return null;};this.ClipClient=function(){this.Canvas.save();this.Canvas.beginPath();this.Canvas.rect(this.RectClient.Left,this.RectClient.Top,this.RectClient.Right-this.RectClient.Left,this.RectClient.Bottom-this.RectClient.Top);//this.Canvas.stroke(); //调试用
|
|
12959
12972
|
this.Canvas.clip();};this.Draw=function(lastMouseStatus){this.ShowSymbol=[];this.TooltipRect=[];this.ButtonRect=[];this.DevicePixelRatio=GetDevicePixelRatio();this.LastMouseStatus=lastMouseStatus;if(this.GlobalOption)this.GlobalOption.FlashBGCount=0;if(this.SizeChange)this.CalculateSize();else this.UpdateCacheData();this.ClipClient();this.DrawHeader();this.DrawBody();this.Canvas.restore();if(this.Tab&&this.BottomToolbarHeight>0){var bottom=this.ChartBorder.GetBottom();this.Tab.DrawTab(this.RectClient.Left,bottom-this.BottomToolbarHeight,this.RectClient.Right,bottom);this.Tab.DrawScrollbar(this.RectClient.Left,bottom-this.BottomToolbarHeight,this.RectClient.Right,bottom);}this.ClipClient();this.DrawBorder();this.Canvas.restore();this.DrawDragRow();if(this.VScrollbar){var bottom=this.ChartBorder.GetBottom();this.VScrollbar.DrawScrollbar(this.RectClient.Left,this.RectClient.Top+this.HeaderHeight,this.RectClient.Right,bottom-this.BottomToolbarHeight-4);}this.LastMouseStatus=null;this.SizeChange=false;};//更新缓存变量
|
|
12960
12973
|
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 是否重新计算
|
|
12961
12974
|
{if(recalculate)this.CalculateSize();var size=this.RowCount;return size;};this.GetCurrentPageStatus=function()//{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
|
|
@@ -12981,10 +12994,10 @@ if(stock&&stock.NameEx){var nameEx=stock.NameEx;drawInfo.Text=this.TextEllipsis(
|
|
|
12981
12994
|
if(stock){this.DrawLimitPriceBorder(stock.Open,stock,left,top,column.Width);this.GetPriceDrawInfo(stock.Open,stock,data,drawInfo,{LimitBG:true});}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.HIGH_ID){//如果行情最高价为涨停价,则对内容加灰框
|
|
12982
12995
|
if(stock){this.DrawLimitPriceBorder(stock.High,stock,left,top,column.Width);this.GetPriceDrawInfo(stock.High,stock,data,drawInfo,{LimitBG:true});}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.LOW_ID){//如果行情最低价为跌停价,则对内容加灰框
|
|
12983
12996
|
if(stock){this.DrawLimitPriceBorder(stock.Low,stock,left,top,column.Width);this.GetPriceDrawInfo(stock.Low,stock,data,drawInfo,{LimitBG:true});}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.YCLOSE_ID){if(stock)this.GetPriceDrawInfo(stock.YClose,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.BUY_PRICE_ID){if(stock)this.GetPriceDrawInfo(stock.BuyPrice,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.FUTURES_CLOSE_ID||column.Type==REPORT_COLUMN_ID.FUTURES_YCLOSE_ID){var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName])){var value=stock[fieldName];this.GetPriceDrawInfo(value,stock,data,drawInfo);}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.SELL_PRICE_ID){if(stock)this.GetPriceDrawInfo(stock.SellPrice,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.AVERAGE_PRICE_ID){if(stock)this.GetPriceDrawInfo(stock.AvPrice,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.EXCHANGE_RATE_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.Exchange))drawInfo.Text=stock.Exchange.toFixed(2);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.BUY_VOL_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.BuyVol))drawInfo.Text=this.FormatVolString(stock.BuyVol);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.SELL_VOL_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.SellVol))drawInfo.Text=this.FormatVolString(stock.SellVol);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.VOL_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.Vol))drawInfo.Text=this.FormatVolString(stock.Vol);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.VOL_IN_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.VolIn))drawInfo.Text=this.FormatVolString(stock.VolIn);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.VOL_OUT_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.VolOut))drawInfo.Text=this.FormatVolString(stock.VolOut);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.TOTAL_SHARES_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.TotalShares))drawInfo.Text=this.FormatVolString(stock.TotalShares);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.OUTSTANDING_SHARES_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.OutShares))drawInfo.Text=this.FormatVolString(stock.OutShares);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.CIRC_MARKET_VALUE_ID||column.Type==REPORT_COLUMN_ID.MARKET_VALUE_ID||column.Type==REPORT_COLUMN_ID.AMOUNT_ID){var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName]))drawInfo.Text=this.FormatVolString(stock[fieldName]);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.INCREASE_ID||column.Type==REPORT_COLUMN_ID.AMPLITUDE_ID||column.Type==REPORT_COLUMN_ID.UPDOWN_ID||column.Type==REPORT_COLUMN_ID.RISING_SPEED_1M_ID||column.Type==REPORT_COLUMN_ID.RISING_SPEED_3M_ID||column.Type==REPORT_COLUMN_ID.RISING_SPEED_5M_ID||column.Type==REPORT_COLUMN_ID.RISING_SPEED_10M_ID||column.Type==REPORT_COLUMN_ID.RISING_SPEED_15M_ID){var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName])){var value=stock[fieldName];drawInfo.Text=value.toFixed(2);drawInfo.TextColor=this.GetUpDownColor(value,0);}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.FUTURES_POSITION_ID||column.Type==REPORT_COLUMN_ID.FUTURES_OPEN_POSITION_ID||column.Type==REPORT_COLUMN_ID.FUTURES_CLOSE_POSITION_ID){//持仓量原始值输出
|
|
12984
|
-
var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName])){var value=stock[fieldName];drawInfo.Text=value.toFixed(0);}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID){this.GetCustomStringDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_NUMBER_TEXT_ID){this.GetCustomNumberDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_DATETIME_TEXT_ID){this.GetCustomDateTimeDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID){this.GetCustomIconDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CLOSE_LINE_ID){var rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;if(stock)this.DrawLine(stock.CloseLine,column,rtItem);}else if(column.Type==REPORT_COLUMN_ID.KLINE_ID){var rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;this.DrawKLine(stock.KLine,column,rtItem,data);}else if(column.Type==REPORT_COLUMN_ID.TIME_ID){this.FormaTimeDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.DATE_ID){this.FormaDateDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.CHECKBOX_ID){rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;drawInfo.Checked=false;drawInfo.Enable=true;drawInfo.CheckBox=this.CheckBoxConfig;drawInfo.Data=stock;if(stock&&IFrameSplitOperator.IsBool(stock.Checked))drawInfo.Checked=stock.Checked;}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID){rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;this.GetCustomCheckBoxDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID){rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;this.GetCustomButtonDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID){rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;this.GetCustomProgressBarDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID){this.GetCustomLinkDrawInfo(data,column,drawInfo);}else if([REPORT_COLUMN_ID.RESERVE_NUMBER1_ID,REPORT_COLUMN_ID.RESERVE_NUMBER2_ID,REPORT_COLUMN_ID.RESERVE_NUMBER3_ID,REPORT_COLUMN_ID.RESERVE_NUMBER4_ID,REPORT_COLUMN_ID.RESERVE_NUMBER5_ID,REPORT_COLUMN_ID.RESERVE_NUMBER6_ID,REPORT_COLUMN_ID.RESERVE_NUMBER7_ID,REPORT_COLUMN_ID.RESERVE_NUMBER8_ID,REPORT_COLUMN_ID.RESERVE_NUMBER9_ID,REPORT_COLUMN_ID.RESERVE_NUMBER10_ID].includes(column.Type)){this.FormatReserveNumber(column,stock,drawInfo);}else if([REPORT_COLUMN_ID.RESERVE_STRING1_ID,REPORT_COLUMN_ID.RESERVE_STRING2_ID,REPORT_COLUMN_ID.RESERVE_STRING3_ID,REPORT_COLUMN_ID.RESERVE_STRING4_ID,REPORT_COLUMN_ID.RESERVE_STRING5_ID,REPORT_COLUMN_ID.RESERVE_STRING6_ID,REPORT_COLUMN_ID.RESERVE_STRING7_ID,REPORT_COLUMN_ID.RESERVE_STRING8_ID,REPORT_COLUMN_ID.RESERVE_STRING9_ID,REPORT_COLUMN_ID.RESERVE_STRING10_ID].includes(column.Type)){this.FormatReserveString(column,stock,drawInfo);}else if(this.IsReserveProgressBarColumn(column.Type)){this.FormatReserveProgressBar(column,stock,drawInfo);}//拖拽行颜色
|
|
12985
|
-
if(rowType==3)drawInfo.TextColor=this.DragRowTextColor;if(drawInfo.Symbol){this.DrawItemTextEx(drawInfo,x,top,textWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID){this.DrawIconItem(drawInfo,x,top,textWidth);}else if(column.Type==REPORT_COLUMN_ID.CHECKBOX_ID||column.Type==REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID){this.DrawCheckbox(drawInfo,left,top,itemWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID){this.DrawButton(drawInfo,left,top,itemWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID||this.IsReserveProgressBarColumn(column.Type)){this.DrawProgressBar(drawInfo,left,top,itemWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID){this.DrawLinkText(drawInfo,x,top,textWidth);}else{if(data.FlashBG&&data.FlashBG.Data&&column.ID!=undefined){if(data.FlashBG.Data.has(column.ID)){var flashItem=data.FlashBG.Data.get(column.ID);var drawBG={Rect:drawInfo.Rect,BGColor:flashItem.Color};--flashItem.Count;this.DrawItemBG(drawBG);if(this.GlobalOption)++this.GlobalOption.FlashBGCount;}}this.DrawItemBG(drawInfo);if(column.Type==REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID)this.DrawCustomText(drawInfo,column,x,top,textWidth);else this.DrawItemText(drawInfo.Text,drawInfo.TextColor,drawInfo.TextAlign,x,top,textWidth,drawInfo.BGColor);}//tooltip提示
|
|
12997
|
+
var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName])){var value=stock[fieldName];drawInfo.Text=value.toFixed(0);}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID){this.GetCustomStringDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_NUMBER_TEXT_ID){this.GetCustomNumberDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_DATETIME_TEXT_ID){this.GetCustomDateTimeDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID){this.GetCustomIconDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CLOSE_LINE_ID){var rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;if(stock)this.DrawLine(stock.CloseLine,column,rtItem);}else if(column.Type==REPORT_COLUMN_ID.KLINE_ID){var rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;this.DrawKLine(stock.KLine,column,rtItem,data);}else if(column.Type==REPORT_COLUMN_ID.TIME_ID){this.FormaTimeDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.DATE_ID){this.FormaDateDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.CHECKBOX_ID){rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;drawInfo.Checked=false;drawInfo.Enable=true;drawInfo.CheckBox=this.CheckBoxConfig;drawInfo.Data=stock;if(stock&&IFrameSplitOperator.IsBool(stock.Checked))drawInfo.Checked=stock.Checked;}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID){rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;this.GetCustomCheckBoxDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID){rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;this.GetCustomButtonDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID){rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;this.GetCustomProgressBarDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID){this.GetCustomLinkDrawInfo(data,column,drawInfo);}else if([REPORT_COLUMN_ID.RESERVE_NUMBER1_ID,REPORT_COLUMN_ID.RESERVE_NUMBER2_ID,REPORT_COLUMN_ID.RESERVE_NUMBER3_ID,REPORT_COLUMN_ID.RESERVE_NUMBER4_ID,REPORT_COLUMN_ID.RESERVE_NUMBER5_ID,REPORT_COLUMN_ID.RESERVE_NUMBER6_ID,REPORT_COLUMN_ID.RESERVE_NUMBER7_ID,REPORT_COLUMN_ID.RESERVE_NUMBER8_ID,REPORT_COLUMN_ID.RESERVE_NUMBER9_ID,REPORT_COLUMN_ID.RESERVE_NUMBER10_ID].includes(column.Type)){this.FormatReserveNumber(column,stock,drawInfo);}else if([REPORT_COLUMN_ID.RESERVE_STRING1_ID,REPORT_COLUMN_ID.RESERVE_STRING2_ID,REPORT_COLUMN_ID.RESERVE_STRING3_ID,REPORT_COLUMN_ID.RESERVE_STRING4_ID,REPORT_COLUMN_ID.RESERVE_STRING5_ID,REPORT_COLUMN_ID.RESERVE_STRING6_ID,REPORT_COLUMN_ID.RESERVE_STRING7_ID,REPORT_COLUMN_ID.RESERVE_STRING8_ID,REPORT_COLUMN_ID.RESERVE_STRING9_ID,REPORT_COLUMN_ID.RESERVE_STRING10_ID].includes(column.Type)){this.FormatReserveString(column,stock,drawInfo);}else if(this.IsReserveProgressBarColumn(column.Type)){this.FormatReserveProgressBar(column,stock,drawInfo);}else if(this.IsReserveButtonColumn(column.Type)){this.FormatReserveButton(column,stock,drawInfo);}//拖拽行颜色
|
|
12998
|
+
if(rowType==3)drawInfo.TextColor=this.DragRowTextColor;if(drawInfo.Symbol){this.DrawItemTextEx(drawInfo,x,top,textWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID){this.DrawIconItem(drawInfo,x,top,textWidth);}else if(column.Type==REPORT_COLUMN_ID.CHECKBOX_ID||column.Type==REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID){this.DrawCheckbox(drawInfo,left,top,itemWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID||this.IsReserveButtonColumn(column.Type)){this.DrawButton(drawInfo,left,top,itemWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID||this.IsReserveProgressBarColumn(column.Type)){this.DrawProgressBar(drawInfo,left,top,itemWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID){this.DrawLinkText(drawInfo,x,top,textWidth);}else{if(data.FlashBG&&data.FlashBG.Data&&column.ID!=undefined){if(data.FlashBG.Data.has(column.ID)){var flashItem=data.FlashBG.Data.get(column.ID);var drawBG={Rect:drawInfo.Rect,BGColor:flashItem.Color};--flashItem.Count;this.DrawItemBG(drawBG);if(this.GlobalOption)++this.GlobalOption.FlashBGCount;}}this.DrawItemBG(drawInfo);if(column.Type==REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID)this.DrawCustomText(drawInfo,column,x,top,textWidth);else this.DrawItemText(drawInfo.Text,drawInfo.TextColor,drawInfo.TextAlign,x,top,textWidth,drawInfo.BGColor);}//tooltip提示
|
|
12986
12999
|
if(drawInfo.Tooltip){//Type:1=数据截断
|
|
12987
|
-
var tooltipData={Rect:rtItem,Stock:stock,Index:index,Column:column,RowType:rowType,Type:drawInfo.Tooltip.Type,Data:drawInfo.Tooltip.Data};this.TooltipRect.push(tooltipData);}if(drawInfo.Botton){var buttonData={Stock:stock,Index:index,ColumnIndex:columnIndex,Column:column,Rect:drawInfo.Botton.Rect,Type:drawInfo.Botton.Type,Data:drawInfo.Data};this.ButtonRect.push(buttonData);}};this.IsReserveProgressBarColumn=function(value){var ARARY_TYPE=[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR1_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR2_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR3_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR4_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR5_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR6_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR7_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR8_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR9_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR10_ID];return ARARY_TYPE.includes(value);};this.DrawCustomText=function(drawInfo,column,left,top,cellWidth){if(!drawInfo.Text)return;var text=drawInfo.Text;var x=left;if(drawInfo.TextAlign=='center'){x=left+cellWidth/2;this.Canvas.textAlign="center";}else if(drawInfo.TextAlign=='right'){x=left+cellWidth-2;this.Canvas.textAlign="right";}else{x+=2;this.Canvas.textAlign="left";}var textWidth=this.Canvas.measureText(text).width+1;var bClip=false;if(textWidth>=cellWidth)//长度超过单元格 裁剪
|
|
13000
|
+
var tooltipData={Rect:rtItem,Stock:stock,Index:index,Column:column,RowType:rowType,Type:drawInfo.Tooltip.Type,Data:drawInfo.Tooltip.Data};this.TooltipRect.push(tooltipData);}if(drawInfo.Botton){var buttonData={Stock:stock,Index:index,ColumnIndex:columnIndex,Column:column,Rect:drawInfo.Botton.Rect,Type:drawInfo.Botton.Type,Data:drawInfo.Data};this.ButtonRect.push(buttonData);}};this.IsReserveProgressBarColumn=function(value){var ARARY_TYPE=[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR1_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR2_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR3_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR4_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR5_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR6_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR7_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR8_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR9_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR10_ID];return ARARY_TYPE.includes(value);};this.IsReserveButtonColumn=function(value){var ARARY_TYPE=[REPORT_COLUMN_ID.RESERVE_BUTTON1_ID,REPORT_COLUMN_ID.RESERVE_BUTTON2_ID,REPORT_COLUMN_ID.RESERVE_BUTTON3_ID,REPORT_COLUMN_ID.RESERVE_BUTTON4_ID,REPORT_COLUMN_ID.RESERVE_BUTTON5_ID,REPORT_COLUMN_ID.RESERVE_BUTTON6_ID,REPORT_COLUMN_ID.RESERVE_BUTTON7_ID,REPORT_COLUMN_ID.RESERVE_BUTTON8_ID,REPORT_COLUMN_ID.RESERVE_BUTTON9_ID,REPORT_COLUMN_ID.RESERVE_BUTTON10_ID];return ARARY_TYPE.includes(value);};this.DrawCustomText=function(drawInfo,column,left,top,cellWidth){if(!drawInfo.Text)return;var text=drawInfo.Text;var x=left;if(drawInfo.TextAlign=='center'){x=left+cellWidth/2;this.Canvas.textAlign="center";}else if(drawInfo.TextAlign=='right'){x=left+cellWidth-2;this.Canvas.textAlign="right";}else{x+=2;this.Canvas.textAlign="left";}var textWidth=this.Canvas.measureText(text).width+1;var bClip=false;if(textWidth>=cellWidth)//长度超过单元格 裁剪
|
|
12988
13001
|
{if(column.FormatType==2){var count=text.length+5;text="";for(var i=0;i<count;++i){text+="#";}}else if(column.FormatType==1){text=this.TextEllipsis(text,cellWidth,column.MaxText);}this.Canvas.save();bClip=true;var rtCell={Left:left,Top:top+this.ItemMergin.Top,Width:cellWidth,Height:this.RowHeight};this.Canvas.beginPath();this.Canvas.rect(rtCell.Left,rtCell.Top,rtCell.Width,rtCell.Height);//this.Canvas.stroke(); //调试用
|
|
12989
13002
|
this.Canvas.clip();//数据截断提示信息
|
|
12990
13003
|
drawInfo.Tooltip={Type:1,Data:{AryText:[{Text:drawInfo.Text}]}};}this.Canvas.textBaseline="bottom";this.Canvas.fillStyle=drawInfo.TextColor;this.Canvas.fillText(text,x,top+this.RowHeight-this.ItemMergin.Bottom);if(bClip)this.Canvas.restore();};this.DrawSymbolName=function(data,column,left,top,rowType){var stock=data.Stock;var symbol=IFrameSplitOperator.RemoveMarketSuffix(data.Symbol);var name;if(stock){symbol=stock.Symbol;name=stock.Name;}if(!symbol&&!name)return;var y=top+this.ItemMergin.Top+this.ItemNameHeight;var textLeft=left+this.ItemMergin.Left;var x=textLeft;var width=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;var textAlign=column.TextAlign;if(textAlign=='center'){x=textLeft+width/2;this.Canvas.textAlign="center";}else if(textAlign=='right'){x=textLeft+width-2;this.Canvas.textAlign="right";}else{x+=2;this.Canvas.textAlign="left";}var textColor=this.GetNameColor(column,symbol,rowType);var text=name;if(text){this.Canvas.textBaseline="bottom";this.Canvas.fillStyle=textColor;this.Canvas.font=this.ItemNameFont;text=this.TextEllipsis(text,width,column.MaxText);if(text)this.Canvas.fillText(text,x,y);}text=symbol;if(text){this.Canvas.textBaseline="bottom";this.Canvas.font=this.ItemSymbolFont;this.Canvas.fillStyle=textColor;this.Canvas.fillText(text,x,y+this.ItemSymbolHeight);}this.Canvas.font=this.ItemFont;//还原字体
|
|
@@ -12999,7 +13012,7 @@ switch(column.ColorType){case 1:drawInfo.TextColor=this.GetUpDownColor(value,0);
|
|
|
12999
13012
|
drawInfo.Data=barData;if(IFrameSplitOperator.IsBool(barData.Enable))drawInfo.Enable=barData.Enable;if(barData.TextColor)drawInfo.TextColor=barData.TextColor;if(barData.BarColor)drawInfo.BarColor=barData.BarColor;if(barData.BGColor)drawInfo.BGColor=barData.BGColor;};this.GetCustomLinkDrawInfo=function(data,column,drawInfo){var linkData=this.GetExtendData(data,column);if(!linkData)return;drawInfo.Text=linkData.Title;drawInfo.Link=column.Link;drawInfo.Enable=true;drawInfo.Data=linkData;drawInfo.MaxText=column.MaxText;if(IFrameSplitOperator.IsBool(linkData.Enable))drawInfo.Enable=linkData.Enable;if(linkData.TextColor)drawInfo.TextColor=linkData.TextColor;};this.FormatReserveNumber=function(column,data,drawInfo){if(column.DefaultText)drawInfo.Text=column.DefaultText;var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(!data||!fieldName)return;var value=data[fieldName];if(!IFrameSplitOperator.IsNumber(value))return;if(IFrameSplitOperator.IsNumber(column.ColorType)){if(column.ColorType==1){drawInfo.TextColor=this.GetUpDownColor(value,0);}else if(column.ColorType==2){drawInfo.TextColor=this.GetUpDownColorV2(value,0);}}//TODO: 不同类型的 格式化输出
|
|
13000
13013
|
drawInfo.Text=value.toFixed(column.FloatPrecision);};this.FormatReserveString=function(column,data,drawInfo){if(column.DefaultText)drawInfo.Text=column.DefaultText;var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(!data||!fieldName)return;var item=data[fieldName];if(IFrameSplitOperator.IsObject(item)){if(item.Text)drawInfo.Text=item.Text;if(item.TextColor)drawInfo.TextColor=item.TextColor;if(item.BGColor)drawInfo.BGColor=item.BGColor;}else if(IFrameSplitOperator.IsString(item)){drawInfo.Text=item;}};this.FormatReserveProgressBar=function(column,data,drawInfo){var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(!data||!fieldName)return;var item=data[fieldName];if(IFrameSplitOperator.IsNumber(item)){drawInfo.ProgressBar=column.ProgressBar;drawInfo.Enable=true;drawInfo.Value=item;//占比
|
|
13001
13014
|
drawInfo.Data={Value:item};}else if(IFrameSplitOperator.IsObject(item)){if(item.Title)drawInfo.Text=item.Title;drawInfo.ProgressBar=column.ProgressBar;drawInfo.Enable=true;drawInfo.Value=item.Value;//占比
|
|
13002
|
-
drawInfo.Data=item;if(IFrameSplitOperator.IsBool(item.Enable))drawInfo.Enable=item.Enable;if(item.TextColor)drawInfo.TextColor=item.TextColor;if(item.BarColor)drawInfo.BarColor=item.BarColor;if(item.BGColor)drawInfo.BGColor=item.BGColor;}};this.FormaTimeDrawInfo=function(column,stock,drawInfo,data){if(!IFrameSplitOperator.IsNumber(stock.Time))return;if(column.ValueType==0)//0=hhmm 1=hhmmss 2=hhmmss.fff
|
|
13015
|
+
drawInfo.Data=item;if(IFrameSplitOperator.IsBool(item.Enable))drawInfo.Enable=item.Enable;if(item.TextColor)drawInfo.TextColor=item.TextColor;if(item.BarColor)drawInfo.BarColor=item.BarColor;if(item.BGColor)drawInfo.BGColor=item.BGColor;}};this.FormatReserveButton=function(column,data,drawInfo){var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(!data||!fieldName)return;var item=data[fieldName];if(!item)return;drawInfo.Text=item.Title;drawInfo.Button=column.Button;drawInfo.Font=column.Button.Font;drawInfo.Enable=true;drawInfo.Data=item;if(IFrameSplitOperator.IsBool(item.Enable))drawInfo.Enable=item.Enable;};this.FormaTimeDrawInfo=function(column,stock,drawInfo,data){if(!IFrameSplitOperator.IsNumber(stock.Time))return;if(column.ValueType==0)//0=hhmm 1=hhmmss 2=hhmmss.fff
|
|
13003
13016
|
{drawInfo.Text=IFrameSplitOperator.FormatTimeString(stock.Time,"HH:MM");}else if(column.ValueType==1){drawInfo.Text=IFrameSplitOperator.FormatTimeString(stock.Time,"HH:MM:SS");}else if(column.ValueType==2){drawInfo.Text=IFrameSplitOperator.FormatTimeString(stock.Time,"HH:MM:SS.fff");}};this.FormaDateDrawInfo=function(column,stock,drawInfo,data){if(!IFrameSplitOperator.IsNumber(stock.Date))return;if(column.FormatType==0)drawInfo.Text=IFrameSplitOperator.FormatDateString(stock.Date,"YYYY-MM-DD");else if(column.FormatType==1)drawInfo.Text=IFrameSplitOperator.FormatDateString(stock.Date,"YYYY/MM/DD");else if(column.FormatType==2)drawInfo.Text=IFrameSplitOperator.FormatDateString(stock.Date,"YYYY/MM/DD/W");else if(column.FormatType==3)drawInfo.Text=IFrameSplitOperator.FormatDateString(stock.Date,"YYYY-MM");else if(column.FormatType==4)drawInfo.Text=IFrameSplitOperator.FormatDateString(stock.Date,"MM/DD");else if(column.FormatType==4)drawInfo.Text=IFrameSplitOperator.FormatDateString(stock.Date,"MM-DD");};//自定义图标
|
|
13004
13017
|
this.GetCustomIconData=function(columnInfo,symbol,drawInfo,data){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_DRAW_CUSTOM_ICON);if(!event||!event.Callback)return false;var sendData={Symbol:symbol,Column:columnInfo,Data:data,Out:{Text:null,TextColor:null,TextAlign:null,Font:null}};event.Callback(event,sendData,this);if(sendData.Out.Text)drawInfo.Text=sendData.Out.Text;if(sendData.Out.TextColor)drawInfo.TextColor=sendData.Out.TextColor;if(sendData.Out.TextAlign)drawInfo.TextAlign=sendData.Out.TextAlign;if(sendData.Out.BGColor)drawInfo.BGColor=sendData.Out.BGColor;if(sendData.Out.Font)drawInfo.Font=sendData.Out.Font;return true;};this.GetPriceDrawInfo=function(price,stock,data,drawInfo,option){if(!IFrameSplitOperator.IsNumber(price))return false;drawInfo.Text=price.toFixed(data.Decimal);var yClose=null;if(stock.PriceColorType===1)//昨结算价 计算颜色
|
|
13005
13018
|
{if(IFrameSplitOperator.IsNumber(stock.YFClose))yClose=stock.YFClose;}else//昨收价 计算颜色
|
|
@@ -13013,7 +13026,8 @@ this.Canvas.clip();if(this.TextOverflowStyle==1){var count=text.length+5;text=""
|
|
|
13013
13026
|
this.DrawItemTextEx=function(drawInfo,left,top,width){var text=drawInfo.Text;var clrText=drawInfo.TextColor;var symbol=drawInfo.Symbol;//符号
|
|
13014
13027
|
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;//鼠标在上面
|
|
13015
13028
|
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 进度条
|
|
13016
|
-
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;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);}}
|
|
13029
|
+
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);}};//创建渐近色
|
|
13030
|
+
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;//数据截断提示信息
|
|
13017
13031
|
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;//下划线
|
|
13018
13032
|
if(drawInfo.Enable===false){color=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>rtText.Left&&x<rtText.Right&&y>rtText.Top&&y<rtText.Bottom){color=config.MouseOn.TextColor;drawLine=true;this.LastMouseStatus.MouseOnStatus={Index:drawInfo.Index,ColumnIndex:drawInfo.ColumnIndex,Type:2};}}this.Canvas.textBaseline="bottom";this.Canvas.textAlign="left";this.Canvas.fillStyle=color;this.Canvas.fillText(text,rtText.Left,rtText.Bottom);if(drawLine){this.Canvas.strokeStyle=color;this.Canvas.beginPath();this.Canvas.moveTo(rtText.Left,rtText.Bottom);this.Canvas.lineTo(rtText.Right,rtText.Bottom);this.Canvas.stroke();}if(drawInfo.Enable){drawInfo.Botton={Rect:rtText,Type:2};}};//字体由外面设置
|
|
13019
13033
|
this.TextEllipsis=function(text,maxWidth,maxText){if(!text)return null;if(text.length<maxText.length)return text;var start=maxText.length-3;if(start<0)return null;var newText=text.slice(0,start);for(var i=start;i<text.length;++i){var value=newText+text[i]+"...";var width=this.Canvas.measureText(value).width;if(width>maxWidth){newText+="...";break;}newText+=text[i];}return newText;};this.DrawMultiBar=function(colunmInfo,data,rtItem){if(!data.Source||!IFrameSplitOperator.IsNonEmptyArray(data.Source))return false;var barData=data.Source[colunmInfo.DataIndex];//{ Value:[0.4,0,2], Color:[0,1] };
|
|
@@ -13998,7 +14012,8 @@ var divInput=document.createElement("div");divInput.className="UMyChart_SearchIn
|
|
|
13998
14012
|
var divContainer=document.createElement("div");divContainer.className="UMyChart_SearchIndex_Container_Div";divDom.appendChild(divContainer);//分类
|
|
13999
14013
|
var divGroup=document.createElement("div");divGroup.className="UMyChart_SearchIndex_GroupList_Div";divContainer.appendChild(divGroup);for(var i=0,j=0;i<this.MaxGroupCount;++i){var groupItem={Div:null,Span:null};var divItem=document.createElement("div");divItem.className="UMyChart_SearchIndex_Group_Div";divGroup.appendChild(divItem);groupItem.Div=divItem;var spanDom=document.createElement("span");spanDom.className='UMyChart_SearchIndex_Group_Span';spanDom.innerText='分类名称';divItem.appendChild(spanDom);groupItem.Span=spanDom;spanDom.onmousedown=function(e){_this96.OnClickGroup(e);};this.AryGroup.push(groupItem);}//表格
|
|
14000
14014
|
var divTable=document.createElement("div");divTable.className='UMyChart_SearchIndex_Table_Div';divContainer.appendChild(divTable);var table=document.createElement("table");table.className="UMyChart_SearchIndex_Table";divTable.appendChild(table);var tbody=document.createElement("tbody");tbody.className="UMyChart_SearchIndex_Tbody";table.appendChild(tbody);this.AryData=[];for(var i=0,j=0;i<this.MaxRowCount;++i){var rowItem={Tr:null,AryCell:[]};var trDom=document.createElement("tr");trDom.className='UMyChart_SearchIndex_Group_Tr';tbody.appendChild(trDom);rowItem.Tr=trDom;for(j=0;j<this.ColCount;++j){var cellItem=this.CreateCellDOM(i,j,trDom);rowItem.AryCell.push(cellItem);}this.AryData.push(rowItem);}document.body.appendChild(divDom);this.DivName=divName;this.DivDialog=divDom;this.TitleBox={DivTitle:divTitle,DivName:divName,DivColor:divClose};this.UpdateStyle();};this.CreateCellDOM=function(rowID,colID,trDom){var _this97=this;var cellItem={Td:null,Span:null,RowID:rowID,ColID:colID,IndexItem:null};var tdDom=document.createElement("td");tdDom.className="UMyChart_SearchIndex_Text_Td";//指标名称
|
|
14001
|
-
trDom.appendChild(tdDom);cellItem.Td=tdDom;var spanDom=document.createElement("span");spanDom.className='UMyChart_SearchIndex_Text_Span';spanDom.innerText='指标名称';spanDom.onmousedown=function(e){_this97.OnClickIndex(e,cellItem);};tdDom.appendChild(spanDom);cellItem.Span=spanDom;return cellItem;};this.OnClickIndex=function(e,cellItem){if(!this.OpData)return;if(!cellItem||!cellItem.IndexItem)return;
|
|
14015
|
+
trDom.appendChild(tdDom);cellItem.Td=tdDom;var spanDom=document.createElement("span");spanDom.className='UMyChart_SearchIndex_Text_Span';spanDom.innerText='指标名称';spanDom.onmousedown=function(e){_this97.OnClickIndex(e,cellItem);};tdDom.appendChild(spanDom);cellItem.Span=spanDom;return cellItem;};this.OnClickIndex=function(e,cellItem){if(!this.OpData)return;if(!cellItem||!cellItem.IndexItem)return;var event=this.HQChart.GetEventCallback(JSCHART_EVENT_ID.SEARCH_DIALOG_ON_CLICK_INDEX);if(event&&event.Callback){var sendData={OpData:this.OpData,IndexData:cellItem.IndexItem,HQChart:this.HQChart,PreventDefault:false};event.Callback(event,sendData,this);if(sendData.PreventDefault==true)return;//已被上层处理了
|
|
14016
|
+
}if(this.OpData.OpType==1){if(!IFrameSplitOperator.IsNumber(this.OpData.WindowIndex))return;var indexItem=cellItem.IndexItem;if(indexItem.Type==0)//系统指标
|
|
14002
14017
|
{this.HQChart.ChangeIndex(this.OpData.WindowIndex,indexItem.ID);}else if(indexItem.Type==1)//自定义脚本指标
|
|
14003
14018
|
{var indexData={ID:indexItem.ID,Name:indexItem.Name,Script:indexItem.Script,Args:indexItem.Args};this.HQChart.ChangeScriptIndex(this.OpData.WindowIndex,indexData);}else if(indexItem.Type==2)//api指标
|
|
14004
14019
|
{var indedData={API:{ID:indexItem.ID,Name:indexItem.Name,Args:indexItem.Args,Url:'local'}};this.HQChart.ChangeAPIIndex(this.OpData.WindowIndex,indedData);}}else if(this.OpData.OpType==2){if(!IFrameSplitOperator.IsNumber(this.OpData.WindowIndex))return;var indexItem=cellItem.IndexItem;if(indexItem.Type==0)//系统指标
|
|
@@ -14062,7 +14077,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
14062
14077
|
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);};}/********************************************************************************
|
|
14063
14078
|
* 版本信息输出
|
|
14064
14079
|
*
|
|
14065
|
-
*/var HQCHART_VERSION="1.1.
|
|
14080
|
+
*/var HQCHART_VERSION="1.1.14107";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();//把给外界调用的方法暴露出来
|
|
14066
14081
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
14067
14082
|
// BaseIndex:BaseIndex,
|
|
14068
14083
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
|
@@ -286,6 +286,15 @@ function JSDialogSearchIndex()
|
|
|
286
286
|
if (!this.OpData) return;
|
|
287
287
|
if (!cellItem || !cellItem.IndexItem) return;
|
|
288
288
|
|
|
289
|
+
var event=this.HQChart.GetEventCallback(JSCHART_EVENT_ID.SEARCH_DIALOG_ON_CLICK_INDEX);
|
|
290
|
+
if (event && event.Callback)
|
|
291
|
+
{
|
|
292
|
+
var sendData={ OpData:this.OpData, IndexData:cellItem.IndexItem, HQChart:this.HQChart, PreventDefault:false };
|
|
293
|
+
event.Callback(event, sendData, this);
|
|
294
|
+
|
|
295
|
+
if (sendData.PreventDefault==true) return; //已被上层处理了
|
|
296
|
+
}
|
|
297
|
+
|
|
289
298
|
if (this.OpData.OpType==1)
|
|
290
299
|
{
|
|
291
300
|
if (!IFrameSplitOperator.IsNumber(this.OpData.WindowIndex)) return;
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -1537,6 +1537,19 @@ function JSReportChartContainer(uielement)
|
|
|
1537
1537
|
if (IFrameSplitOperator.IsNumber(item[308]) || IFrameSplitOperator.IsObject(item[308])) stock.ReserveProgressBar8=item[308];
|
|
1538
1538
|
if (IFrameSplitOperator.IsNumber(item[309]) || IFrameSplitOperator.IsObject(item[309])) stock.ReserveProgressBar9=item[309];
|
|
1539
1539
|
if (IFrameSplitOperator.IsNumber(item[310]) || IFrameSplitOperator.IsObject(item[310])) stock.ReserveProgressBar10=item[310];
|
|
1540
|
+
|
|
1541
|
+
//10个按钮 351-400 { Title, Enable:, BGColor, TextColor: }
|
|
1542
|
+
if (IFrameSplitOperator.IsObject(item[351])) stock.ReserveButton1=item[351];
|
|
1543
|
+
if (IFrameSplitOperator.IsObject(item[352])) stock.ReserveButton2=item[352];
|
|
1544
|
+
if (IFrameSplitOperator.IsObject(item[353])) stock.ReserveButton3=item[353];
|
|
1545
|
+
if (IFrameSplitOperator.IsObject(item[354])) stock.ReserveButton4=item[354];
|
|
1546
|
+
if (IFrameSplitOperator.IsObject(item[355])) stock.ReserveButton5=item[355];
|
|
1547
|
+
if (IFrameSplitOperator.IsObject(item[356])) stock.ReserveButton6=item[356];
|
|
1548
|
+
if (IFrameSplitOperator.IsObject(item[357])) stock.ReserveButton7=item[357];
|
|
1549
|
+
if (IFrameSplitOperator.IsObject(item[358])) stock.ReserveButton8=item[358];
|
|
1550
|
+
if (IFrameSplitOperator.IsObject(item[359])) stock.ReserveButton9=item[359];
|
|
1551
|
+
if (IFrameSplitOperator.IsObject(item[360])) stock.ReserveButton10=item[360];
|
|
1552
|
+
|
|
1540
1553
|
}
|
|
1541
1554
|
|
|
1542
1555
|
|
|
@@ -2002,7 +2015,7 @@ function JSReportChartContainer(uielement)
|
|
|
2002
2015
|
var tooltipData=report.GetTooltipData(x,y); //单元格提示信息
|
|
2003
2016
|
if (tooltipData)
|
|
2004
2017
|
{
|
|
2005
|
-
this.LastMouseStatus.TooltipStatus={ X:e.clientX,
|
|
2018
|
+
this.LastMouseStatus.TooltipStatus={ X:x, Y:y, Data:tooltipData, ClientX:e.clientX, ClientY:e.clientY };
|
|
2006
2019
|
bDrawTooltip=true;
|
|
2007
2020
|
}
|
|
2008
2021
|
}
|
|
@@ -4194,6 +4207,18 @@ var REPORT_COLUMN_ID=
|
|
|
4194
4207
|
RESERVE_PROGRESS_BAR9_ID:409,
|
|
4195
4208
|
RESERVE_PROGRESS_BAR10_ID:410,
|
|
4196
4209
|
|
|
4210
|
+
//留按钮类型 10个 451-500
|
|
4211
|
+
RESERVE_BUTTON1_ID:451, //ReserveButton1:
|
|
4212
|
+
RESERVE_BUTTON2_ID:452, //ReserveButton2:
|
|
4213
|
+
RESERVE_BUTTON3_ID:453, //ReserveButton3:
|
|
4214
|
+
RESERVE_BUTTON4_ID:454, //ReserveButton4:
|
|
4215
|
+
RESERVE_BUTTON5_ID:455, //ReserveButton5:
|
|
4216
|
+
RESERVE_BUTTON6_ID:456, //ReserveButton6:
|
|
4217
|
+
RESERVE_BUTTON7_ID:457, //ReserveButton7:
|
|
4218
|
+
RESERVE_BUTTON8_ID:458, //ReserveButton8:
|
|
4219
|
+
RESERVE_BUTTON9_ID:459, //ReserveButton9:
|
|
4220
|
+
RESERVE_BUTTON10_ID:460, //ReserveButton10:
|
|
4221
|
+
|
|
4197
4222
|
}
|
|
4198
4223
|
|
|
4199
4224
|
|
|
@@ -4278,6 +4303,18 @@ var MAP_COLUMN_FIELD=new Map([
|
|
|
4278
4303
|
[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR8_ID,"ReserveProgressBar8"],
|
|
4279
4304
|
[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR9_ID,"ReserveProgressBar9"],
|
|
4280
4305
|
[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR10_ID,"ReserveProgressBar10"],
|
|
4306
|
+
|
|
4307
|
+
|
|
4308
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON1_ID,"ReserveButton1"],
|
|
4309
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON2_ID,"ReserveButton2"],
|
|
4310
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON3_ID,"ReserveButton3"],
|
|
4311
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON4_ID,"ReserveButton4"],
|
|
4312
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON5_ID,"ReserveButton5"],
|
|
4313
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON6_ID,"ReserveButton6"],
|
|
4314
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON7_ID,"ReserveButton7"],
|
|
4315
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON8_ID,"ReserveButton8"],
|
|
4316
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON9_ID,"ReserveButton9"],
|
|
4317
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON10_ID,"ReserveButton10"],
|
|
4281
4318
|
]);
|
|
4282
4319
|
|
|
4283
4320
|
function ChartReport()
|
|
@@ -4651,6 +4688,11 @@ function ChartReport()
|
|
|
4651
4688
|
if (item.Button) colItem.Button=CloneData(item.Button);
|
|
4652
4689
|
else colItem.Button=this.ButtonConfig;
|
|
4653
4690
|
}
|
|
4691
|
+
else if (this.IsReserveButtonColumn(item.Type))
|
|
4692
|
+
{
|
|
4693
|
+
if (item.Button) colItem.Button=CloneData(item.Button);
|
|
4694
|
+
else colItem.Button=this.ButtonConfig;
|
|
4695
|
+
}
|
|
4654
4696
|
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID)
|
|
4655
4697
|
{
|
|
4656
4698
|
if (!IFrameSplitOperator.IsNumber(item.DataIndex) && !IFrameSplitOperator.IsNumber(item.BlockIndex)) continue;
|
|
@@ -4849,6 +4891,17 @@ function ChartReport()
|
|
|
4849
4891
|
{ Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR8_ID, Title:"进度条8", TextAlign:"center", FixedWidth:100*GetDevicePixelRatio() },
|
|
4850
4892
|
{ Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR9_ID, Title:"进度条9", TextAlign:"center", FixedWidth:100*GetDevicePixelRatio() },
|
|
4851
4893
|
{ Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR10_ID, Title:"进度条10", TextAlign:"center", FixedWidth:100*GetDevicePixelRatio() },
|
|
4894
|
+
|
|
4895
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON1_ID, Title:"按钮1", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
4896
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON2_ID, Title:"按钮2", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
4897
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON3_ID, Title:"按钮3", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
4898
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON4_ID, Title:"按钮4", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
4899
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON5_ID, Title:"按钮5", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
4900
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON6_ID, Title:"按钮6", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
4901
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON7_ID, Title:"按钮7", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
4902
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON8_ID, Title:"按钮8", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
4903
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON9_ID, Title:"按钮9", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
4904
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON10_ID, Title:"按钮10", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
4852
4905
|
|
|
4853
4906
|
];
|
|
4854
4907
|
|
|
@@ -5953,6 +6006,10 @@ function ChartReport()
|
|
|
5953
6006
|
{
|
|
5954
6007
|
this.FormatReserveProgressBar(column, stock, drawInfo);
|
|
5955
6008
|
}
|
|
6009
|
+
else if (this.IsReserveButtonColumn(column.Type))
|
|
6010
|
+
{
|
|
6011
|
+
this.FormatReserveButton(column, stock, drawInfo);
|
|
6012
|
+
}
|
|
5956
6013
|
|
|
5957
6014
|
|
|
5958
6015
|
//拖拽行颜色
|
|
@@ -5971,7 +6028,7 @@ function ChartReport()
|
|
|
5971
6028
|
{
|
|
5972
6029
|
this.DrawCheckbox(drawInfo, left, top, itemWidth);
|
|
5973
6030
|
}
|
|
5974
|
-
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID)
|
|
6031
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID || this.IsReserveButtonColumn(column.Type))
|
|
5975
6032
|
{
|
|
5976
6033
|
this.DrawButton(drawInfo, left, top, itemWidth);
|
|
5977
6034
|
}
|
|
@@ -6033,6 +6090,18 @@ function ChartReport()
|
|
|
6033
6090
|
return ARARY_TYPE.includes(value);
|
|
6034
6091
|
}
|
|
6035
6092
|
|
|
6093
|
+
this.IsReserveButtonColumn=function(value)
|
|
6094
|
+
{
|
|
6095
|
+
var ARARY_TYPE=
|
|
6096
|
+
[
|
|
6097
|
+
REPORT_COLUMN_ID.RESERVE_BUTTON1_ID, REPORT_COLUMN_ID.RESERVE_BUTTON2_ID,REPORT_COLUMN_ID.RESERVE_BUTTON3_ID,
|
|
6098
|
+
REPORT_COLUMN_ID.RESERVE_BUTTON4_ID,REPORT_COLUMN_ID.RESERVE_BUTTON5_ID,REPORT_COLUMN_ID.RESERVE_BUTTON6_ID,REPORT_COLUMN_ID.RESERVE_BUTTON7_ID,
|
|
6099
|
+
REPORT_COLUMN_ID.RESERVE_BUTTON8_ID,REPORT_COLUMN_ID.RESERVE_BUTTON9_ID,REPORT_COLUMN_ID.RESERVE_BUTTON10_ID
|
|
6100
|
+
];
|
|
6101
|
+
|
|
6102
|
+
return ARARY_TYPE.includes(value);
|
|
6103
|
+
}
|
|
6104
|
+
|
|
6036
6105
|
this.DrawCustomText=function(drawInfo, column, left, top, cellWidth)
|
|
6037
6106
|
{
|
|
6038
6107
|
if (!drawInfo.Text) return;
|
|
@@ -6480,6 +6549,22 @@ function ChartReport()
|
|
|
6480
6549
|
}
|
|
6481
6550
|
}
|
|
6482
6551
|
|
|
6552
|
+
this.FormatReserveButton=function(column, data, drawInfo)
|
|
6553
|
+
{
|
|
6554
|
+
var fieldName=MAP_COLUMN_FIELD.get(column.Type);
|
|
6555
|
+
if (!data || !fieldName) return;
|
|
6556
|
+
var item=data[fieldName];
|
|
6557
|
+
if (!item) return;
|
|
6558
|
+
|
|
6559
|
+
drawInfo.Text=item.Title;
|
|
6560
|
+
drawInfo.Button=column.Button;
|
|
6561
|
+
drawInfo.Font=column.Button.Font;
|
|
6562
|
+
drawInfo.Enable=true;
|
|
6563
|
+
drawInfo.Data=item;
|
|
6564
|
+
|
|
6565
|
+
if (IFrameSplitOperator.IsBool(item.Enable)) drawInfo.Enable=item.Enable;
|
|
6566
|
+
}
|
|
6567
|
+
|
|
6483
6568
|
this.FormaTimeDrawInfo=function(column, stock, drawInfo, data)
|
|
6484
6569
|
{
|
|
6485
6570
|
if (!IFrameSplitOperator.IsNumber(stock.Time)) return;
|
|
@@ -6931,8 +7016,9 @@ function ChartReport()
|
|
|
6931
7016
|
rtBar.Width=fullBarWidth*value;
|
|
6932
7017
|
rtBar.Height=rtBar.Bottom-rtBar.Top;
|
|
6933
7018
|
if (rtBar.Width<1) rtBG.Width=1;
|
|
6934
|
-
|
|
6935
|
-
this.Canvas.fillStyle=barColor;
|
|
7019
|
+
|
|
7020
|
+
if (Array.isArray(barColor)) this.Canvas.fillStyle=this.CreateLinearGradient(barColor, rtBG.Left, rtBG.Top, rtBG.Right, rtBG.Top);
|
|
7021
|
+
else this.Canvas.fillStyle=barColor;
|
|
6936
7022
|
this.Canvas.fillRect(rtBar.Left, rtBar.Top,rtBar.Width,rtBar.Height);
|
|
6937
7023
|
}
|
|
6938
7024
|
|
|
@@ -6949,6 +7035,20 @@ function ChartReport()
|
|
|
6949
7035
|
}
|
|
6950
7036
|
}
|
|
6951
7037
|
|
|
7038
|
+
//创建渐近色
|
|
7039
|
+
this.CreateLinearGradient=function(aryColor, x0, y0, x1, y1)
|
|
7040
|
+
{
|
|
7041
|
+
var gradient = this.Canvas.createLinearGradient(x0, y0, x1, y1);
|
|
7042
|
+
var offset=1/(aryColor.length-1);
|
|
7043
|
+
for(var i=0; i<aryColor.length; ++i)
|
|
7044
|
+
{
|
|
7045
|
+
var value=i*offset;
|
|
7046
|
+
gradient.addColorStop(value, aryColor[i]);
|
|
7047
|
+
}
|
|
7048
|
+
|
|
7049
|
+
return gradient;
|
|
7050
|
+
}
|
|
7051
|
+
|
|
6952
7052
|
this.DrawLinkText=function(drawInfo, left, top, width)
|
|
6953
7053
|
{
|
|
6954
7054
|
if (!drawInfo.Link || !drawInfo.Text) return;
|
|
@@ -6558,6 +6558,8 @@ var JSCHART_EVENT_ID=
|
|
|
6558
6558
|
|
|
6559
6559
|
ON_FORMAT_KLINE_FLOAT_TOOLTIP:161, //格式化k线浮动框显示文字
|
|
6560
6560
|
ON_FORMAT_KLINE_INFO_FLOAT_TOOLTIP:162, //格式化信息地雷显示文字
|
|
6561
|
+
|
|
6562
|
+
SEARCH_DIALOG_ON_CLICK_INDEX:163, //切换指标-指标对话框
|
|
6561
6563
|
}
|
|
6562
6564
|
|
|
6563
6565
|
var JSCHART_OPERATOR_ID=
|
|
@@ -128474,6 +128476,19 @@ function JSReportChartContainer(uielement)
|
|
|
128474
128476
|
if (IFrameSplitOperator.IsNumber(item[308]) || IFrameSplitOperator.IsObject(item[308])) stock.ReserveProgressBar8=item[308];
|
|
128475
128477
|
if (IFrameSplitOperator.IsNumber(item[309]) || IFrameSplitOperator.IsObject(item[309])) stock.ReserveProgressBar9=item[309];
|
|
128476
128478
|
if (IFrameSplitOperator.IsNumber(item[310]) || IFrameSplitOperator.IsObject(item[310])) stock.ReserveProgressBar10=item[310];
|
|
128479
|
+
|
|
128480
|
+
//10个按钮 351-400 { Title, Enable:, BGColor, TextColor: }
|
|
128481
|
+
if (IFrameSplitOperator.IsObject(item[351])) stock.ReserveButton1=item[351];
|
|
128482
|
+
if (IFrameSplitOperator.IsObject(item[352])) stock.ReserveButton2=item[352];
|
|
128483
|
+
if (IFrameSplitOperator.IsObject(item[353])) stock.ReserveButton3=item[353];
|
|
128484
|
+
if (IFrameSplitOperator.IsObject(item[354])) stock.ReserveButton4=item[354];
|
|
128485
|
+
if (IFrameSplitOperator.IsObject(item[355])) stock.ReserveButton5=item[355];
|
|
128486
|
+
if (IFrameSplitOperator.IsObject(item[356])) stock.ReserveButton6=item[356];
|
|
128487
|
+
if (IFrameSplitOperator.IsObject(item[357])) stock.ReserveButton7=item[357];
|
|
128488
|
+
if (IFrameSplitOperator.IsObject(item[358])) stock.ReserveButton8=item[358];
|
|
128489
|
+
if (IFrameSplitOperator.IsObject(item[359])) stock.ReserveButton9=item[359];
|
|
128490
|
+
if (IFrameSplitOperator.IsObject(item[360])) stock.ReserveButton10=item[360];
|
|
128491
|
+
|
|
128477
128492
|
}
|
|
128478
128493
|
|
|
128479
128494
|
|
|
@@ -128939,7 +128954,7 @@ function JSReportChartContainer(uielement)
|
|
|
128939
128954
|
var tooltipData=report.GetTooltipData(x,y); //单元格提示信息
|
|
128940
128955
|
if (tooltipData)
|
|
128941
128956
|
{
|
|
128942
|
-
this.LastMouseStatus.TooltipStatus={ X:e.clientX,
|
|
128957
|
+
this.LastMouseStatus.TooltipStatus={ X:x, Y:y, Data:tooltipData, ClientX:e.clientX, ClientY:e.clientY };
|
|
128943
128958
|
bDrawTooltip=true;
|
|
128944
128959
|
}
|
|
128945
128960
|
}
|
|
@@ -131131,6 +131146,18 @@ var REPORT_COLUMN_ID=
|
|
|
131131
131146
|
RESERVE_PROGRESS_BAR9_ID:409,
|
|
131132
131147
|
RESERVE_PROGRESS_BAR10_ID:410,
|
|
131133
131148
|
|
|
131149
|
+
//留按钮类型 10个 451-500
|
|
131150
|
+
RESERVE_BUTTON1_ID:451, //ReserveButton1:
|
|
131151
|
+
RESERVE_BUTTON2_ID:452, //ReserveButton2:
|
|
131152
|
+
RESERVE_BUTTON3_ID:453, //ReserveButton3:
|
|
131153
|
+
RESERVE_BUTTON4_ID:454, //ReserveButton4:
|
|
131154
|
+
RESERVE_BUTTON5_ID:455, //ReserveButton5:
|
|
131155
|
+
RESERVE_BUTTON6_ID:456, //ReserveButton6:
|
|
131156
|
+
RESERVE_BUTTON7_ID:457, //ReserveButton7:
|
|
131157
|
+
RESERVE_BUTTON8_ID:458, //ReserveButton8:
|
|
131158
|
+
RESERVE_BUTTON9_ID:459, //ReserveButton9:
|
|
131159
|
+
RESERVE_BUTTON10_ID:460, //ReserveButton10:
|
|
131160
|
+
|
|
131134
131161
|
}
|
|
131135
131162
|
|
|
131136
131163
|
|
|
@@ -131215,6 +131242,18 @@ var MAP_COLUMN_FIELD=new Map([
|
|
|
131215
131242
|
[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR8_ID,"ReserveProgressBar8"],
|
|
131216
131243
|
[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR9_ID,"ReserveProgressBar9"],
|
|
131217
131244
|
[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR10_ID,"ReserveProgressBar10"],
|
|
131245
|
+
|
|
131246
|
+
|
|
131247
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON1_ID,"ReserveButton1"],
|
|
131248
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON2_ID,"ReserveButton2"],
|
|
131249
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON3_ID,"ReserveButton3"],
|
|
131250
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON4_ID,"ReserveButton4"],
|
|
131251
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON5_ID,"ReserveButton5"],
|
|
131252
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON6_ID,"ReserveButton6"],
|
|
131253
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON7_ID,"ReserveButton7"],
|
|
131254
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON8_ID,"ReserveButton8"],
|
|
131255
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON9_ID,"ReserveButton9"],
|
|
131256
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON10_ID,"ReserveButton10"],
|
|
131218
131257
|
]);
|
|
131219
131258
|
|
|
131220
131259
|
function ChartReport()
|
|
@@ -131588,6 +131627,11 @@ function ChartReport()
|
|
|
131588
131627
|
if (item.Button) colItem.Button=CloneData(item.Button);
|
|
131589
131628
|
else colItem.Button=this.ButtonConfig;
|
|
131590
131629
|
}
|
|
131630
|
+
else if (this.IsReserveButtonColumn(item.Type))
|
|
131631
|
+
{
|
|
131632
|
+
if (item.Button) colItem.Button=CloneData(item.Button);
|
|
131633
|
+
else colItem.Button=this.ButtonConfig;
|
|
131634
|
+
}
|
|
131591
131635
|
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID)
|
|
131592
131636
|
{
|
|
131593
131637
|
if (!IFrameSplitOperator.IsNumber(item.DataIndex) && !IFrameSplitOperator.IsNumber(item.BlockIndex)) continue;
|
|
@@ -131786,6 +131830,17 @@ function ChartReport()
|
|
|
131786
131830
|
{ Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR8_ID, Title:"进度条8", TextAlign:"center", FixedWidth:100*GetDevicePixelRatio() },
|
|
131787
131831
|
{ Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR9_ID, Title:"进度条9", TextAlign:"center", FixedWidth:100*GetDevicePixelRatio() },
|
|
131788
131832
|
{ Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR10_ID, Title:"进度条10", TextAlign:"center", FixedWidth:100*GetDevicePixelRatio() },
|
|
131833
|
+
|
|
131834
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON1_ID, Title:"按钮1", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131835
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON2_ID, Title:"按钮2", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131836
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON3_ID, Title:"按钮3", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131837
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON4_ID, Title:"按钮4", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131838
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON5_ID, Title:"按钮5", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131839
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON6_ID, Title:"按钮6", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131840
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON7_ID, Title:"按钮7", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131841
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON8_ID, Title:"按钮8", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131842
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON9_ID, Title:"按钮9", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131843
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON10_ID, Title:"按钮10", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131789
131844
|
|
|
131790
131845
|
];
|
|
131791
131846
|
|
|
@@ -132890,6 +132945,10 @@ function ChartReport()
|
|
|
132890
132945
|
{
|
|
132891
132946
|
this.FormatReserveProgressBar(column, stock, drawInfo);
|
|
132892
132947
|
}
|
|
132948
|
+
else if (this.IsReserveButtonColumn(column.Type))
|
|
132949
|
+
{
|
|
132950
|
+
this.FormatReserveButton(column, stock, drawInfo);
|
|
132951
|
+
}
|
|
132893
132952
|
|
|
132894
132953
|
|
|
132895
132954
|
//拖拽行颜色
|
|
@@ -132908,7 +132967,7 @@ function ChartReport()
|
|
|
132908
132967
|
{
|
|
132909
132968
|
this.DrawCheckbox(drawInfo, left, top, itemWidth);
|
|
132910
132969
|
}
|
|
132911
|
-
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID)
|
|
132970
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID || this.IsReserveButtonColumn(column.Type))
|
|
132912
132971
|
{
|
|
132913
132972
|
this.DrawButton(drawInfo, left, top, itemWidth);
|
|
132914
132973
|
}
|
|
@@ -132970,6 +133029,18 @@ function ChartReport()
|
|
|
132970
133029
|
return ARARY_TYPE.includes(value);
|
|
132971
133030
|
}
|
|
132972
133031
|
|
|
133032
|
+
this.IsReserveButtonColumn=function(value)
|
|
133033
|
+
{
|
|
133034
|
+
var ARARY_TYPE=
|
|
133035
|
+
[
|
|
133036
|
+
REPORT_COLUMN_ID.RESERVE_BUTTON1_ID, REPORT_COLUMN_ID.RESERVE_BUTTON2_ID,REPORT_COLUMN_ID.RESERVE_BUTTON3_ID,
|
|
133037
|
+
REPORT_COLUMN_ID.RESERVE_BUTTON4_ID,REPORT_COLUMN_ID.RESERVE_BUTTON5_ID,REPORT_COLUMN_ID.RESERVE_BUTTON6_ID,REPORT_COLUMN_ID.RESERVE_BUTTON7_ID,
|
|
133038
|
+
REPORT_COLUMN_ID.RESERVE_BUTTON8_ID,REPORT_COLUMN_ID.RESERVE_BUTTON9_ID,REPORT_COLUMN_ID.RESERVE_BUTTON10_ID
|
|
133039
|
+
];
|
|
133040
|
+
|
|
133041
|
+
return ARARY_TYPE.includes(value);
|
|
133042
|
+
}
|
|
133043
|
+
|
|
132973
133044
|
this.DrawCustomText=function(drawInfo, column, left, top, cellWidth)
|
|
132974
133045
|
{
|
|
132975
133046
|
if (!drawInfo.Text) return;
|
|
@@ -133417,6 +133488,22 @@ function ChartReport()
|
|
|
133417
133488
|
}
|
|
133418
133489
|
}
|
|
133419
133490
|
|
|
133491
|
+
this.FormatReserveButton=function(column, data, drawInfo)
|
|
133492
|
+
{
|
|
133493
|
+
var fieldName=MAP_COLUMN_FIELD.get(column.Type);
|
|
133494
|
+
if (!data || !fieldName) return;
|
|
133495
|
+
var item=data[fieldName];
|
|
133496
|
+
if (!item) return;
|
|
133497
|
+
|
|
133498
|
+
drawInfo.Text=item.Title;
|
|
133499
|
+
drawInfo.Button=column.Button;
|
|
133500
|
+
drawInfo.Font=column.Button.Font;
|
|
133501
|
+
drawInfo.Enable=true;
|
|
133502
|
+
drawInfo.Data=item;
|
|
133503
|
+
|
|
133504
|
+
if (IFrameSplitOperator.IsBool(item.Enable)) drawInfo.Enable=item.Enable;
|
|
133505
|
+
}
|
|
133506
|
+
|
|
133420
133507
|
this.FormaTimeDrawInfo=function(column, stock, drawInfo, data)
|
|
133421
133508
|
{
|
|
133422
133509
|
if (!IFrameSplitOperator.IsNumber(stock.Time)) return;
|
|
@@ -133868,8 +133955,9 @@ function ChartReport()
|
|
|
133868
133955
|
rtBar.Width=fullBarWidth*value;
|
|
133869
133956
|
rtBar.Height=rtBar.Bottom-rtBar.Top;
|
|
133870
133957
|
if (rtBar.Width<1) rtBG.Width=1;
|
|
133871
|
-
|
|
133872
|
-
this.Canvas.fillStyle=barColor;
|
|
133958
|
+
|
|
133959
|
+
if (Array.isArray(barColor)) this.Canvas.fillStyle=this.CreateLinearGradient(barColor, rtBG.Left, rtBG.Top, rtBG.Right, rtBG.Top);
|
|
133960
|
+
else this.Canvas.fillStyle=barColor;
|
|
133873
133961
|
this.Canvas.fillRect(rtBar.Left, rtBar.Top,rtBar.Width,rtBar.Height);
|
|
133874
133962
|
}
|
|
133875
133963
|
|
|
@@ -133886,6 +133974,20 @@ function ChartReport()
|
|
|
133886
133974
|
}
|
|
133887
133975
|
}
|
|
133888
133976
|
|
|
133977
|
+
//创建渐近色
|
|
133978
|
+
this.CreateLinearGradient=function(aryColor, x0, y0, x1, y1)
|
|
133979
|
+
{
|
|
133980
|
+
var gradient = this.Canvas.createLinearGradient(x0, y0, x1, y1);
|
|
133981
|
+
var offset=1/(aryColor.length-1);
|
|
133982
|
+
for(var i=0; i<aryColor.length; ++i)
|
|
133983
|
+
{
|
|
133984
|
+
var value=i*offset;
|
|
133985
|
+
gradient.addColorStop(value, aryColor[i]);
|
|
133986
|
+
}
|
|
133987
|
+
|
|
133988
|
+
return gradient;
|
|
133989
|
+
}
|
|
133990
|
+
|
|
133889
133991
|
this.DrawLinkText=function(drawInfo, left, top, width)
|
|
133890
133992
|
{
|
|
133891
133993
|
if (!drawInfo.Link || !drawInfo.Text) return;
|
|
@@ -139169,7 +139271,7 @@ function ScrollBarBGChart()
|
|
|
139169
139271
|
|
|
139170
139272
|
|
|
139171
139273
|
|
|
139172
|
-
var HQCHART_VERSION="1.1.
|
|
139274
|
+
var HQCHART_VERSION="1.1.14107";
|
|
139173
139275
|
|
|
139174
139276
|
function PrintHQChartVersion()
|
|
139175
139277
|
{
|
|
@@ -6602,6 +6602,8 @@ var JSCHART_EVENT_ID=
|
|
|
6602
6602
|
|
|
6603
6603
|
ON_FORMAT_KLINE_FLOAT_TOOLTIP:161, //格式化k线浮动框显示文字
|
|
6604
6604
|
ON_FORMAT_KLINE_INFO_FLOAT_TOOLTIP:162, //格式化信息地雷显示文字
|
|
6605
|
+
|
|
6606
|
+
SEARCH_DIALOG_ON_CLICK_INDEX:163, //切换指标-指标对话框
|
|
6605
6607
|
}
|
|
6606
6608
|
|
|
6607
6609
|
var JSCHART_OPERATOR_ID=
|
|
@@ -128518,6 +128520,19 @@ function JSReportChartContainer(uielement)
|
|
|
128518
128520
|
if (IFrameSplitOperator.IsNumber(item[308]) || IFrameSplitOperator.IsObject(item[308])) stock.ReserveProgressBar8=item[308];
|
|
128519
128521
|
if (IFrameSplitOperator.IsNumber(item[309]) || IFrameSplitOperator.IsObject(item[309])) stock.ReserveProgressBar9=item[309];
|
|
128520
128522
|
if (IFrameSplitOperator.IsNumber(item[310]) || IFrameSplitOperator.IsObject(item[310])) stock.ReserveProgressBar10=item[310];
|
|
128523
|
+
|
|
128524
|
+
//10个按钮 351-400 { Title, Enable:, BGColor, TextColor: }
|
|
128525
|
+
if (IFrameSplitOperator.IsObject(item[351])) stock.ReserveButton1=item[351];
|
|
128526
|
+
if (IFrameSplitOperator.IsObject(item[352])) stock.ReserveButton2=item[352];
|
|
128527
|
+
if (IFrameSplitOperator.IsObject(item[353])) stock.ReserveButton3=item[353];
|
|
128528
|
+
if (IFrameSplitOperator.IsObject(item[354])) stock.ReserveButton4=item[354];
|
|
128529
|
+
if (IFrameSplitOperator.IsObject(item[355])) stock.ReserveButton5=item[355];
|
|
128530
|
+
if (IFrameSplitOperator.IsObject(item[356])) stock.ReserveButton6=item[356];
|
|
128531
|
+
if (IFrameSplitOperator.IsObject(item[357])) stock.ReserveButton7=item[357];
|
|
128532
|
+
if (IFrameSplitOperator.IsObject(item[358])) stock.ReserveButton8=item[358];
|
|
128533
|
+
if (IFrameSplitOperator.IsObject(item[359])) stock.ReserveButton9=item[359];
|
|
128534
|
+
if (IFrameSplitOperator.IsObject(item[360])) stock.ReserveButton10=item[360];
|
|
128535
|
+
|
|
128521
128536
|
}
|
|
128522
128537
|
|
|
128523
128538
|
|
|
@@ -128983,7 +128998,7 @@ function JSReportChartContainer(uielement)
|
|
|
128983
128998
|
var tooltipData=report.GetTooltipData(x,y); //单元格提示信息
|
|
128984
128999
|
if (tooltipData)
|
|
128985
129000
|
{
|
|
128986
|
-
this.LastMouseStatus.TooltipStatus={ X:e.clientX,
|
|
129001
|
+
this.LastMouseStatus.TooltipStatus={ X:x, Y:y, Data:tooltipData, ClientX:e.clientX, ClientY:e.clientY };
|
|
128987
129002
|
bDrawTooltip=true;
|
|
128988
129003
|
}
|
|
128989
129004
|
}
|
|
@@ -131175,6 +131190,18 @@ var REPORT_COLUMN_ID=
|
|
|
131175
131190
|
RESERVE_PROGRESS_BAR9_ID:409,
|
|
131176
131191
|
RESERVE_PROGRESS_BAR10_ID:410,
|
|
131177
131192
|
|
|
131193
|
+
//留按钮类型 10个 451-500
|
|
131194
|
+
RESERVE_BUTTON1_ID:451, //ReserveButton1:
|
|
131195
|
+
RESERVE_BUTTON2_ID:452, //ReserveButton2:
|
|
131196
|
+
RESERVE_BUTTON3_ID:453, //ReserveButton3:
|
|
131197
|
+
RESERVE_BUTTON4_ID:454, //ReserveButton4:
|
|
131198
|
+
RESERVE_BUTTON5_ID:455, //ReserveButton5:
|
|
131199
|
+
RESERVE_BUTTON6_ID:456, //ReserveButton6:
|
|
131200
|
+
RESERVE_BUTTON7_ID:457, //ReserveButton7:
|
|
131201
|
+
RESERVE_BUTTON8_ID:458, //ReserveButton8:
|
|
131202
|
+
RESERVE_BUTTON9_ID:459, //ReserveButton9:
|
|
131203
|
+
RESERVE_BUTTON10_ID:460, //ReserveButton10:
|
|
131204
|
+
|
|
131178
131205
|
}
|
|
131179
131206
|
|
|
131180
131207
|
|
|
@@ -131259,6 +131286,18 @@ var MAP_COLUMN_FIELD=new Map([
|
|
|
131259
131286
|
[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR8_ID,"ReserveProgressBar8"],
|
|
131260
131287
|
[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR9_ID,"ReserveProgressBar9"],
|
|
131261
131288
|
[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR10_ID,"ReserveProgressBar10"],
|
|
131289
|
+
|
|
131290
|
+
|
|
131291
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON1_ID,"ReserveButton1"],
|
|
131292
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON2_ID,"ReserveButton2"],
|
|
131293
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON3_ID,"ReserveButton3"],
|
|
131294
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON4_ID,"ReserveButton4"],
|
|
131295
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON5_ID,"ReserveButton5"],
|
|
131296
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON6_ID,"ReserveButton6"],
|
|
131297
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON7_ID,"ReserveButton7"],
|
|
131298
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON8_ID,"ReserveButton8"],
|
|
131299
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON9_ID,"ReserveButton9"],
|
|
131300
|
+
[REPORT_COLUMN_ID.RESERVE_BUTTON10_ID,"ReserveButton10"],
|
|
131262
131301
|
]);
|
|
131263
131302
|
|
|
131264
131303
|
function ChartReport()
|
|
@@ -131632,6 +131671,11 @@ function ChartReport()
|
|
|
131632
131671
|
if (item.Button) colItem.Button=CloneData(item.Button);
|
|
131633
131672
|
else colItem.Button=this.ButtonConfig;
|
|
131634
131673
|
}
|
|
131674
|
+
else if (this.IsReserveButtonColumn(item.Type))
|
|
131675
|
+
{
|
|
131676
|
+
if (item.Button) colItem.Button=CloneData(item.Button);
|
|
131677
|
+
else colItem.Button=this.ButtonConfig;
|
|
131678
|
+
}
|
|
131635
131679
|
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID)
|
|
131636
131680
|
{
|
|
131637
131681
|
if (!IFrameSplitOperator.IsNumber(item.DataIndex) && !IFrameSplitOperator.IsNumber(item.BlockIndex)) continue;
|
|
@@ -131830,6 +131874,17 @@ function ChartReport()
|
|
|
131830
131874
|
{ Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR8_ID, Title:"进度条8", TextAlign:"center", FixedWidth:100*GetDevicePixelRatio() },
|
|
131831
131875
|
{ Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR9_ID, Title:"进度条9", TextAlign:"center", FixedWidth:100*GetDevicePixelRatio() },
|
|
131832
131876
|
{ Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR10_ID, Title:"进度条10", TextAlign:"center", FixedWidth:100*GetDevicePixelRatio() },
|
|
131877
|
+
|
|
131878
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON1_ID, Title:"按钮1", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131879
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON2_ID, Title:"按钮2", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131880
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON3_ID, Title:"按钮3", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131881
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON4_ID, Title:"按钮4", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131882
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON5_ID, Title:"按钮5", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131883
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON6_ID, Title:"按钮6", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131884
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON7_ID, Title:"按钮7", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131885
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON8_ID, Title:"按钮8", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131886
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON9_ID, Title:"按钮9", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131887
|
+
{ Type:REPORT_COLUMN_ID.RESERVE_BUTTON10_ID, Title:"按钮10", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
|
|
131833
131888
|
|
|
131834
131889
|
];
|
|
131835
131890
|
|
|
@@ -132934,6 +132989,10 @@ function ChartReport()
|
|
|
132934
132989
|
{
|
|
132935
132990
|
this.FormatReserveProgressBar(column, stock, drawInfo);
|
|
132936
132991
|
}
|
|
132992
|
+
else if (this.IsReserveButtonColumn(column.Type))
|
|
132993
|
+
{
|
|
132994
|
+
this.FormatReserveButton(column, stock, drawInfo);
|
|
132995
|
+
}
|
|
132937
132996
|
|
|
132938
132997
|
|
|
132939
132998
|
//拖拽行颜色
|
|
@@ -132952,7 +133011,7 @@ function ChartReport()
|
|
|
132952
133011
|
{
|
|
132953
133012
|
this.DrawCheckbox(drawInfo, left, top, itemWidth);
|
|
132954
133013
|
}
|
|
132955
|
-
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID)
|
|
133014
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID || this.IsReserveButtonColumn(column.Type))
|
|
132956
133015
|
{
|
|
132957
133016
|
this.DrawButton(drawInfo, left, top, itemWidth);
|
|
132958
133017
|
}
|
|
@@ -133014,6 +133073,18 @@ function ChartReport()
|
|
|
133014
133073
|
return ARARY_TYPE.includes(value);
|
|
133015
133074
|
}
|
|
133016
133075
|
|
|
133076
|
+
this.IsReserveButtonColumn=function(value)
|
|
133077
|
+
{
|
|
133078
|
+
var ARARY_TYPE=
|
|
133079
|
+
[
|
|
133080
|
+
REPORT_COLUMN_ID.RESERVE_BUTTON1_ID, REPORT_COLUMN_ID.RESERVE_BUTTON2_ID,REPORT_COLUMN_ID.RESERVE_BUTTON3_ID,
|
|
133081
|
+
REPORT_COLUMN_ID.RESERVE_BUTTON4_ID,REPORT_COLUMN_ID.RESERVE_BUTTON5_ID,REPORT_COLUMN_ID.RESERVE_BUTTON6_ID,REPORT_COLUMN_ID.RESERVE_BUTTON7_ID,
|
|
133082
|
+
REPORT_COLUMN_ID.RESERVE_BUTTON8_ID,REPORT_COLUMN_ID.RESERVE_BUTTON9_ID,REPORT_COLUMN_ID.RESERVE_BUTTON10_ID
|
|
133083
|
+
];
|
|
133084
|
+
|
|
133085
|
+
return ARARY_TYPE.includes(value);
|
|
133086
|
+
}
|
|
133087
|
+
|
|
133017
133088
|
this.DrawCustomText=function(drawInfo, column, left, top, cellWidth)
|
|
133018
133089
|
{
|
|
133019
133090
|
if (!drawInfo.Text) return;
|
|
@@ -133461,6 +133532,22 @@ function ChartReport()
|
|
|
133461
133532
|
}
|
|
133462
133533
|
}
|
|
133463
133534
|
|
|
133535
|
+
this.FormatReserveButton=function(column, data, drawInfo)
|
|
133536
|
+
{
|
|
133537
|
+
var fieldName=MAP_COLUMN_FIELD.get(column.Type);
|
|
133538
|
+
if (!data || !fieldName) return;
|
|
133539
|
+
var item=data[fieldName];
|
|
133540
|
+
if (!item) return;
|
|
133541
|
+
|
|
133542
|
+
drawInfo.Text=item.Title;
|
|
133543
|
+
drawInfo.Button=column.Button;
|
|
133544
|
+
drawInfo.Font=column.Button.Font;
|
|
133545
|
+
drawInfo.Enable=true;
|
|
133546
|
+
drawInfo.Data=item;
|
|
133547
|
+
|
|
133548
|
+
if (IFrameSplitOperator.IsBool(item.Enable)) drawInfo.Enable=item.Enable;
|
|
133549
|
+
}
|
|
133550
|
+
|
|
133464
133551
|
this.FormaTimeDrawInfo=function(column, stock, drawInfo, data)
|
|
133465
133552
|
{
|
|
133466
133553
|
if (!IFrameSplitOperator.IsNumber(stock.Time)) return;
|
|
@@ -133912,8 +133999,9 @@ function ChartReport()
|
|
|
133912
133999
|
rtBar.Width=fullBarWidth*value;
|
|
133913
134000
|
rtBar.Height=rtBar.Bottom-rtBar.Top;
|
|
133914
134001
|
if (rtBar.Width<1) rtBG.Width=1;
|
|
133915
|
-
|
|
133916
|
-
this.Canvas.fillStyle=barColor;
|
|
134002
|
+
|
|
134003
|
+
if (Array.isArray(barColor)) this.Canvas.fillStyle=this.CreateLinearGradient(barColor, rtBG.Left, rtBG.Top, rtBG.Right, rtBG.Top);
|
|
134004
|
+
else this.Canvas.fillStyle=barColor;
|
|
133917
134005
|
this.Canvas.fillRect(rtBar.Left, rtBar.Top,rtBar.Width,rtBar.Height);
|
|
133918
134006
|
}
|
|
133919
134007
|
|
|
@@ -133930,6 +134018,20 @@ function ChartReport()
|
|
|
133930
134018
|
}
|
|
133931
134019
|
}
|
|
133932
134020
|
|
|
134021
|
+
//创建渐近色
|
|
134022
|
+
this.CreateLinearGradient=function(aryColor, x0, y0, x1, y1)
|
|
134023
|
+
{
|
|
134024
|
+
var gradient = this.Canvas.createLinearGradient(x0, y0, x1, y1);
|
|
134025
|
+
var offset=1/(aryColor.length-1);
|
|
134026
|
+
for(var i=0; i<aryColor.length; ++i)
|
|
134027
|
+
{
|
|
134028
|
+
var value=i*offset;
|
|
134029
|
+
gradient.addColorStop(value, aryColor[i]);
|
|
134030
|
+
}
|
|
134031
|
+
|
|
134032
|
+
return gradient;
|
|
134033
|
+
}
|
|
134034
|
+
|
|
133933
134035
|
this.DrawLinkText=function(drawInfo, left, top, width)
|
|
133934
134036
|
{
|
|
133935
134037
|
if (!drawInfo.Link || !drawInfo.Text) return;
|
|
@@ -147282,6 +147384,15 @@ function JSDialogSearchIndex()
|
|
|
147282
147384
|
if (!this.OpData) return;
|
|
147283
147385
|
if (!cellItem || !cellItem.IndexItem) return;
|
|
147284
147386
|
|
|
147387
|
+
var event=this.HQChart.GetEventCallback(JSCHART_EVENT_ID.SEARCH_DIALOG_ON_CLICK_INDEX);
|
|
147388
|
+
if (event && event.Callback)
|
|
147389
|
+
{
|
|
147390
|
+
var sendData={ OpData:this.OpData, IndexData:cellItem.IndexItem, HQChart:this.HQChart, PreventDefault:false };
|
|
147391
|
+
event.Callback(event, sendData, this);
|
|
147392
|
+
|
|
147393
|
+
if (sendData.PreventDefault==true) return; //已被上层处理了
|
|
147394
|
+
}
|
|
147395
|
+
|
|
147285
147396
|
if (this.OpData.OpType==1)
|
|
147286
147397
|
{
|
|
147287
147398
|
if (!IFrameSplitOperator.IsNumber(this.OpData.WindowIndex)) return;
|
|
@@ -148157,7 +148268,7 @@ function HQChartScriptWorker()
|
|
|
148157
148268
|
|
|
148158
148269
|
|
|
148159
148270
|
|
|
148160
|
-
var HQCHART_VERSION="1.1.
|
|
148271
|
+
var HQCHART_VERSION="1.1.14107";
|
|
148161
148272
|
|
|
148162
148273
|
function PrintHQChartVersion()
|
|
148163
148274
|
{
|