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

delete unused code

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51853 954022d7-b5bf-4e40-9824-e11837661b57
parent fda1805f
......@@ -76,8 +76,7 @@
}
if(this._otherProps._grouping == 'grouped')
this.DrawAboveLabels(isFormatCell);
this.DrawAboveLabels(isFormatCell);
this.DrawLabels(isFormatCell);
......@@ -368,20 +367,6 @@
} else {
this.min = this._otherProps._ymin;
/*for (i=0; i<this.data.length; ++i) {
if (typeof(this.data[i]) == 'object') {
var value = this._otherProps._grouping == 'grouped' ? Number(OfficeExcel.array_max(this.data[i], true)) : Number(OfficeExcel.array_sum(this.data[i])) ;
} else {
var value = Number(this.data[i]);
}
this.max = Math.max(Math.abs(this.max), Math.abs(value));
}
this.scale = OfficeExcel.getScale(this.max, this);*/
//this.max = this.scale[4];
if('auto' == this._otherProps._ylabels_count)
{
var lengSc = this.scale.length;
......@@ -659,82 +644,7 @@
this.coords.push([x + hmargin, y, width - (2 * hmargin), height]);
/**
* Stacked bar
*/
} else if (typeof(this.data[i]) == 'object' && this._otherProps._grouping == 'stacked') {
var barWidth = width - (2 * hmargin);
var startY = 0;
var dataset = this.data[i];
for (j=0; j<dataset.length; ++j) {
/**
* Set the fill and stroke colors
*/
this.context.strokeStyle = strokeStyle
this.context.fillStyle = colors[j];
if (this._otherProps._colors_reverse) {
this.context.fillStyle = colors[this.data[i].length - j - 1];
}
if (this._otherProps._colors_sequential && colors[sequentialColorIndex]) {
this.context.fillStyle = colors[sequentialColorIndex++];
} else if (this._otherProps._colors_sequential) {
this.context.fillStyle = colors[sequentialColorIndex - 1];
}
var height = (dataset[j] / this.max) * (this.canvas.height - this._chartGutter._top - this._chartGutter._bottom );
// If the X axis pos is in the center, we need to half the height
if (xaxispos == 'center') {
height /= 2;
}
var totalHeight = (OfficeExcel.array_sum(dataset) / this.max) * (this.canvas.height - hmargin - this._chartGutter._top - this._chartGutter._bottom);
/**
* Store the coords for tooltips
*/
this.coords.push([x + hmargin, y, width - (2 * hmargin), height]);
this.context.strokeRect(x + hmargin, y, width - (2 * hmargin), height);
this.context.fillRect(x + hmargin, y, width - (2 * hmargin), height);
if (j == 0) {
var startY = y;
var startX = x;
}
y += height;
}
// This bit draws the text labels that appear above the bars if requested
if (this._otherProps._labels_above) {
this.context.fillStyle = this._otherProps._text_color;
OfficeExcel.Text(this.context,
this._otherProps._labels_above_font,
typeof(this._otherProps._labels_above_size) == 'number' ? this._otherProps._labels_above_size : this._otherProps._text_size - 3,
startX + (barWidth / 2) + this._otherProps._hmargin,
startY - 4,
String(this._otherProps._units_pre + OfficeExcel.array_sum(this.data[i]).toFixed(this._otherProps._labels_above_decimals) + this._otherProps._units_post),
this._otherProps._labels_above_angle ? 'bottom' : null,
this._otherProps._labels_above_angle ? (this._otherProps._labels_above_angle > 0 ? 'right' : 'left') : 'center',
null,
this._otherProps._labels_above_angle,
null,
bold,
textOptions);
}
/**
* Grouped bar
*/
} else if (typeof(this.data[i]) == 'object' && this._otherProps._grouping == 'grouped') {
} else if (typeof(this.data[i]) == 'object') {
this.context.lineWidth = this._otherProps._linewidth;
for (j=0; j<this.data[i].length; ++j) {
......
......@@ -84,7 +84,6 @@ OfficeExcel.OtherProps = function()
this._labels = [];
this._labels_above = false;
this._labels_above_decimals = 0;
this._labels_above_size = null;
this._labels_above_angle = null;
this._labels_sticks = false;
......@@ -142,8 +141,6 @@ OfficeExcel.OtherProps = function()
this._filled_range = false;
this._filled_accumulative = true;
this._grouping = 'grouped';
this._xaxis = true;
this._defaultcolor = 'white';
......
......@@ -34,13 +34,12 @@
this.coords = [];
this.max = 0;
var grouping = this._otherProps._grouping;
var value = 0;
for (i=0; i<this.data.length; ++i) {
if (typeof(this.data[i]) == 'object') {
var value = grouping == 'grouped' ? Number(OfficeExcel.array_max(this.data[i], true)) : Number(OfficeExcel.array_sum(this.data[i])) ;
value = Number(OfficeExcel.array_max(this.data[i], true));
} else {
var value = Number(Math.abs(this.data[i]));
value = Number(Math.abs(this.data[i]));
}
this.max = Math.max(Math.abs(this.max), Math.abs(value));
......@@ -574,50 +573,7 @@
/**
* Stacked bar chart
*/
} else if (typeof(this.data[i]) == 'object' && this._otherProps._grouping == 'stacked') {
var barHeight = height - (2 * vmargin);
for (j=0; j<this.data[i].length; ++j) {
// Set the fill/stroke colors
this.context.strokeStyle = this._otherProps._strokecolor;
this.context.fillStyle = this._otherProps._colors[j];
// Sequential colors
if (this._otherProps._colors_sequential) {
this.context.fillStyle = this._otherProps._colors[colorIdx++];
}
var width = (((this.data[i][j]) / (this.max))) * this.graphwidth;
var totalWidth = (OfficeExcel.array_sum(this.data[i]) / this.max) * this.graphwidth;
this.context.strokeRect(x, this._chartGutter._top + this._otherProps._vmargin + (this.graphheight / this.data.length) * i, width, height - (2 * vmargin) );
this.context.fillRect(x, this._chartGutter._top + this._otherProps._vmargin + (this.graphheight / this.data.length) * i, width, height - (2 * vmargin) );
/**
* Store the coords for tooltips
*/
// The last property of this array is a boolean which tells you whether the value is the last or not
this.coords.push([x,
y + vmargin,
width,
height - (2 * vmargin),
this.context.fillStyle,
OfficeExcel.array_sum(this.data[i]),
j == (this.data[i].length - 1)
]);
x += width;
}
/**
* A grouped bar chart
*/
} else if (typeof(this.data[i]) == 'object' && this._otherProps._grouping == 'grouped') {
} else if (typeof(this.data[i]) == 'object') {
for (j=0; j<this.data[i].length; ++j) {
// Set the fill/stroke colors
......
......@@ -1415,7 +1415,6 @@
size,
x_pos,
y_pos - 5 - size,
//x_val.toFixed(this._otherProps._labels_above_decimals) + ', ' + y_val.toFixed(this._otherProps._labels_above_decimals),
OfficeExcel.numToFormatText(OfficeExcel.num_round(y_val),formatTrue),
'center',
'center',
......
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