hqchart 1.1.15191 → 1.1.15210
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 +61 -61
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogDrawTool.js +136 -103
- package/src/jscommon/umychart.js +62 -33
- package/src/jscommon/umychart.resource/css/tools.css +47 -3
- package/src/jscommon/umychart.resource/font/drawtool/demo_index.html +49 -49
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.css +11 -11
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.js +1 -1
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.json +14 -14
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.ttf +0 -0
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.woff +0 -0
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.woff2 +0 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +63 -34
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +199 -137
|
@@ -4616,6 +4616,17 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4616
4616
|
if (IFrameSplitOperator.IsBool(item.Enable)) chart.FastSlideConfig.Enable=item.Enable;
|
|
4617
4617
|
}
|
|
4618
4618
|
|
|
4619
|
+
if (option.DataMove)
|
|
4620
|
+
{
|
|
4621
|
+
var item=option.DataMove;
|
|
4622
|
+
|
|
4623
|
+
var subItem=item.Touch;
|
|
4624
|
+
if (subItem && IFrameSplitOperator.IsBool(subItem.EnableLR)) chart.DataMoveConfig.Touch.EnableLR=subItem.EnableLR;
|
|
4625
|
+
|
|
4626
|
+
var subItem=item.Mouse;
|
|
4627
|
+
if (subItem && IFrameSplitOperator.IsBool(subItem.EnableLR)) chart.DataMoveConfig.Mouse.EnableLR=subItem.EnableLR;
|
|
4628
|
+
}
|
|
4629
|
+
|
|
4619
4630
|
if (chart.ClassName=="KLineChartContainer")
|
|
4620
4631
|
{
|
|
4621
4632
|
if (!option.DragSelectRect)
|
|
@@ -7570,8 +7581,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7570
7581
|
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
7571
7582
|
this.AryHotKey=[]; //热键 { KeyID:87, SecondKeyID:1, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
7572
7583
|
|
|
7573
|
-
this.FastSlideConfig={ MinDistance:500, MinSpeed:3, MaxTime:250, Enable:false };
|
|
7574
|
-
this.KeyboardMove={ Timer:null, Delay:100 , PressTime:500, Enable:false, Event:null };
|
|
7584
|
+
this.FastSlideConfig={ MinDistance:500, MinSpeed:3, MaxTime:250, Enable:false }; //快速滑动配置 MinDistance=最小的距离 MinSpeed=最小速度 MaxTime=最大间隔时间(ms)
|
|
7585
|
+
this.KeyboardMove={ Timer:null, Delay:100 , PressTime:500, Enable:false, Event:null }; //键盘左右移动 PressTime=长按时间
|
|
7586
|
+
this.DataMoveConfig={ Touch:{ EnableLR: true}, Mouse:{ EnableLR:true } }; //数据移动配置
|
|
7575
7587
|
|
|
7576
7588
|
this.MapEventListenerCache=new Map(); //addEventListener 监听事件 key=type:"keydown|keyup ....", value:{ Callback:, Option: }
|
|
7577
7589
|
|
|
@@ -9072,7 +9084,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9072
9084
|
}
|
|
9073
9085
|
else if (this.DragMode==1 || isDragSelectRect || isDragSubSelectRect) //数据上下左右拖拽 区间选择框左右拖动
|
|
9074
9086
|
{
|
|
9075
|
-
this.
|
|
9087
|
+
if (this.DataMoveConfig.Mouse.EnableLR)
|
|
9088
|
+
this.OnDragMode_One({X:moveSetp, Y:moveSetpY}, e);
|
|
9076
9089
|
}
|
|
9077
9090
|
}
|
|
9078
9091
|
|
|
@@ -10251,18 +10264,21 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10251
10264
|
var oneStepWidth=this.GetMoveOneStepWidth();
|
|
10252
10265
|
if (moveSetp<oneStepWidth) return;
|
|
10253
10266
|
|
|
10254
|
-
if(this.
|
|
10255
|
-
{
|
|
10256
|
-
this.UpdataDataoffset();
|
|
10257
|
-
this.UpdatePointByCursorIndex();
|
|
10258
|
-
this.UpdateFrameMaxMin();
|
|
10259
|
-
this.ResetFrameXYSplit();
|
|
10260
|
-
this.Draw();
|
|
10261
|
-
this.OnKLinePageChange("OnTouchMove");
|
|
10262
|
-
}
|
|
10263
|
-
else
|
|
10267
|
+
if (this.DataMoveConfig.Touch.EnableLR)
|
|
10264
10268
|
{
|
|
10265
|
-
if
|
|
10269
|
+
if(this.DataMove(moveSetp,isLeft))
|
|
10270
|
+
{
|
|
10271
|
+
this.UpdataDataoffset();
|
|
10272
|
+
this.UpdatePointByCursorIndex();
|
|
10273
|
+
this.UpdateFrameMaxMin();
|
|
10274
|
+
this.ResetFrameXYSplit();
|
|
10275
|
+
this.Draw();
|
|
10276
|
+
this.OnKLinePageChange("OnTouchMove");
|
|
10277
|
+
}
|
|
10278
|
+
else
|
|
10279
|
+
{
|
|
10280
|
+
if (this.DragDownloadData) this.DragDownloadData();
|
|
10281
|
+
}
|
|
10266
10282
|
}
|
|
10267
10283
|
|
|
10268
10284
|
drag.LastMove.X=touches[0].clientX;
|
|
@@ -14638,6 +14654,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
14638
14654
|
if (IFrameSplitOperator.IsBool(frameItem.IsShowIndexTitle)) frame.IsShowIndexTitle=frameItem.IsShowIndexTitle;
|
|
14639
14655
|
if (frameItem.ClientBGColor) frame.ClientBGColor=frameItem.ClientBGColor;
|
|
14640
14656
|
|
|
14657
|
+
if (frameItem.Toolbar)
|
|
14658
|
+
{
|
|
14659
|
+
var subItem=frameItem.Toolbar.Margin;
|
|
14660
|
+
if (subItem && IFrameSplitOperator.IsNumber(subItem.Right)) frame.ToolbarConfig.Margin.Right=subItem.Right;
|
|
14661
|
+
}
|
|
14662
|
+
|
|
14641
14663
|
//分时图属性
|
|
14642
14664
|
if (IFrameSplitOperator.IsBool(frameItem.CloseBeforeButton)) frameItem.IsShowCloseButton=frameItem.CloseBeforeButton;
|
|
14643
14665
|
if (frame.YSplitOperator.RightTextConfig) //主图右侧坐标设置
|
|
@@ -17964,6 +17986,8 @@ function AverageWidthFrame()
|
|
|
17964
17986
|
this.ExportDataButton=CloneData(g_JSChartResource.Buttons.ExportData);
|
|
17965
17987
|
this.AddIndexWindowButton=CloneData(g_JSChartResource.Buttons.AddIndexWindow);
|
|
17966
17988
|
this.IndexHelpButton=CloneData(g_JSChartResource.Buttons.IndexHelp);
|
|
17989
|
+
|
|
17990
|
+
this.ToolbarConfig={ Margin:{ Right:3 } },
|
|
17967
17991
|
|
|
17968
17992
|
this.ButtonTooltip=CloneData(g_JSChartResource.Buttons.Tooltip);
|
|
17969
17993
|
|
|
@@ -18033,7 +18057,7 @@ function AverageWidthFrame()
|
|
|
18033
18057
|
var border=this.GetBorder();
|
|
18034
18058
|
if (this.IsHScreen)
|
|
18035
18059
|
{
|
|
18036
|
-
var y=border.Bottom-
|
|
18060
|
+
var y=border.Bottom-this.ToolbarConfig.Margin.Right;
|
|
18037
18061
|
var x=border.RightTitle+this.ChartBorder.TitleHeight/2;
|
|
18038
18062
|
|
|
18039
18063
|
this.ToolbarCacheSize={ RToolbar:{ Right:y, Left:y }}; //相当于额 Top, Bottom
|
|
@@ -18072,7 +18096,7 @@ function AverageWidthFrame()
|
|
|
18072
18096
|
}
|
|
18073
18097
|
else
|
|
18074
18098
|
{
|
|
18075
|
-
var right=border.RightEx-
|
|
18099
|
+
var right=border.RightEx-this.ToolbarConfig.Margin.Right;
|
|
18076
18100
|
var left=border.Left;
|
|
18077
18101
|
var yButton=border.Top+this.ChartBorder.TitleHeight/2;
|
|
18078
18102
|
|
|
@@ -70288,17 +70312,13 @@ IChartDrawPicture.ColorToRGBA=function(color,opacity)
|
|
|
70288
70312
|
var reg = /^(rgb|RGB)/;
|
|
70289
70313
|
if (reg.test(color))
|
|
70290
70314
|
{
|
|
70291
|
-
var
|
|
70292
|
-
var
|
|
70293
|
-
|
|
70294
|
-
|
|
70295
|
-
{
|
|
70296
|
-
var hex = Number(colorArr[i]).toString(16);
|
|
70297
|
-
if (hex === "0") hex += hex;
|
|
70298
|
-
strHex += hex;
|
|
70299
|
-
}
|
|
70315
|
+
var aryColor = color.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(","); // 把RGB的3个数值变成数组
|
|
70316
|
+
var r = parseInt(aryColor[0]);
|
|
70317
|
+
var g = parseInt(aryColor[1]);
|
|
70318
|
+
var b = parseInt(aryColor[2]);
|
|
70300
70319
|
|
|
70301
|
-
|
|
70320
|
+
var value=`rgba(${r},${g},${b},${opacity})`;
|
|
70321
|
+
return value;
|
|
70302
70322
|
}
|
|
70303
70323
|
|
|
70304
70324
|
return "rgba(" + parseInt("0x" + color.slice(1, 3)) + "," + parseInt("0x" + color.slice(3, 5)) + "," + parseInt("0x" + color.slice(5, 7)) + "," + opacity + ")";
|
|
@@ -70309,7 +70329,8 @@ IChartDrawPicture.RGBToHex=function(rgb)
|
|
|
70309
70329
|
// Choose correct separator
|
|
70310
70330
|
let sep = rgb.indexOf(",") > -1 ? "," : " ";
|
|
70311
70331
|
// Turn "rgb(r,g,b)" into [r,g,b]
|
|
70312
|
-
rgb = rgb.substr(
|
|
70332
|
+
if (rgb.includes("rgba(") || rgb.includes("RGBA(")) rgb = rgb.substr(5).split(")")[0].split(sep);
|
|
70333
|
+
else rgb = rgb.substr(4).split(")")[0].split(sep);
|
|
70313
70334
|
|
|
70314
70335
|
let r = (+rgb[0]).toString(16),
|
|
70315
70336
|
g = (+rgb[1]).toString(16),
|
|
@@ -92390,12 +92411,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
92390
92411
|
if (this.ChartDrawStorage)
|
|
92391
92412
|
{
|
|
92392
92413
|
this.ChartDrawStorageCache=this.ChartDrawStorage.GetDrawData( {Symbol:this.Symbol, Period:this.Period} );
|
|
92393
|
-
|
|
92394
|
-
|
|
92395
|
-
|
|
92396
|
-
|
|
92397
|
-
|
|
92398
|
-
}
|
|
92414
|
+
}
|
|
92415
|
+
|
|
92416
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_LOAD_DRAWPICTURE);
|
|
92417
|
+
if (event && event.Callback)
|
|
92418
|
+
{
|
|
92419
|
+
var sendData={ Symbol:this.Symbol, Period:this.Period, DrawStorage:this.ChartDrawStorage, ChartDrawStorageCache:this.ChartDrawStorageCache };
|
|
92420
|
+
event.Callback(event,sendData,this);
|
|
92399
92421
|
}
|
|
92400
92422
|
}
|
|
92401
92423
|
|
|
@@ -100245,6 +100267,13 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
100245
100267
|
{
|
|
100246
100268
|
this.ChartDrawStorageCache=this.ChartDrawStorage.GetDrawData( { Symbol:this.Symbol, Period:888888888 } );
|
|
100247
100269
|
}
|
|
100270
|
+
|
|
100271
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_LOAD_DRAWPICTURE);
|
|
100272
|
+
if (event && event.Callback)
|
|
100273
|
+
{
|
|
100274
|
+
var sendData={ Symbol:this.Symbol, Period:888888888, DrawStorage:this.ChartDrawStorage, ChartDrawStorageCache:this.ChartDrawStorageCache };
|
|
100275
|
+
event.Callback(event,sendData,this);
|
|
100276
|
+
}
|
|
100248
100277
|
}
|
|
100249
100278
|
|
|
100250
100279
|
this.CreateChartDrawPictureByStorage=function() //把缓存(this.ChartDrawStorageCache) 画图工具创建出来
|
|
@@ -158010,8 +158039,6 @@ function JSDialogDrawTool()
|
|
|
158010
158039
|
this.AryDivChart=[];
|
|
158011
158040
|
this.HQChart=null;
|
|
158012
158041
|
this.LineColor='rgb(255,140,0)';
|
|
158013
|
-
this.LineColorIndex=0;
|
|
158014
|
-
this.RandomLineColor=["rgb(255,69,0)", "rgb(0,191,255)", "rgb(255,0,255)", "rgb(255,105,180)"];
|
|
158015
158042
|
this.LineWidth=1*GetDevicePixelRatio();
|
|
158016
158043
|
this.ColumnCount=5
|
|
158017
158044
|
|
|
@@ -158022,7 +158049,6 @@ function JSDialogDrawTool()
|
|
|
158022
158049
|
this.Inital=function(hqchart)
|
|
158023
158050
|
{
|
|
158024
158051
|
this.LineColor=g_JSChartResource.DrawPicture.LineColor[0];
|
|
158025
|
-
this.RandomLineColor.splice(0,0,this.LineColor);
|
|
158026
158052
|
this.HQChart=hqchart;
|
|
158027
158053
|
}
|
|
158028
158054
|
|
|
@@ -158251,6 +158277,13 @@ function JSDialogDrawTool()
|
|
|
158251
158277
|
if (item.Type==2 && item.Data.ID==JS_DRAWTOOL_MENU_ID.CMD_CHANGE_LINE_COLOR_ID) //颜色
|
|
158252
158278
|
{
|
|
158253
158279
|
spanDom.style['color']=this.LineColor;
|
|
158280
|
+
var inputColor=document.createElement("input");
|
|
158281
|
+
inputColor.setAttribute("type", "color");
|
|
158282
|
+
inputColor.setAttribute("value", IChartDrawPicture.RGBToHex(this.LineColor));
|
|
158283
|
+
inputColor.className="UMyChart_DrawTool_Input_Color";
|
|
158284
|
+
inputColor.oninput=(e)=>{ this.OnChangeColor(e, data) };
|
|
158285
|
+
tdDom.appendChild(inputColor);
|
|
158286
|
+
data.InputColor=inputColor;
|
|
158254
158287
|
}
|
|
158255
158288
|
else if (item.Type==2 && item.Data.ID==JS_DRAWTOOL_MENU_ID.CMD_CROSS_PERIOD_ID)
|
|
158256
158289
|
{
|
|
@@ -158267,16 +158300,20 @@ function JSDialogDrawTool()
|
|
|
158267
158300
|
}
|
|
158268
158301
|
|
|
158269
158302
|
|
|
158270
|
-
|
|
158271
|
-
this.OnChangeLineColor=function(data)
|
|
158303
|
+
this.OnChangeColor=function(e, data)
|
|
158272
158304
|
{
|
|
158273
|
-
|
|
158274
|
-
|
|
158275
|
-
this.LineColor=
|
|
158276
|
-
|
|
158305
|
+
var color=data.InputColor.value;
|
|
158306
|
+
color=IChartDrawPicture.HexToRGB(color);
|
|
158307
|
+
this.LineColor=color;
|
|
158277
158308
|
data.Span.style['color']=this.LineColor;
|
|
158278
158309
|
}
|
|
158279
158310
|
|
|
158311
|
+
this.OnChangeLineColor=function(data)
|
|
158312
|
+
{
|
|
158313
|
+
data.InputColor.setAttribute("value", IChartDrawPicture.RGBToHex(this.LineColor));
|
|
158314
|
+
data.InputColor.click(); //显示选色器
|
|
158315
|
+
}
|
|
158316
|
+
|
|
158280
158317
|
//清空所有画图工具
|
|
158281
158318
|
this.DeleteAllChart=function()
|
|
158282
158319
|
{
|
|
@@ -158520,24 +158557,19 @@ function JSDialogModifyDraw()
|
|
|
158520
158557
|
this.ModifyTextButton=null;
|
|
158521
158558
|
this.AdvancedButton=null;
|
|
158522
158559
|
|
|
158523
|
-
this.RandomLineColor=["rgb(255,69,0)", "rgb(173,255,47)", "rgb(238,154,73)", "rgb(255,105,180)"]; //线段颜色
|
|
158524
|
-
this.RandomBGColor=["rgba(210,251,209,0.8)", "rgb(217,217,253)", "rgb(255,208,204)", "rgb(252,249,206)"]; //背景颜色
|
|
158525
|
-
this.RandomFontColor=["rgb(0,0,0)", "rgb(255, 0, 0)", "rgb(20, 255, 0)", "rgb(255, 0, 255)"]; //文字颜色
|
|
158526
|
-
this.RandomBorderColor=["rgb(0,0,0)", "rgb(5, 246, 143)", "rgb(139, 137, 137)", "rgb(255, 20, 147)"]; //边框颜色
|
|
158527
|
-
|
|
158528
158560
|
this.AryButton=
|
|
158529
158561
|
[
|
|
158530
|
-
{ Title:"
|
|
158531
|
-
{ Title:"修改字体颜色", ClassName: 'hqchart_drawtool icon-
|
|
158532
|
-
{ Title:"修改背景颜色", ClassName: 'hqchart_drawtool icon-zitibeijingse', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_CHANGE_BG_COLOR_ID }},
|
|
158533
|
-
{ Title:"修改边框颜色", ClassName: 'hqchart_drawtool icon-biankuang', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_CHANGE_BORDER_COLOR_ID }},
|
|
158534
|
-
{ Title:"字体放大", ClassName: 'hqchart_drawtool icon-zoomin', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_ZOOM_FONT_ID }},
|
|
158535
|
-
{ Title:"字体缩小", ClassName: 'hqchart_drawtool icon-zoomout', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_ZOOM_OUT_FONT_ID }},
|
|
158536
|
-
{ Title:"随机生成文字内容", ClassName: 'hqchart_drawtool icon-bianji', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_MODIFY_TEXT_ID }},
|
|
158537
|
-
{ Title:"高级设置", ClassName: 'hqchart_drawtool icon-setting', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_ADVANCED_SETTING_ID }},
|
|
158562
|
+
{ Title:"修改图形颜色", ClassName: 'hqchart_drawtool icon-Vector UMyChart_Draw_Modify_Dialog_Button_Color_Span', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_CHANGE_LINE_COLOR_ID }},
|
|
158563
|
+
{ Title:"修改字体颜色", ClassName: 'hqchart_drawtool icon-zitiyanse1 UMyChart_Draw_Modify_Dialog_Button_Color_Span ', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_CHANGE_FONT_COLOR_ID }},
|
|
158564
|
+
{ Title:"修改背景颜色", ClassName: 'hqchart_drawtool icon-zitibeijingse UMyChart_Draw_Modify_Dialog_Button_Color_Span', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_CHANGE_BG_COLOR_ID }},
|
|
158565
|
+
{ Title:"修改边框颜色", ClassName: 'hqchart_drawtool icon-biankuang UMyChart_Draw_Modify_Dialog_Button_Color_Span', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_CHANGE_BORDER_COLOR_ID }},
|
|
158566
|
+
{ Title:"字体放大", ClassName: 'hqchart_drawtool icon-zoomin UMyChart_Draw_Modify_Dialog_Button_Span', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_ZOOM_FONT_ID }},
|
|
158567
|
+
{ Title:"字体缩小", ClassName: 'hqchart_drawtool icon-zoomout UMyChart_Draw_Modify_Dialog_Button_Span', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_ZOOM_OUT_FONT_ID }},
|
|
158568
|
+
{ Title:"随机生成文字内容", ClassName: 'hqchart_drawtool icon-bianji UMyChart_Draw_Modify_Dialog_Button_Span', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_MODIFY_TEXT_ID }},
|
|
158569
|
+
{ Title:"高级设置", ClassName: 'hqchart_drawtool icon-setting UMyChart_Draw_Modify_Dialog_Button_Span', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_ADVANCED_SETTING_ID }},
|
|
158538
158570
|
|
|
158539
158571
|
{ Title:"上锁", ClassName: 'hqchart_drawtool icon-lock', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_LOCK_DRAW_CHART_ID }},
|
|
158540
|
-
{ Title:"删除图形", ClassName: 'hqchart_drawtool icon-recycle_bin', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_DELETE_DRAW_CHART_ID }},
|
|
158572
|
+
{ Title:"删除图形", ClassName: 'hqchart_drawtool icon-recycle_bin UMyChart_Draw_Modify_Dialog_Button_Span', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_DELETE_DRAW_CHART_ID }},
|
|
158541
158573
|
];
|
|
158542
158574
|
|
|
158543
158575
|
this.RestoreFocusDelay=800;
|
|
@@ -158593,10 +158625,9 @@ function JSDialogModifyDraw()
|
|
|
158593
158625
|
spanTooltip.innerText=item.Title;
|
|
158594
158626
|
divItem.appendChild(spanTooltip);
|
|
158595
158627
|
|
|
158596
|
-
|
|
158597
158628
|
var spanDom=document.createElement("span");
|
|
158598
158629
|
spanDom.className=item.ClassName;
|
|
158599
|
-
spanDom.classList.add("UMyChart_Draw_Modify_Dialog_Button_Span");
|
|
158630
|
+
//spanDom.classList.add("UMyChart_Draw_Modify_Dialog_Button_Span");
|
|
158600
158631
|
divItem.appendChild(spanDom);
|
|
158601
158632
|
|
|
158602
158633
|
|
|
@@ -158610,17 +158641,33 @@ function JSDialogModifyDraw()
|
|
|
158610
158641
|
{
|
|
158611
158642
|
case JS_DRAWTOOL_MENU_ID.CMD_CHANGE_LINE_COLOR_ID:
|
|
158612
158643
|
this.ColorButton=data;
|
|
158644
|
+
var divColorBar=this.CreateColorBar(data);
|
|
158645
|
+
divItem.appendChild(divColorBar);
|
|
158646
|
+
var inputColor=this.CreateInputColor(data);
|
|
158647
|
+
divItem.appendChild(inputColor);
|
|
158613
158648
|
break;
|
|
158614
158649
|
case JS_DRAWTOOL_MENU_ID.CMD_CHANGE_BG_COLOR_ID:
|
|
158615
158650
|
this.BGColorButton=data;
|
|
158651
|
+
var divColorBar=this.CreateColorBar(data);
|
|
158652
|
+
divItem.appendChild(divColorBar);
|
|
158653
|
+
var inputColor=this.CreateInputColor(data);
|
|
158654
|
+
divItem.appendChild(inputColor);
|
|
158616
158655
|
divItem.style.display="none";
|
|
158617
158656
|
break;
|
|
158618
158657
|
case JS_DRAWTOOL_MENU_ID.CMD_CHANGE_FONT_COLOR_ID:
|
|
158619
158658
|
this.FontColorButton=data;
|
|
158659
|
+
var divColorBar=this.CreateColorBar(data);
|
|
158660
|
+
divItem.appendChild(divColorBar);
|
|
158661
|
+
var inputColor=this.CreateInputColor(data);
|
|
158662
|
+
divItem.appendChild(inputColor);
|
|
158620
158663
|
divItem.style.display="none";
|
|
158621
158664
|
break;
|
|
158622
158665
|
case JS_DRAWTOOL_MENU_ID.CMD_CHANGE_BORDER_COLOR_ID:
|
|
158623
158666
|
this.BorderColorButton=data;
|
|
158667
|
+
var divColorBar=this.CreateColorBar(data);
|
|
158668
|
+
divItem.appendChild(divColorBar);
|
|
158669
|
+
var inputColor=this.CreateInputColor(data);
|
|
158670
|
+
divItem.appendChild(inputColor);
|
|
158624
158671
|
divItem.style.display="none";
|
|
158625
158672
|
break;
|
|
158626
158673
|
case JS_DRAWTOOL_MENU_ID.CMD_LOCK_DRAW_CHART_ID:
|
|
@@ -158647,6 +158694,27 @@ function JSDialogModifyDraw()
|
|
|
158647
158694
|
parentDivDom.appendChild(divItem);
|
|
158648
158695
|
}
|
|
158649
158696
|
|
|
158697
|
+
this.CreateInputColor=function(data)
|
|
158698
|
+
{
|
|
158699
|
+
var inputColor=document.createElement("input");
|
|
158700
|
+
inputColor.setAttribute("type", "color");
|
|
158701
|
+
inputColor.className="UMyChart_Draw_Modify_Input_Color";
|
|
158702
|
+
data.InputColor=inputColor;
|
|
158703
|
+
inputColor.oninput=(e)=>{ this.OnChangeColor(e, data) };
|
|
158704
|
+
|
|
158705
|
+
return inputColor;
|
|
158706
|
+
}
|
|
158707
|
+
|
|
158708
|
+
//颜色块
|
|
158709
|
+
this.CreateColorBar=function(data)
|
|
158710
|
+
{
|
|
158711
|
+
var divColor=document.createElement("div");
|
|
158712
|
+
divColor.className="UMyChart_Draw_Modify_Dialog_Button_ColorBar_Div";
|
|
158713
|
+
data.DivColorBar=divColor;
|
|
158714
|
+
|
|
158715
|
+
return divColor;
|
|
158716
|
+
}
|
|
158717
|
+
|
|
158650
158718
|
this.OnClickButton=function(e, data)
|
|
158651
158719
|
{
|
|
158652
158720
|
console.log('[JSDialogModifyDraw::OnClickButton] ', data);
|
|
@@ -158656,19 +158724,19 @@ function JSDialogModifyDraw()
|
|
|
158656
158724
|
switch(id)
|
|
158657
158725
|
{
|
|
158658
158726
|
case JS_DRAWTOOL_MENU_ID.CMD_CHANGE_LINE_COLOR_ID:
|
|
158659
|
-
this.ModifyLineColor();
|
|
158727
|
+
this.ModifyLineColor(data);
|
|
158660
158728
|
break;
|
|
158661
158729
|
case JS_DRAWTOOL_MENU_ID.CMD_DELETE_DRAW_CHART_ID:
|
|
158662
158730
|
this.DeleteDrawPicture();
|
|
158663
158731
|
break;
|
|
158664
158732
|
case JS_DRAWTOOL_MENU_ID.CMD_CHANGE_BG_COLOR_ID:
|
|
158665
|
-
this.ModifyBGColor();
|
|
158733
|
+
this.ModifyBGColor(data);
|
|
158666
158734
|
break;
|
|
158667
158735
|
case JS_DRAWTOOL_MENU_ID.CMD_CHANGE_FONT_COLOR_ID:
|
|
158668
|
-
this.ModifyFontColor();
|
|
158736
|
+
this.ModifyFontColor(data);
|
|
158669
158737
|
break;
|
|
158670
158738
|
case JS_DRAWTOOL_MENU_ID.CMD_CHANGE_BORDER_COLOR_ID:
|
|
158671
|
-
this.ModifyBorderColor();
|
|
158739
|
+
this.ModifyBorderColor(data);
|
|
158672
158740
|
break;
|
|
158673
158741
|
case JS_DRAWTOOL_MENU_ID.CMD_LOCK_DRAW_CHART_ID:
|
|
158674
158742
|
this.ModifyLockChart();
|
|
@@ -158745,83 +158813,89 @@ function JSDialogModifyDraw()
|
|
|
158745
158813
|
dom.style.display=diaplay;
|
|
158746
158814
|
}
|
|
158747
158815
|
|
|
158748
|
-
this.
|
|
158816
|
+
this.OnChangeColor=function(e, data)
|
|
158749
158817
|
{
|
|
158750
|
-
|
|
158751
|
-
|
|
158818
|
+
if (!this.ChartPicture || !this.HQChart) return;
|
|
158819
|
+
|
|
158820
|
+
var color=data.InputColor.value;
|
|
158821
|
+
color=IChartDrawPicture.HexToRGB(color);
|
|
158822
|
+
|
|
158823
|
+
if (data.Item.Data.ID==JS_DRAWTOOL_MENU_ID.CMD_CHANGE_LINE_COLOR_ID)
|
|
158752
158824
|
{
|
|
158753
|
-
|
|
158754
|
-
|
|
158755
|
-
|
|
158756
|
-
break;
|
|
158757
|
-
}
|
|
158758
|
-
}
|
|
158825
|
+
this.ChartPicture.LineColor=color;
|
|
158826
|
+
if (this.ColorButton) this.ColorButton.DivColorBar.style['background-color']=color;
|
|
158827
|
+
if (this.HQChart.ChartDrawStorage) this.HQChart.ChartDrawStorage.SaveDrawData(this.ChartPicture); //保存下
|
|
158759
158828
|
|
|
158760
|
-
|
|
158761
|
-
|
|
158829
|
+
this.HQChart.Draw();
|
|
158830
|
+
}
|
|
158831
|
+
else if (data.Item.Data.ID==JS_DRAWTOOL_MENU_ID.CMD_CHANGE_BORDER_COLOR_ID)
|
|
158832
|
+
{
|
|
158833
|
+
if (this.ChartPicture.ClassName=="ChartDrawNote") this.ChartPicture.NoteBorderColor=color;
|
|
158834
|
+
else this.ChartPicture.BorderColor=color;
|
|
158835
|
+
|
|
158836
|
+
if (this.BorderColorButton) this.BorderColorButton.DivColorBar.style['background-color']=color;
|
|
158837
|
+
if (this.HQChart.ChartDrawStorage) this.HQChart.ChartDrawStorage.SaveDrawData(this.ChartPicture); //保存下
|
|
158762
158838
|
|
|
158763
|
-
|
|
158764
|
-
|
|
158839
|
+
this.HQChart.Draw();
|
|
158840
|
+
}
|
|
158841
|
+
else if (data.Item.Data.ID==JS_DRAWTOOL_MENU_ID.CMD_CHANGE_FONT_COLOR_ID)
|
|
158842
|
+
{
|
|
158843
|
+
if (this.ChartPicture.ClassName=="ChartDrawNote") this.ChartPicture.NoteTextColor=color;
|
|
158844
|
+
else this.ChartPicture.TextColor=color;
|
|
158765
158845
|
|
|
158766
|
-
|
|
158767
|
-
|
|
158768
|
-
if (!this.ChartPicture || !this.HQChart) return;
|
|
158846
|
+
if (this.FontColorButton) this.FontColorButton.DivColorBar.style['background-color']=color;
|
|
158847
|
+
if (this.HQChart.ChartDrawStorage) this.HQChart.ChartDrawStorage.SaveDrawData(this.ChartPicture); //保存下
|
|
158769
158848
|
|
|
158770
|
-
|
|
158849
|
+
this.HQChart.Draw();
|
|
158850
|
+
}
|
|
158851
|
+
else if (data.Item.Data.ID==JS_DRAWTOOL_MENU_ID.CMD_CHANGE_BG_COLOR_ID)
|
|
158852
|
+
{
|
|
158853
|
+
color=IChartDrawPicture.ColorToRGBA(color, 0.8);
|
|
158854
|
+
if (this.ChartPicture.ClassName=="ChartDrawNote") this.ChartPicture.NoteBGColor=color;
|
|
158855
|
+
else this.ChartPicture.BGColor=color;
|
|
158771
158856
|
|
|
158772
|
-
|
|
158773
|
-
|
|
158857
|
+
if (this.BGColorButton) this.BGColorButton.DivColorBar.style['background-color']=color;
|
|
158858
|
+
if (this.HQChart.ChartDrawStorage) this.HQChart.ChartDrawStorage.SaveDrawData(this.ChartPicture); //保存下
|
|
158774
158859
|
|
|
158775
|
-
|
|
158860
|
+
this.HQChart.Draw();
|
|
158861
|
+
}
|
|
158862
|
+
|
|
158863
|
+
}
|
|
158776
158864
|
|
|
158777
|
-
|
|
158865
|
+
this.ShowColorPicker=function(data, defaultColor)
|
|
158866
|
+
{
|
|
158867
|
+
if (!data.InputColor) return;
|
|
158778
158868
|
|
|
158779
|
-
|
|
158869
|
+
data.InputColor.setAttribute("value", IChartDrawPicture.RGBToHex(defaultColor));
|
|
158870
|
+
data.InputColor.click(); //显示选色器
|
|
158780
158871
|
}
|
|
158781
158872
|
|
|
158782
|
-
this.
|
|
158873
|
+
this.ModifyLineColor=function(data)
|
|
158783
158874
|
{
|
|
158784
158875
|
if (!this.ChartPicture || !this.HQChart) return;
|
|
158785
158876
|
|
|
158786
|
-
|
|
158787
|
-
|
|
158788
|
-
|
|
158789
|
-
var color=this.GetRandomColor(this.ChartPicture.NoteTextColor, this.RandomFontColor);
|
|
158790
|
-
this.ChartPicture.NoteTextColor=color;
|
|
158791
|
-
}
|
|
158792
|
-
else
|
|
158793
|
-
{
|
|
158794
|
-
var color=this.GetRandomColor(this.ChartPicture.TextColor, this.RandomFontColor);
|
|
158795
|
-
this.ChartPicture.TextColor=color;
|
|
158796
|
-
}
|
|
158797
|
-
|
|
158798
|
-
|
|
158799
|
-
if (this.FontColorButton) this.FontColorButton.Span.style['color']=color;
|
|
158877
|
+
var color=this.ChartPicture.LineColor;
|
|
158878
|
+
this.ShowColorPicker(data, color);
|
|
158879
|
+
}
|
|
158800
158880
|
|
|
158801
|
-
|
|
158881
|
+
this.ModifyFontColor=function(data)
|
|
158882
|
+
{
|
|
158883
|
+
if (!this.ChartPicture || !this.HQChart) return;
|
|
158802
158884
|
|
|
158803
|
-
this.
|
|
158885
|
+
var color=this.ChartPicture.TextColor;
|
|
158886
|
+
if (this.ChartPicture.ClassName=="ChartDrawNote") color=this.ChartPicture.NoteTextColor;
|
|
158887
|
+
|
|
158888
|
+
this.ShowColorPicker(data, color);
|
|
158804
158889
|
}
|
|
158805
158890
|
|
|
158806
|
-
this.ModifyBGColor=function()
|
|
158891
|
+
this.ModifyBGColor=function(data)
|
|
158807
158892
|
{
|
|
158808
158893
|
if (!this.ChartPicture || !this.HQChart) return;
|
|
158809
158894
|
|
|
158810
|
-
|
|
158811
|
-
|
|
158812
|
-
var color=this.GetRandomColor(this.ChartPicture.NoteBGColor, this.RandomBGColor);
|
|
158813
|
-
this.ChartPicture.NoteBGColor=color;
|
|
158814
|
-
}
|
|
158815
|
-
else
|
|
158816
|
-
{
|
|
158817
|
-
var color=this.GetRandomColor(this.ChartPicture.BGColor, this.RandomBGColor);
|
|
158818
|
-
this.ChartPicture.BGColor=color;
|
|
158819
|
-
}
|
|
158895
|
+
var color=this.ChartPicture.BGColor;
|
|
158896
|
+
if (this.ChartPicture.ClassName=="ChartDrawNote") color=this.ChartPicture.NoteBGColor;
|
|
158820
158897
|
|
|
158821
|
-
|
|
158822
|
-
if (this.HQChart.ChartDrawStorage) this.HQChart.ChartDrawStorage.SaveDrawData(this.ChartPicture); //保存下
|
|
158823
|
-
|
|
158824
|
-
this.HQChart.Draw();
|
|
158898
|
+
this.ShowColorPicker(data, color);
|
|
158825
158899
|
}
|
|
158826
158900
|
|
|
158827
158901
|
this.ModifyLockChart=function()
|
|
@@ -158848,26 +158922,14 @@ function JSDialogModifyDraw()
|
|
|
158848
158922
|
}
|
|
158849
158923
|
}
|
|
158850
158924
|
|
|
158851
|
-
this.ModifyBorderColor=function()
|
|
158925
|
+
this.ModifyBorderColor=function(data)
|
|
158852
158926
|
{
|
|
158853
158927
|
if (!this.ChartPicture || !this.HQChart) return;
|
|
158854
158928
|
|
|
158855
|
-
|
|
158856
|
-
|
|
158857
|
-
var color=this.GetRandomColor(this.ChartPicture.NoteBorderColor, this.RandomBorderColor);
|
|
158858
|
-
this.ChartPicture.NoteBorderColor=color;
|
|
158859
|
-
}
|
|
158860
|
-
else
|
|
158861
|
-
{
|
|
158862
|
-
var color=this.GetRandomColor(this.ChartPicture.BorderColor, this.RandomBorderColor);
|
|
158863
|
-
this.ChartPicture.BorderColor=color;
|
|
158864
|
-
}
|
|
158865
|
-
|
|
158929
|
+
var color= this.ChartPicture.BorderColor;
|
|
158930
|
+
if (this.ChartPicture.ClassName=="ChartDrawNote") color=this.ChartPicture.NoteBorderColor;
|
|
158866
158931
|
|
|
158867
|
-
|
|
158868
|
-
if (this.HQChart.ChartDrawStorage) this.HQChart.ChartDrawStorage.SaveDrawData(this.ChartPicture); //保存下
|
|
158869
|
-
|
|
158870
|
-
this.HQChart.Draw();
|
|
158932
|
+
this.ShowColorPicker(data, color);
|
|
158871
158933
|
}
|
|
158872
158934
|
|
|
158873
158935
|
this.ModifyFontZoom=function(step)
|
|
@@ -158994,7 +159056,7 @@ function JSDialogModifyDraw()
|
|
|
158994
159056
|
this.ShowButton(item.Div, bShowLineColor?"inline":"none");
|
|
158995
159057
|
if (bShowLineColor)
|
|
158996
159058
|
{
|
|
158997
|
-
item.
|
|
159059
|
+
item.DivColorBar.style['background-color']=chart.LineColor;
|
|
158998
159060
|
}
|
|
158999
159061
|
}
|
|
159000
159062
|
|
|
@@ -159004,7 +159066,7 @@ function JSDialogModifyDraw()
|
|
|
159004
159066
|
this.ShowButton(item.Div, bShowBGColor?"inline":"none");
|
|
159005
159067
|
if (bShowBGColor)
|
|
159006
159068
|
{
|
|
159007
|
-
item.
|
|
159069
|
+
item.DivColorBar.style['background-color']=bgColor;
|
|
159008
159070
|
}
|
|
159009
159071
|
}
|
|
159010
159072
|
|
|
@@ -159014,7 +159076,7 @@ function JSDialogModifyDraw()
|
|
|
159014
159076
|
this.ShowButton(item.Div, bShowFontColor?"inline":"none");
|
|
159015
159077
|
if (bShowFontColor)
|
|
159016
159078
|
{
|
|
159017
|
-
item.
|
|
159079
|
+
item.DivColorBar.style['background-color']=fontColor;
|
|
159018
159080
|
}
|
|
159019
159081
|
}
|
|
159020
159082
|
|
|
@@ -159024,7 +159086,7 @@ function JSDialogModifyDraw()
|
|
|
159024
159086
|
this.ShowButton(item.Div, bShowBorderColor?"inline":"none");
|
|
159025
159087
|
if (bShowBorderColor)
|
|
159026
159088
|
{
|
|
159027
|
-
item.
|
|
159089
|
+
item.DivColorBar.style['background-color']=borderColor;
|
|
159028
159090
|
}
|
|
159029
159091
|
}
|
|
159030
159092
|
|
|
@@ -166124,7 +166186,7 @@ function HQChartScriptWorker()
|
|
|
166124
166186
|
|
|
166125
166187
|
|
|
166126
166188
|
|
|
166127
|
-
var HQCHART_VERSION="1.1.
|
|
166189
|
+
var HQCHART_VERSION="1.1.15209";
|
|
166128
166190
|
|
|
166129
166191
|
function PrintHQChartVersion()
|
|
166130
166192
|
{
|