Commit 0b190ad2 authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

Fix criticals: #21093, #21347

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50849 954022d7-b5bf-4e40-9824-e11837661b57
parent 80fa50f5
...@@ -520,6 +520,30 @@ asc_CChart.prototype = { ...@@ -520,6 +520,30 @@ asc_CChart.prototype = {
var api_sheet = window["Asc"]["editor"]; var api_sheet = window["Asc"]["editor"];
var api = api_sheet ? api_sheet : api_doc; var api = api_sheet ? api_sheet : api_doc;
var aData = [];
for (var j = 0; j < _t.series.length; j++) {
aData.push(_t.series[j].Val.NumCache.length);
aData.push(_t.series[j].xVal.NumCache.length);
aData.push(_t.series[j].Cat.NumCache.length);
}
maxDataLen = Math.max.apply(Math, aData);
var emptyItem = { numFormatStr: "General", isDateTimeFormat: false, val: "", isHidden: false };
for (var j = 0; j < _t.series.length; j++) {
if ( _t.series[j].Val.NumCache.length ) {
while ( _t.series[j].Val.NumCache.length < maxDataLen )
_t.series[j].Val.NumCache.push(emptyItem);
}
if ( _t.series[j].xVal.NumCache.length ) {
while ( _t.series[j].xVal.NumCache.length < maxDataLen )
_t.series[j].xVal.NumCache.push(emptyItem);
}
if ( _t.series[j].Cat.NumCache.length ) {
while ( _t.series[j].Cat.NumCache.length < maxDataLen )
_t.series[j].Cat.NumCache.push(emptyItem);
}
}
if ( serLen ) { if ( serLen ) {
for (var i = 0; i < _t.series[0].Val.NumCache.length; i++) { for (var i = 0; i < _t.series[0].Val.NumCache.length; i++) {
......
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