hqchart 1.1.13555 → 1.1.13565
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 +34 -25
- package/package.json +1 -1
- package/src/jscommon/umychart.js +34 -5
- package/src/jscommon/umychart.report.js +155 -35
- package/src/jscommon/umychart.style.js +1 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +191 -42
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +191 -42
package/src/jscommon/umychart.js
CHANGED
|
@@ -2600,6 +2600,7 @@ var JSCHART_EVENT_ID=
|
|
|
2600
2600
|
|
|
2601
2601
|
ON_DRAW_REPORT_ROW_BG:140, //报价列表整行背景
|
|
2602
2602
|
ON_CLICK_REPORT_CHECKBOX:141, //报价列表checkbox
|
|
2603
|
+
ON_CLICK_REPORT_BUTTON:142, //报价列表按钮
|
|
2603
2604
|
|
|
2604
2605
|
|
|
2605
2606
|
ON_CHANGE_INDEX:150, //切换指标
|
|
@@ -2772,8 +2773,12 @@ var JSCHART_MENU_ID=
|
|
|
2772
2773
|
|
|
2773
2774
|
CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID:38,
|
|
2774
2775
|
|
|
2776
|
+
CMD_SHOW_CORSS_LINE_ID:39, //显示十字光标线
|
|
2777
|
+
|
|
2775
2778
|
|
|
2776
2779
|
CMD_REPORT_CHANGE_BLOCK_ID:60, //报价列表 切换板块ID
|
|
2780
|
+
|
|
2781
|
+
|
|
2777
2782
|
}
|
|
2778
2783
|
|
|
2779
2784
|
|
|
@@ -9555,6 +9560,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9555
9560
|
if (this.ChartDragSelectRect) this.ChartDragSelectRect.ShowMode=param;
|
|
9556
9561
|
}
|
|
9557
9562
|
break;
|
|
9563
|
+
|
|
9564
|
+
case JSCHART_MENU_ID.CMD_SHOW_CORSS_LINE_ID:
|
|
9565
|
+
if (IFrameSplitOperator.IsBool(srcParam))
|
|
9566
|
+
{
|
|
9567
|
+
if (this.ChartCorssCursor) this.ChartCorssCursor.IsShowCorss=srcParam;
|
|
9568
|
+
}
|
|
9569
|
+
break;
|
|
9558
9570
|
}
|
|
9559
9571
|
}
|
|
9560
9572
|
|
|
@@ -50889,8 +50901,9 @@ function HQPriceStringFormat()
|
|
|
50889
50901
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_CORSSCURSOR_Y_TEXT);
|
|
50890
50902
|
if (event)
|
|
50891
50903
|
{
|
|
50892
|
-
var data={ Value:this.Value, FrameID:this.FrameID };
|
|
50904
|
+
var data={ Value:this.Value, FrameID:this.FrameID, PreventDefault:false };
|
|
50893
50905
|
event.Callback(event,data,this);
|
|
50906
|
+
if (data.PreventDefault==true) return false;
|
|
50894
50907
|
}
|
|
50895
50908
|
}
|
|
50896
50909
|
|
|
@@ -50965,8 +50978,10 @@ function HQDateStringFormat()
|
|
|
50965
50978
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_CORSSCURSOR_X_TEXT);
|
|
50966
50979
|
if (event)
|
|
50967
50980
|
{
|
|
50968
|
-
var data={ Item:currentData, Period:this.Data.Period, Date:currentData.Date, Time:currentData.Time,Index:this.Data.DataOffset+index };
|
|
50981
|
+
var data={ Item:currentData, Period:this.Data.Period, Date:currentData.Date, Time:currentData.Time,Index:this.Data.DataOffset+index, PreventDefault:false };
|
|
50969
50982
|
event.Callback(event,data,this);
|
|
50983
|
+
|
|
50984
|
+
if (data.PreventDefault==true) return false;
|
|
50970
50985
|
}
|
|
50971
50986
|
}
|
|
50972
50987
|
|
|
@@ -51105,8 +51120,10 @@ function HQMinuteTimeStringFormat()
|
|
|
51105
51120
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_CORSSCURSOR_X_TEXT);
|
|
51106
51121
|
if (event)
|
|
51107
51122
|
{
|
|
51108
|
-
var data={ Time:time, Index:showIndex };
|
|
51123
|
+
var data={ Time:time, Index:showIndex, PreventDefault:false };
|
|
51109
51124
|
event.Callback(event,data,this);
|
|
51125
|
+
|
|
51126
|
+
if (data.PreventDefault==true) return false;
|
|
51110
51127
|
}
|
|
51111
51128
|
}
|
|
51112
51129
|
|
|
@@ -67142,7 +67159,7 @@ function JSChartResource()
|
|
|
67142
67159
|
|
|
67143
67160
|
Item:
|
|
67144
67161
|
{
|
|
67145
|
-
Mergin:{ Top:2, Bottom:
|
|
67162
|
+
Mergin:{ Top:2, Bottom:4,Left:5, Right:5 }, //单元格四周间距
|
|
67146
67163
|
Font:{ Size:15, Name:"微软雅黑"},
|
|
67147
67164
|
BarMergin:{ Top:2, Left:3, Right:3, Bottom:2 },//单元格字体
|
|
67148
67165
|
NameFont:{ Size:14, Name:"微软雅黑" },
|
|
@@ -74913,6 +74930,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
74913
74930
|
if (this.GetExtendChartByClassName("SessionBreaksPaint")) bBGSpit=true;
|
|
74914
74931
|
if (this.GetExtendChartByClassName('StockChip')) bShowStockChip=true; //筹码
|
|
74915
74932
|
|
|
74933
|
+
var bShowCorss=false; //十字光标十字线
|
|
74934
|
+
if (this.ChartCorssCursor) bShowCorss=this.ChartCorssCursor.IsShowCorss;
|
|
74935
|
+
|
|
74916
74936
|
var aryMenu=
|
|
74917
74937
|
[
|
|
74918
74938
|
{
|
|
@@ -75071,6 +75091,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
75071
75091
|
{ Name:"画图工具", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID, Args:[]}, Checked:this.IsShowDrawToolDialog() },
|
|
75072
75092
|
|
|
75073
75093
|
{ Name:"移动筹码图", Data:{ ID:bShowStockChip?JSCHART_MENU_ID.CMD_HIDE_STOCKCHIP_ID:JSCHART_MENU_ID.CMD_SHOW_STOCKCHIP_ID, Args:[]}, Checked:bShowStockChip},
|
|
75094
|
+
|
|
75095
|
+
{ Name:"十字光标线", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_CORSS_LINE_ID, Args:[!bShowCorss]}, Checked:bShowCorss },
|
|
75096
|
+
|
|
75074
75097
|
{ Name:JSPopMenu.SEPARATOR_LINE_NAME },
|
|
75075
75098
|
{
|
|
75076
75099
|
Name:"鼠标形状",
|
|
@@ -78575,6 +78598,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
78575
78598
|
if (item && item.Symbol) aryOverlaySymbol.push(item.Symbol)
|
|
78576
78599
|
}
|
|
78577
78600
|
|
|
78601
|
+
var bShowCorss=false; //十字光标十字线
|
|
78602
|
+
if (this.ChartCorssCursor) bShowCorss=this.ChartCorssCursor.IsShowCorss;
|
|
78603
|
+
|
|
78578
78604
|
var aryMenu=
|
|
78579
78605
|
[
|
|
78580
78606
|
{
|
|
@@ -78643,6 +78669,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
78643
78669
|
SubMenu:
|
|
78644
78670
|
[
|
|
78645
78671
|
{ Name:"画图工具", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID, Args:[]}, Checked:this.IsShowDrawToolDialog()},
|
|
78672
|
+
{ Name:"十字光标线", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_CORSS_LINE_ID, Args:[!bShowCorss]}, Checked:bShowCorss },
|
|
78646
78673
|
|
|
78647
78674
|
{
|
|
78648
78675
|
Name:"区间选择样式",
|
|
@@ -78652,7 +78679,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
78652
78679
|
{ Name:"样式2", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[1]}, Checked:1==this.ChartDragSelectRect.ShowMode },
|
|
78653
78680
|
{ Name:"样式3", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[2]}, Checked:2==this.ChartDragSelectRect.ShowMode },
|
|
78654
78681
|
]
|
|
78655
|
-
}
|
|
78682
|
+
},
|
|
78683
|
+
|
|
78684
|
+
|
|
78656
78685
|
]
|
|
78657
78686
|
}
|
|
78658
78687
|
|
|
@@ -3671,13 +3671,7 @@ var REPORT_COLUMN_ID=
|
|
|
3671
3671
|
TIME_ID:31, //时间 hhmmss / hhmm / hhmmss.fff
|
|
3672
3672
|
DATE_ID:32, //日期
|
|
3673
3673
|
|
|
3674
|
-
CHECKBOX_ID:33, //单选框
|
|
3675
|
-
CHECKBOX2_ID:34,
|
|
3676
|
-
CHECKBOX3_ID:35,
|
|
3677
|
-
CHECKBOX4_ID:36,
|
|
3678
|
-
CHECKBOX5_ID:37,
|
|
3679
|
-
CHECKBOX6_ID:38,
|
|
3680
|
-
|
|
3674
|
+
CHECKBOX_ID:33, //单选框
|
|
3681
3675
|
|
|
3682
3676
|
SYMBOL_NAME_ID:99,
|
|
3683
3677
|
|
|
@@ -3685,6 +3679,8 @@ var REPORT_COLUMN_ID=
|
|
|
3685
3679
|
CUSTOM_NUMBER_TEXT_ID:101, //自定义数值型
|
|
3686
3680
|
CUSTOM_DATETIME_TEXT_ID:102, //自定义日期类型
|
|
3687
3681
|
CUSTOM_ICON_ID:103, //自定义图标
|
|
3682
|
+
CUSTOM_CHECKBOX_ID:104, //自定义checkbox
|
|
3683
|
+
CUSTOM_BUTTON_ID:105, //自定义按钮
|
|
3688
3684
|
}
|
|
3689
3685
|
|
|
3690
3686
|
var MAP_COLUMN_FIELD=new Map([
|
|
@@ -4053,6 +4049,21 @@ function ChartReport()
|
|
|
4053
4049
|
if (IFrameSplitOperator.IsNumber(item.ValueType)) colItem.FormatType=item.ValueType; //输出样式
|
|
4054
4050
|
|
|
4055
4051
|
}
|
|
4052
|
+
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID)
|
|
4053
|
+
{
|
|
4054
|
+
if (!IFrameSplitOperator.IsNumber(item.DataIndex) && !IFrameSplitOperator.IsNumber(item.BlockIndex)) continue;
|
|
4055
|
+
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
4056
|
+
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
4057
|
+
if (item.CheckBox) colItem.CheckBox=CloneData(item.CheckBox);
|
|
4058
|
+
else colItem.CheckBox=CloneData(g_JSChartResource.Report.CheckBox);
|
|
4059
|
+
}
|
|
4060
|
+
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID)
|
|
4061
|
+
{
|
|
4062
|
+
if (!IFrameSplitOperator.IsNumber(item.DataIndex) && !IFrameSplitOperator.IsNumber(item.BlockIndex)) continue;
|
|
4063
|
+
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
4064
|
+
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
4065
|
+
if (item.Button) colItem.Button=CloneData(item.Button);
|
|
4066
|
+
}
|
|
4056
4067
|
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID)
|
|
4057
4068
|
{
|
|
4058
4069
|
|
|
@@ -4069,6 +4080,7 @@ function ChartReport()
|
|
|
4069
4080
|
{
|
|
4070
4081
|
if (IFrameSplitOperator.IsNumber(item.FormatType)) colItem.FormatType=item.FormatType;
|
|
4071
4082
|
}
|
|
4083
|
+
|
|
4072
4084
|
|
|
4073
4085
|
this.Column.push(colItem);
|
|
4074
4086
|
}
|
|
@@ -4165,9 +4177,11 @@ function ChartReport()
|
|
|
4165
4177
|
{ Type:REPORT_COLUMN_ID.TIME_ID, Title:"时间", TextAlign:"left", ValueType:0, TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"99:99:99.999" },
|
|
4166
4178
|
{ Type:REPORT_COLUMN_ID.DATE_ID, Title:"日期", TextAlign:"left", FormatType:0, TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999-99-99" },
|
|
4167
4179
|
|
|
4168
|
-
{ Type:REPORT_COLUMN_ID.CHECKBOX_ID, Title:"", TextAlign:"center", FixedWidth:20*GetDevicePixelRatio() }
|
|
4180
|
+
{ Type:REPORT_COLUMN_ID.CHECKBOX_ID, Title:"", TextAlign:"center", FixedWidth:20*GetDevicePixelRatio() },
|
|
4169
4181
|
|
|
4170
|
-
|
|
4182
|
+
{ Type:REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID, Title:"", TextAlign:"center", FixedWidth:20*GetDevicePixelRatio() },
|
|
4183
|
+
|
|
4184
|
+
{ Type:REPORT_COLUMN_ID.CUSTOM_BUTTON_ID, Title:"", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() }
|
|
4171
4185
|
];
|
|
4172
4186
|
|
|
4173
4187
|
for(var i=0;i<DEFAULT_COLUMN.length;++i)
|
|
@@ -5116,10 +5130,30 @@ function ChartReport()
|
|
|
5116
5130
|
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
5117
5131
|
drawInfo.Rect=rtItem;
|
|
5118
5132
|
drawInfo.Checked=false;
|
|
5119
|
-
drawInfo.
|
|
5133
|
+
drawInfo.Enable=true;
|
|
5134
|
+
drawInfo.CheckBox=this.CheckBoxConfig;
|
|
5135
|
+
drawInfo.Data=stock;
|
|
5120
5136
|
if (stock && IFrameSplitOperator.IsBool(stock.Checked))
|
|
5121
5137
|
drawInfo.Checked=stock.Checked;
|
|
5122
5138
|
}
|
|
5139
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID)
|
|
5140
|
+
{
|
|
5141
|
+
rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
|
|
5142
|
+
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
5143
|
+
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
5144
|
+
drawInfo.Rect=rtItem;
|
|
5145
|
+
|
|
5146
|
+
this.GetCustomCheckBoxDrawInfo(data, column, drawInfo);
|
|
5147
|
+
}
|
|
5148
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID)
|
|
5149
|
+
{
|
|
5150
|
+
rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
|
|
5151
|
+
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
5152
|
+
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
5153
|
+
drawInfo.Rect=rtItem;
|
|
5154
|
+
|
|
5155
|
+
this.GetCustomButtonDrawInfo(data, column, drawInfo);
|
|
5156
|
+
}
|
|
5123
5157
|
|
|
5124
5158
|
|
|
5125
5159
|
//拖拽行颜色
|
|
@@ -5134,10 +5168,14 @@ function ChartReport()
|
|
|
5134
5168
|
{
|
|
5135
5169
|
this.DrawIconItem(drawInfo, x, top, textWidth);
|
|
5136
5170
|
}
|
|
5137
|
-
else if (column.Type==REPORT_COLUMN_ID.CHECKBOX_ID)
|
|
5171
|
+
else if (column.Type==REPORT_COLUMN_ID.CHECKBOX_ID || column.Type==REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID)
|
|
5138
5172
|
{
|
|
5139
5173
|
this.DrawCheckbox(drawInfo, left, top, itemWidth);
|
|
5140
5174
|
}
|
|
5175
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID)
|
|
5176
|
+
{
|
|
5177
|
+
this.DrawButton(drawInfo, left, top, itemWidth);
|
|
5178
|
+
}
|
|
5141
5179
|
else
|
|
5142
5180
|
{
|
|
5143
5181
|
if (data.FlashBG && data.FlashBG.Data && column.ID!=undefined)
|
|
@@ -5171,7 +5209,7 @@ function ChartReport()
|
|
|
5171
5209
|
|
|
5172
5210
|
if (drawInfo.Botton)
|
|
5173
5211
|
{
|
|
5174
|
-
var buttonData={ Stock:stock, Index:index, Column:column, Rect:drawInfo.Botton.Rect, Type:drawInfo.Botton.Type };
|
|
5212
|
+
var buttonData={ Stock:stock, Index:index, Column:column, Rect:drawInfo.Botton.Rect, Type:drawInfo.Botton.Type, Data:drawInfo.Data };
|
|
5175
5213
|
this.ButtonRect.push(buttonData);
|
|
5176
5214
|
}
|
|
5177
5215
|
}
|
|
@@ -5231,9 +5269,9 @@ function ChartReport()
|
|
|
5231
5269
|
}
|
|
5232
5270
|
}
|
|
5233
5271
|
|
|
5234
|
-
this.Canvas.textBaseline="
|
|
5272
|
+
this.Canvas.textBaseline="bottom";
|
|
5235
5273
|
this.Canvas.fillStyle=drawInfo.TextColor;
|
|
5236
|
-
this.Canvas.fillText(text,x,top+this.ItemMergin.
|
|
5274
|
+
this.Canvas.fillText(text,x,top+this.RowHeight-this.ItemMergin.Bottom);
|
|
5237
5275
|
|
|
5238
5276
|
if (bClip) this.Canvas.restore();
|
|
5239
5277
|
}
|
|
@@ -5427,6 +5465,32 @@ function ChartReport()
|
|
|
5427
5465
|
}
|
|
5428
5466
|
}
|
|
5429
5467
|
|
|
5468
|
+
this.GetCustomCheckBoxDrawInfo=function(data, column, drawInfo)
|
|
5469
|
+
{
|
|
5470
|
+
var checkData=this.GetExtendData(data, column);
|
|
5471
|
+
if (!checkData) return;
|
|
5472
|
+
if (!IFrameSplitOperator.IsBool(checkData.Checked)) return;
|
|
5473
|
+
|
|
5474
|
+
drawInfo.Checked=checkData.Checked;
|
|
5475
|
+
drawInfo.Enable=true;
|
|
5476
|
+
drawInfo.Data=checkData;
|
|
5477
|
+
if (IFrameSplitOperator.IsBool(checkData.DisableCheckBox)) drawInfo.Enable=!checkData.DisableCheckBox;
|
|
5478
|
+
drawInfo.CheckBox=column.CheckBox;
|
|
5479
|
+
}
|
|
5480
|
+
|
|
5481
|
+
this.GetCustomButtonDrawInfo=function(data, column, drawInfo)
|
|
5482
|
+
{
|
|
5483
|
+
var buttonData=this.GetExtendData(data, column);
|
|
5484
|
+
if (!buttonData) return;
|
|
5485
|
+
|
|
5486
|
+
drawInfo.Text=buttonData.Title;
|
|
5487
|
+
drawInfo.Button=column.Button;
|
|
5488
|
+
drawInfo.Font=column.Button.Font;
|
|
5489
|
+
drawInfo.Enable=true;
|
|
5490
|
+
drawInfo.Data=buttonData;
|
|
5491
|
+
if (IFrameSplitOperator.IsBool(buttonData.Enable)) drawInfo.Enable=buttonData.Enable;
|
|
5492
|
+
}
|
|
5493
|
+
|
|
5430
5494
|
this.FormaTimeDrawInfo=function(column, stock, drawInfo, data)
|
|
5431
5495
|
{
|
|
5432
5496
|
if (!IFrameSplitOperator.IsNumber(stock.Time)) return;
|
|
@@ -5587,9 +5651,9 @@ function ChartReport()
|
|
|
5587
5651
|
}
|
|
5588
5652
|
}
|
|
5589
5653
|
|
|
5590
|
-
this.Canvas.textBaseline="
|
|
5654
|
+
this.Canvas.textBaseline="bottom";
|
|
5591
5655
|
this.Canvas.fillStyle=textColor;
|
|
5592
|
-
this.Canvas.fillText(text,x,top+this.ItemMergin.
|
|
5656
|
+
this.Canvas.fillText(text,x,top+this.RowHeight-this.ItemMergin.Bottom);
|
|
5593
5657
|
|
|
5594
5658
|
if (bClip) this.Canvas.restore();
|
|
5595
5659
|
}
|
|
@@ -5693,32 +5757,80 @@ function ChartReport()
|
|
|
5693
5757
|
|
|
5694
5758
|
this.DrawCheckbox=function(drawInfo, left, top, width)
|
|
5695
5759
|
{
|
|
5760
|
+
if (!IFrameSplitOperator.IsBool(drawInfo.Checked)) return;
|
|
5761
|
+
if (!drawInfo.CheckBox) return;
|
|
5762
|
+
|
|
5763
|
+
drawInfo.Font=`${drawInfo.CheckBox.Size*this.DevicePixelRatio}px ${drawInfo.CheckBox.Family}`;
|
|
5696
5764
|
var textAlign=drawInfo.TextAlign;
|
|
5697
|
-
var size=
|
|
5698
|
-
|
|
5699
|
-
var
|
|
5700
|
-
var y=top+this.RowHeight-this.CheckBoxConfig.Margin.Bottom;
|
|
5765
|
+
var size=drawInfo.CheckBox.Size*this.DevicePixelRatio;
|
|
5766
|
+
var x=left+drawInfo.CheckBox.Margin.Left;
|
|
5767
|
+
var y=top+this.RowHeight-drawInfo.CheckBox.Margin.Bottom;
|
|
5701
5768
|
if (textAlign=='center') x=left+width/2-size/2;
|
|
5702
|
-
else if (textAlign=='right') x=left+width-
|
|
5769
|
+
else if (textAlign=='right') x=left+width-drawInfo.CheckBox.Margin.Right;
|
|
5703
5770
|
|
|
5704
5771
|
this.Canvas.font=drawInfo.Font;
|
|
5705
5772
|
this.Canvas.textBaseline="bottom";
|
|
5706
5773
|
this.Canvas.textAlign="left";
|
|
5707
5774
|
if (drawInfo.Checked===true)
|
|
5708
5775
|
{
|
|
5709
|
-
this.Canvas.fillStyle=
|
|
5710
|
-
this.Canvas.
|
|
5776
|
+
if (drawInfo.Enable===false) this.Canvas.fillStyle=drawInfo.CheckBox.Checked.DisableColor;
|
|
5777
|
+
else this.Canvas.fillStyle=drawInfo.CheckBox.Checked.Color;
|
|
5778
|
+
this.Canvas.fillText(drawInfo.CheckBox.Checked.Symbol,x,y);
|
|
5711
5779
|
}
|
|
5712
5780
|
else if (drawInfo.Checked===false)
|
|
5713
5781
|
{
|
|
5714
|
-
this.Canvas.fillStyle=
|
|
5715
|
-
this.Canvas.
|
|
5782
|
+
if (drawInfo.Enable===false) this.Canvas.fillStyle=drawInfo.CheckBox.Unchecked.DisableColor;
|
|
5783
|
+
else this.Canvas.fillStyle=drawInfo.CheckBox.Unchecked.Color;
|
|
5784
|
+
this.Canvas.fillText(drawInfo.CheckBox.Unchecked.Symbol,x,y);
|
|
5716
5785
|
}
|
|
5717
5786
|
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5787
|
+
if (drawInfo.Enable)
|
|
5788
|
+
{
|
|
5789
|
+
var rtBox={ Left:x, Bottom:y, Width:size, Height:size };
|
|
5790
|
+
rtBox.Right=rtBox.Left+rtBox.Width;
|
|
5791
|
+
rtBox.Top=rtBox.Bottom-rtBox.Height;
|
|
5792
|
+
drawInfo.Botton={ Rect:rtBox, Type:0 };
|
|
5793
|
+
}
|
|
5794
|
+
}
|
|
5795
|
+
|
|
5796
|
+
this.DrawButton=function(drawInfo, left, top, width)
|
|
5797
|
+
{
|
|
5798
|
+
if (!drawInfo.Button) return;
|
|
5799
|
+
|
|
5800
|
+
var rtBG=
|
|
5801
|
+
{
|
|
5802
|
+
Left:left+drawInfo.Button.Margin.Left, Top:top+drawInfo.Button.Margin.Top,
|
|
5803
|
+
Height:this.RowHeight-drawInfo.Button.Margin.Top-drawInfo.Button.Margin.Bottom,
|
|
5804
|
+
Width:width-drawInfo.Button.Margin.Left-drawInfo.Button.Margin.Right
|
|
5805
|
+
}
|
|
5806
|
+
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
5807
|
+
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
5808
|
+
|
|
5809
|
+
var bgColor=drawInfo.Button.BGColor, textColor=drawInfo.Button.TextColor;
|
|
5810
|
+
if (drawInfo.Enable===false)
|
|
5811
|
+
{
|
|
5812
|
+
bgColor=drawInfo.Button.Disable.BGColor;
|
|
5813
|
+
textColor=drawInfo.Button.Disable.TextColor;
|
|
5814
|
+
}
|
|
5815
|
+
|
|
5816
|
+
this.Canvas.fillStyle=bgColor;
|
|
5817
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top,rtBG.Width,rtBG.Height);
|
|
5818
|
+
|
|
5819
|
+
this.Canvas.font=drawInfo.Font;
|
|
5820
|
+
this.Canvas.textBaseline="bottom";
|
|
5821
|
+
this.Canvas.textAlign="left";
|
|
5822
|
+
this.Canvas.fillStyle=textColor;
|
|
5823
|
+
var textWidth=this.Canvas.measureText(drawInfo.Text).width;
|
|
5824
|
+
|
|
5825
|
+
var x=rtBG.Left;
|
|
5826
|
+
if (textWidth<rtBG.Width) x+=(rtBG.Width-textWidth)/2;
|
|
5827
|
+
var y=rtBG.Bottom-drawInfo.Button.TextMargin.Bottom;
|
|
5828
|
+
this.Canvas.fillText(drawInfo.Text,x,y);
|
|
5829
|
+
|
|
5830
|
+
if (drawInfo.Enable)
|
|
5831
|
+
{
|
|
5832
|
+
drawInfo.Botton={ Rect:rtBG, Type:1 };
|
|
5833
|
+
}
|
|
5722
5834
|
}
|
|
5723
5835
|
|
|
5724
5836
|
//字体由外面设置
|
|
@@ -6409,22 +6521,30 @@ function ChartReport()
|
|
|
6409
6521
|
var buttonData=this.GetButtonData(x,y);
|
|
6410
6522
|
if (!buttonData) return true;
|
|
6411
6523
|
|
|
6412
|
-
if (buttonData.Type===0)
|
|
6524
|
+
if (buttonData.Type===0) //checkbox
|
|
6413
6525
|
{
|
|
6414
|
-
var sendData={ Column:buttonData.Column, Index:buttonData.Index, Stock:buttonData.Stock, PreventDefault: false };
|
|
6526
|
+
var sendData={ Column:buttonData.Column, Index:buttonData.Index, Stock:buttonData.Stock, Data:buttonData.Data, PreventDefault: false };
|
|
6415
6527
|
this.SendClickEvent(JSCHART_EVENT_ID.ON_CLICK_REPORT_CHECKBOX, sendData)
|
|
6416
6528
|
|
|
6417
6529
|
if (!sendData.PreventDefault)
|
|
6418
6530
|
{
|
|
6419
|
-
if (IFrameSplitOperator.IsBool(buttonData.
|
|
6420
|
-
buttonData.
|
|
6531
|
+
if (IFrameSplitOperator.IsBool(buttonData.Data.Checked))
|
|
6532
|
+
buttonData.Data.Checked=!buttonData.Data.Checked;
|
|
6421
6533
|
else
|
|
6422
|
-
buttonData.
|
|
6534
|
+
buttonData.Data.Checked=true;
|
|
6423
6535
|
}
|
|
6424
6536
|
|
|
6425
6537
|
status.Redraw=true;
|
|
6426
6538
|
return true;
|
|
6427
6539
|
}
|
|
6540
|
+
else if (buttonData.Type===1) //button
|
|
6541
|
+
{
|
|
6542
|
+
var sendData={ Column:buttonData.Column, Index:buttonData.Index, Stock:buttonData.Stock, Data:buttonData.Data };
|
|
6543
|
+
this.SendClickEvent(JSCHART_EVENT_ID.ON_CLICK_REPORT_BUTTON, sendData)
|
|
6544
|
+
|
|
6545
|
+
status.Redraw=true;
|
|
6546
|
+
return true;
|
|
6547
|
+
}
|
|
6428
6548
|
|
|
6429
6549
|
return false;
|
|
6430
6550
|
}
|
|
@@ -6679,7 +6799,7 @@ function ChartReport()
|
|
|
6679
6799
|
|
|
6680
6800
|
if (x>=rt.Left && x<=rt.Right && y>=rt.Top && y<=rt.Bottom)
|
|
6681
6801
|
{
|
|
6682
|
-
return { Rect:item.Rect, Stock:item.Stock, Column:item.Column, Index:item.Index, Type:item.Type };
|
|
6802
|
+
return { Rect:item.Rect, Stock:item.Stock, Column:item.Column, Index:item.Index, Type:item.Type, Data:item.Data };
|
|
6683
6803
|
}
|
|
6684
6804
|
}
|
|
6685
6805
|
}
|
|
@@ -532,7 +532,7 @@ function GetBlackStyle()
|
|
|
532
532
|
|
|
533
533
|
Item:
|
|
534
534
|
{
|
|
535
|
-
Mergin:{ Top:2, Bottom:
|
|
535
|
+
Mergin:{ Top:2, Bottom:4,Left:5, Right:5 },
|
|
536
536
|
Font:{ Size:15, Name:"微软雅黑"},
|
|
537
537
|
BarMergin:{ Top:2, Left:3, Right:3, Bottom:2 },
|
|
538
538
|
NameFont:{ Size:14, Name:"微软雅黑" },
|