Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
41104fe5
Commit
41104fe5
authored
Mar 05, 2017
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Bug 34209
parent
f5f6df06
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
15 deletions
+57
-15
common/Drawings/CommonController.js
common/Drawings/CommonController.js
+48
-15
common/Drawings/Format/ChartFormat.js
common/Drawings/Format/ChartFormat.js
+9
-0
No files found.
common/Drawings/CommonController.js
View file @
41104fe5
...
...
@@ -9758,7 +9758,9 @@ function ApplyMarker(aPreset, oObject, index, aBaseColors){
oObject
.
setMarker
(
null
);
return
;
}
oObject
.
setMarker
(
new
AscFormat
.
CMarker
());
if
(
!
oObject
.
marker
){
oObject
.
setMarker
(
new
AscFormat
.
CMarker
());
}
oObject
.
marker
.
setSize
(
aPreset
[
0
]);
ApplySpPr
(
aPreset
[
1
],
oObject
.
marker
,
index
,
aBaseColors
);
oObject
.
marker
.
setSymbol
(
aPreset
[
2
]);
...
...
@@ -9928,7 +9930,9 @@ function ApplyTxPr(aTextPr, oObject, oDrawingDocument, i, baseFills, bAccent1Bac
if
(
!
aTextPr
){
return
;
}
oObject
.
setTxPr
(
AscFormat
.
CreateTextBodyFromString
(
""
,
oDrawingDocument
,
oObject
));
if
(
!
oObject
.
txPr
){
oObject
.
setTxPr
(
AscFormat
.
CreateTextBodyFromString
(
""
,
oDrawingDocument
,
oObject
));
}
var
Pr
=
oObject
.
txPr
.
content
.
Content
[
0
].
Pr
.
Copy
();
if
(
!
Pr
.
DefaultRunPr
){
Pr
.
DefaultRunPr
=
new
CTextPr
();
...
...
@@ -10055,7 +10059,9 @@ function ApplyDLblsProps(aPr, oObj, oDrawingDocument, i, baseFills, bCreate){
return
;
}
if
(
!
bCreate
)
{
oObj
.
setDLbls
(
new
AscFormat
.
CDLbls
());
if
(
!
oObj
.
dLbls
){
oObj
.
setDLbls
(
new
AscFormat
.
CDLbls
());
}
}
if
(
oObj
.
dLbls
){
var
lbls
=
oObj
.
dLbls
;
...
...
@@ -10106,7 +10112,9 @@ function ApplyPresetToChartSpace(oChartSpace, aPreset, bCreate){
}
else
{
if
(
!
bCreate
&&
aPreset
[
5
]){
oChartSpace
.
chart
.
setLegend
(
new
AscFormat
.
CLegend
());
if
(
!
oChartSpace
.
chart
.
legend
){
oChartSpace
.
chart
.
setLegend
(
new
AscFormat
.
CLegend
());
}
oChartSpace
.
chart
.
legend
.
setOverlay
(
false
);
}
}
...
...
@@ -10131,20 +10139,35 @@ function ApplyPresetToChartSpace(oChartSpace, aPreset, bCreate){
for
(
i
=
0
;
i
<
oChart
.
series
.
length
;
++
i
){
var
pts
=
AscFormat
.
getPtsFromSeries
(
oChart
.
series
[
i
]);
for
(
var
j
=
oChart
.
series
[
i
].
dPt
.
length
-
1
;
j
>
-
1
;
--
j
){
oChart
.
series
[
i
].
removeDPt
(
j
);
}
var
oDPt
;
if
(
oChart
.
getObjectType
()
===
AscDFH
.
historyitem_type_PieChart
||
oChart
.
getObjectType
()
===
AscDFH
.
historyitem_type_DoughnutChart
){
base_fills
=
AscFormat
.
getArrayFillsFromBase
(
style
.
fill2
,
AscFormat
.
getMaxIdx
(
pts
));
for
(
j
=
0
;
j
<
pts
.
length
;
++
j
){
var
oDPt
=
new
AscFormat
.
CDPt
();
oDPt
.
setBubble3D
(
false
);
oDPt
.
setIdx
(
j
);
oDPt
=
null
;
if
(
oChart
.
series
[
i
].
getDptByIdx
){
oDPt
=
oChart
.
series
[
i
].
getDptByIdx
(
j
);
}
if
(
!
oDPt
){
oDPt
=
new
AscFormat
.
CDPt
();
oDPt
.
setIdx
(
j
);
}
if
(
oDPt
.
bubble3D
!==
false
){
oDPt
.
setBubble3D
(
false
);
}
ApplySpPr
(
aPreset
[
11
],
oDPt
,
j
,
base_fills
,
bAccent1Background
);
oChart
.
series
[
i
].
addDPt
(
oDPt
);
}
for
(
j
=
0
;
j
<
oChart
.
series
[
i
].
dPt
.
length
;
++
j
){
if
(
oChart
.
series
[
i
].
dPt
[
j
].
idx
>=
pts
.
length
){
oChart
.
series
[
i
].
removeDPt
(
j
);
}
}
}
else
{
for
(
var
j
=
oChart
.
series
[
i
].
dPt
.
length
-
1
;
j
>
-
1
;
--
j
){
oChart
.
series
[
i
].
removeDPt
(
j
);
}
base_fills
=
AscFormat
.
getArrayFillsFromBase
(
style
.
fill2
,
oChart
.
series
.
length
);
ApplySpPr
(
aPreset
[
11
],
oChart
.
series
[
i
],
i
,
base_fills
,
bAccent1Background
);
}
...
...
@@ -10200,7 +10223,9 @@ function ApplyPresetToChartSpace(oChartSpace, aPreset, bCreate){
}
if
(
aPreset
[
17
]){
oChartSpace
.
chart
.
setView3D
(
new
AscFormat
.
CView3d
());
if
(
!
oChartSpace
.
chart
.
view3D
){
oChartSpace
.
chart
.
setView3D
(
new
AscFormat
.
CView3d
());
}
oChartSpace
.
chart
.
view3D
.
setDepthPercent
(
aPreset
[
17
][
0
]);
oChartSpace
.
chart
.
view3D
.
setHPercent
(
aPreset
[
17
][
1
]);
oChartSpace
.
chart
.
view3D
.
setPerspective
(
aPreset
[
17
][
2
]);
...
...
@@ -10212,7 +10237,9 @@ function ApplyPresetToChartSpace(oChartSpace, aPreset, bCreate){
oChartSpace
.
chart
.
setView3D
(
null
);
}
if
(
aPreset
[
18
]){
oChartSpace
.
chart
.
setBackWall
(
new
AscFormat
.
CChartWall
());
if
(
!
oChartSpace
.
chart
.
backWall
){
oChartSpace
.
chart
.
setBackWall
(
new
AscFormat
.
CChartWall
());
}
ApplySpPr
(
aPreset
[
18
][
0
],
oChartSpace
.
chart
.
backWall
);
oChartSpace
.
chart
.
backWall
.
setThickness
(
aPreset
[
18
][
1
]);
}
...
...
@@ -10221,7 +10248,9 @@ function ApplyPresetToChartSpace(oChartSpace, aPreset, bCreate){
}
if
(
aPreset
[
19
]){
oChartSpace
.
chart
.
setFloor
(
new
AscFormat
.
CChartWall
());
if
(
!
oChartSpace
.
chart
.
floor
){
oChartSpace
.
chart
.
setFloor
(
new
AscFormat
.
CChartWall
());
}
ApplySpPr
(
aPreset
[
19
][
0
],
oChartSpace
.
chart
.
floor
);
oChartSpace
.
chart
.
floor
.
setThickness
(
aPreset
[
19
][
1
]);
}
...
...
@@ -10230,7 +10259,9 @@ function ApplyPresetToChartSpace(oChartSpace, aPreset, bCreate){
}
if
(
aPreset
[
20
]){
oChartSpace
.
chart
.
setSideWall
(
new
AscFormat
.
CChartWall
());
if
(
!
oChartSpace
.
chart
.
sideWall
){
oChartSpace
.
chart
.
setSideWall
(
new
AscFormat
.
CChartWall
());
}
ApplySpPr
(
aPreset
[
20
][
0
],
oChartSpace
.
chart
.
sideWall
);
oChartSpace
.
chart
.
sideWall
.
setThickness
(
aPreset
[
20
][
1
]);
}
...
...
@@ -10253,7 +10284,9 @@ function ApplyPresetToChartSpace(oChartSpace, aPreset, bCreate){
oChart
.
setUpDownBars
(
null
);
}
else
{
oChart
.
setUpDownBars
(
new
AscFormat
.
CUpDownBars
());
if
(
!
oChart
.
upDownBars
){
oChart
.
setUpDownBars
(
new
AscFormat
.
CUpDownBars
());
}
oChartSpace
.
setSpPr
(
null
);
ApplySpPr
(
aPreset
[
24
][
0
],
oChartSpace
);
oChart
.
upDownBars
.
setDownBars
(
oChartSpace
.
spPr
);
...
...
common/Drawings/Format/ChartFormat.js
View file @
41104fe5
...
...
@@ -9742,6 +9742,15 @@ CPieSeries.prototype =
return
null
;
},
getDptByIdx
:
function
(
idx
){
for
(
var
i
=
0
;
i
<
this
.
dPt
.
length
;
++
i
){
if
(
this
.
dPt
[
i
].
idx
===
idx
){
return
this
.
dPt
[
i
];
}
}
return
null
;
},
Refresh_RecalcData
:
function
()
{},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment