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
05af6f72
Commit
05af6f72
authored
Jan 24, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ previous merge
parent
17926458
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
common/Charts/3DTransformation.js
common/Charts/3DTransformation.js
+10
-10
No files found.
common/Charts/3DTransformation.js
View file @
05af6f72
...
@@ -226,7 +226,7 @@ Processor3D.prototype._recalculateScaleWithMaxWidth = function()
...
@@ -226,7 +226,7 @@ Processor3D.prototype._recalculateScaleWithMaxWidth = function()
var
subType
=
this
.
chartsDrawer
.
calcProp
.
subType
;
var
subType
=
this
.
chartsDrawer
.
calcProp
.
subType
;
var
type
=
this
.
chartsDrawer
.
calcProp
.
type
;
var
type
=
this
.
chartsDrawer
.
calcProp
.
type
;
var
isStandardType
=
!!
(
subType
===
"
standard
"
||
type
===
AscFormat
.
c_oChartTypes
.
Line
||
type
===
AscFormat
.
c_oChartTypes
.
Area
&&
subType
===
"
normal
"
);
var
isStandardType
=
!!
(
subType
===
"
standard
"
||
type
===
AscFormat
.
c_oChartTypes
.
Line
||
(
type
===
AscFormat
.
c_oChartTypes
.
Area
&&
subType
===
"
normal
"
)
||
type
===
AscFormat
.
c_oChartTypes
.
Surface
);
var
optimalWidthLine
,
kF
;
var
optimalWidthLine
,
kF
;
if
(
!
isStandardType
)
if
(
!
isStandardType
)
...
@@ -1065,7 +1065,7 @@ Processor3D.prototype._calculateDepth = function()
...
@@ -1065,7 +1065,7 @@ Processor3D.prototype._calculateDepth = function()
var
heightOriginalChart
=
this
.
heightCanvas
-
(
this
.
top
+
this
.
bottom
);
var
heightOriginalChart
=
this
.
heightCanvas
-
(
this
.
top
+
this
.
bottom
);
var
subType
=
this
.
chartsDrawer
.
calcProp
.
subType
;
var
subType
=
this
.
chartsDrawer
.
calcProp
.
subType
;
var
type
=
this
.
chartsDrawer
.
calcProp
.
type
;
var
type
=
this
.
chartsDrawer
.
calcProp
.
type
;
var
defaultOverlap
=
(
subType
==
"
stacked
"
||
subType
==
"
stackedPer
"
||
subType
==
"
standard
"
||
type
==
AscFormat
.
c_oChartTypes
.
Line
||
type
==
AscFormat
.
c_oChartTypes
.
Area
)
?
100
:
0
;
var
defaultOverlap
=
(
subType
==
"
stacked
"
||
subType
==
"
stackedPer
"
||
subType
==
"
standard
"
||
type
==
AscFormat
.
c_oChartTypes
.
Line
||
type
==
AscFormat
.
c_oChartTypes
.
Area
||
type
==
AscFormat
.
c_oChartTypes
.
Surface
)
?
100
:
0
;
var
overlap
=
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
overlap
?
(
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
overlap
/
100
)
:
(
defaultOverlap
/
100
);
var
overlap
=
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
overlap
?
(
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
overlap
/
100
)
:
(
defaultOverlap
/
100
);
var
gapWidth
=
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
gapWidth
!=
null
?
(
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
gapWidth
/
100
)
:
(
150
/
100
);
var
gapWidth
=
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
gapWidth
!=
null
?
(
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
gapWidth
/
100
)
:
(
150
/
100
);
var
gapDepth
=
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
gapDepth
!=
null
?
(
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
gapDepth
/
100
)
:
type
===
AscFormat
.
c_oChartTypes
.
Area
&&
subType
!==
"
normal
"
?
1
:
(
150
/
100
);
var
gapDepth
=
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
gapDepth
!=
null
?
(
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
gapDepth
/
100
)
:
type
===
AscFormat
.
c_oChartTypes
.
Area
&&
subType
!==
"
normal
"
?
1
:
(
150
/
100
);
...
@@ -1078,13 +1078,13 @@ Processor3D.prototype._calculateDepth = function()
...
@@ -1078,13 +1078,13 @@ Processor3D.prototype._calculateDepth = function()
var
depthPercent
=
this
.
view3D
.
depthPercent
!==
null
?
this
.
view3D
.
depthPercent
/
100
:
1
;
var
depthPercent
=
this
.
view3D
.
depthPercent
!==
null
?
this
.
view3D
.
depthPercent
/
100
:
1
;
var
t
=
this
;
var
t
=
this
;
var
areaStackedKf
=
type
===
AscFormat
.
c_oChartTypes
.
Area
&&
subType
!==
"
normal
"
?
(
ptCount
/
(
2
*
(
ptCount
-
1
)))
:
1
;
var
areaStackedKf
=
(
type
===
AscFormat
.
c_oChartTypes
.
Area
&&
subType
!==
"
normal
"
)
||
type
===
AscFormat
.
c_oChartTypes
.
Surface
?
(
ptCount
/
(
2
*
(
ptCount
-
1
)))
:
1
;
var
depth
=
0
;
var
depth
=
0
;
var
chartWidth
=
0
;
var
chartWidth
=
0
;
var
standardType
=
false
;
var
standardType
=
false
;
if
(
subType
==
"
standard
"
||
type
==
AscFormat
.
c_oChartTypes
.
Line
||
(
type
==
AscFormat
.
c_oChartTypes
.
Area
&&
subType
==
"
normal
"
))
if
(
subType
==
"
standard
"
||
type
==
AscFormat
.
c_oChartTypes
.
Line
||
(
type
==
AscFormat
.
c_oChartTypes
.
Area
&&
subType
==
"
normal
"
)
||
(
type
===
AscFormat
.
c_oChartTypes
.
Surface
)
)
standardType
=
true
;
standardType
=
true
;
var
heightHPercent
=
heightOriginalChart
/
hPercent
;
var
heightHPercent
=
heightOriginalChart
/
hPercent
;
...
@@ -1115,7 +1115,7 @@ Processor3D.prototype._calculateDepth = function()
...
@@ -1115,7 +1115,7 @@ Processor3D.prototype._calculateDepth = function()
var
widthChart
=
(
widthOriginalChart
/
t
.
aspectRatioX
)
/
t
.
specialStandardScaleX
;
var
widthChart
=
(
widthOriginalChart
/
t
.
aspectRatioX
)
/
t
.
specialStandardScaleX
;
b
=
(
seriesCount
-
(
seriesCount
-
1
)
*
overlap
+
gapWidth
);
b
=
(
seriesCount
-
(
seriesCount
-
1
)
*
overlap
+
gapWidth
);
if
(
subType
==
"
standard
"
||
type
==
AscFormat
.
c_oChartTypes
.
Line
||
type
==
AscFormat
.
c_oChartTypes
.
Area
)
if
(
subType
==
"
standard
"
||
type
==
AscFormat
.
c_oChartTypes
.
Line
||
type
==
AscFormat
.
c_oChartTypes
.
Area
||
type
===
AscFormat
.
c_oChartTypes
.
Surface
)
b
=
b
/
seriesCount
;
b
=
b
/
seriesCount
;
angleOxKf
=
sinOx
===
0
?
1
:
sinOx
;
angleOxKf
=
sinOx
===
0
?
1
:
sinOx
;
...
@@ -1129,7 +1129,7 @@ Processor3D.prototype._calculateDepth = function()
...
@@ -1129,7 +1129,7 @@ Processor3D.prototype._calculateDepth = function()
{
{
angleOxKf
=
sinOx
===
0
?
0
:
sinOx
;
angleOxKf
=
sinOx
===
0
?
0
:
sinOx
;
if
(
type
==
AscFormat
.
c_oChartTypes
.
Area
)
if
(
type
==
AscFormat
.
c_oChartTypes
.
Area
||
type
===
AscFormat
.
c_oChartTypes
.
Surface
)
depth
=
(
depthPercent
/
(
angleOxKf
*
depthPercent
+
((
ptCount
+
(
Math
.
floor
((
seriesCount
-
ptCount
)
/
2
-
0.5
)))
/
seriesCount
*
hPercent
)))
*
(
heightOriginalChart
);
depth
=
(
depthPercent
/
(
angleOxKf
*
depthPercent
+
((
ptCount
+
(
Math
.
floor
((
seriesCount
-
ptCount
)
/
2
-
0.5
)))
/
seriesCount
*
hPercent
)))
*
(
heightOriginalChart
);
else
else
depth
=
(
depthPercent
/
(
angleOxKf
*
depthPercent
+
((
ptCount
+
(
Math
.
floor
((
seriesCount
-
ptCount
)
/
2
)))
/
seriesCount
*
hPercent
)))
*
(
heightOriginalChart
);
depth
=
(
depthPercent
/
(
angleOxKf
*
depthPercent
+
((
ptCount
+
(
Math
.
floor
((
seriesCount
-
ptCount
)
/
2
)))
/
seriesCount
*
hPercent
)))
*
(
heightOriginalChart
);
...
@@ -1154,7 +1154,7 @@ Processor3D.prototype._calculateDepthPerspective = function()
...
@@ -1154,7 +1154,7 @@ Processor3D.prototype._calculateDepthPerspective = function()
var
width
=
widthChart
/
this
.
chartsDrawer
.
calcProp
.
ptCount
;
var
width
=
widthChart
/
this
.
chartsDrawer
.
calcProp
.
ptCount
;
var
isNormalArea
=
!!
(
this
.
chartsDrawer
.
calcProp
.
subType
==
"
normal
"
&&
this
.
chartsDrawer
.
calcProp
.
type
==
AscFormat
.
c_oChartTypes
.
Area
);
var
isNormalArea
=
!!
(
(
this
.
chartsDrawer
.
calcProp
.
subType
==
"
normal
"
&&
this
.
chartsDrawer
.
calcProp
.
type
==
AscFormat
.
c_oChartTypes
.
Area
)
||
this
.
chartsDrawer
.
calcProp
.
type
===
AscFormat
.
c_oChartTypes
.
Surface
);
var
defaultOverlap
=
(
this
.
chartsDrawer
.
calcProp
.
subType
==
"
stacked
"
||
this
.
chartsDrawer
.
calcProp
.
subType
==
"
stackedPer
"
||
this
.
chartsDrawer
.
calcProp
.
subType
==
"
standard
"
||
this
.
chartsDrawer
.
calcProp
.
type
==
AscFormat
.
c_oChartTypes
.
Line
||
isNormalArea
)
?
100
:
0
;
var
defaultOverlap
=
(
this
.
chartsDrawer
.
calcProp
.
subType
==
"
stacked
"
||
this
.
chartsDrawer
.
calcProp
.
subType
==
"
stackedPer
"
||
this
.
chartsDrawer
.
calcProp
.
subType
==
"
standard
"
||
this
.
chartsDrawer
.
calcProp
.
type
==
AscFormat
.
c_oChartTypes
.
Line
||
isNormalArea
)
?
100
:
0
;
var
overlap
=
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
overlap
?
(
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
overlap
/
100
)
:
(
defaultOverlap
/
100
);
var
overlap
=
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
overlap
?
(
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
overlap
/
100
)
:
(
defaultOverlap
/
100
);
...
@@ -1162,7 +1162,7 @@ Processor3D.prototype._calculateDepthPerspective = function()
...
@@ -1162,7 +1162,7 @@ Processor3D.prototype._calculateDepthPerspective = function()
var
gapWidth
=
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
gapWidth
!=
null
?
(
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
gapWidth
/
100
)
:
(
150
/
100
);
var
gapWidth
=
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
gapWidth
!=
null
?
(
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
gapWidth
/
100
)
:
(
150
/
100
);
var
gapDepth
=
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
gapDepth
!=
null
?
(
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
gapDepth
/
100
)
:
(
150
/
100
);
var
gapDepth
=
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
gapDepth
!=
null
?
(
this
.
chartSpace
.
chart
.
plotArea
.
chart
.
gapDepth
/
100
)
:
(
150
/
100
);
if
(
AscFormat
.
c_oChartTypes
.
Area
===
this
.
chartsDrawer
.
calcProp
.
type
)
if
(
AscFormat
.
c_oChartTypes
.
Area
===
this
.
chartsDrawer
.
calcProp
.
type
||
AscFormat
.
c_oChartTypes
.
Surface
===
this
.
chartsDrawer
.
calcProp
.
type
)
{
{
gapWidth
=
0
;
gapWidth
=
0
;
gapDepth
=
0
;
gapDepth
=
0
;
...
@@ -1200,7 +1200,7 @@ Processor3D.prototype._calculateDepthPerspective = function()
...
@@ -1200,7 +1200,7 @@ Processor3D.prototype._calculateDepthPerspective = function()
Processor3D
.
prototype
.
_calcSpecialStandardScaleX
=
function
()
Processor3D
.
prototype
.
_calcSpecialStandardScaleX
=
function
()
{
{
if
(
!
(
this
.
chartsDrawer
.
calcProp
.
subType
==
"
standard
"
||
this
.
chartsDrawer
.
calcProp
.
type
==
AscFormat
.
c_oChartTypes
.
Line
||
(
this
.
chartsDrawer
.
calcProp
.
type
===
AscFormat
.
c_oChartTypes
.
Area
&&
this
.
chartsDrawer
.
calcProp
.
subType
==
"
normal
"
)))
if
(
!
(
this
.
chartsDrawer
.
calcProp
.
subType
==
"
standard
"
||
this
.
chartsDrawer
.
calcProp
.
type
==
AscFormat
.
c_oChartTypes
.
Line
||
(
this
.
chartsDrawer
.
calcProp
.
type
===
AscFormat
.
c_oChartTypes
.
Area
&&
this
.
chartsDrawer
.
calcProp
.
subType
==
"
normal
"
)
||
this
.
chartsDrawer
.
calcProp
.
type
===
AscFormat
.
c_oChartTypes
.
Surface
))
return
;
return
;
//calculate width in 3d standard charts with rAngAx
//calculate width in 3d standard charts with rAngAx
...
@@ -2502,7 +2502,7 @@ Processor3D.prototype._calcAspectRatio = function()
...
@@ -2502,7 +2502,7 @@ Processor3D.prototype._calcAspectRatio = function()
var
aspectRatioY
=
1
;
var
aspectRatioY
=
1
;
var
subType
=
this
.
chartsDrawer
.
calcProp
.
subType
;
var
subType
=
this
.
chartsDrawer
.
calcProp
.
subType
;
if
((
subType
===
"
standard
"
||
this
.
chartsDrawer
.
calcProp
.
type
===
AscFormat
.
c_oChartTypes
.
Line
||
(
this
.
chartsDrawer
.
calcProp
.
type
===
AscFormat
.
c_oChartTypes
.
Area
&&
subType
==
"
normal
"
))
&&
!
this
.
view3D
.
getRAngAx
())
if
((
subType
===
"
standard
"
||
this
.
chartsDrawer
.
calcProp
.
type
===
AscFormat
.
c_oChartTypes
.
Line
||
(
this
.
chartsDrawer
.
calcProp
.
type
===
AscFormat
.
c_oChartTypes
.
Area
&&
subType
==
"
normal
"
)
||
this
.
chartsDrawer
.
calcProp
.
type
===
AscFormat
.
c_oChartTypes
.
Surface
)
&&
!
this
.
view3D
.
getRAngAx
())
{
{
this
.
_calcSpecialStandardScaleX
();
this
.
_calcSpecialStandardScaleX
();
...
...
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