Commit 594d9992 authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

корректное масштабирование подписей значений по оси OY.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47537 954022d7-b5bf-4e40-9824-e11837661b57
parent efcd5c87
...@@ -1499,8 +1499,10 @@ ...@@ -1499,8 +1499,10 @@
OfficeExcel.Text = function (context, font, size, x, y, text) OfficeExcel.Text = function (context, font, size, x, y, text)
{ {
var drwContext = OfficeExcel.drawingCtxCharts; var drwContext = OfficeExcel.drawingCtxCharts;
var scale = 1;
if(drwContext) if(drwContext)
{ {
scale = drwContext.scaleFactor;
drwContext.setCanvas(bar.canvas); drwContext.setCanvas(bar.canvas);
context = drwContext; context = drwContext;
...@@ -1541,7 +1543,7 @@ ...@@ -1541,7 +1543,7 @@
if (arguments[6]) { if (arguments[6]) {
var vAlign = arguments[6]; var vAlign = arguments[6];
if(textSize) if(textSize)
size1 = textSize.height/0.75; size1 = (textSize.height/0.75)*scale;
else else
size1 = size; size1 = size;
if (vAlign == 'center') { if (vAlign == 'center') {
...@@ -1557,7 +1559,7 @@ ...@@ -1557,7 +1559,7 @@
// Hoeizontal alignment - defaults to left // Hoeizontal alignment - defaults to left
if (arguments[7] && textSize) { if (arguments[7] && textSize) {
var hAlign = arguments[7]; var hAlign = arguments[7];
width = textSize.width/0.75; width = (textSize.width/0.75)*scale;
if (hAlign) { if (hAlign) {
if (hAlign == 'center') { if (hAlign == 'center') {
//context.translate(-1 * (width / 2), 0) //context.translate(-1 * (width / 2), 0)
...@@ -1572,8 +1574,8 @@ ...@@ -1572,8 +1574,8 @@
context.setFillStyle(arguments[13].color); context.setFillStyle(arguments[13].color);
else else
context.setFillStyle("#000000"); context.setFillStyle("#000000");
x = x/(drwContext.scaleFactor); x = x/(scale);
y = y/(drwContext.scaleFactor); y = y/(scale);
// Rotate the canvas if need be // Rotate the canvas if need be
if (arguments[9] && textSize) { if (arguments[9] && textSize) {
var textOptions = var textOptions =
......
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