Commit 14b8571b authored by Alexander.Trofimov's avatar Alexander.Trofimov

export SparklineType (enum c_oAscSparklineType)

parent e5c42876
...@@ -359,6 +359,12 @@ var c_oAscPopUpSelectorType = { ...@@ -359,6 +359,12 @@ var c_oAscPopUpSelectorType = {
Signature : "XLSY" Signature : "XLSY"
}; };
var c_oAscSparklineType = {
Line: 0,
Column: 1,
Stacked: 2
};
//----------------------------------------------------------export---------------------------------------------------- //----------------------------------------------------------export----------------------------------------------------
window['AscCommonExcel'] = window['AscCommonExcel'] || {}; window['AscCommonExcel'] = window['AscCommonExcel'] || {};
window['AscCommonExcel'].c_oAscAlignType = c_oAscAlignType; window['AscCommonExcel'].c_oAscAlignType = c_oAscAlignType;
...@@ -530,4 +536,9 @@ var c_oAscPopUpSelectorType = { ...@@ -530,4 +536,9 @@ var c_oAscPopUpSelectorType = {
prot['Func'] = prot.Func; prot['Func'] = prot.Func;
prot['Range'] = prot.Range; prot['Range'] = prot.Range;
prot['Table'] = prot.Table; prot['Table'] = prot.Table;
window['Asc']['c_oAscSparklineType'] = window['Asc'].c_oAscSparklineType = c_oAscSparklineType;
prot = c_oAscSparklineType;
prot['Line'] = prot.Line;
prot['Column'] = prot.Column;
prot['Stacked'] = prot.Stacked;
})(window); })(window);
...@@ -1017,11 +1017,6 @@ ...@@ -1017,11 +1017,6 @@
yesterday : 'yesterday' yesterday : 'yesterday'
}; };
var ESparklineType = {
Line: 0,
Column: 1,
Stacked: 2
};
var EDispBlanksAs = { var EDispBlanksAs = {
Span: 0, Span: 0,
Gap: 1, Gap: 1,
...@@ -8140,7 +8135,6 @@ ...@@ -8140,7 +8135,6 @@
window["AscCommonExcel"].ECfType = ECfType; window["AscCommonExcel"].ECfType = ECfType;
window["AscCommonExcel"].ECfvoType = ECfvoType; window["AscCommonExcel"].ECfvoType = ECfvoType;
window["AscCommonExcel"].ST_TimePeriod = ST_TimePeriod; window["AscCommonExcel"].ST_TimePeriod = ST_TimePeriod;
window["Asc"].ESparklineType = ESparklineType;
window["Asc"].EDispBlanksAs = EDispBlanksAs; window["Asc"].EDispBlanksAs = EDispBlanksAs;
window["Asc"].SparklineAxisMinMax = SparklineAxisMinMax; window["Asc"].SparklineAxisMinMax = SparklineAxisMinMax;
......
...@@ -4558,7 +4558,7 @@ CellArea.prototype = { ...@@ -4558,7 +4558,7 @@ CellArea.prototype = {
this.manualMax = undefined; this.manualMax = undefined;
this.manualMin = undefined; this.manualMin = undefined;
this.lineWeight = 0.75; this.lineWeight = 0.75;
this.type = Asc.ESparklineType.Line; this.type = Asc.c_oAscSparklineType.Line;
this.dateAxis = false; this.dateAxis = false;
this.displayEmptyCellsAs = Asc.EDispBlanksAs.Zero; this.displayEmptyCellsAs = Asc.EDispBlanksAs.Zero;
this.markers = false; this.markers = false;
......
...@@ -297,12 +297,12 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou ...@@ -297,12 +297,12 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
var settings = new AscCommon.asc_ChartSettings(); var settings = new AscCommon.asc_ChartSettings();
switch(oSparklineGroup.type) switch(oSparklineGroup.type)
{ {
case Asc.ESparklineType.Column: case Asc.c_oAscSparklineType.Column:
{ {
settings.type = c_oAscChartTypeSettings.barNormal; settings.type = c_oAscChartTypeSettings.barNormal;
break; break;
} }
case Asc.ESparklineType.Stacked: case Asc.c_oAscSparklineType.Stacked:
{ {
settings.type = c_oAscChartTypeSettings.barStackedPer; settings.type = c_oAscChartTypeSettings.barStackedPer;
break; break;
...@@ -436,7 +436,7 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou ...@@ -436,7 +436,7 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
chart_space.recalculateReferences(); chart_space.recalculateReferences();
chart_space.recalcInfo.recalculateReferences = false; chart_space.recalcInfo.recalculateReferences = false;
var fCallbackSeries = null; var fCallbackSeries = null;
if(oSparklineGroup.type === Asc.ESparklineType.Line) if(oSparklineGroup.type === Asc.c_oAscSparklineType.Line)
{ {
var oLn = new AscFormat.CLn(); var oLn = new AscFormat.CLn();
oLn.setW(36000*nSparklineMultiplier*25.4*(oSparklineGroup.lineWidth != null ? oSparklineGroup.lineWidth : 0.75)/72); oLn.setW(36000*nSparklineMultiplier*25.4*(oSparklineGroup.lineWidth != null ? oSparklineGroup.lineWidth : 0.75)/72);
...@@ -613,7 +613,7 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou ...@@ -613,7 +613,7 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
{ {
var oUnifill = CreateUniFillFromExcelColor(oSparklineGroup.colorSeries); var oUnifill = CreateUniFillFromExcelColor(oSparklineGroup.colorSeries);
var oSerie = chart_space.chart.plotArea.charts[0].series[0]; var oSerie = chart_space.chart.plotArea.charts[0].series[0];
if(oSparklineGroup.type === Asc.ESparklineType.Line) if(oSparklineGroup.type === Asc.c_oAscSparklineType.Line)
{ {
var oLn = oSerie.spPr.ln; var oLn = oSerie.spPr.ln;
oLn.setFill(oUnifill); oLn.setFill(oUnifill);
...@@ -2391,7 +2391,7 @@ function DrawingObjects() { ...@@ -2391,7 +2391,7 @@ function DrawingObjects() {
_this.checkSparklineGroupMinMaxVal = function(oSparklineGroup) _this.checkSparklineGroupMinMaxVal = function(oSparklineGroup)
{ {
var maxVal = null, minVal = null, i, j; var maxVal = null, minVal = null, i, j;
if(oSparklineGroup.type !== Asc.ESparklineType.Stacked && if(oSparklineGroup.type !== Asc.c_oAscSparklineType.Stacked &&
(Asc.SparklineAxisMinMax.Group === oSparklineGroup.minAxisType || Asc.SparklineAxisMinMax.Group === oSparklineGroup.maxAxisType)) (Asc.SparklineAxisMinMax.Group === oSparklineGroup.minAxisType || Asc.SparklineAxisMinMax.Group === oSparklineGroup.maxAxisType))
{ {
for(i = 0; i < oSparklineGroup.arrSparklines.length; ++i) for(i = 0; i < oSparklineGroup.arrSparklines.length; ++i)
...@@ -2465,7 +2465,7 @@ function DrawingObjects() { ...@@ -2465,7 +2465,7 @@ function DrawingObjects() {
for(i = 0; i < aSparklineGroups.length; ++i) { for(i = 0; i < aSparklineGroups.length; ++i) {
var oSparklineGroup = aSparklineGroups[i]; var oSparklineGroup = aSparklineGroups[i];
if(oSparklineGroup.type !== Asc.ESparklineType.Stacked && if(oSparklineGroup.type !== Asc.c_oAscSparklineType.Stacked &&
(Asc.SparklineAxisMinMax.Group === oSparklineGroup.minAxisType || Asc.SparklineAxisMinMax.Group === oSparklineGroup.maxAxisType)) (Asc.SparklineAxisMinMax.Group === oSparklineGroup.minAxisType || Asc.SparklineAxisMinMax.Group === oSparklineGroup.maxAxisType))
{ {
_this.checkSparklineGroupMinMaxVal(oSparklineGroup); _this.checkSparklineGroupMinMaxVal(oSparklineGroup);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment