Commit fcb0b034 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@51884 954022d7-b5bf-4e40-9824-e11837661b57
parent 3d004918
......@@ -1863,9 +1863,6 @@ function DrawBarChart(chartCanvas, chartSubType, data, chart) {
bar._otherProps._type = 'accumulative';
if (bar._otherProps._autoGrouping == 'stackedPer') {
for (var j = 0; j < (data.length); j++) {
var maxVal = 0;
var minVal = 0;
var summ = 0;
for (var i = 0; i < data[j].length; i++) {
summ += Math.abs(data[j][i]);
......@@ -1958,7 +1955,6 @@ function DrawHBarChart(chartCanvas, chartSubType, data, chart) {
}
var tempData = data;
var firstData = data;
for (var j = 0; j < (data.length); j++) {
for (var i = 0; i < (data[j].length); i++) {
......
This diff is collapsed.
......@@ -55,7 +55,7 @@ OfficeExcel.OtherProps = function()
this._xlabels = true;
this._ylabels = true;
this._ylabels_count = 5;
this._ylabels_count = 'auto';
this._labels = [];
this._labels_above = false;
......@@ -73,7 +73,6 @@ OfficeExcel.OtherProps = function()
this._background_grid_autofit = true;
this._background_grid_autofit_numhlines = 5;
this._background_grid_autofit_numvlines = 20;
this._background_grid_autofit_align = false;
this._background_vbars = null;
this._background_hbars = null;
......@@ -87,11 +86,8 @@ OfficeExcel.OtherProps = function()
this._fillstyle = null;
this._smallxticks = 3;
this._largexticks = 5;
this._smallyticks = 3;
this._ticksize = 3;
this._tickdirection = -1;
this._tickmarks = null; // can be reverse
this._tickmarks_dot_color = 'white';
......
......@@ -1110,9 +1110,6 @@
}
return OfficeExcel.array_exp(massRes);
}
}
if (max <= 1) {
......@@ -1461,14 +1458,8 @@
}
}
/**
* This function draws the background for the bar chart, line chart and scatter chart.
*
* @param object obj The graph object
*/
OfficeExcel.background.Draw = function (obj)
{
var canvas = obj.canvas;
var context = obj.context;
var height = 0;
var gutterLeft = obj._chartGutter._left;
......@@ -1504,28 +1495,6 @@
// If autofit is specified, use the .numhlines and .numvlines along with the width to work
// out the hsize and vsize
if (obj._otherProps._background_grid_autofit) {
/**
* Align the grid to the tickmarks
*/
if (obj._otherProps._background_grid_autofit_align) {
// Align the horizontal lines
obj._otherProps._background_grid_autofit_numhlines = obj._otherProps._ylabels_count;
// Align the vertical lines for the line
if (obj.type == 'line') {
if (obj._otherProps._labels && obj._otherProps._labels.length) {
obj._otherProps._background_grid_autofit_numvlines = obj._otherProps._labels.length - 1;
} else {
obj._otherProps._background_grid_autofit_numvlines = obj.data[0].length - 1;
}
// Align the vertical lines for the bar
} else if (obj.type == 'bar' && obj._otherProps._labels && obj._otherProps._labels.length) {
obj._otherProps._background_grid_autofit_numvlines = obj._otherProps._labels.length;
}
}
var vsize = ((obj.canvas.width - gutterLeft - gutterRight)) / obj._otherProps._background_grid_autofit_numvlines;
var hsize = (obj.canvas.height - gutterTop - gutterBottom) / (obj._otherProps._background_grid_autofit_numhlines);
if(vsize > -1 && vsize < 1)
......@@ -1542,13 +1511,7 @@
// Draw the horizontal lines
if (obj._otherProps._background_grid_hlines) {
height = (OfficeExcel.GetHeight(obj) - gutterBottom - gutterTop)
//for (y = gutterTop; y <= (height + gutterTop); y+=obj._otherProps._background_grid_hsize) {
/*for (n = y; n < y + obj._otherProps._background_grid_hsize; n+=(obj._otherProps._background_grid_hsize/5)) {
context.moveTo(gutterLeft, AA(this, n));
context.lineTo(OfficeExcel.GetWidth(obj) - gutterRight, AA(this,n));
}*/
height = (OfficeExcel.GetHeight(obj) - gutterBottom - gutterTop)
height = (OfficeExcel.GetHeight(obj) - gutterBottom - gutterTop);
for (y = gutterTop; y <= height + gutterTop + 1; y+=obj._otherProps._background_grid_hsize) {
if((y + obj._otherProps._background_grid_hsize) > (height + gutterTop + 1))
{
......@@ -1564,14 +1527,6 @@
}
}
// }
/*if (obj._otherProps._background_grid_hlines) {
height = (OfficeExcel.GetHeight(obj) - gutterBottom)
for (y=gutterTop; y<height; y+=obj._otherProps._background_grid_hsize) {
context.moveTo(gutterLeft, AA(this, y));
context.lineTo(OfficeExcel.GetWidth(obj) - gutterRight, AA(this, y));
}
}*/
}
......@@ -1594,42 +1549,6 @@
}
context.stroke();
context.stroke();
if(obj._otherProps._background_grid_hlines_interim)
{
var n = 0;
context.strokeStyle = obj._otherProps._background_grid_hlines_interim_color;
for (y = gutterTop; y < (height + gutterTop); y+=(obj._otherProps._background_grid_hsize/5)) {
if(n%5 != 0 && n != 0)
{
context.moveTo(gutterLeft, AA(this, y));
context.lineTo(OfficeExcel.GetWidth(obj) - gutterRight, AA(this, y));
context.stroke();
}
n++;
}
context.stroke();
}
if(obj._otherProps._background_grid_vlines_interim)
{
var n = 0;
context.strokeStyle = obj._otherProps._background_grid_vlines_interim_color;
var width = (obj.canvas.width - gutterRight)
for (x=gutterLeft; x < width + gutterLeft; x+=obj._otherProps._background_grid_vsize/2) {
if(n%2 != 0 && n != 0)
{
context.moveTo(AA(this, x), gutterTop);
context.lineTo(AA(this, x), obj.canvas.height - gutterBottom);
}
n++;
}
context.stroke();
}
}
}
......
This diff is collapsed.
This diff is collapsed.
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