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

delete _key_rounded

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51833 954022d7-b5bf-4e40-9824-e11837661b57
parent e9b88f51
......@@ -1505,9 +1505,6 @@ function drawChart(chart, arrValues, width, height, options) {
bar._otherProps._colors = OfficeExcel.array_reverse(bar._otherProps._colors);
}
}
// без рамки
bar._otherProps._key_rounded = null;
if (bar._otherProps._filled != true && bar.type != 'bar' && bar.type != 'hbar' && bar.type != 'pie')
bar._otherProps._key_color_shape = 'line';
......@@ -1752,8 +1749,6 @@ function DrawScatterChart(chartCanvas, chartSubType, data, chart) {
bar._otherProps._xmax = countGraph.length;
bar._otherProps._key_colors = keyColors;
}
//для того, чтобы не строить рамку вокруг легенды
bar._otherProps._key_rounded = null;
if (bar._otherProps._filled != true)
bar._otherProps._key_color_shape = 'line';
}
......@@ -1769,10 +1764,9 @@ function DrawPieChart(chartCanvas, chartSubType, data, chart) {
bar._otherProps._ylabels_count = 'auto';
bar._otherProps._colors = ['steelblue', 'IndianRed', 'Silver'];
bar._chartGutter._left = 45;
bar._chartGutter._right = 90;;
bar._chartGutter._right = 90;
bar._chartGutter._top = 13;
bar._chartGutter._bottom = 30;
bar._otherProps._key_rounded = null;
}
function DrawLineChart(chartCanvas, chartType, chartSubType, data, chart) {
......@@ -2056,9 +2050,6 @@ function DrawHBarChart(chartCanvas, chartSubType, data, chart) {
}
else
bar._otherProps._vmargin = (((bar.canvas.height - (bar._chartGutter._top + bar._chartGutter._bottom)) * 0.3) / bar.data.length) / bar.data[0].length;
//для того, чтобы не строить рамку вокруг легенды
bar._otherProps._key_rounded = null;
}
function findPrevValue(originalData, num, max) {
......
......@@ -1781,20 +1781,4 @@
textOptions);
}
}
}
/**
* This function can be used when the canvas is clicked on (or similar - depending on the event)
* to retrieve the relevant Y coordinate for a particular value.
*
* @param int value The value to get the Y coordinate for
*/
OfficeExcel.Bar.prototype.getYCoord = function (value)
{
var yCoord;
yCoord = ((value - this.min) / (this.max - this.min)) * this.grapharea;
yCoord = this.canvas.height - this._chartGutter._bottom - yCoord;
return yCoord;
}
\ No newline at end of file
}
\ No newline at end of file
......@@ -158,12 +158,8 @@ OfficeExcel.OtherProps = function()
this._tickmarks_dot_color = 'white';
this._key = [];
this._key_background = 'white';
this._key_position_x = null;
this._key_position_y = null;
this._key_position_gutter_boxed = true;
this._key_rounded = true;
this._key_linewidth = 1;
this._key_color_shape = 'square';
this._key_colors = null;
this._key_halign = 'right';
......
......@@ -40,16 +40,10 @@
var gutterLeft = obj._chartGutter._left;
var gutterRight = obj._chartGutter._right;
var gutterTop = obj._chartGutter._top;
var gutterBottom = obj._chartGutter._bottom;
var hpos = obj._otherProps._yaxispos == 'right' ? gutterLeft + 10 : OfficeExcel.GetWidth(obj) - gutterRight - 10;
var vpos = gutterTop + 10;
var blob_size = text_size; // The blob of color
var hmargin = 8; // This is the size of the gaps between the blob of color and the text
var vmargin = 4; // This is the vertical margin of the key
var fillstyle = obj._otherProps._key_background;
var strokestyle = '#333';
var height = 0;
var width = 0;
var scale = 1;
if(OfficeExcel.drawingCtxCharts && OfficeExcel.drawingCtxCharts.scaleFactor)
......@@ -180,30 +174,12 @@
// Draw the box that the key resides in
context.beginPath();
context.fillStyle = obj._otherProps._key_background;
context.fillStyle = 'white';
context.strokeStyle = 'black';
if('radar' == obj.type)
{
colors = obj._otherProps._strokecolor
}
if (arguments[3] != false) {
context.lineWidth = typeof(obj._otherProps._key_linewidth) == 'number' ? obj._otherProps._key_linewidth : 1;
// The older square rectangled key
if (obj._otherProps._key_rounded == true) {
context.beginPath();
context.strokeStyle = strokestyle;
OfficeExcel.strokedCurvyRect(context, AA(this, hpos), AA(this, vpos), width - 5, 5 + ( (text_size + 5) * OfficeExcel.getKeyLength(key)),4);
context.stroke();
context.fill();
}
else if(null != obj._otherProps._key_rounded) {
context.strokeRect(AA(this, hpos), AA(this, vpos), width - 5, 5 + ( (text_size + 5) * OfficeExcel.getKeyLength(key)));
context.fillRect(AA(this, hpos), AA(this, vpos), width - 5, 5 + ( (text_size + 5) * OfficeExcel.getKeyLength(key)));
}
}
context.beginPath();
......@@ -377,22 +353,4 @@
}
context.fill();
}
/**
* Returns the key length, but accounts for null values
*
* @param array key The key elements
*/
OfficeExcel.getKeyLength = function (key)
{
var len = 0;
for (var i=0; i<key.length; ++i) {
if (key[i] != null) {
++len;
}
}
return len;
}
\ No newline at end of file
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