Commit a650a1f2 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

delete _ylabels_inside, _ylabels_inside_color

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51879 954022d7-b5bf-4e40-9824-e11837661b57
parent 764701f1
...@@ -854,14 +854,8 @@ ...@@ -854,14 +854,8 @@
underline: this._otherProps._ylabels_underline underline: this._otherProps._ylabels_underline
} }
if (this._otherProps._ylabels_inside == true) {
var xpos = this._otherProps._yaxispos == 'left' ? this._chartGutter._left + 5 : OfficeExcel.GetWidth(this) - this._chartGutter._right - 5;
var align = this._otherProps._yaxispos == 'left' ? 'left' : 'right';
var boxed = true;
} else {
var xpos = this._otherProps._yaxispos == 'left' ? this._chartGutter._left - 5 : this.canvas.width - this._chartGutter._right + 5; var xpos = this._otherProps._yaxispos == 'left' ? this._chartGutter._left - 5 : this.canvas.width - this._chartGutter._right + 5;
var boxed = false; var boxed = false;
}
if('auto' == numYLabels) if('auto' == numYLabels)
{ {
...@@ -987,23 +981,13 @@ ...@@ -987,23 +981,13 @@
var units_pre = this._otherProps._units_pre; var units_pre = this._otherProps._units_pre;
var units_post = this._otherProps._units_post; var units_post = this._otherProps._units_post;
var context = this.context; var context = this.context;
var align = '';
var xpos = 0;
var boxed = false;
this.context.fillStyle = this._otherProps._text_color; this.context.fillStyle = this._otherProps._text_color;
this.context.strokeStyle = 'black'; this.context.strokeStyle = 'black';
if (this._otherProps._ylabels_inside == true) {
var xpos = this._otherProps._yaxispos == 'left' ? this._chartGutter._left + 5 : OfficeExcel.GetWidth(this) - this._chartGutter._right - 5;
var align = this._otherProps._yaxispos == 'left' ? 'left' : 'right';
var boxed = true;
} else {
var xpos = this._otherProps._yaxispos == 'left' ? this._chartGutter._left - 5 : OfficeExcel.GetWidth(this) - this._chartGutter._right + 5; var xpos = this._otherProps._yaxispos == 'left' ? this._chartGutter._left - 5 : OfficeExcel.GetWidth(this) - this._chartGutter._right + 5;
var align = this._otherProps._yaxispos == 'left' ? 'right' : 'left'; var align = this._otherProps._yaxispos == 'left' ? 'right' : 'left';
var boxed = false; var boxed = false;
}
/** /**
* Draw specific Y labels here so that the local variables can be reused * Draw specific Y labels here so that the local variables can be reused
...@@ -1139,14 +1123,8 @@ ...@@ -1139,14 +1123,8 @@
underline: this._otherProps._xlabels_underline underline: this._otherProps._xlabels_underline
} }
if (this._otherProps._ylabels_inside == true) {
var xpos = this._otherProps._yaxispos == 'left' ? this._chartGutter._left + 5 : OfficeExcel.GetWidth(this) - this._chartGutter._right - 5;
var align = this._otherProps._yaxispos == 'left' ? 'left' : 'right';
var boxed = true;
} else {
var xpos = this._otherProps._yaxispos == 'left' ? this._chartGutter._left - 5 : OfficeExcel.GetWidth(this) - this._chartGutter._right + 5; var xpos = this._otherProps._yaxispos == 'left' ? this._chartGutter._left - 5 : OfficeExcel.GetWidth(this) - this._chartGutter._right + 5;
var boxed = false; var boxed = false;
}
/** /**
* Draw specific Y labels here so that the local variables can be reused * Draw specific Y labels here so that the local variables can be reused
......
...@@ -56,8 +56,6 @@ OfficeExcel.OtherProps = function() ...@@ -56,8 +56,6 @@ OfficeExcel.OtherProps = function()
this._ylabels = true; this._ylabels = true;
this._ylabels_count = 5; this._ylabels_count = 5;
this._ylabels_inside = false;
this._ylabels_inside_color = null;
this._ylabels_specific = null; this._ylabels_specific = null;
this._labels = []; this._labels = [];
......
...@@ -473,25 +473,7 @@ ...@@ -473,25 +473,7 @@
var numYLabels = this._otherProps._ylabels_count; var numYLabels = this._otherProps._ylabels_count;
var bounding = false; var bounding = false;
var bgcolor = this._otherProps._ylabels_inside ? this._otherProps._ylabels_inside_color : null; var bgcolor = null;
/**
* If the Y labels are inside the Y axis, invert the alignment
*/
if (this._otherProps._ylabels_inside == true && align == 'left') {
xpos -= 10;
align = 'right';
bounding = true;
} else if (this._otherProps._ylabels_inside == true && align == 'right') {
xpos += 10;
align = 'left';
bounding = true;
}
if (this._otherProps._xaxispos == 'center') { if (this._otherProps._xaxispos == 'center') {
var half = this.grapharea / 2; var half = this.grapharea / 2;
...@@ -689,22 +671,8 @@ ...@@ -689,22 +671,8 @@
if (this._otherProps._yaxispos == 'left') { if (this._otherProps._yaxispos == 'left') {
var x = this._chartGutter._left - 5; var x = this._chartGutter._left - 5;
if (this._otherProps._ylabels_inside) {
x += 10;
halign = 'left';
bounding = true;
bgcolor = 'rgba(255,255,255,0.5)';
}
} else if (this._otherProps._yaxispos == 'right') { } else if (this._otherProps._yaxispos == 'right') {
var x = this.canvas.width - this._chartGutter._right + 5; var x = this.canvas.width - this._chartGutter._right + 5;
if (this._otherProps._ylabels_inside) {
x -= 10;
halign = 'right';
bounding = true;
bgcolor = 'rgba(255,255,255,0.5)';
}
} }
......
...@@ -399,16 +399,11 @@ ...@@ -399,16 +399,11 @@
this.context.fillStyle = this._otherProps._text_color; this.context.fillStyle = this._otherProps._text_color;
var font = this._otherProps._ylabels_font; var font = this._otherProps._ylabels_font;
var xMin = this._otherProps._xmin; var xMin = this._otherProps._xmin;
var xMax = this._otherProps._xmax;
var yMax = this.scale[this.scale.length - 1];
var yMin = this._otherProps._ymin;
var text_size = this._otherProps._ylabels_size; var text_size = this._otherProps._ylabels_size;
var units_pre = this._otherProps._units_pre; var units_pre = this._otherProps._units_pre;
var units_post = this._otherProps._units_post; var units_post = this._otherProps._units_post;
var numYLabels = this._otherProps._ylabels_count; var numYLabels = this._otherProps._ylabels_count;
var inside = this._otherProps._ylabels_inside;
var context = this.context; var context = this.context;
var canvas = this.canvas;
var boxed = false; var boxed = false;
this.halfTextHeight = text_size / 2; this.halfTextHeight = text_size / 2;
...@@ -431,18 +426,6 @@ ...@@ -431,18 +426,6 @@
italic: this._otherProps._ylabels_italic italic: this._otherProps._ylabels_italic
} }
if (inside) {
if (this._otherProps._yaxispos == 'left') {
xPos = this._chartGutter._left + 5;
align = 'left';
boxed = true;
} else {
xPos = this.canvas.width - this._chartGutter._right - 5;
align = 'right';
boxed = true;
}
}
if (this._otherProps._xaxispos == 'center') { if (this._otherProps._xaxispos == 'center') {
...@@ -560,23 +543,6 @@ ...@@ -560,23 +543,6 @@
var xPos = this._otherProps._yaxispos == 'left' ? this._chartGutter._left - 5 : this.canvas.width - this._chartGutter._right + 5; var xPos = this._otherProps._yaxispos == 'left' ? this._chartGutter._left - 5 : this.canvas.width - this._chartGutter._right + 5;
var align = this._otherProps._yaxispos == 'right' ? 'left' : 'right'; var align = this._otherProps._yaxispos == 'right' ? 'left' : 'right';
if (inside) {
if (this._otherProps._yaxispos == 'left') {
xPos = this._chartGutter._left + 5;
align = 'left';
boxed = true;
} else {
xPos = this.canvas.width - this._chartGutter._right - 5;
align = 'right';
boxed = true;
}
}
/**
* Specific Y labels
*/
if('auto' == numYLabels) if('auto' == numYLabels)
{ {
align = 'right'; align = 'right';
......
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