hqchart 1.1.15198 → 1.1.15215
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 +32 -29
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogDrawTool.js +36 -19
- package/src/jscommon/umychart.DialogSearchIndex.js +10 -6
- package/src/jscommon/umychart.DialogTooltip.js +9 -5
- package/src/jscommon/umychart.PopMinuteChart.js +5 -4
- package/src/jscommon/umychart.js +45 -18
- package/src/jscommon/umychart.popMenu.js +6 -4
- package/src/jscommon/umychart.resource/css/tools.css +33 -5
- 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 +46 -19
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +112 -57
|
@@ -687,17 +687,17 @@ function JSDialogModifyDraw()
|
|
|
687
687
|
|
|
688
688
|
this.AryButton=
|
|
689
689
|
[
|
|
690
|
-
{ Title:"修改图形颜色", ClassName: 'hqchart_drawtool icon-
|
|
691
|
-
{ Title:"修改字体颜色", ClassName: 'hqchart_drawtool icon-
|
|
692
|
-
{ Title:"修改背景颜色", ClassName: 'hqchart_drawtool icon-zitibeijingse', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_CHANGE_BG_COLOR_ID }},
|
|
693
|
-
{ Title:"修改边框颜色", ClassName: 'hqchart_drawtool icon-biankuang', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_CHANGE_BORDER_COLOR_ID }},
|
|
694
|
-
{ Title:"字体放大", ClassName: 'hqchart_drawtool icon-zoomin', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_ZOOM_FONT_ID }},
|
|
695
|
-
{ Title:"字体缩小", ClassName: 'hqchart_drawtool icon-zoomout', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_ZOOM_OUT_FONT_ID }},
|
|
696
|
-
{ Title:"随机生成文字内容", ClassName: 'hqchart_drawtool icon-bianji', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_MODIFY_TEXT_ID }},
|
|
697
|
-
{ Title:"高级设置", ClassName: 'hqchart_drawtool icon-setting', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_ADVANCED_SETTING_ID }},
|
|
690
|
+
{ 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 }},
|
|
691
|
+
{ 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 }},
|
|
692
|
+
{ 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 }},
|
|
693
|
+
{ 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 }},
|
|
694
|
+
{ Title:"字体放大", ClassName: 'hqchart_drawtool icon-zoomin UMyChart_Draw_Modify_Dialog_Button_Span', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_ZOOM_FONT_ID }},
|
|
695
|
+
{ 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 }},
|
|
696
|
+
{ Title:"随机生成文字内容", ClassName: 'hqchart_drawtool icon-bianji UMyChart_Draw_Modify_Dialog_Button_Span', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_MODIFY_TEXT_ID }},
|
|
697
|
+
{ Title:"高级设置", ClassName: 'hqchart_drawtool icon-setting UMyChart_Draw_Modify_Dialog_Button_Span', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_ADVANCED_SETTING_ID }},
|
|
698
698
|
|
|
699
699
|
{ Title:"上锁", ClassName: 'hqchart_drawtool icon-lock', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_LOCK_DRAW_CHART_ID }},
|
|
700
|
-
{ Title:"删除图形", ClassName: 'hqchart_drawtool icon-recycle_bin', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_DELETE_DRAW_CHART_ID }},
|
|
700
|
+
{ 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 }},
|
|
701
701
|
];
|
|
702
702
|
|
|
703
703
|
this.RestoreFocusDelay=800;
|
|
@@ -753,10 +753,9 @@ function JSDialogModifyDraw()
|
|
|
753
753
|
spanTooltip.innerText=item.Title;
|
|
754
754
|
divItem.appendChild(spanTooltip);
|
|
755
755
|
|
|
756
|
-
|
|
757
756
|
var spanDom=document.createElement("span");
|
|
758
757
|
spanDom.className=item.ClassName;
|
|
759
|
-
spanDom.classList.add("UMyChart_Draw_Modify_Dialog_Button_Span");
|
|
758
|
+
//spanDom.classList.add("UMyChart_Draw_Modify_Dialog_Button_Span");
|
|
760
759
|
divItem.appendChild(spanDom);
|
|
761
760
|
|
|
762
761
|
|
|
@@ -770,23 +769,31 @@ function JSDialogModifyDraw()
|
|
|
770
769
|
{
|
|
771
770
|
case JS_DRAWTOOL_MENU_ID.CMD_CHANGE_LINE_COLOR_ID:
|
|
772
771
|
this.ColorButton=data;
|
|
772
|
+
var divColorBar=this.CreateColorBar(data);
|
|
773
|
+
divItem.appendChild(divColorBar);
|
|
773
774
|
var inputColor=this.CreateInputColor(data);
|
|
774
775
|
divItem.appendChild(inputColor);
|
|
775
776
|
break;
|
|
776
777
|
case JS_DRAWTOOL_MENU_ID.CMD_CHANGE_BG_COLOR_ID:
|
|
777
778
|
this.BGColorButton=data;
|
|
779
|
+
var divColorBar=this.CreateColorBar(data);
|
|
780
|
+
divItem.appendChild(divColorBar);
|
|
778
781
|
var inputColor=this.CreateInputColor(data);
|
|
779
782
|
divItem.appendChild(inputColor);
|
|
780
783
|
divItem.style.display="none";
|
|
781
784
|
break;
|
|
782
785
|
case JS_DRAWTOOL_MENU_ID.CMD_CHANGE_FONT_COLOR_ID:
|
|
783
786
|
this.FontColorButton=data;
|
|
787
|
+
var divColorBar=this.CreateColorBar(data);
|
|
788
|
+
divItem.appendChild(divColorBar);
|
|
784
789
|
var inputColor=this.CreateInputColor(data);
|
|
785
790
|
divItem.appendChild(inputColor);
|
|
786
791
|
divItem.style.display="none";
|
|
787
792
|
break;
|
|
788
793
|
case JS_DRAWTOOL_MENU_ID.CMD_CHANGE_BORDER_COLOR_ID:
|
|
789
794
|
this.BorderColorButton=data;
|
|
795
|
+
var divColorBar=this.CreateColorBar(data);
|
|
796
|
+
divItem.appendChild(divColorBar);
|
|
790
797
|
var inputColor=this.CreateInputColor(data);
|
|
791
798
|
divItem.appendChild(inputColor);
|
|
792
799
|
divItem.style.display="none";
|
|
@@ -826,6 +833,16 @@ function JSDialogModifyDraw()
|
|
|
826
833
|
return inputColor;
|
|
827
834
|
}
|
|
828
835
|
|
|
836
|
+
//颜色块
|
|
837
|
+
this.CreateColorBar=function(data)
|
|
838
|
+
{
|
|
839
|
+
var divColor=document.createElement("div");
|
|
840
|
+
divColor.className="UMyChart_Draw_Modify_Dialog_Button_ColorBar_Div";
|
|
841
|
+
data.DivColorBar=divColor;
|
|
842
|
+
|
|
843
|
+
return divColor;
|
|
844
|
+
}
|
|
845
|
+
|
|
829
846
|
this.OnClickButton=function(e, data)
|
|
830
847
|
{
|
|
831
848
|
console.log('[JSDialogModifyDraw::OnClickButton] ', data);
|
|
@@ -934,7 +951,7 @@ function JSDialogModifyDraw()
|
|
|
934
951
|
if (data.Item.Data.ID==JS_DRAWTOOL_MENU_ID.CMD_CHANGE_LINE_COLOR_ID)
|
|
935
952
|
{
|
|
936
953
|
this.ChartPicture.LineColor=color;
|
|
937
|
-
if (this.ColorButton) this.ColorButton.
|
|
954
|
+
if (this.ColorButton) this.ColorButton.DivColorBar.style['background-color']=color;
|
|
938
955
|
if (this.HQChart.ChartDrawStorage) this.HQChart.ChartDrawStorage.SaveDrawData(this.ChartPicture); //保存下
|
|
939
956
|
|
|
940
957
|
this.HQChart.Draw();
|
|
@@ -944,7 +961,7 @@ function JSDialogModifyDraw()
|
|
|
944
961
|
if (this.ChartPicture.ClassName=="ChartDrawNote") this.ChartPicture.NoteBorderColor=color;
|
|
945
962
|
else this.ChartPicture.BorderColor=color;
|
|
946
963
|
|
|
947
|
-
if (this.BorderColorButton) this.BorderColorButton.
|
|
964
|
+
if (this.BorderColorButton) this.BorderColorButton.DivColorBar.style['background-color']=color;
|
|
948
965
|
if (this.HQChart.ChartDrawStorage) this.HQChart.ChartDrawStorage.SaveDrawData(this.ChartPicture); //保存下
|
|
949
966
|
|
|
950
967
|
this.HQChart.Draw();
|
|
@@ -954,7 +971,7 @@ function JSDialogModifyDraw()
|
|
|
954
971
|
if (this.ChartPicture.ClassName=="ChartDrawNote") this.ChartPicture.NoteTextColor=color;
|
|
955
972
|
else this.ChartPicture.TextColor=color;
|
|
956
973
|
|
|
957
|
-
if (this.FontColorButton) this.FontColorButton.
|
|
974
|
+
if (this.FontColorButton) this.FontColorButton.DivColorBar.style['background-color']=color;
|
|
958
975
|
if (this.HQChart.ChartDrawStorage) this.HQChart.ChartDrawStorage.SaveDrawData(this.ChartPicture); //保存下
|
|
959
976
|
|
|
960
977
|
this.HQChart.Draw();
|
|
@@ -965,7 +982,7 @@ function JSDialogModifyDraw()
|
|
|
965
982
|
if (this.ChartPicture.ClassName=="ChartDrawNote") this.ChartPicture.NoteBGColor=color;
|
|
966
983
|
else this.ChartPicture.BGColor=color;
|
|
967
984
|
|
|
968
|
-
if (this.BGColorButton) this.BGColorButton.
|
|
985
|
+
if (this.BGColorButton) this.BGColorButton.DivColorBar.style['background-color']=color;
|
|
969
986
|
if (this.HQChart.ChartDrawStorage) this.HQChart.ChartDrawStorage.SaveDrawData(this.ChartPicture); //保存下
|
|
970
987
|
|
|
971
988
|
this.HQChart.Draw();
|
|
@@ -1167,7 +1184,7 @@ function JSDialogModifyDraw()
|
|
|
1167
1184
|
this.ShowButton(item.Div, bShowLineColor?"inline":"none");
|
|
1168
1185
|
if (bShowLineColor)
|
|
1169
1186
|
{
|
|
1170
|
-
item.
|
|
1187
|
+
item.DivColorBar.style['background-color']=chart.LineColor;
|
|
1171
1188
|
}
|
|
1172
1189
|
}
|
|
1173
1190
|
|
|
@@ -1177,7 +1194,7 @@ function JSDialogModifyDraw()
|
|
|
1177
1194
|
this.ShowButton(item.Div, bShowBGColor?"inline":"none");
|
|
1178
1195
|
if (bShowBGColor)
|
|
1179
1196
|
{
|
|
1180
|
-
item.
|
|
1197
|
+
item.DivColorBar.style['background-color']=bgColor;
|
|
1181
1198
|
}
|
|
1182
1199
|
}
|
|
1183
1200
|
|
|
@@ -1187,7 +1204,7 @@ function JSDialogModifyDraw()
|
|
|
1187
1204
|
this.ShowButton(item.Div, bShowFontColor?"inline":"none");
|
|
1188
1205
|
if (bShowFontColor)
|
|
1189
1206
|
{
|
|
1190
|
-
item.
|
|
1207
|
+
item.DivColorBar.style['background-color']=fontColor;
|
|
1191
1208
|
}
|
|
1192
1209
|
}
|
|
1193
1210
|
|
|
@@ -1197,7 +1214,7 @@ function JSDialogModifyDraw()
|
|
|
1197
1214
|
this.ShowButton(item.Div, bShowBorderColor?"inline":"none");
|
|
1198
1215
|
if (bShowBorderColor)
|
|
1199
1216
|
{
|
|
1200
|
-
item.
|
|
1217
|
+
item.DivColorBar.style['background-color']=borderColor;
|
|
1201
1218
|
}
|
|
1202
1219
|
}
|
|
1203
1220
|
|
|
@@ -104,9 +104,10 @@ function JSDialogSearchIndex()
|
|
|
104
104
|
|
|
105
105
|
var right=left+this.DivDialog.offsetWidth;
|
|
106
106
|
var bottom=top+ this.DivDialog.offsetHeight;
|
|
107
|
-
|
|
107
|
+
var scrollPos=GetScrollPosition();
|
|
108
|
+
|
|
108
109
|
if ((right+5)>=window.innerWidth) left=window.innerWidth-this.DivDialog.offsetWidth-5;
|
|
109
|
-
if ((bottom+5)>=window.innerHeight) top=window.innerHeight-this.DivDialog.offsetHeight-5;
|
|
110
|
+
if ((bottom+5)>=window.innerHeight+scrollPos.Top) top=(window.innerHeight-this.DivDialog.offsetHeight-5)+scrollPos.Top;
|
|
110
111
|
|
|
111
112
|
this.DivDialog.style.left = left + 'px';
|
|
112
113
|
this.DivDialog.style.top = top + 'px';
|
|
@@ -137,8 +138,9 @@ function JSDialogSearchIndex()
|
|
|
137
138
|
if (!IFrameSplitOperator.IsNumber(x) || !IFrameSplitOperator.IsNumber(y)) //默认居中显示
|
|
138
139
|
{
|
|
139
140
|
var rtClient=this.HQChart.UIElement.getBoundingClientRect();
|
|
141
|
+
var scrollPos=GetScrollPosition();
|
|
140
142
|
x=rtClient.left+(rtClient.right-rtClient.left-this.DivDialog.offsetWidth)/2;
|
|
141
|
-
y=rtClient.top+(rtClient.bottom-rtClient.top-this.DivDialog.offsetHeight)/2;
|
|
143
|
+
y=rtClient.top+(rtClient.bottom-rtClient.top-this.DivDialog.offsetHeight)/2+scrollPos.Top;
|
|
142
144
|
}
|
|
143
145
|
|
|
144
146
|
this.InputDom.value="";
|
|
@@ -898,8 +900,9 @@ function JSDialogModifyIndexParam()
|
|
|
898
900
|
if (!IFrameSplitOperator.IsNumber(x) || !IFrameSplitOperator.IsNumber(y)) //默认居中显示
|
|
899
901
|
{
|
|
900
902
|
var rtClient=this.HQChart.UIElement.getBoundingClientRect();
|
|
903
|
+
var scrollPos=GetScrollPosition();
|
|
901
904
|
x=rtClient.left+(rtClient.right-rtClient.left-this.DivDialog.offsetWidth)/2;
|
|
902
|
-
y=rtClient.top+(rtClient.bottom-rtClient.top-this.DivDialog.offsetHeight)/2;
|
|
905
|
+
y=rtClient.top+(rtClient.bottom-rtClient.top-this.DivDialog.offsetHeight)/2+scrollPos.Top;
|
|
903
906
|
}
|
|
904
907
|
|
|
905
908
|
this.DivDialog.style.visibility='visible';
|
|
@@ -966,9 +969,10 @@ function JSDialogModifyIndexParam()
|
|
|
966
969
|
|
|
967
970
|
var right=left+this.DivDialog.offsetWidth;
|
|
968
971
|
var bottom=top+ this.DivDialog.offsetHeight;
|
|
969
|
-
|
|
972
|
+
var scrollPos=GetScrollPosition();
|
|
973
|
+
|
|
970
974
|
if ((right+5)>=window.innerWidth) left=window.innerWidth-this.DivDialog.offsetWidth-5;
|
|
971
|
-
if ((bottom+5)>=window.innerHeight) top=window.innerHeight-this.DivDialog.offsetHeight-5;
|
|
975
|
+
if ((bottom+5)>=window.innerHeight+scrollPos.Top) top=(window.innerHeight-this.DivDialog.offsetHeight-5)+scrollPos.Top;
|
|
972
976
|
|
|
973
977
|
this.DivDialog.style.left = left + 'px';
|
|
974
978
|
this.DivDialog.style.top = top + 'px';
|
|
@@ -518,6 +518,7 @@ function JSDialogTooltip()
|
|
|
518
518
|
{
|
|
519
519
|
if (!this.DragTitle) return;
|
|
520
520
|
|
|
521
|
+
var scrollPos=GetScrollPosition();
|
|
521
522
|
var left = e.clientX - this.DragTitle.YOffset;
|
|
522
523
|
var top = e.clientY - this.DragTitle.XOffset;
|
|
523
524
|
|
|
@@ -525,7 +526,7 @@ function JSDialogTooltip()
|
|
|
525
526
|
var bottom=top+ this.DivDialog.offsetHeight;
|
|
526
527
|
|
|
527
528
|
if ((right+5)>=window.innerWidth) left=window.innerWidth-this.DivDialog.offsetWidth-5;
|
|
528
|
-
if ((bottom+5)>=window.innerHeight) top=window.innerHeight-this.DivDialog.offsetHeight-5;
|
|
529
|
+
if ((bottom+5)>=(window.innerHeight+scrollPos.Top)) top=(window.innerHeight-this.DivDialog.offsetHeight-5)+scrollPos.Top;
|
|
529
530
|
|
|
530
531
|
this.DivDialog.style.left = left + 'px';
|
|
531
532
|
this.DivDialog.style.top = top + 'px';
|
|
@@ -547,8 +548,8 @@ function JSDialogTooltip()
|
|
|
547
548
|
if (!this.DivDialog) return;
|
|
548
549
|
if (!this.HQChart) return;
|
|
549
550
|
|
|
550
|
-
|
|
551
|
-
var top=this.HQChart.Frame.ChartBorder.GetTop();
|
|
551
|
+
var scrollPos=GetScrollPosition();
|
|
552
|
+
var top=this.HQChart.Frame.ChartBorder.GetTop()+scrollPos.Top;
|
|
552
553
|
var left=this.HQChart.Frame.ChartBorder.GetLeft();
|
|
553
554
|
var rtClient=this.HQChart.UIElement.getBoundingClientRect();
|
|
554
555
|
|
|
@@ -1180,17 +1181,19 @@ function JSFloatTooltip()
|
|
|
1180
1181
|
if (!this.HQChart) return;
|
|
1181
1182
|
|
|
1182
1183
|
var rtClient=this.HQChart.UIElement.getBoundingClientRect();
|
|
1184
|
+
var scrollPos=GetScrollPosition();
|
|
1183
1185
|
var yMove=0;
|
|
1184
1186
|
if (option && IFrameSplitOperator.IsNumber(option.YMove)) yMove=option.YMove;
|
|
1185
1187
|
|
|
1186
|
-
var left=x+rtClient.left,top=y+rtClient.top+yMove;
|
|
1188
|
+
var left=x+rtClient.left,top=y+rtClient.top+yMove+scrollPos.Top;
|
|
1187
1189
|
var right=left+this.DivDialog.offsetWidth;
|
|
1188
1190
|
var bottom=top+this.DivDialog.offsetHeight;
|
|
1189
1191
|
|
|
1190
1192
|
if ((right+5)>=window.innerWidth) left=left-this.DivDialog.offsetWidth;
|
|
1191
|
-
if ((bottom+5)>=window.innerHeight)
|
|
1193
|
+
if ((bottom+5)>=window.innerHeight+scrollPos.Top)
|
|
1192
1194
|
{
|
|
1193
1195
|
top=(y+rtClient.top)-this.DivDialog.offsetHeight;
|
|
1196
|
+
top+=scrollPos.Top;
|
|
1194
1197
|
}
|
|
1195
1198
|
|
|
1196
1199
|
this.DivDialog.style.top = top + "px";
|
|
@@ -2414,6 +2417,7 @@ function JSSmallFloatTooltip()
|
|
|
2414
2417
|
if (!this.DivDialog) return;
|
|
2415
2418
|
if (!this.HQChart) return;
|
|
2416
2419
|
|
|
2420
|
+
var scrollPos=GetScrollPosition();
|
|
2417
2421
|
var rtClient=this.HQChart.UIElement.getBoundingClientRect();
|
|
2418
2422
|
var yMove=0;
|
|
2419
2423
|
if (option && IFrameSplitOperator.IsNumber(option.YMove)) yMove=option.YMove;
|
|
@@ -218,15 +218,15 @@ function JSPopMinuteChart()
|
|
|
218
218
|
if (this.Minute.JSChart) this.Minute.JSChart.OnSize();
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
|
|
221
|
+
var scrollPos=GetScrollPosition();
|
|
222
222
|
|
|
223
223
|
//超出窗口调整位置
|
|
224
224
|
var height=this.DivDialog.offsetHeight;
|
|
225
225
|
var width=this.DivDialog.offsetWidth;
|
|
226
226
|
var xRight=window.innerWidth-5;
|
|
227
|
-
var ybottom=window.innerHeight-5;
|
|
227
|
+
var ybottom=window.innerHeight-5+scrollPos.Top;
|
|
228
228
|
if (x+width>xRight) x=xRight-width;
|
|
229
|
-
if (y+height>ybottom) y=ybottom-height;
|
|
229
|
+
if (y+height>ybottom) y=(ybottom-height);
|
|
230
230
|
|
|
231
231
|
this.DivDialog.style.visibility='visible';
|
|
232
232
|
this.DivDialog.style.top = y + "px";
|
|
@@ -265,6 +265,7 @@ function JSPopMinuteChart()
|
|
|
265
265
|
{
|
|
266
266
|
if (!this.DragTitle) return;
|
|
267
267
|
|
|
268
|
+
var scrollPos=GetScrollPosition();
|
|
268
269
|
var left = e.clientX - this.DragTitle.YOffset;
|
|
269
270
|
var top = e.clientY - this.DragTitle.XOffset;
|
|
270
271
|
|
|
@@ -272,7 +273,7 @@ function JSPopMinuteChart()
|
|
|
272
273
|
var bottom=top+ this.DivDialog.offsetHeight;
|
|
273
274
|
|
|
274
275
|
if ((right+5)>=window.innerWidth) left=window.innerWidth-this.DivDialog.offsetWidth-5;
|
|
275
|
-
if ((bottom+5)>=window.innerHeight) top=window.innerHeight-this.DivDialog.offsetHeight-5;
|
|
276
|
+
if ((bottom+5)>=window.innerHeight+scrollPos.Top) top=(window.innerHeight-this.DivDialog.offsetHeight-5)+scrollPos.Top;
|
|
276
277
|
|
|
277
278
|
this.DivDialog.style.left = left + 'px';
|
|
278
279
|
this.DivDialog.style.top = top + 'px';
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -476,6 +476,17 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
476
476
|
if (IFrameSplitOperator.IsBool(item.Enable)) chart.FastSlideConfig.Enable=item.Enable;
|
|
477
477
|
}
|
|
478
478
|
|
|
479
|
+
if (option.DataMove)
|
|
480
|
+
{
|
|
481
|
+
var item=option.DataMove;
|
|
482
|
+
|
|
483
|
+
var subItem=item.Touch;
|
|
484
|
+
if (subItem && IFrameSplitOperator.IsBool(subItem.EnableLR)) chart.DataMoveConfig.Touch.EnableLR=subItem.EnableLR;
|
|
485
|
+
|
|
486
|
+
var subItem=item.Mouse;
|
|
487
|
+
if (subItem && IFrameSplitOperator.IsBool(subItem.EnableLR)) chart.DataMoveConfig.Mouse.EnableLR=subItem.EnableLR;
|
|
488
|
+
}
|
|
489
|
+
|
|
479
490
|
if (chart.ClassName=="KLineChartContainer")
|
|
480
491
|
{
|
|
481
492
|
if (!option.DragSelectRect)
|
|
@@ -3430,8 +3441,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3430
3441
|
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
3431
3442
|
this.AryHotKey=[]; //热键 { KeyID:87, SecondKeyID:1, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
3432
3443
|
|
|
3433
|
-
this.FastSlideConfig={ MinDistance:500, MinSpeed:3, MaxTime:250, Enable:false };
|
|
3434
|
-
this.KeyboardMove={ Timer:null, Delay:100 , PressTime:500, Enable:false, Event:null };
|
|
3444
|
+
this.FastSlideConfig={ MinDistance:500, MinSpeed:3, MaxTime:250, Enable:false }; //快速滑动配置 MinDistance=最小的距离 MinSpeed=最小速度 MaxTime=最大间隔时间(ms)
|
|
3445
|
+
this.KeyboardMove={ Timer:null, Delay:100 , PressTime:500, Enable:false, Event:null }; //键盘左右移动 PressTime=长按时间
|
|
3446
|
+
this.DataMoveConfig={ Touch:{ EnableLR: true}, Mouse:{ EnableLR:true } }; //数据移动配置
|
|
3435
3447
|
|
|
3436
3448
|
this.MapEventListenerCache=new Map(); //addEventListener 监听事件 key=type:"keydown|keyup ....", value:{ Callback:, Option: }
|
|
3437
3449
|
|
|
@@ -4932,7 +4944,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4932
4944
|
}
|
|
4933
4945
|
else if (this.DragMode==1 || isDragSelectRect || isDragSubSelectRect) //数据上下左右拖拽 区间选择框左右拖动
|
|
4934
4946
|
{
|
|
4935
|
-
this.
|
|
4947
|
+
if (this.DataMoveConfig.Mouse.EnableLR)
|
|
4948
|
+
this.OnDragMode_One({X:moveSetp, Y:moveSetpY}, e);
|
|
4936
4949
|
}
|
|
4937
4950
|
}
|
|
4938
4951
|
|
|
@@ -6111,18 +6124,21 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6111
6124
|
var oneStepWidth=this.GetMoveOneStepWidth();
|
|
6112
6125
|
if (moveSetp<oneStepWidth) return;
|
|
6113
6126
|
|
|
6114
|
-
if(this.
|
|
6127
|
+
if (this.DataMoveConfig.Touch.EnableLR)
|
|
6115
6128
|
{
|
|
6116
|
-
this.
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6129
|
+
if(this.DataMove(moveSetp,isLeft))
|
|
6130
|
+
{
|
|
6131
|
+
this.UpdataDataoffset();
|
|
6132
|
+
this.UpdatePointByCursorIndex();
|
|
6133
|
+
this.UpdateFrameMaxMin();
|
|
6134
|
+
this.ResetFrameXYSplit();
|
|
6135
|
+
this.Draw();
|
|
6136
|
+
this.OnKLinePageChange("OnTouchMove");
|
|
6137
|
+
}
|
|
6138
|
+
else
|
|
6139
|
+
{
|
|
6140
|
+
if (this.DragDownloadData) this.DragDownloadData();
|
|
6141
|
+
}
|
|
6126
6142
|
}
|
|
6127
6143
|
|
|
6128
6144
|
drag.LastMove.X=touches[0].clientX;
|
|
@@ -10498,6 +10514,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10498
10514
|
if (IFrameSplitOperator.IsBool(frameItem.IsShowIndexTitle)) frame.IsShowIndexTitle=frameItem.IsShowIndexTitle;
|
|
10499
10515
|
if (frameItem.ClientBGColor) frame.ClientBGColor=frameItem.ClientBGColor;
|
|
10500
10516
|
|
|
10517
|
+
if (frameItem.Toolbar)
|
|
10518
|
+
{
|
|
10519
|
+
var subItem=frameItem.Toolbar.Margin;
|
|
10520
|
+
if (subItem && IFrameSplitOperator.IsNumber(subItem.Right)) frame.ToolbarConfig.Margin.Right=subItem.Right;
|
|
10521
|
+
}
|
|
10522
|
+
|
|
10501
10523
|
//分时图属性
|
|
10502
10524
|
if (IFrameSplitOperator.IsBool(frameItem.CloseBeforeButton)) frameItem.IsShowCloseButton=frameItem.CloseBeforeButton;
|
|
10503
10525
|
if (frame.YSplitOperator.RightTextConfig) //主图右侧坐标设置
|
|
@@ -13824,6 +13846,8 @@ function AverageWidthFrame()
|
|
|
13824
13846
|
this.ExportDataButton=CloneData(g_JSChartResource.Buttons.ExportData);
|
|
13825
13847
|
this.AddIndexWindowButton=CloneData(g_JSChartResource.Buttons.AddIndexWindow);
|
|
13826
13848
|
this.IndexHelpButton=CloneData(g_JSChartResource.Buttons.IndexHelp);
|
|
13849
|
+
|
|
13850
|
+
this.ToolbarConfig={ Margin:{ Right:3 } },
|
|
13827
13851
|
|
|
13828
13852
|
this.ButtonTooltip=CloneData(g_JSChartResource.Buttons.Tooltip);
|
|
13829
13853
|
|
|
@@ -13893,7 +13917,7 @@ function AverageWidthFrame()
|
|
|
13893
13917
|
var border=this.GetBorder();
|
|
13894
13918
|
if (this.IsHScreen)
|
|
13895
13919
|
{
|
|
13896
|
-
var y=border.Bottom-
|
|
13920
|
+
var y=border.Bottom-this.ToolbarConfig.Margin.Right;
|
|
13897
13921
|
var x=border.RightTitle+this.ChartBorder.TitleHeight/2;
|
|
13898
13922
|
|
|
13899
13923
|
this.ToolbarCacheSize={ RToolbar:{ Right:y, Left:y }}; //相当于额 Top, Bottom
|
|
@@ -13932,7 +13956,7 @@ function AverageWidthFrame()
|
|
|
13932
13956
|
}
|
|
13933
13957
|
else
|
|
13934
13958
|
{
|
|
13935
|
-
var right=border.RightEx-
|
|
13959
|
+
var right=border.RightEx-this.ToolbarConfig.Margin.Right;
|
|
13936
13960
|
var left=border.Left;
|
|
13937
13961
|
var yButton=border.Top+this.ChartBorder.TitleHeight/2;
|
|
13938
13962
|
|
|
@@ -66148,7 +66172,6 @@ IChartDrawPicture.ColorToRGBA=function(color,opacity)
|
|
|
66148
66172
|
var reg = /^(rgb|RGB)/;
|
|
66149
66173
|
if (reg.test(color))
|
|
66150
66174
|
{
|
|
66151
|
-
var strHex = "#";
|
|
66152
66175
|
var aryColor = color.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(","); // 把RGB的3个数值变成数组
|
|
66153
66176
|
var r = parseInt(aryColor[0]);
|
|
66154
66177
|
var g = parseInt(aryColor[1]);
|
|
@@ -105623,6 +105646,7 @@ function JSDivFrameToolbar()
|
|
|
105623
105646
|
var pixelTatio = GetDevicePixelRatio();
|
|
105624
105647
|
var frame=this.HQChart.Frame.SubFrame[this.FrameID].Frame;
|
|
105625
105648
|
var border=frame.GetBorder();
|
|
105649
|
+
var rtClient=this.HQChart.UIElement.getBoundingClientRect();
|
|
105626
105650
|
|
|
105627
105651
|
var top=border.Top/pixelTatio;
|
|
105628
105652
|
var right=border.RightEx/pixelTatio;
|
|
@@ -105655,10 +105679,13 @@ function JSDivFrameToolbar()
|
|
|
105655
105679
|
if (!this.HQChart.JSToolbarTooltip) return;
|
|
105656
105680
|
if (!item.Div) return;
|
|
105657
105681
|
|
|
105682
|
+
|
|
105658
105683
|
var rtButton=item.Div.getBoundingClientRect();
|
|
105659
105684
|
var rtHQChart=this.DivHQChart.getBoundingClientRect();
|
|
105685
|
+
var left=rtButton.left;
|
|
105686
|
+
var top=rtButton.bottom+2;
|
|
105660
105687
|
var left=rtButton.left-rtHQChart.left;
|
|
105661
|
-
var top=
|
|
105688
|
+
var top=this.DivToolbar.offsetHeight+this.DivToolbar.offsetTop;
|
|
105662
105689
|
this.HQChart.JSToolbarTooltip.Show(top, left, { Text:item.Tooltip.Text });
|
|
105663
105690
|
}
|
|
105664
105691
|
}
|
|
@@ -262,10 +262,11 @@ function JSPopMenu()
|
|
|
262
262
|
if (this.HQChart) this.HQChart.ClearRestoreFocusTimer();
|
|
263
263
|
|
|
264
264
|
//菜单在当前屏幕无法显示需要调整
|
|
265
|
+
var scrollPos=GetScrollPosition();
|
|
265
266
|
var menuHeight=this.RootDOM.offsetHeight;
|
|
266
267
|
var yMenuBottom=y+menuHeight;
|
|
267
|
-
var yBottom=window.innerHeight-15;
|
|
268
|
-
if (yMenuBottom>yBottom) y=yBottom-menuHeight
|
|
268
|
+
var yBottom=window.innerHeight-15+scrollPos.Top;
|
|
269
|
+
if (yMenuBottom>yBottom) y=(yBottom-menuHeight)
|
|
269
270
|
|
|
270
271
|
var menuWidth=this.RootDOM.offsetWidth;
|
|
271
272
|
var yMenuRight=x+menuWidth;
|
|
@@ -342,10 +343,11 @@ function JSPopMenu()
|
|
|
342
343
|
else
|
|
343
344
|
{
|
|
344
345
|
var rtParent=trDom.getBoundingClientRect();
|
|
345
|
-
var
|
|
346
|
+
var scrollPos=GetScrollPosition();
|
|
347
|
+
var x=rtParent.right, y=rtParent.top+scrollPos.Top;
|
|
346
348
|
|
|
347
349
|
//菜单在当前屏幕无法显示需要调整
|
|
348
|
-
var yBottom=window.innerHeight-15;
|
|
350
|
+
var yBottom=window.innerHeight-15+scrollPos.Top;
|
|
349
351
|
var yRight=window.innerWidth-15;
|
|
350
352
|
var menuHeight=subMenu.offsetHeight;
|
|
351
353
|
var menuWidth=subMenu.offsetWidth;
|
|
@@ -1129,6 +1129,7 @@ input[type="color"] {
|
|
|
1129
1129
|
width:22px;
|
|
1130
1130
|
user-select: none;
|
|
1131
1131
|
border: 1px solid;
|
|
1132
|
+
padding: 1px;
|
|
1132
1133
|
background-color:var(--HQChart-DialogModifyDraw-DragBGColor);
|
|
1133
1134
|
border-color: var(--HQChart-DialogModifyDraw-DragBGColor);
|
|
1134
1135
|
}
|
|
@@ -1153,12 +1154,28 @@ input[type="color"] {
|
|
|
1153
1154
|
color:var(--HQChart-DialogModifyDraw-ButtonColor);
|
|
1154
1155
|
}
|
|
1155
1156
|
|
|
1157
|
+
.UMyChart_Draw_Modify_Dialog_Button_ColorBar_Div
|
|
1158
|
+
{
|
|
1159
|
+
margin-top: 2px;
|
|
1160
|
+
height: 3px;
|
|
1161
|
+
width: 22px;
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
.UMyChart_Draw_Modify_Dialog_Button_Color_Span
|
|
1165
|
+
{
|
|
1166
|
+
font-size:17px;
|
|
1167
|
+
margin-left: 2px;
|
|
1168
|
+
color:var(--HQChart-DialogModifyDraw-ButtonColor);
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
|
|
1156
1172
|
.UMyChart_Draw_Modify_Dialog_Unlock_Button_Span
|
|
1157
1173
|
{
|
|
1158
1174
|
font-size:22px;
|
|
1159
1175
|
color:var(--HQChart-DialogModifyDraw-UnlockButtonColor);
|
|
1160
1176
|
}
|
|
1161
1177
|
|
|
1178
|
+
|
|
1162
1179
|
.UMyChart_Draw_Modify_Tooltip
|
|
1163
1180
|
{
|
|
1164
1181
|
position: absolute;
|
|
@@ -1166,14 +1183,14 @@ input[type="color"] {
|
|
|
1166
1183
|
top: 30px;
|
|
1167
1184
|
z-index: 2;
|
|
1168
1185
|
width: 80px;
|
|
1169
|
-
color:
|
|
1186
|
+
color: var(--HQChart-DialogModifyDraw-Tooltip-Color);
|
|
1170
1187
|
font-size: 12px;
|
|
1171
1188
|
text-align: center;
|
|
1172
|
-
background-color:
|
|
1189
|
+
background-color:var(--HQChart-DialogModifyDraw-Tooltip-BGColor);
|
|
1173
1190
|
border-radius: 2px;
|
|
1174
1191
|
padding: 5px 5px 5px 5px;
|
|
1175
1192
|
pointer-events: none;
|
|
1176
|
-
border-color:
|
|
1193
|
+
border-color: var(--HQChart-DialogModifyDraw-Tooltip-BorderColor);
|
|
1177
1194
|
border-style:solid;
|
|
1178
1195
|
border-width:1px;
|
|
1179
1196
|
user-select: none;
|
|
@@ -1183,7 +1200,7 @@ input[type="color"] {
|
|
|
1183
1200
|
{
|
|
1184
1201
|
visibility:hidden;
|
|
1185
1202
|
width:22px;
|
|
1186
|
-
height:
|
|
1203
|
+
height:4px;
|
|
1187
1204
|
position:absolute;
|
|
1188
1205
|
}
|
|
1189
1206
|
|
|
@@ -1206,7 +1223,8 @@ input[type="color"] {
|
|
|
1206
1223
|
|
|
1207
1224
|
.jschart_pop_minute_chart
|
|
1208
1225
|
{
|
|
1209
|
-
height:480px
|
|
1226
|
+
height:480px;
|
|
1227
|
+
position: relative;
|
|
1210
1228
|
}
|
|
1211
1229
|
|
|
1212
1230
|
.jschart_pop_minute_chart_Title_Div
|
|
@@ -2124,6 +2142,10 @@ input[type="color"] {
|
|
|
2124
2142
|
--HQChart-DialogModifyDraw-ButtonBorderColor:rgb(20,20,20);
|
|
2125
2143
|
--HQChart-DialogModifyDraw-UnlockButtonColor:rgb(220,220,220);
|
|
2126
2144
|
|
|
2145
|
+
--HQChart-DialogModifyDraw-Tooltip-BGColor: rgb(250,250,250);
|
|
2146
|
+
--HQChart-DialogModifyDraw-Tooltip-BorderColor: rgb(20,20,20);
|
|
2147
|
+
--HQChart-DialogModifyDraw-Tooltip-Color: rgb(20,20,20);
|
|
2148
|
+
|
|
2127
2149
|
/*
|
|
2128
2150
|
JSDialogSearchIndex
|
|
2129
2151
|
*/
|
|
@@ -2200,6 +2222,9 @@ input[type="color"] {
|
|
|
2200
2222
|
--HQChart-DialogModifyDraw-ButtonBorderColor:rgb(20,20,20);
|
|
2201
2223
|
--HQChart-DialogModifyDraw-UnlockButtonColor:rgb(220,220,220);
|
|
2202
2224
|
|
|
2225
|
+
--HQChart-DialogModifyDraw-Tooltip-BGColor: rgb(250,250,250);
|
|
2226
|
+
--HQChart-DialogModifyDraw-Tooltip-BorderColor: rgb(20,20,20);
|
|
2227
|
+
--HQChart-DialogModifyDraw-Tooltip-Color: rgb(20,20,20);
|
|
2203
2228
|
|
|
2204
2229
|
/*
|
|
2205
2230
|
JSDialogSearchIndex
|
|
@@ -2272,6 +2297,9 @@ input[type="color"] {
|
|
|
2272
2297
|
--HQChart-DialogModifyDraw-ButtonBorderColor:rgb(170,170,170);
|
|
2273
2298
|
--HQChart-DialogModifyDraw-UnlockButtonColor:rgb(60,60,60);
|
|
2274
2299
|
|
|
2300
|
+
--HQChart-DialogModifyDraw-Tooltip-BGColor: rgb(38,38,38);
|
|
2301
|
+
--HQChart-DialogModifyDraw-Tooltip-BorderColor: rgb(170,170,170);
|
|
2302
|
+
--HQChart-DialogModifyDraw-Tooltip-Color: rgb(210,210,210);
|
|
2275
2303
|
|
|
2276
2304
|
/*
|
|
2277
2305
|
JSDialogSearchIndex
|