Skip to content

Commit

Permalink
ver 7702
Browse files Browse the repository at this point in the history
7701 期货走势图 显示均线
7699 MarketLongShortIndex 线段放在最后
7698 JsonDataToMinuteDataArray 增加日期 和 持仓量
7697 分时图 增加持仓量线段颜色配置
7696 黑色配置 增加分时图持仓量线段颜色配置
  • Loading branch information
jones2000 committed Dec 23, 2019
1 parent 0417d9e commit b1922ff
Show file tree
Hide file tree
Showing 9 changed files with 386 additions and 255 deletions.
456 changes: 286 additions & 170 deletions umychart_indexapi/jscommon/umychart.node.js

Large diffs are not rendered by default.

37 changes: 20 additions & 17 deletions umychart_uniapp_h5/umychart.uniapp.h5.js
Original file line number Diff line number Diff line change
Expand Up @@ -31028,7 +31028,7 @@ function MinuteChartContainer(uielement)
this.ChartPaint[1].Data=bindData;

var upperSymbol=this.Symbol.toUpperCase();
if (MARKET_SUFFIX_NAME.IsChinaFutures(this.Symbol) || MARKET_SUFFIX_NAME.IsForeignExchange(upperSymbol)) //外汇 期货没有均线
if (MARKET_SUFFIX_NAME.IsForeignExchange(upperSymbol)) //外汇没有均线
{
this.ChartPaint[1].Data=null;
}
Expand Down Expand Up @@ -31105,6 +31105,7 @@ function MinuteChartContainer(uielement)
chart.ChartBorder=frame.ChartBorder;
chart.ChartFrame=frame
chart.Identify=overlayFrame.Identify;
chart.Color=g_JSChartResource.Minute.PositionColor;
overlayFrame.ChartPaint.push(chart);

subFrame.OverlayIndex.push(overlayFrame);
Expand Down Expand Up @@ -31469,6 +31470,8 @@ MinuteChartContainer.JsonDataToMinuteDataArray=function(data)
item.DateTime=date.toString()+" "+jsData[0].toString();
item.Date=date;
item.Time=jsData[0];
if (8<jsData.length && jsData[8]>0) item.Date=jsData[8]; //日期
if (isFutures && 9<jsData.length) item.Position=jsData[9]; //持仓

if (!item.Close) //当前没有价格 使用上一个价格填充
{
Expand Down Expand Up @@ -33195,20 +33198,20 @@ function MarketLongShortIndex()
delete this.newMethod;

this.Index=new Array(
new IndexInfo("市场多空指标",null),
new IndexInfo("多头区域",null),
new IndexInfo("空头区域",null)
new IndexInfo("空头区域",null),
new IndexInfo("市场多空指标",null),
);

this.Index[0].LineColor=g_JSChartResource.Index.LineColor[0];
this.Index[1].LineColor=g_JSChartResource.UpBarColor;
this.Index[2].LineColor=g_JSChartResource.DownBarColor;
this.Index[0].LineColor=g_JSChartResource.UpBarColor;
this.Index[1].LineColor=g_JSChartResource.DownBarColor;
this.Index[2].LineColor=g_JSChartResource.Index.LineColor[0];

this.LongShortData; //多空数据

this.CreateChart=function(id)
{
if (id==0) return new ChartLine();
if (id==2) return new ChartLine();

return new ChartStraightLine();
}
Expand Down Expand Up @@ -33296,10 +33299,9 @@ function MarketLongShortIndex()
if (paint.length!=this.Index.length) return false;

//paint[0].Data.Data=SWLData;
paint[0].Data.Data=this.LongShortData;
paint[0].NotSupportMessage=null;
paint[1].Data.Data[0]=8;
paint[2].Data.Data[0]=1;
paint[2].Data.Data=this.LongShortData;
paint[0].Data.Data[0]=8;
paint[1].Data.Data[0]=1;

var titleIndex=windowIndex+1;

Expand All @@ -33313,7 +33315,7 @@ function MarketLongShortIndex()
for(var i in paint)
{
var titleData=new DynamicTitleData(paint[i].Data,this.Index[i].Name,this.Index[i].LineColor);
if (i>0) titleData.DataType="StraightLine";
if (i!=2) titleData.DataType="StraightLine";
titlePaint.OverlayIndex.get(this.OverlayIndex.Identify).Data[i]=titleData;
}
}
Expand All @@ -33323,7 +33325,7 @@ function MarketLongShortIndex()
for(var i in paint)
{
hqChart.TitlePaint[titleIndex].Data[i]=new DynamicTitleData(paint[i].Data,this.Index[i].Name,this.Index[i].LineColor);
if (i>0) hqChart.TitlePaint[titleIndex].Data[i].DataType="StraightLine";
if (i!=2) hqChart.TitlePaint[titleIndex].Data[i].DataType="StraightLine";
}
}

Expand Down Expand Up @@ -51816,10 +51818,11 @@ var BLACK_STYLE=

Minute:
{
VolBarColor: "rgb(255,236,0)",
PriceColor: "rgb(25,180,231)",
AreaPriceColor:"rgba(63,158,255,.3)",
AvPriceColor: "rgb(255,236,0)",
VolBarColor: "rgb(255,236,0)",
PriceColor: "rgb(25,180,231)",
AreaPriceColor:"rgba(63,158,255,.3)",
AvPriceColor: "rgb(255,236,0)",
PositionColor:'rgb(218,165,32)',
},


Expand Down
28 changes: 15 additions & 13 deletions vuehqchart/src/jscommon/umychart.js
Original file line number Diff line number Diff line change
Expand Up @@ -27710,7 +27710,7 @@ function MinuteChartContainer(uielement)
this.ChartPaint[1].Data=bindData;

var upperSymbol=this.Symbol.toUpperCase();
if (MARKET_SUFFIX_NAME.IsChinaFutures(this.Symbol) || MARKET_SUFFIX_NAME.IsForeignExchange(upperSymbol)) //外汇 期货没有均线
if (MARKET_SUFFIX_NAME.IsForeignExchange(upperSymbol)) //外汇没有均线
{
this.ChartPaint[1].Data=null;
}
Expand Down Expand Up @@ -27787,6 +27787,7 @@ function MinuteChartContainer(uielement)
chart.ChartBorder=frame.ChartBorder;
chart.ChartFrame=frame
chart.Identify=overlayFrame.Identify;
chart.Color=g_JSChartResource.Minute.PositionColor;
overlayFrame.ChartPaint.push(chart);

subFrame.OverlayIndex.push(overlayFrame);
Expand Down Expand Up @@ -28151,6 +28152,8 @@ MinuteChartContainer.JsonDataToMinuteDataArray=function(data)
item.DateTime=date.toString()+" "+jsData[0].toString();
item.Date=date;
item.Time=jsData[0];
if (8<jsData.length && jsData[8]>0) item.Date=jsData[8]; //日期
if (isFutures && 9<jsData.length) item.Position=jsData[9]; //持仓

if (!item.Close) //当前没有价格 使用上一个价格填充
{
Expand Down Expand Up @@ -29877,20 +29880,20 @@ function MarketLongShortIndex()
delete this.newMethod;

this.Index=new Array(
new IndexInfo("市场多空指标",null),
new IndexInfo("多头区域",null),
new IndexInfo("空头区域",null)
new IndexInfo("空头区域",null),
new IndexInfo("市场多空指标",null),
);

this.Index[0].LineColor=g_JSChartResource.Index.LineColor[0];
this.Index[1].LineColor=g_JSChartResource.UpBarColor;
this.Index[2].LineColor=g_JSChartResource.DownBarColor;
this.Index[0].LineColor=g_JSChartResource.UpBarColor;
this.Index[1].LineColor=g_JSChartResource.DownBarColor;
this.Index[2].LineColor=g_JSChartResource.Index.LineColor[0];

this.LongShortData; //多空数据

this.CreateChart=function(id)
{
if (id==0) return new ChartLine();
if (id==2) return new ChartLine();

return new ChartStraightLine();
}
Expand Down Expand Up @@ -29978,10 +29981,9 @@ function MarketLongShortIndex()
if (paint.length!=this.Index.length) return false;

//paint[0].Data.Data=SWLData;
paint[0].Data.Data=this.LongShortData;
paint[0].NotSupportMessage=null;
paint[1].Data.Data[0]=8;
paint[2].Data.Data[0]=1;
paint[2].Data.Data=this.LongShortData;
paint[0].Data.Data[0]=8;
paint[1].Data.Data[0]=1;

var titleIndex=windowIndex+1;

Expand All @@ -29995,7 +29997,7 @@ function MarketLongShortIndex()
for(var i in paint)
{
var titleData=new DynamicTitleData(paint[i].Data,this.Index[i].Name,this.Index[i].LineColor);
if (i>0) titleData.DataType="StraightLine";
if (i!=2) titleData.DataType="StraightLine";
titlePaint.OverlayIndex.get(this.OverlayIndex.Identify).Data[i]=titleData;
}
}
Expand All @@ -30005,7 +30007,7 @@ function MarketLongShortIndex()
for(var i in paint)
{
hqChart.TitlePaint[titleIndex].Data[i]=new DynamicTitleData(paint[i].Data,this.Index[i].Name,this.Index[i].LineColor);
if (i>0) hqChart.TitlePaint[titleIndex].Data[i].DataType="StraightLine";
if (i!=2) hqChart.TitlePaint[titleIndex].Data[i].DataType="StraightLine";
}
}

Expand Down
9 changes: 5 additions & 4 deletions vuehqchart/src/jscommon/umychart.style.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ var BLACK_STYLE=

Minute:
{
VolBarColor: "rgb(255,236,0)",
PriceColor: "rgb(25,180,231)",
AreaPriceColor:"rgba(63,158,255,.3)",
AvPriceColor: "rgb(255,236,0)",
VolBarColor: "rgb(255,236,0)",
PriceColor: "rgb(25,180,231)",
AreaPriceColor:"rgba(63,158,255,.3)",
AvPriceColor: "rgb(255,236,0)",
PositionColor:'rgb(218,165,32)',
},


Expand Down
37 changes: 20 additions & 17 deletions vuehqchart/src/jscommon/umychart.vue/umychart.vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -31069,7 +31069,7 @@ function MinuteChartContainer(uielement)
this.ChartPaint[1].Data=bindData;

var upperSymbol=this.Symbol.toUpperCase();
if (MARKET_SUFFIX_NAME.IsChinaFutures(this.Symbol) || MARKET_SUFFIX_NAME.IsForeignExchange(upperSymbol)) //外汇 期货没有均线
if (MARKET_SUFFIX_NAME.IsForeignExchange(upperSymbol)) //外汇没有均线
{
this.ChartPaint[1].Data=null;
}
Expand Down Expand Up @@ -31146,6 +31146,7 @@ function MinuteChartContainer(uielement)
chart.ChartBorder=frame.ChartBorder;
chart.ChartFrame=frame
chart.Identify=overlayFrame.Identify;
chart.Color=g_JSChartResource.Minute.PositionColor;
overlayFrame.ChartPaint.push(chart);

subFrame.OverlayIndex.push(overlayFrame);
Expand Down Expand Up @@ -31510,6 +31511,8 @@ MinuteChartContainer.JsonDataToMinuteDataArray=function(data)
item.DateTime=date.toString()+" "+jsData[0].toString();
item.Date=date;
item.Time=jsData[0];
if (8<jsData.length && jsData[8]>0) item.Date=jsData[8]; //日期
if (isFutures && 9<jsData.length) item.Position=jsData[9]; //持仓

if (!item.Close) //当前没有价格 使用上一个价格填充
{
Expand Down Expand Up @@ -33236,20 +33239,20 @@ function MarketLongShortIndex()
delete this.newMethod;

this.Index=new Array(
new IndexInfo("市场多空指标",null),
new IndexInfo("多头区域",null),
new IndexInfo("空头区域",null)
new IndexInfo("空头区域",null),
new IndexInfo("市场多空指标",null),
);

this.Index[0].LineColor=g_JSChartResource.Index.LineColor[0];
this.Index[1].LineColor=g_JSChartResource.UpBarColor;
this.Index[2].LineColor=g_JSChartResource.DownBarColor;
this.Index[0].LineColor=g_JSChartResource.UpBarColor;
this.Index[1].LineColor=g_JSChartResource.DownBarColor;
this.Index[2].LineColor=g_JSChartResource.Index.LineColor[0];

this.LongShortData; //多空数据

this.CreateChart=function(id)
{
if (id==0) return new ChartLine();
if (id==2) return new ChartLine();

return new ChartStraightLine();
}
Expand Down Expand Up @@ -33337,10 +33340,9 @@ function MarketLongShortIndex()
if (paint.length!=this.Index.length) return false;

//paint[0].Data.Data=SWLData;
paint[0].Data.Data=this.LongShortData;
paint[0].NotSupportMessage=null;
paint[1].Data.Data[0]=8;
paint[2].Data.Data[0]=1;
paint[2].Data.Data=this.LongShortData;
paint[0].Data.Data[0]=8;
paint[1].Data.Data[0]=1;

var titleIndex=windowIndex+1;

Expand All @@ -33354,7 +33356,7 @@ function MarketLongShortIndex()
for(var i in paint)
{
var titleData=new DynamicTitleData(paint[i].Data,this.Index[i].Name,this.Index[i].LineColor);
if (i>0) titleData.DataType="StraightLine";
if (i!=2) titleData.DataType="StraightLine";
titlePaint.OverlayIndex.get(this.OverlayIndex.Identify).Data[i]=titleData;
}
}
Expand All @@ -33364,7 +33366,7 @@ function MarketLongShortIndex()
for(var i in paint)
{
hqChart.TitlePaint[titleIndex].Data[i]=new DynamicTitleData(paint[i].Data,this.Index[i].Name,this.Index[i].LineColor);
if (i>0) hqChart.TitlePaint[titleIndex].Data[i].DataType="StraightLine";
if (i!=2) hqChart.TitlePaint[titleIndex].Data[i].DataType="StraightLine";
}
}

Expand Down Expand Up @@ -51857,10 +51859,11 @@ var BLACK_STYLE=

Minute:
{
VolBarColor: "rgb(255,236,0)",
PriceColor: "rgb(25,180,231)",
AreaPriceColor:"rgba(63,158,255,.3)",
AvPriceColor: "rgb(255,236,0)",
VolBarColor: "rgb(255,236,0)",
PriceColor: "rgb(25,180,231)",
AreaPriceColor:"rgba(63,158,255,.3)",
AvPriceColor: "rgb(255,236,0)",
PositionColor:'rgb(218,165,32)',
},


Expand Down
28 changes: 15 additions & 13 deletions webhqchart.demo/jscommon/umychart.js
Original file line number Diff line number Diff line change
Expand Up @@ -27710,7 +27710,7 @@ function MinuteChartContainer(uielement)
this.ChartPaint[1].Data=bindData;

var upperSymbol=this.Symbol.toUpperCase();
if (MARKET_SUFFIX_NAME.IsChinaFutures(this.Symbol) || MARKET_SUFFIX_NAME.IsForeignExchange(upperSymbol)) //外汇 期货没有均线
if (MARKET_SUFFIX_NAME.IsForeignExchange(upperSymbol)) //外汇没有均线
{
this.ChartPaint[1].Data=null;
}
Expand Down Expand Up @@ -27787,6 +27787,7 @@ function MinuteChartContainer(uielement)
chart.ChartBorder=frame.ChartBorder;
chart.ChartFrame=frame
chart.Identify=overlayFrame.Identify;
chart.Color=g_JSChartResource.Minute.PositionColor;
overlayFrame.ChartPaint.push(chart);

subFrame.OverlayIndex.push(overlayFrame);
Expand Down Expand Up @@ -28151,6 +28152,8 @@ MinuteChartContainer.JsonDataToMinuteDataArray=function(data)
item.DateTime=date.toString()+" "+jsData[0].toString();
item.Date=date;
item.Time=jsData[0];
if (8<jsData.length && jsData[8]>0) item.Date=jsData[8]; //日期
if (isFutures && 9<jsData.length) item.Position=jsData[9]; //持仓

if (!item.Close) //当前没有价格 使用上一个价格填充
{
Expand Down Expand Up @@ -29877,20 +29880,20 @@ function MarketLongShortIndex()
delete this.newMethod;

this.Index=new Array(
new IndexInfo("市场多空指标",null),
new IndexInfo("多头区域",null),
new IndexInfo("空头区域",null)
new IndexInfo("空头区域",null),
new IndexInfo("市场多空指标",null),
);

this.Index[0].LineColor=g_JSChartResource.Index.LineColor[0];
this.Index[1].LineColor=g_JSChartResource.UpBarColor;
this.Index[2].LineColor=g_JSChartResource.DownBarColor;
this.Index[0].LineColor=g_JSChartResource.UpBarColor;
this.Index[1].LineColor=g_JSChartResource.DownBarColor;
this.Index[2].LineColor=g_JSChartResource.Index.LineColor[0];

this.LongShortData; //多空数据

this.CreateChart=function(id)
{
if (id==0) return new ChartLine();
if (id==2) return new ChartLine();

return new ChartStraightLine();
}
Expand Down Expand Up @@ -29978,10 +29981,9 @@ function MarketLongShortIndex()
if (paint.length!=this.Index.length) return false;

//paint[0].Data.Data=SWLData;
paint[0].Data.Data=this.LongShortData;
paint[0].NotSupportMessage=null;
paint[1].Data.Data[0]=8;
paint[2].Data.Data[0]=1;
paint[2].Data.Data=this.LongShortData;
paint[0].Data.Data[0]=8;
paint[1].Data.Data[0]=1;

var titleIndex=windowIndex+1;

Expand All @@ -29995,7 +29997,7 @@ function MarketLongShortIndex()
for(var i in paint)
{
var titleData=new DynamicTitleData(paint[i].Data,this.Index[i].Name,this.Index[i].LineColor);
if (i>0) titleData.DataType="StraightLine";
if (i!=2) titleData.DataType="StraightLine";
titlePaint.OverlayIndex.get(this.OverlayIndex.Identify).Data[i]=titleData;
}
}
Expand All @@ -30005,7 +30007,7 @@ function MarketLongShortIndex()
for(var i in paint)
{
hqChart.TitlePaint[titleIndex].Data[i]=new DynamicTitleData(paint[i].Data,this.Index[i].Name,this.Index[i].LineColor);
if (i>0) hqChart.TitlePaint[titleIndex].Data[i].DataType="StraightLine";
if (i!=2) hqChart.TitlePaint[titleIndex].Data[i].DataType="StraightLine";
}
}

Expand Down
Loading

0 comments on commit b1922ff

Please sign in to comment.