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
3cf66598
Commit
3cf66598
authored
Sep 27, 2016
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes for normal area charts
parent
75d7220c
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
332 additions
and
341 deletions
+332
-341
common/Charts/3DTransformation.js
common/Charts/3DTransformation.js
+9
-7
common/Charts/ChartsDrawer.js
common/Charts/ChartsDrawer.js
+323
-334
No files found.
common/Charts/3DTransformation.js
View file @
3cf66598
...
@@ -901,15 +901,17 @@ Processor3D.prototype._calculateDepthPerspective = function()
...
@@ -901,15 +901,17 @@ Processor3D.prototype._calculateDepthPerspective = function()
var
seriesCount
=
this
.
chartsDrawer
.
calcProp
.
seriesCount
;
var
seriesCount
=
this
.
chartsDrawer
.
calcProp
.
seriesCount
;
var
width
=
widthChart
/
this
.
chartsDrawer
.
calcProp
.
ptCount
;
var
width
=
widthChart
/
this
.
chartsDrawer
.
calcProp
.
ptCount
;
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
)
?
100
:
0
;
var
isNormalArea
=
!!
(
this
.
chartsDrawer
.
calcProp
.
subType
==
"
normal
"
&&
this
.
chartsDrawer
.
calcProp
.
type
==
AscFormat
.
c_oChartTypes
.
Area
);
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
);
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
);
var
baseDepth
=
width
/
(
seriesCount
-
(
seriesCount
-
1
)
*
overlap
+
gapWidth
);
var
baseDepth
=
width
/
(
seriesCount
-
(
seriesCount
-
1
)
*
overlap
+
gapWidth
);
if
(
this
.
chartsDrawer
.
calcProp
.
subType
==
"
standard
"
||
this
.
chartsDrawer
.
calcProp
.
type
==
AscFormat
.
c_oChartTypes
.
Line
)
if
(
this
.
chartsDrawer
.
calcProp
.
subType
==
"
standard
"
||
this
.
chartsDrawer
.
calcProp
.
type
==
AscFormat
.
c_oChartTypes
.
Line
||
isNormalArea
)
baseDepth
=
(
width
/
(
seriesCount
-
(
seriesCount
-
1
)
*
overlap
+
gapWidth
))
*
seriesCount
;
baseDepth
=
(
width
/
(
seriesCount
-
(
seriesCount
-
1
)
*
overlap
+
gapWidth
))
*
seriesCount
;
//процент от базовой глубины
//процент от базовой глубины
...
@@ -923,7 +925,7 @@ Processor3D.prototype._calculateDepthPerspective = function()
...
@@ -923,7 +925,7 @@ Processor3D.prototype._calculateDepthPerspective = function()
}
}
//TODO глубина в некоторых случаях отличается(тип Standard)
//TODO глубина в некоторых случаях отличается(тип Standard)
if
(
this
.
chartsDrawer
.
calcProp
.
subType
===
"
standard
"
||
this
.
chartsDrawer
.
calcProp
.
type
===
AscFormat
.
c_oChartTypes
.
Line
)
if
(
this
.
chartsDrawer
.
calcProp
.
subType
===
"
standard
"
||
this
.
chartsDrawer
.
calcProp
.
type
===
AscFormat
.
c_oChartTypes
.
Line
||
isNormalArea
)
{
{
var
b
=
1
/
seriesCount
;
var
b
=
1
/
seriesCount
;
...
@@ -940,7 +942,7 @@ Processor3D.prototype._calculateDepthPerspective = function()
...
@@ -940,7 +942,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
))
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
"
)
))
return
;
return
;
//calculate width in 3d standard charts with rAngAx
//calculate width in 3d standard charts with rAngAx
...
@@ -2226,13 +2228,13 @@ Processor3D.prototype._calcAspectRatio = function()
...
@@ -2226,13 +2228,13 @@ 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
.
view3D
.
rAngAx
)
if
((
subType
===
"
standard
"
||
this
.
chartsDrawer
.
calcProp
.
type
===
AscFormat
.
c_oChartTypes
.
Line
||
(
this
.
chartsDrawer
.
calcProp
.
type
===
AscFormat
.
c_oChartTypes
.
Area
&&
subType
==
"
normal
"
)
)
&&
!
this
.
view3D
.
rAngAx
)
{
{
this
.
_calcSpecialStandardScaleX
();
this
.
_calcSpecialStandardScaleX
();
aspectRatioX
=
(
widthOriginalChart
/
(
heightOriginalChart
/
hPercent
))
*
this
.
specialStandardScaleX
;
aspectRatioX
=
(
widthOriginalChart
/
(
heightOriginalChart
/
hPercent
))
*
this
.
specialStandardScaleX
;
}
}
else
if
(
subType
===
"
standard
"
||
this
.
chartsDrawer
.
calcProp
.
type
===
AscFormat
.
c_oChartTypes
.
Line
||
(
this
.
chartsDrawer
.
calcProp
.
type
===
AscFormat
.
c_oChartTypes
.
Area
&&
subType
==
"
normal
"
)
)
else
if
(
subType
===
"
standard
"
||
this
.
chartsDrawer
.
calcProp
.
type
===
AscFormat
.
c_oChartTypes
.
Line
)
{
{
var
seriesCount
=
this
.
chartsDrawer
.
calcProp
.
seriesCount
;
var
seriesCount
=
this
.
chartsDrawer
.
calcProp
.
seriesCount
;
var
ptCount
=
this
.
chartsDrawer
.
calcProp
.
ptCount
;
var
ptCount
=
this
.
chartsDrawer
.
calcProp
.
ptCount
;
...
...
common/Charts/ChartsDrawer.js
View file @
3cf66598
This diff is collapsed.
Click to expand it.
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