Commit 847f91cb authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

отрисовка каждого значения подписей диаграммы со своим форматом для точечной диаграммы

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47966 954022d7-b5bf-4e40-9824-e11837661b57
parent e74508ee
...@@ -1205,22 +1205,34 @@ function insertChart(chart, activeWorkSheet, width, height, isNewChart) { ...@@ -1205,22 +1205,34 @@ function insertChart(chart, activeWorkSheet, width, height, isNewChart) {
maxY = 0; maxY = 0;
var isEnY = false var isEnY = false
var scatterArr = arrValuesRev; var scatterArr = arrValuesRev;
var scatterArrLabels = arrFormatAdobeLabelsRev;
if(!scatterArr) if(!scatterArr)
{
scatterArr = arrReverse(arrValues); scatterArr = arrReverse(arrValues);
scatterArrLabels = arrReverse(arrFormatAdobeLabels);
}
if (chart.range.rows) if (chart.range.rows)
{
scatterArr = arrValues; scatterArr = arrValues;
scatterArrLabels = arrFormatAdobeLabels;
}
var newArr = []; var newArr = [];
var newAdobeLabels = [];
if(isDateTimeFormat) if(isDateTimeFormat)
{ {
formatCellScOy = formatCell; formatCellScOy = formatCell;
formatCell = 'General'; formatCell = 'General';
for (i = 0; i < scatterArr.length; ++i) { for (i = 0; i < scatterArr.length; ++i) {
newArr[i]=[]; newArr[i] = [];
newAdobeLabels[i] = [];
for (j = 0; j < scatterArr[i].length; ++j) { for (j = 0; j < scatterArr[i].length; ++j) {
newArr[i][j] = []; newArr[i][j] = [];
newAdobeLabels[i][j] = [];
newArr[i][j][0] = j+1; newArr[i][j][0] = j+1;
newArr[i][j][1] = scatterArr[i][j]; newArr[i][j][1] = scatterArr[i][j];
newAdobeLabels[i][j][1] = scatterArrLabels[i][j];
if(!isEn) if(!isEn)
{ {
min = newArr[i][j][0]; min = newArr[i][j][0];
...@@ -1243,10 +1255,13 @@ function insertChart(chart, activeWorkSheet, width, height, isNewChart) { ...@@ -1243,10 +1255,13 @@ function insertChart(chart, activeWorkSheet, width, height, isNewChart) {
else if(scatterArr.length == 1) else if(scatterArr.length == 1)
{ {
newArr[0]=[]; newArr[0]=[];
newAdobeLabels[0] = [];
for (j = 0; j < scatterArr[0].length; ++j) { for (j = 0; j < scatterArr[0].length; ++j) {
newArr[0][j] = []; newArr[0][j] = [];
newAdobeLabels[0][j] = [];
newArr[0][j][0] = j+1; newArr[0][j][0] = j+1;
newArr[0][j][1] = scatterArr[0][j]; newArr[0][j][1] = scatterArr[0][j];
newAdobeLabels[0][j][1] = scatterArrLabels[0][j];
if(!isEn) if(!isEn)
{ {
min = newArr[0][j][0]; min = newArr[0][j][0];
...@@ -1269,11 +1284,15 @@ function insertChart(chart, activeWorkSheet, width, height, isNewChart) { ...@@ -1269,11 +1284,15 @@ function insertChart(chart, activeWorkSheet, width, height, isNewChart) {
{ {
//принимаем первую срочку за X, остальные за y //принимаем первую срочку за X, остальные за y
for (i = 1; i < scatterArr.length; ++i) { for (i = 1; i < scatterArr.length; ++i) {
newArr[i-1]=[]; newArr[i-1] = [];
newAdobeLabels[i-1] = [];
for (j = 0; j < scatterArr[i].length; ++j) { for (j = 0; j < scatterArr[i].length; ++j) {
newArr[i-1][j] = []; newArr[i-1][j] = [];
newAdobeLabels[i-1][j] = [];
newArr[i-1][j][0] = scatterArr[0][j]; newArr[i-1][j][0] = scatterArr[0][j];
newArr[i-1][j][1] = scatterArr[i][j]; newArr[i-1][j][1] = scatterArr[i][j];
newAdobeLabels[i-1][j][0] = scatterArrLabels[0][j];
newAdobeLabels[i-1][j][1] = scatterArrLabels[i][j];
if(newArr[i-1][j][0].toString() != '' && !isEn) if(newArr[i-1][j][0].toString() != '' && !isEn)
{ {
...@@ -1315,8 +1334,12 @@ function insertChart(chart, activeWorkSheet, width, height, isNewChart) { ...@@ -1315,8 +1334,12 @@ function insertChart(chart, activeWorkSheet, width, height, isNewChart) {
chart.max = max; chart.max = max;
if(skipSeries) if(skipSeries)
chart.skipSeries = skipSeries; chart.skipSeries = skipSeries;
if(newArr != undefined) if(newArr != undefined)
{
chart.arrFormatAdobeLabels = newAdobeLabels;
drawChart(chart, newArr, width, height); drawChart(chart, newArr, width, height);
}
else else
{ {
chart.isSkip = isSkip; chart.isSkip = isSkip;
......
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