hqchart 1.1.14516 → 1.1.14533
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 +140 -104
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogDrawTool.js +156 -4
- package/src/jscommon/umychart.DialogSearchIndex.js +10 -2
- package/src/jscommon/umychart.NetworkFilterTest.js +69 -1
- package/src/jscommon/umychart.PopKLineChart.js +272 -0
- package/src/jscommon/umychart.js +226 -352
- package/src/jscommon/umychart.report.js +80 -29
- package/src/jscommon/umychart.resource/css/tools.css +35 -0
- package/src/jscommon/umychart.resource/font/drawtool/demo_index.html +95 -3
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.css +19 -3
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.js +1 -1
- package/src/jscommon/umychart.resource/font/drawtool/iconfont.json +28 -0
- 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.style.js +6 -1
- package/src/jscommon/umychart.testdata.js +69 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +313 -383
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +69 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +751 -389
package/src/jscommon/umychart.js
CHANGED
|
@@ -2707,6 +2707,8 @@ var JSCHART_EVENT_ID=
|
|
|
2707
2707
|
ON_CLICK_DEAL_ROW:165,
|
|
2708
2708
|
ON_RCLICK_DEAL_ROW:166,
|
|
2709
2709
|
ON_DBCLICK_DEAL_ROW:167,
|
|
2710
|
+
|
|
2711
|
+
ON_FORMAT_OVERLAY_INDEX_OUT_TEXT:168, //格式化叠指标标题
|
|
2710
2712
|
}
|
|
2711
2713
|
|
|
2712
2714
|
var JSCHART_OPERATOR_ID=
|
|
@@ -2896,6 +2898,7 @@ var JSCHART_MENU_ID=
|
|
|
2896
2898
|
|
|
2897
2899
|
CMD_RBUTTON_SELECT_RECT_ID:53, //右键区间选择
|
|
2898
2900
|
CMD_LBUTTON_SELECT_RECT_ID:54, //左键区间选择
|
|
2901
|
+
CMD_ENABLE_XDRAG_BOTTOM_ID:55, //X轴拖动缩放
|
|
2899
2902
|
|
|
2900
2903
|
|
|
2901
2904
|
|
|
@@ -4159,7 +4162,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4159
4162
|
|
|
4160
4163
|
var yMove=e.clientY-drag.LastMove.Y;
|
|
4161
4164
|
|
|
4162
|
-
this.OnMoveFromeBorder(this.BorderDrag.Index, yMove);
|
|
4165
|
+
if (!this.OnMoveFromeBorder(this.BorderDrag.Index, yMove)) return;
|
|
4163
4166
|
|
|
4164
4167
|
drag.LastMove.X=e.clientX;
|
|
4165
4168
|
drag.LastMove.Y=e.clientY;
|
|
@@ -7060,7 +7063,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7060
7063
|
this.SelectChartDrawPicture=null;
|
|
7061
7064
|
if (this.ChartPictureMenu) this.ChartPictureMenu.Hide();
|
|
7062
7065
|
this.ClearChartDrawPicture(drawPicture); //删除选中的画图工具
|
|
7063
|
-
this.CloseModifyDrawDialog();
|
|
7064
7066
|
}
|
|
7065
7067
|
else if (this.SelectedChart && this.SelectedChart.Selected.Identify)
|
|
7066
7068
|
{
|
|
@@ -7284,14 +7286,16 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7284
7286
|
|
|
7285
7287
|
this.OnMoveFromeBorder=function(index, yMove)
|
|
7286
7288
|
{
|
|
7287
|
-
if (!this.Frame) return;
|
|
7289
|
+
if (!this.Frame) return false;
|
|
7288
7290
|
|
|
7289
|
-
if (!this.Frame.OnMoveFromeBorder(index,yMove)) return ;
|
|
7291
|
+
if (!this.Frame.OnMoveFromeBorder(index,yMove)) return false;
|
|
7290
7292
|
|
|
7291
7293
|
//this.Frame.SetSizeChage(true);
|
|
7292
7294
|
this.Frame.SetFrameBorderSizeChange();
|
|
7293
7295
|
this.Frame.ReDrawToolbar();
|
|
7294
7296
|
this.Draw();
|
|
7297
|
+
|
|
7298
|
+
return true;
|
|
7295
7299
|
}
|
|
7296
7300
|
|
|
7297
7301
|
this.OnZoomUpDownFrameY=function(obj, yMove)
|
|
@@ -8878,20 +8882,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8878
8882
|
|
|
8879
8883
|
if (!this.DialogModifyDraw) return;
|
|
8880
8884
|
|
|
8881
|
-
|
|
8882
|
-
{
|
|
8883
|
-
this.CloseModifyDrawDialog();
|
|
8884
|
-
|
|
8885
|
-
if (!this.ChartPictureMenu) this.ChartPictureMenu=g_DialogFactory.Create('ChartPictureSettingMenu', this.UIElement.parentNode);
|
|
8886
|
-
if (!this.ChartPictureMenu) return;
|
|
8887
|
-
|
|
8888
|
-
var event={ data: { ChartPicture:chart, HQChart:this}};
|
|
8889
|
-
this.ChartPictureMenu.DoModal(event);
|
|
8890
|
-
}
|
|
8891
|
-
else
|
|
8892
|
-
{
|
|
8893
|
-
this.ShowModifyDrawDialog(chart);
|
|
8894
|
-
}
|
|
8885
|
+
this.ShowModifyDrawDialog(chart);
|
|
8895
8886
|
}
|
|
8896
8887
|
|
|
8897
8888
|
this.FinishMoveChartDrawPicture=function()
|
|
@@ -8943,6 +8934,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8943
8934
|
|
|
8944
8935
|
if (option && option.Draw==false) bDraw=false;
|
|
8945
8936
|
if (bDraw) this.Draw();
|
|
8937
|
+
if (this.DialogModifyDraw) this.DialogModifyDraw.OnClearChartDrawPicture(null);
|
|
8946
8938
|
}
|
|
8947
8939
|
else
|
|
8948
8940
|
{
|
|
@@ -8962,6 +8954,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8962
8954
|
|
|
8963
8955
|
if (option && option.Draw==false) bDraw=false;
|
|
8964
8956
|
if (bDraw) this.Draw();
|
|
8957
|
+
if (this.DialogModifyDraw) this.DialogModifyDraw.OnClearChartDrawPicture(drawPicture);
|
|
8958
|
+
break;
|
|
8965
8959
|
}
|
|
8966
8960
|
}
|
|
8967
8961
|
}
|
|
@@ -9090,6 +9084,23 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9090
9084
|
else this.Draw();
|
|
9091
9085
|
}
|
|
9092
9086
|
|
|
9087
|
+
this.SetSplashScreen=function(option)
|
|
9088
|
+
{
|
|
9089
|
+
if (!option) return;
|
|
9090
|
+
|
|
9091
|
+
if (IFrameSplitOperator.IsBool(option.Enable)) this.ChartSplashPaint.EnableSplash(option.Enable);
|
|
9092
|
+
if (option.Title) this.ChartSplashPaint.SetTitle(option.Title);
|
|
9093
|
+
|
|
9094
|
+
if (option.Draw) this.Draw();
|
|
9095
|
+
}
|
|
9096
|
+
|
|
9097
|
+
this.IsEnableSplashScreen=function()
|
|
9098
|
+
{
|
|
9099
|
+
if (!this.ChartSplashPaint) return false;
|
|
9100
|
+
|
|
9101
|
+
return this.ChartSplashPaint.IsEnableSplash;
|
|
9102
|
+
}
|
|
9103
|
+
|
|
9093
9104
|
//设置指标窗口属性 windowItem=SetOption.Windows[i], frameItem=SetOption.Frames[i];
|
|
9094
9105
|
this.SetSubFrameAttribute=function(subFrame, windowItem, frameItem)
|
|
9095
9106
|
{
|
|
@@ -10414,6 +10425,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10414
10425
|
case JSCHART_MENU_ID.CMD_LBUTTON_SELECT_RECT_ID:
|
|
10415
10426
|
if (IFrameSplitOperator.IsBool(srcParam) && this.ChartDragSelectRect) this.ChartDragSelectRect.EnableLButton=srcParam;
|
|
10416
10427
|
break;
|
|
10428
|
+
case JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID:
|
|
10429
|
+
if (IFrameSplitOperator.IsBool(srcParam)) this.EnableXDrag.Bottom=srcParam;
|
|
10430
|
+
break;
|
|
10417
10431
|
}
|
|
10418
10432
|
}
|
|
10419
10433
|
|
|
@@ -19882,11 +19896,37 @@ function HQTradeFrame()
|
|
|
19882
19896
|
{
|
|
19883
19897
|
if (this.SubFrame.length<=0) return false;
|
|
19884
19898
|
|
|
19885
|
-
var topFrame=
|
|
19899
|
+
var topFrame=null;
|
|
19900
|
+
var aryTopTitleFrame=[];
|
|
19901
|
+
for(var i=index;i>=0;--i)
|
|
19902
|
+
{
|
|
19903
|
+
var item=this.SubFrame[i];
|
|
19904
|
+
|
|
19905
|
+
if (item.Frame && item.Frame.ChartBorder && item.Frame.ChartBorder.IsShowTitleOnly) //标题模式
|
|
19906
|
+
{
|
|
19907
|
+
aryTopTitleFrame.push(item);
|
|
19908
|
+
continue;
|
|
19909
|
+
}
|
|
19910
|
+
|
|
19911
|
+
if (item.Height>0)
|
|
19912
|
+
{
|
|
19913
|
+
topFrame=item;
|
|
19914
|
+
break;
|
|
19915
|
+
}
|
|
19916
|
+
}
|
|
19917
|
+
|
|
19886
19918
|
var bottomFrame=null;
|
|
19919
|
+
var aryBottomTitleFrame=[];
|
|
19887
19920
|
for(var i=index+1;i<this.SubFrame.length;++i)
|
|
19888
19921
|
{
|
|
19889
19922
|
var item=this.SubFrame[i];
|
|
19923
|
+
|
|
19924
|
+
if (item.Frame && item.Frame.ChartBorder && item.Frame.ChartBorder.IsShowTitleOnly) //标题模式
|
|
19925
|
+
{
|
|
19926
|
+
aryBottomTitleFrame.push(item);
|
|
19927
|
+
continue;
|
|
19928
|
+
}
|
|
19929
|
+
|
|
19890
19930
|
if (item.Height>0)
|
|
19891
19931
|
{
|
|
19892
19932
|
bottomFrame=item;
|
|
@@ -19904,6 +19944,20 @@ function HQTradeFrame()
|
|
|
19904
19944
|
|
|
19905
19945
|
var height=topFrame.Frame.ChartBorder.GetHeightEx();
|
|
19906
19946
|
var height2=bottomFrame.Frame.ChartBorder.GetHeightEx();
|
|
19947
|
+
|
|
19948
|
+
for(var i=0;i<aryBottomTitleFrame.length;++i)
|
|
19949
|
+
{
|
|
19950
|
+
var item=aryBottomTitleFrame[i];
|
|
19951
|
+
item.Frame.ChartBorder.Bottom+=yMove;
|
|
19952
|
+
item.Frame.ChartBorder.Top+=yMove;
|
|
19953
|
+
}
|
|
19954
|
+
|
|
19955
|
+
for(var i=0;i<aryTopTitleFrame.length;++i)
|
|
19956
|
+
{
|
|
19957
|
+
var item=aryTopTitleFrame[i];
|
|
19958
|
+
item.Frame.ChartBorder.Bottom+=yMove;
|
|
19959
|
+
item.Frame.ChartBorder.Top+=yMove;
|
|
19960
|
+
}
|
|
19907
19961
|
|
|
19908
19962
|
//缩小的时候 小于最小高度 不处理
|
|
19909
19963
|
if ((height<this.MinSubFrameHeight && yMove<0) || (height2<this.MinSubFrameHeight && yMove>0))
|
|
@@ -20197,11 +20251,25 @@ function HQTradeFrame()
|
|
|
20197
20251
|
this.SaveSubFrameHeightRate=function()
|
|
20198
20252
|
{
|
|
20199
20253
|
var height=this.ChartBorder.GetHeight();
|
|
20254
|
+
var totalTitleHeight=0;
|
|
20255
|
+
for(var i=0;i<this.SubFrame.length;++i)
|
|
20256
|
+
{
|
|
20257
|
+
var item=this.SubFrame[i];
|
|
20258
|
+
var frame=item.Frame;
|
|
20259
|
+
if (frame && frame.ChartBorder && frame.ChartBorder.IsShowTitleOnly && item.Height>0)
|
|
20260
|
+
totalTitleHeight+=frame.ChartBorder.TitleHeight;
|
|
20261
|
+
}
|
|
20262
|
+
height-=totalTitleHeight;
|
|
20200
20263
|
|
|
20201
20264
|
for(var i=0; i<this.SubFrame.length; ++i)
|
|
20202
20265
|
{
|
|
20203
20266
|
var item=this.SubFrame[i];
|
|
20267
|
+
var frame=item.Frame;
|
|
20268
|
+
if (item.Height<=0) continue;
|
|
20269
|
+
if (frame && frame.ChartBorder && frame.ChartBorder.IsShowTitleOnly && item.Height>0) continue;
|
|
20270
|
+
|
|
20204
20271
|
var subHeight=item.Frame.ChartBorder.GetHeight();
|
|
20272
|
+
|
|
20205
20273
|
var rate=(subHeight/height)*100;
|
|
20206
20274
|
item.Height=rate;
|
|
20207
20275
|
}
|
|
@@ -21333,9 +21401,13 @@ function HQTradeFrame()
|
|
|
21333
21401
|
var left=item.Frame.ChartBorder.GetLeft();
|
|
21334
21402
|
var right=item.Frame.ChartBorder.GetRight();
|
|
21335
21403
|
|
|
21336
|
-
|
|
21337
|
-
|
|
21338
|
-
|
|
21404
|
+
var rtBorder={ Left:left, Right:right, Top:bottom-height/2, Height:height };
|
|
21405
|
+
rtBorder.Bottom=rtBorder.Top+rtBorder.Height;
|
|
21406
|
+
rtBorder.Width=rtBorder.Right-rtBorder.Left;
|
|
21407
|
+
if (x>=rtBorder.Left && x<=rtBorder.Right && y>=rtBorder.Top && y<rtBorder.Bottom)
|
|
21408
|
+
//item.Frame.Canvas.beginPath();
|
|
21409
|
+
//item.Frame.Canvas.rect(left,bottom-height/2,(right-left),height);
|
|
21410
|
+
//if (item.Frame.Canvas.isPointInPath(x,y))
|
|
21339
21411
|
{
|
|
21340
21412
|
return { Index:i, Bottom:true };
|
|
21341
21413
|
}
|
|
@@ -59243,6 +59315,101 @@ function DynamicChartTitlePainting()
|
|
|
59243
59315
|
this.Canvas.restore();
|
|
59244
59316
|
}
|
|
59245
59317
|
|
|
59318
|
+
this.FormatOverlayTitle=function(item, overlayItem, titleIndex)
|
|
59319
|
+
{
|
|
59320
|
+
if (!item || !item.Data || !item.Data.Data || !item.Name) return null;
|
|
59321
|
+
if (item.IsVisible===false) return null;
|
|
59322
|
+
if (item.Data.Data.length<=0) return null;
|
|
59323
|
+
|
|
59324
|
+
var value=null;
|
|
59325
|
+
var valueText=null;
|
|
59326
|
+
var aryText=null;
|
|
59327
|
+
if (item.DataType=="StraightLine") //直线只有1个数据
|
|
59328
|
+
{
|
|
59329
|
+
value=item.Data.Data[0];
|
|
59330
|
+
valueText=this.FormatValue(value,item);
|
|
59331
|
+
}
|
|
59332
|
+
else
|
|
59333
|
+
{
|
|
59334
|
+
var index=Math.abs(this.CursorIndex-0.5);
|
|
59335
|
+
index=parseInt(index.toFixed(0));
|
|
59336
|
+
if (this.IsKLineFrame) index=this.CursorIndex;
|
|
59337
|
+
var dataIndex=item.Data.DataOffset+index;
|
|
59338
|
+
if (dataIndex>=item.Data.Data.length) dataIndex=item.Data.Data.length-1;
|
|
59339
|
+
if (dataIndex<0) return null;
|
|
59340
|
+
|
|
59341
|
+
value=item.Data.Data[dataIndex];
|
|
59342
|
+
if (value==null) return null;
|
|
59343
|
+
|
|
59344
|
+
if (this.GetEventCallback) //外部处理
|
|
59345
|
+
{
|
|
59346
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_OVERLAY_INDEX_OUT_TEXT);
|
|
59347
|
+
if (event)
|
|
59348
|
+
{
|
|
59349
|
+
var sendData=
|
|
59350
|
+
{
|
|
59351
|
+
Item:item, Index:titleIndex, Data:overlayItem, FrameID:this.Frame.Identify,
|
|
59352
|
+
DataIndex:dataIndex, Value:value, PreventDefault:false, Out:null
|
|
59353
|
+
};
|
|
59354
|
+
event.Callback(event,sendData,this);
|
|
59355
|
+
if (sendData.Out) return sendData.Out;
|
|
59356
|
+
if (sendData.PreventDefault) return sendData.Out;
|
|
59357
|
+
}
|
|
59358
|
+
}
|
|
59359
|
+
|
|
59360
|
+
if (item.DataType=="MultiReport")
|
|
59361
|
+
{
|
|
59362
|
+
valueText=this.FormatMultiReport(value,item);
|
|
59363
|
+
if (!valueText) return null;
|
|
59364
|
+
}
|
|
59365
|
+
else if (item.DataType=="ChartStackedBar")
|
|
59366
|
+
{
|
|
59367
|
+
aryText=this.FormatStackedBarTitle(value, item);
|
|
59368
|
+
if (!aryText) return null;
|
|
59369
|
+
}
|
|
59370
|
+
else if (item.DataType=="ChartMultiLine") //多线段数据
|
|
59371
|
+
{
|
|
59372
|
+
aryText=this.ForamtMultiLineTitle(dataIndex, item);
|
|
59373
|
+
if (!aryText) return null;
|
|
59374
|
+
}
|
|
59375
|
+
else if (item.DataType=="ChartMultiPoint")
|
|
59376
|
+
{
|
|
59377
|
+
aryText=this.ForamtMultiPointTitle(dataIndex, item);
|
|
59378
|
+
if (!aryText) return null;
|
|
59379
|
+
}
|
|
59380
|
+
else if (item.DataType=="ChartMultiBar")
|
|
59381
|
+
{
|
|
59382
|
+
aryText=this.ForamtMultiBarTitle(dataIndex, item);
|
|
59383
|
+
if (!aryText) return null;
|
|
59384
|
+
}
|
|
59385
|
+
else if (item.DataType=="DRAWKLINE")
|
|
59386
|
+
{
|
|
59387
|
+
aryText=this.FormatKLineTitle(value, item);
|
|
59388
|
+
if (!aryText) return null;
|
|
59389
|
+
}
|
|
59390
|
+
else if (item.DataType=="ChartIndexTitle")
|
|
59391
|
+
{
|
|
59392
|
+
var outTitle=this.FormatIndexTitle(value, item);
|
|
59393
|
+
if (!outTitle) return null;
|
|
59394
|
+
|
|
59395
|
+
valueText=outTitle.Text;
|
|
59396
|
+
aryText=outTitle.ArrayText;
|
|
59397
|
+
}
|
|
59398
|
+
else if (item.DataType=="MULTI_POINT_LINE")
|
|
59399
|
+
{
|
|
59400
|
+
valueText=this.FormatMultiDataLine(value, item);
|
|
59401
|
+
if (!valueText) return null;
|
|
59402
|
+
}
|
|
59403
|
+
else
|
|
59404
|
+
{
|
|
59405
|
+
valueText=this.FormatValue(value,item);
|
|
59406
|
+
}
|
|
59407
|
+
}
|
|
59408
|
+
|
|
59409
|
+
|
|
59410
|
+
return { Text:valueText, ArrayText:aryText };
|
|
59411
|
+
}
|
|
59412
|
+
|
|
59246
59413
|
this.DrawOverlayIndexSingleLine=function(moveonPoint, mouseStatus) //叠加指标1个指标一行
|
|
59247
59414
|
{
|
|
59248
59415
|
var pixelRatio=GetDevicePixelRatio();
|
|
@@ -59305,68 +59472,11 @@ function DynamicChartTitlePainting()
|
|
|
59305
59472
|
for(var i=0; i<overlayItem.Data.length; ++i)
|
|
59306
59473
|
{
|
|
59307
59474
|
var item=overlayItem.Data[i];
|
|
59308
|
-
|
|
59309
|
-
if (
|
|
59310
|
-
if (item.Data.Data.length<=0) continue;
|
|
59311
|
-
|
|
59312
|
-
var value=null;
|
|
59313
|
-
var valueText=null;
|
|
59314
|
-
var aryText=null;
|
|
59315
|
-
if (item.DataType=="StraightLine") //直线只有1个数据
|
|
59316
|
-
{
|
|
59317
|
-
value=item.Data.Data[0];
|
|
59318
|
-
valueText=this.FormatValue(value,item);
|
|
59319
|
-
}
|
|
59320
|
-
else
|
|
59321
|
-
{
|
|
59322
|
-
var index=Math.abs(this.CursorIndex-0.5);
|
|
59323
|
-
index=parseInt(index.toFixed(0));
|
|
59324
|
-
if (this.IsKLineFrame) index=this.CursorIndex;
|
|
59325
|
-
var dataIndex=item.Data.DataOffset+index;
|
|
59326
|
-
if (dataIndex>=item.Data.Data.length) dataIndex=item.Data.Data.length-1;
|
|
59327
|
-
if (dataIndex<0) continue;
|
|
59328
|
-
|
|
59329
|
-
value=item.Data.Data[dataIndex];
|
|
59330
|
-
if (value==null) continue;
|
|
59331
|
-
|
|
59332
|
-
if (item.DataType=="MultiReport")
|
|
59333
|
-
{
|
|
59334
|
-
valueText=this.FormatMultiReport(value,item);
|
|
59335
|
-
if (!valueText) continue;
|
|
59336
|
-
}
|
|
59337
|
-
else if (item.DataType=="ChartStackedBar")
|
|
59338
|
-
{
|
|
59339
|
-
aryText=this.FormatStackedBarTitle(value, item);
|
|
59340
|
-
if (!aryText) continue;
|
|
59341
|
-
}
|
|
59342
|
-
else if (item.DataType=="ChartMultiPoint")
|
|
59343
|
-
{
|
|
59344
|
-
aryText=this.ForamtMultiPointTitle(dataIndex, item);
|
|
59345
|
-
if (!aryText) continue;
|
|
59346
|
-
}
|
|
59347
|
-
else if (item.DataType=="ChartMultiBar")
|
|
59348
|
-
{
|
|
59349
|
-
aryText=this.ForamtMultiBarTitle(dataIndex, item);
|
|
59350
|
-
if (!aryText) continue;
|
|
59351
|
-
}
|
|
59352
|
-
else if (item.DataType=="DRAWKLINE")
|
|
59353
|
-
{
|
|
59354
|
-
aryText=this.FormatKLineTitle(value, item);
|
|
59355
|
-
if (!aryText) continue;
|
|
59356
|
-
}
|
|
59357
|
-
else if (item.DataType=="ChartIndexTitle")
|
|
59358
|
-
{
|
|
59359
|
-
var outTitle=this.FormatIndexTitle(value, item);
|
|
59360
|
-
if (!outTitle) continue;
|
|
59475
|
+
var outText=this.FormatOverlayTitle(item,overlayItem,i);
|
|
59476
|
+
if (!outText) continue;
|
|
59361
59477
|
|
|
59362
|
-
|
|
59363
|
-
|
|
59364
|
-
}
|
|
59365
|
-
else
|
|
59366
|
-
{
|
|
59367
|
-
valueText=this.FormatValue(value,item);
|
|
59368
|
-
}
|
|
59369
|
-
}
|
|
59478
|
+
var valueText=outText.Text;
|
|
59479
|
+
var aryText=outText.ArrayText;
|
|
59370
59480
|
|
|
59371
59481
|
if (aryText)
|
|
59372
59482
|
{
|
|
@@ -64735,15 +64845,13 @@ function ChartDrawPictureText()
|
|
|
64735
64845
|
delete this.newMethod;
|
|
64736
64846
|
|
|
64737
64847
|
this.ClassName='ChartDrawPictureText';
|
|
64738
|
-
this.Text='
|
|
64848
|
+
this.Text='输入文字';
|
|
64739
64849
|
this.PointCount=1;
|
|
64740
64850
|
this.FontOption={ Family:'微软雅黑', Size:20, Weight:null, Style:null }; //Weight(bold 粗体), Style(italic)
|
|
64741
64851
|
//矢量图片
|
|
64742
64852
|
//this.Text="\ue606";
|
|
64743
64853
|
//this.FontOption={ Family:'iconfont', Size:20, Weight:null, Style:null }; //Weight(bold 粗体), Style(italic)
|
|
64744
64854
|
this.TextRect=null; //文字区域
|
|
64745
|
-
this.IsInitialized=false; //是否初始化了
|
|
64746
|
-
this.SettingMenu;
|
|
64747
64855
|
this.HQChart;
|
|
64748
64856
|
|
|
64749
64857
|
this.SetOption=function(option)
|
|
@@ -64781,12 +64889,6 @@ function ChartDrawPictureText()
|
|
|
64781
64889
|
this.TextRect.Height=textHeight
|
|
64782
64890
|
//this.Canvas.strokeRect(this.TextRect.Left,this.TextRect.Top,this.TextRect.Width,this.TextRect.Height);
|
|
64783
64891
|
this.Canvas.restore();
|
|
64784
|
-
|
|
64785
|
-
if (this.IsInitialized===false)
|
|
64786
|
-
{
|
|
64787
|
-
this.SetTextOption();
|
|
64788
|
-
this.IsInitialized=true;
|
|
64789
|
-
}
|
|
64790
64892
|
}
|
|
64791
64893
|
|
|
64792
64894
|
//根据设置动态生成字体
|
|
@@ -64805,18 +64907,6 @@ function ChartDrawPictureText()
|
|
|
64805
64907
|
return font;
|
|
64806
64908
|
}
|
|
64807
64909
|
|
|
64808
|
-
this.SetTextOption=function()
|
|
64809
|
-
{
|
|
64810
|
-
JSConsole.Chart.Log('[ChartDrawPictureText::SetTextOption]');
|
|
64811
|
-
//创建div设置窗口
|
|
64812
|
-
if (!this.SettingMenu) this.SettingMenu=new ChartPictureTextSettingMenu(this.Frame.ChartBorder.UIElement.parentNode);
|
|
64813
|
-
|
|
64814
|
-
this.SettingMenu.ChartPicture=this;
|
|
64815
|
-
this.SettingMenu.HQChart=this.HQChart;
|
|
64816
|
-
this.SettingMenu.Position={Left:this.TextRect.Left+this.TextRect.Width,Top:this.TextRect.Top};
|
|
64817
|
-
this.SettingMenu.DoModal();
|
|
64818
|
-
}
|
|
64819
|
-
|
|
64820
64910
|
this.IsPointIn=function(x,y)
|
|
64821
64911
|
{
|
|
64822
64912
|
if (!this.Frame || this.Status!=10) return -1;
|
|
@@ -69699,6 +69789,7 @@ function ChartDrawPriceNote()
|
|
|
69699
69789
|
|
|
69700
69790
|
var price=this.Frame.GetYData(ptStart.Y, false);
|
|
69701
69791
|
var text=price.toFixed(floatPrecision);
|
|
69792
|
+
this.Canvas.font=font;
|
|
69702
69793
|
var textHeight=this.Canvas.measureText("擎").width;
|
|
69703
69794
|
var textWidth=this.Canvas.measureText(text).width;
|
|
69704
69795
|
var angle=this.CalculateAngle(ptStart.X, ptStart.Y, ptEnd.X, ptEnd.Y);
|
|
@@ -71784,6 +71875,15 @@ function JSChartResource()
|
|
|
71784
71875
|
TitleBGColor:"rgb(200, 66, 69)", //标题背景颜色
|
|
71785
71876
|
}
|
|
71786
71877
|
|
|
71878
|
+
this.PopKLineChart=
|
|
71879
|
+
{
|
|
71880
|
+
BGColor:"rgba(250,250,250,0.95)",
|
|
71881
|
+
BorderColor:"rgb(0,0,0)",
|
|
71882
|
+
|
|
71883
|
+
TitleColor:'rgb(250,250,250)', //标题颜色
|
|
71884
|
+
TitleBGColor:"rgb(200, 66, 69)", //标题背景颜色
|
|
71885
|
+
}
|
|
71886
|
+
|
|
71787
71887
|
this.SelectRectBGColor="rgba(1,130,212,0.06)"; //背景色
|
|
71788
71888
|
// this.SelectRectAlpha=0.06; //透明度
|
|
71789
71889
|
|
|
@@ -73356,10 +73456,21 @@ function JSChartResource()
|
|
|
73356
73456
|
if (style.PopMinuteChart)
|
|
73357
73457
|
{
|
|
73358
73458
|
var item=style.PopMinuteChart;
|
|
73359
|
-
|
|
73360
|
-
if (item.
|
|
73361
|
-
if (item.
|
|
73362
|
-
if (item.
|
|
73459
|
+
var dest=this.PopMinuteChart;
|
|
73460
|
+
if (item.BGColor) dest.BGColor=item.BGColor;
|
|
73461
|
+
if (item.BorderColor) dest.BorderColor=item.BorderColor;
|
|
73462
|
+
if (item.TitleColor) dest.TitleColor=item.TitleColor;
|
|
73463
|
+
if (item.TitleBGColor) dest.TitleBGColor=item.TitleBGColor;
|
|
73464
|
+
}
|
|
73465
|
+
|
|
73466
|
+
if (style.PopKLineChart)
|
|
73467
|
+
{
|
|
73468
|
+
var item=style.PopKLineChart;
|
|
73469
|
+
var dest=this.PopKLineChart;
|
|
73470
|
+
if (item.BGColor) dest.BGColor=item.BGColor;
|
|
73471
|
+
if (item.BorderColor) dest.BorderColor=item.BorderColor;
|
|
73472
|
+
if (item.TitleColor) dest.TitleColor=item.TitleColor;
|
|
73473
|
+
if (item.TitleBGColor) dest.TitleBGColor=item.TitleBGColor;
|
|
73363
73474
|
}
|
|
73364
73475
|
|
|
73365
73476
|
if (style.DefaultTextColor) this.DefaultTextColor = style.DefaultTextColor;
|
|
@@ -79139,8 +79250,10 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
79139
79250
|
{
|
|
79140
79251
|
if (option.KLine)
|
|
79141
79252
|
{
|
|
79142
|
-
|
|
79143
|
-
if (IFrameSplitOperator.IsNumber(
|
|
79253
|
+
var item=option.KLine;
|
|
79254
|
+
if (IFrameSplitOperator.IsNumber(item.DrawType)) isChangeKLineDrawType=true;
|
|
79255
|
+
if (IFrameSplitOperator.IsNumber(item.Right)) right=item.Right;
|
|
79256
|
+
if (IFrameSplitOperator.IsNumber(item.DataWidth)) this.KLineSize={ DataWidth:item.DataWidth };
|
|
79144
79257
|
}
|
|
79145
79258
|
|
|
79146
79259
|
if (option.Reload==true) isReload=true;
|
|
@@ -80623,7 +80736,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
80623
80736
|
bindData.Period=this.Period;
|
|
80624
80737
|
bindData.Right=this.Right;
|
|
80625
80738
|
|
|
80626
|
-
if (bindData.Right>0 && MARKET_SUFFIX_NAME.
|
|
80739
|
+
if (bindData.Right>0 && MARKET_SUFFIX_NAME.IsEnableRight(item.Symbol)) //复权数据
|
|
80627
80740
|
{
|
|
80628
80741
|
var rightData=bindData.GetRightData(bindData.Right,{ AlgorithmType: this.RightFormula });
|
|
80629
80742
|
bindData.Data=rightData;
|
|
@@ -80696,6 +80809,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
80696
80809
|
var item=option.KLine;
|
|
80697
80810
|
if (IFrameSplitOperator.IsNumber(item.Right)) this.Right=item.Right;
|
|
80698
80811
|
if (IFrameSplitOperator.IsNumber(item.Period)) this.Period=item.Period;
|
|
80812
|
+
if (IFrameSplitOperator.IsNumber(item.DataWidth)) this.KLineSize={ DataWidth:item.DataWidth };
|
|
80699
80813
|
}
|
|
80700
80814
|
}
|
|
80701
80815
|
|
|
@@ -81763,6 +81877,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81763
81877
|
|
|
81764
81878
|
{ Name:"禁止拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[0]}, Checked:0==this.DragMode },
|
|
81765
81879
|
{ Name:"启动拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1]}, Checked:1==this.DragMode },
|
|
81880
|
+
{ Name:"X轴拖动缩放", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[!this.EnableXDrag.Bottom]}, Checked:this.EnableXDrag.Bottom },
|
|
81766
81881
|
{ Name:"左键区间选择", Data:{ ID:JSCHART_MENU_ID.CMD_LBUTTON_SELECT_RECT_ID, Args:[!bLButtonSelectRect]}, Checked:bLButtonSelectRect },
|
|
81767
81882
|
{ Name:"右键区间选择", Data:{ ID:JSCHART_MENU_ID.CMD_RBUTTON_SELECT_RECT_ID, Args:[!bRButtonSelectRect]}, Checked:bRButtonSelectRect },
|
|
81768
81883
|
{ Name:JSPopMenu.SEPARATOR_LINE_NAME },
|
|
@@ -81773,7 +81888,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81773
81888
|
|
|
81774
81889
|
{ Name:"移动筹码图", Data:{ ID:bShowStockChip?JSCHART_MENU_ID.CMD_HIDE_STOCKCHIP_ID:JSCHART_MENU_ID.CMD_SHOW_STOCKCHIP_ID, Args:[stockChipConfig.Name, stockChipConfig]}, Checked:bShowStockChip},
|
|
81775
81890
|
|
|
81776
|
-
|
|
81777
81891
|
|
|
81778
81892
|
{ Name:"双击弹分时图", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_POP_MINUTE_CHART_ID, Args:[!bPopMinuteChart]}, Checked:bPopMinuteChart},
|
|
81779
81893
|
|
|
@@ -81962,8 +82076,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81962
82076
|
var self=this;
|
|
81963
82077
|
drawPicture.GetActiveDrawPicture=function() { return self.GetActiveDrawPicture(); }
|
|
81964
82078
|
|
|
81965
|
-
if (drawPicture.ClassName==='ChartDrawPictureText') drawPicture.IsInitialized=true;
|
|
81966
|
-
|
|
81967
82079
|
this.ChartDrawPicture.push(drawPicture);
|
|
81968
82080
|
}
|
|
81969
82081
|
|
|
@@ -89280,7 +89392,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
89280
89392
|
if (item)
|
|
89281
89393
|
{
|
|
89282
89394
|
drawPicture=item.Create();
|
|
89283
|
-
if (drawPicture.ClassName=='ChartDrawPictureText') drawPicture.HQChart=this;
|
|
89284
89395
|
}
|
|
89285
89396
|
|
|
89286
89397
|
if (!drawPicture) //iconfont图标
|
|
@@ -89343,7 +89454,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
89343
89454
|
|
|
89344
89455
|
drawPicture.GetActiveDrawPicture=function() { return self.GetActiveDrawPicture(); }
|
|
89345
89456
|
|
|
89346
|
-
if (drawPicture.ClassName==='ChartDrawPictureText') drawPicture.IsInitialized=true;
|
|
89347
89457
|
this.ChartDrawPicture.push(drawPicture);
|
|
89348
89458
|
|
|
89349
89459
|
if (obj.Draw==true) this.DrawDynamicInfo();
|
|
@@ -89387,8 +89497,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
89387
89497
|
drawPicture.ValueToPoint();
|
|
89388
89498
|
drawPicture.GetActiveDrawPicture=()=>{ return this.GetActiveDrawPicture(); }
|
|
89389
89499
|
|
|
89390
|
-
if (drawPicture.ClassName==='ChartDrawPictureText') drawPicture.IsInitialized=true;
|
|
89391
|
-
|
|
89392
89500
|
this.ChartDrawPicture.push(drawPicture);
|
|
89393
89501
|
}
|
|
89394
89502
|
|
|
@@ -94266,7 +94374,6 @@ function DialogFactory()
|
|
|
94266
94374
|
this.DataMap=new Map(
|
|
94267
94375
|
[
|
|
94268
94376
|
["ChartPictureSettingMenu", { Create:function(divElement) { return new ChartPictureSettingMenu(divElement); } }],
|
|
94269
|
-
["ChartPictureTextSettingMenu", { Create:function(divElement) { return new ChartPictureTextSettingMenu(divElement); } }]
|
|
94270
94377
|
]);
|
|
94271
94378
|
|
|
94272
94379
|
this.Create=function(name, option)
|
|
@@ -94492,239 +94599,6 @@ function ChartPictureSettingMenu(divElement)
|
|
|
94492
94599
|
}
|
|
94493
94600
|
}
|
|
94494
94601
|
|
|
94495
|
-
//画图工具 文本设置窗口
|
|
94496
|
-
function ChartPictureTextSettingMenu(divElement)
|
|
94497
|
-
{
|
|
94498
|
-
this.newMethod=IDivDialog; //派生
|
|
94499
|
-
this.newMethod(divElement);
|
|
94500
|
-
delete this.newMethod;
|
|
94501
|
-
|
|
94502
|
-
this.ChartPicture;
|
|
94503
|
-
this.SettingDiv;
|
|
94504
|
-
this.Position;
|
|
94505
|
-
|
|
94506
|
-
this.BackupData; //画图工具备份数据
|
|
94507
|
-
|
|
94508
|
-
this.Close=function()
|
|
94509
|
-
{
|
|
94510
|
-
if (this.SettingDiv) this.DivElement.removeChild(this.SettingDiv); //直接删除
|
|
94511
|
-
}
|
|
94512
|
-
|
|
94513
|
-
this.DoModal=function()
|
|
94514
|
-
{
|
|
94515
|
-
var text=this.ChartPicture.Text; //显示的文本
|
|
94516
|
-
var fontOption=this.ChartPicture.FontOption; //字体设置
|
|
94517
|
-
var lineColor=this.ChartPicture.LineColor;
|
|
94518
|
-
//数据备份, 点取消的时候把备份数据设置回去
|
|
94519
|
-
this.BackupData=
|
|
94520
|
-
{
|
|
94521
|
-
Text:text,
|
|
94522
|
-
LineColor:lineColor,
|
|
94523
|
-
FontOption:{Family: fontOption.Family, Size: fontOption.Size, Weight: fontOption.Weight, Style: fontOption.Style }
|
|
94524
|
-
};
|
|
94525
|
-
JSConsole.Chart.Log('[ChartPictureTextSettingMenu::DoModal] picture info',this.BackupData);
|
|
94526
|
-
|
|
94527
|
-
var self=this;
|
|
94528
|
-
var div=this.DivElement.getElementsByClassName('chartpicture-text-setting')[0];
|
|
94529
|
-
if (!div)
|
|
94530
|
-
{
|
|
94531
|
-
div=document.createElement("div");
|
|
94532
|
-
div.className='chartpicture-text-setting';
|
|
94533
|
-
this.DivElement.appendChild(div);
|
|
94534
|
-
this.SettingDiv=div;
|
|
94535
|
-
}
|
|
94536
|
-
else
|
|
94537
|
-
{
|
|
94538
|
-
this.SettingDiv=div;
|
|
94539
|
-
}
|
|
94540
|
-
|
|
94541
|
-
var titleContainerStr = '<div class="titleWrap">'+
|
|
94542
|
-
'<span class="titleName">样式设置</span>'+
|
|
94543
|
-
'<i class="closeBtn iconfont icon-close"></i>'+
|
|
94544
|
-
'</div>';
|
|
94545
|
-
|
|
94546
|
-
var fontSizeArray = [10,11,12,14,16,20,24,28,32,40];
|
|
94547
|
-
var fontArray = ['微软雅黑','宋体','Arial','仿宋'];
|
|
94548
|
-
var sizeListStr = "";
|
|
94549
|
-
var fontListStr = "";
|
|
94550
|
-
fontArray.forEach(function(item,index){
|
|
94551
|
-
fontListStr += index !== 0 ? '<p>'+item+'</P>' : '<p class="active">'+item+'</P>';
|
|
94552
|
-
});
|
|
94553
|
-
fontSizeArray.forEach(function(item,index){
|
|
94554
|
-
sizeListStr += index !== 5 ? '<p>'+item+'</P>' : '<p class="active">'+item+'</P>';
|
|
94555
|
-
});
|
|
94556
|
-
var contentContainerStr = '<div class="contentWrap">'+
|
|
94557
|
-
'<div class="styleOptions">'+
|
|
94558
|
-
'<span class="colorPicker"><input type="color" id="fontColor" value="#1e90ff"></span>'+
|
|
94559
|
-
'<div class="likeSelect fontSelect"><span class="choicedText">微软雅黑</span><div class="selectList">'+fontListStr+'</div><i class="iconfont icon-xia"></i></div>'+
|
|
94560
|
-
'<div class="likeSelect fontSizeSelect"><span class="choicedText">20</span><div class="selectList">'+sizeListStr+'</div><i class="iconfont icon-xia"></i></div>'+
|
|
94561
|
-
'<span class="strongFont likeBtn"><i class="iconfont icon-jiacu"></i></span>'+
|
|
94562
|
-
'<span class="italicsFont likeBtn"><i class="iconfont icon-qingxieL"></i></span>'+
|
|
94563
|
-
'</div>'+
|
|
94564
|
-
'<textarea class="tArea" id="tArea" placeholder="Text"></textarea>'+
|
|
94565
|
-
'</div>';
|
|
94566
|
-
var btnContainer = '<div class="btnsContainer">'+
|
|
94567
|
-
'<span class="okBtn btn">确认</span>'+
|
|
94568
|
-
'<span class="cancelBtn btn">取消</span>'+
|
|
94569
|
-
'</div>';
|
|
94570
|
-
|
|
94571
|
-
var pixelTatio = GetDevicePixelRatio();
|
|
94572
|
-
var DoModalStr = titleContainerStr+contentContainerStr+btnContainer;
|
|
94573
|
-
this.SettingDiv.style.left = this.Position.Left/pixelTatio + "px";
|
|
94574
|
-
this.SettingDiv.style.top = this.Position.Top/pixelTatio + "px";
|
|
94575
|
-
this.SettingDiv.innerHTML=DoModalStr;
|
|
94576
|
-
this.SettingDiv.style.position = "absolute";
|
|
94577
|
-
this.SettingDiv.style.display = "block";
|
|
94578
|
-
$(".chartpicture-text-setting .colorPicker").css({ //初始设置
|
|
94579
|
-
"borderColor":self.ChartPicture.LineColor,
|
|
94580
|
-
"background-color":self.ChartPicture.LineColor
|
|
94581
|
-
});
|
|
94582
|
-
|
|
94583
|
-
var family = this.ChartPicture.FontOption.Family;
|
|
94584
|
-
$('.chartpicture-text-setting .fontSelect .choicedText').html(family);
|
|
94585
|
-
fontArray.forEach(function(item,index){
|
|
94586
|
-
if(item == family){
|
|
94587
|
-
$('.chartpicture-text-setting .fontSelect p').removeClass('active');
|
|
94588
|
-
$('.chartpicture-text-setting .fontSelect p').eq(index).addClass('active');
|
|
94589
|
-
}
|
|
94590
|
-
});
|
|
94591
|
-
|
|
94592
|
-
var size = this.ChartPicture.FontOption.Size;
|
|
94593
|
-
$('.chartpicture-text-setting .fontSizeSelect .choicedText').html(size);
|
|
94594
|
-
fontSizeArray.forEach(function(item,index){
|
|
94595
|
-
if(item == size){
|
|
94596
|
-
$('.chartpicture-text-setting .fontSizeSelect p').removeClass('active');
|
|
94597
|
-
$('.chartpicture-text-setting .fontSizeSelect p').eq(index).addClass('active');
|
|
94598
|
-
}
|
|
94599
|
-
});
|
|
94600
|
-
|
|
94601
|
-
var weight = this.ChartPicture.FontOption.Weight;
|
|
94602
|
-
if( weight != null && weight == 'bold'){
|
|
94603
|
-
$('.chartpicture-text-setting .strongFont').addClass('hot');
|
|
94604
|
-
}
|
|
94605
|
-
|
|
94606
|
-
var style = this.ChartPicture.FontOption.Style;
|
|
94607
|
-
if( style != null && style == 'italic'){
|
|
94608
|
-
$('.chartpicture-text-setting .italicsFont').addClass('hot');
|
|
94609
|
-
}
|
|
94610
|
-
|
|
94611
|
-
var text = this.ChartPicture.Text;
|
|
94612
|
-
$('.chartpicture-text-setting .tArea').val(text); //结束初始设置
|
|
94613
|
-
|
|
94614
|
-
var defaultTextOption = { Family:'微软雅黑', Size:20, Weight:null, Style:null };
|
|
94615
|
-
$(".chartpicture-text-setting #fontColor").change(
|
|
94616
|
-
{
|
|
94617
|
-
Picture:this.ChartPicture
|
|
94618
|
-
},
|
|
94619
|
-
function(event)
|
|
94620
|
-
{ //颜色选择
|
|
94621
|
-
var value = $(this).val();
|
|
94622
|
-
$(this).parent().css({
|
|
94623
|
-
"borderColor":value,
|
|
94624
|
-
"background-color":value
|
|
94625
|
-
});
|
|
94626
|
-
var chart=event.data.Picture;
|
|
94627
|
-
chart.LineColor = value;
|
|
94628
|
-
if (chart.Update) chart.Update(); //更新界面
|
|
94629
|
-
}
|
|
94630
|
-
);
|
|
94631
|
-
$(".chartpicture-text-setting .fontSelect,.chartpicture-text-setting .fontSizeSelect").click(function(){
|
|
94632
|
-
$(this).find('.selectList').toggle();
|
|
94633
|
-
$(this).toggleClass('hot');
|
|
94634
|
-
});
|
|
94635
|
-
$(".chartpicture-text-setting .fontSelect p").click(
|
|
94636
|
-
{
|
|
94637
|
-
Picture:this.ChartPicture
|
|
94638
|
-
},
|
|
94639
|
-
function(event){ //字体选择
|
|
94640
|
-
var choicedText = $(this).closest(".fontSelect").find('.choicedText').html();
|
|
94641
|
-
var currentSelect = event.currentTarget.innerHTML;
|
|
94642
|
-
if(choicedText !== currentSelect){
|
|
94643
|
-
$(this).closest(".fontSelect").find('.choicedText').html(currentSelect);
|
|
94644
|
-
$(this).siblings().removeClass('active');
|
|
94645
|
-
$(this).addClass('active');
|
|
94646
|
-
var chart = event.data.Picture;
|
|
94647
|
-
chart.FontOption.Family = currentSelect;
|
|
94648
|
-
if (chart.Update) chart.Update(); //更新界面
|
|
94649
|
-
}
|
|
94650
|
-
});
|
|
94651
|
-
$(".chartpicture-text-setting .fontSizeSelect p").click(
|
|
94652
|
-
{
|
|
94653
|
-
Picture:this.ChartPicture
|
|
94654
|
-
},
|
|
94655
|
-
function(event){ //字号选择
|
|
94656
|
-
var choicedText = $(this).closest(".fontSizeSelect").find('.choicedText').html();
|
|
94657
|
-
var currentSelect = event.currentTarget.innerHTML;
|
|
94658
|
-
if(choicedText !== currentSelect){
|
|
94659
|
-
$(this).closest(".fontSizeSelect").find('.choicedText').html(currentSelect);
|
|
94660
|
-
$(this).siblings().removeClass('active');
|
|
94661
|
-
$(this).addClass('active');
|
|
94662
|
-
var chart = event.data.Picture;
|
|
94663
|
-
chart.FontOption.Size = Number(currentSelect);
|
|
94664
|
-
if (chart.Update) chart.Update(); //更新界面
|
|
94665
|
-
}
|
|
94666
|
-
});
|
|
94667
|
-
$(".chartpicture-text-setting .strongFont").click(
|
|
94668
|
-
{
|
|
94669
|
-
Picture:this.ChartPicture
|
|
94670
|
-
},
|
|
94671
|
-
function(event){
|
|
94672
|
-
$(this).toggleClass('hot');
|
|
94673
|
-
var classnames = $(this).attr('class');
|
|
94674
|
-
if(classnames.indexOf('hot') > 0){
|
|
94675
|
-
var chart = event.data.Picture;
|
|
94676
|
-
chart.FontOption.Weight = 'bold';
|
|
94677
|
-
if (chart.Update) chart.Update(); //更新界面
|
|
94678
|
-
}
|
|
94679
|
-
});
|
|
94680
|
-
$(".chartpicture-text-setting .italicsFont").click(
|
|
94681
|
-
{
|
|
94682
|
-
Picture:this.ChartPicture
|
|
94683
|
-
},
|
|
94684
|
-
function(event){
|
|
94685
|
-
$(this).toggleClass('hot')
|
|
94686
|
-
var classnames = $(this).attr('class');
|
|
94687
|
-
if(classnames.indexOf('hot') > 0){
|
|
94688
|
-
var chart = event.data.Picture;
|
|
94689
|
-
chart.FontOption.Style = 'italic';
|
|
94690
|
-
if (chart.Update) chart.Update(); //更新界面
|
|
94691
|
-
}
|
|
94692
|
-
});
|
|
94693
|
-
$(".chartpicture-text-setting .titleWrap .closeBtn,.chartpicture-text-setting .btnsContainer .cancelBtn").click( //取消
|
|
94694
|
-
{
|
|
94695
|
-
Picture:this.ChartPicture
|
|
94696
|
-
},
|
|
94697
|
-
function(event){
|
|
94698
|
-
var picture = event.data.Picture;
|
|
94699
|
-
picture.Text = self.BackupData.Text;
|
|
94700
|
-
picture.LineColor = self.BackupData.LineColor;
|
|
94701
|
-
picture.FontOption = self.BackupData.FontOption;
|
|
94702
|
-
if (picture.Update) picture.Update();
|
|
94703
|
-
self.Close();
|
|
94704
|
-
});
|
|
94705
|
-
$(".chartpicture-text-setting .tArea").keyup( //文本内容
|
|
94706
|
-
{
|
|
94707
|
-
Picture:this.ChartPicture
|
|
94708
|
-
},
|
|
94709
|
-
function(event){
|
|
94710
|
-
JSConsole.Chart.Log('[ChartPictureTextSettingMenu::DoModal] $(".chartpicture-text-setting .tArea").keyup()');
|
|
94711
|
-
var content = $(this).val();
|
|
94712
|
-
var chart = event.data.Picture;
|
|
94713
|
-
chart.Text = content;
|
|
94714
|
-
if (chart.Update) chart.Update(); //更新界面
|
|
94715
|
-
});
|
|
94716
|
-
|
|
94717
|
-
//确定按钮
|
|
94718
|
-
$(".chartpicture-text-setting .btnsContainer .okBtn").click(
|
|
94719
|
-
function()
|
|
94720
|
-
{
|
|
94721
|
-
self.Close();
|
|
94722
|
-
if (self.HQChart && self.HQChart.ChartDrawStorage) self.HQChart.ChartDrawStorage.SaveDrawData(self.ChartPicture); //保存下
|
|
94723
|
-
}
|
|
94724
|
-
);
|
|
94725
|
-
}
|
|
94726
|
-
}
|
|
94727
|
-
|
|
94728
94602
|
|
|
94729
94603
|
function ChartPictureVolProfileSettingMenu(divElement)
|
|
94730
94604
|
{
|