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
6ebae178
Commit
6ebae178
authored
Nov 29, 2016
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change size perspective pie chart
parent
ba8bb483
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
11 deletions
+49
-11
common/Charts/3DTransformation.js
common/Charts/3DTransformation.js
+33
-10
common/Charts/ChartsDrawer.js
common/Charts/ChartsDrawer.js
+16
-1
No files found.
common/Charts/3DTransformation.js
View file @
6ebae178
...
...
@@ -154,8 +154,8 @@ Processor3D.prototype._calculateAutoHPercent = function()
if
(
AscFormat
.
c_oChartTypes
.
Pie
===
this
.
chartsDrawer
.
calcProp
.
type
)
{
this
.
hPercent
=
this
.
hPercent
/
6.8
;
this
.
view3D
.
depthPercent
=
6
80
;
this
.
hPercent
=
0.12
;
//this.view3D.depthPercent = 1
80;
}
}
...
...
@@ -1000,6 +1000,12 @@ Processor3D.prototype._calculateDepthPerspective = function()
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
);
if
(
AscFormat
.
c_oChartTypes
.
Area
===
this
.
chartsDrawer
.
calcProp
.
type
)
{
gapWidth
=
0
;
gapDepth
=
0
;
}
var
baseDepth
=
width
/
(
seriesCount
-
(
seriesCount
-
1
)
*
overlap
+
gapWidth
);
if
(
this
.
chartsDrawer
.
calcProp
.
subType
==
"
standard
"
||
this
.
chartsDrawer
.
calcProp
.
type
==
AscFormat
.
c_oChartTypes
.
Line
||
isNormalArea
)
baseDepth
=
(
width
/
(
seriesCount
-
(
seriesCount
-
1
)
*
overlap
+
gapWidth
))
*
seriesCount
;
...
...
@@ -1080,14 +1086,30 @@ Processor3D.prototype._calculateCameraDiff = function (/*isSkip*/)
//add test points for parallelepiped rect
var
points
=
[];
var
faces
=
[];
points
.
push
(
new
Point3D
(
this
.
left
,
this
.
top
,
perspectiveDepth
,
this
));
points
.
push
(
new
Point3D
(
this
.
left
,
heightChart
+
this
.
top
,
perspectiveDepth
,
this
));
points
.
push
(
new
Point3D
(
originalWidthChart
+
this
.
left
,
heightChart
+
this
.
top
,
perspectiveDepth
,
this
));
points
.
push
(
new
Point3D
(
originalWidthChart
+
this
.
left
,
this
.
top
,
perspectiveDepth
,
this
));
points
.
push
(
new
Point3D
(
originalWidthChart
+
this
.
left
,
this
.
top
,
0
,
this
));
points
.
push
(
new
Point3D
(
originalWidthChart
+
this
.
left
,
heightChart
+
this
.
top
,
0
,
this
));
points
.
push
(
new
Point3D
(
this
.
left
,
heightChart
+
this
.
top
,
0
,
this
));
points
.
push
(
new
Point3D
(
this
.
left
,
this
.
top
,
0
,
this
));
if
(
AscFormat
.
c_oChartTypes
.
Pie
===
this
.
chartsDrawer
.
calcProp
.
type
)
{
points
.
push
(
new
Point3D
(
this
.
left
+
originalWidthChart
/
2
,
this
.
top
,
perspectiveDepth
,
this
));
points
.
push
(
new
Point3D
(
this
.
left
,
this
.
top
,
perspectiveDepth
/
2
,
this
));
points
.
push
(
new
Point3D
(
this
.
left
+
originalWidthChart
,
this
.
top
,
perspectiveDepth
/
2
,
this
));
points
.
push
(
new
Point3D
(
this
.
left
+
originalWidthChart
/
2
,
this
.
top
,
0
,
this
));
points
.
push
(
new
Point3D
(
this
.
left
+
originalWidthChart
/
2
,
this
.
top
+
heightChart
,
perspectiveDepth
,
this
));
points
.
push
(
new
Point3D
(
this
.
left
,
this
.
top
+
heightChart
,
perspectiveDepth
/
2
,
this
));
points
.
push
(
new
Point3D
(
this
.
left
+
originalWidthChart
,
this
.
top
+
heightChart
,
perspectiveDepth
/
2
,
this
));
points
.
push
(
new
Point3D
(
this
.
left
+
originalWidthChart
/
2
,
this
.
top
+
heightChart
,
0
,
this
));
}
else
{
points
.
push
(
new
Point3D
(
this
.
left
,
this
.
top
,
perspectiveDepth
,
this
));
points
.
push
(
new
Point3D
(
this
.
left
,
heightChart
+
this
.
top
,
perspectiveDepth
,
this
));
points
.
push
(
new
Point3D
(
originalWidthChart
+
this
.
left
,
heightChart
+
this
.
top
,
perspectiveDepth
,
this
));
points
.
push
(
new
Point3D
(
originalWidthChart
+
this
.
left
,
this
.
top
,
perspectiveDepth
,
this
));
points
.
push
(
new
Point3D
(
originalWidthChart
+
this
.
left
,
this
.
top
,
0
,
this
));
points
.
push
(
new
Point3D
(
originalWidthChart
+
this
.
left
,
heightChart
+
this
.
top
,
0
,
this
));
points
.
push
(
new
Point3D
(
this
.
left
,
heightChart
+
this
.
top
,
0
,
this
));
points
.
push
(
new
Point3D
(
this
.
left
,
this
.
top
,
0
,
this
));
}
faces
.
push
([
0
,
1
,
2
,
3
]);
faces
.
push
([
2
,
5
,
4
,
3
]);
...
...
@@ -1342,6 +1364,7 @@ Processor3D.prototype.checkOutSideArea = function(newPoints)
}
};
calculateZ
(
100
);
calculateZ
(
10
);
calculateZ
(
1
);
...
...
common/Charts/ChartsDrawer.js
View file @
6ebae178
...
...
@@ -2532,7 +2532,16 @@ CChartsDrawer.prototype =
if
(
numCache
!=
null
&&
numCache
.
pts
&&
numCache
.
pts
.
length
)
{
if
(
!
this
.
calcProp
.
ptCount
)
this
.
calcProp
.
ptCount
=
numCache
.
ptCount
;
{
if
(
AscFormat
.
c_oChartTypes
.
Pie
===
this
.
calcProp
.
type
)
{
this
.
calcProp
.
ptCount
=
1
;
}
else
{
this
.
calcProp
.
ptCount
=
numCache
.
ptCount
;
}
}
//TODO возможно нужно будет проверку добавить на isHidden
counter
++
;
...
...
@@ -2543,6 +2552,11 @@ CChartsDrawer.prototype =
}
}
if
(
AscFormat
.
c_oChartTypes
.
Pie
===
this
.
calcProp
.
type
)
{
counter
=
1
;
}
return
counter
;
},
...
...
@@ -7439,6 +7453,7 @@ drawPieChart.prototype =
{
if
(
this
.
cChartDrawer
.
processor3D
.
view3D
.
rAngAx
)
{
this
.
properties3d
=
this
.
cChartDrawer
.
processor3D
.
calculatePropertiesForPieCharts
();
this
.
_re
с
alculatePie3D
();
}
else
...
...
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