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
44d70eae
Commit
44d70eae
authored
Oct 31, 2016
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
draw back faces(hBar charts)
parent
b294c3a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
98 additions
and
64 deletions
+98
-64
common/Charts/ChartsDrawer.js
common/Charts/ChartsDrawer.js
+98
-64
No files found.
common/Charts/ChartsDrawer.js
View file @
44d70eae
...
@@ -1127,8 +1127,8 @@ CChartsDrawer.prototype =
...
@@ -1127,8 +1127,8 @@ CChartsDrawer.prototype =
if
(
!
this
.
calcProp
.
data
[
j
+
1
])
if
(
!
this
.
calcProp
.
data
[
j
+
1
])
this
.
calcProp
.
data
[
j
+
1
]
=
[];
this
.
calcProp
.
data
[
j
+
1
]
=
[];
this
.
calcProp
.
data
[
j
+
1
][
i
]
=
this
.
calcProp
.
data
[
j
+
1
][
i
]
+
this
.
calcProp
.
data
[
j
][
i
];
this
.
calcProp
.
data
[
j
+
1
][
i
]
=
this
.
calcProp
.
data
[
j
+
1
][
i
]
+
this
.
calcProp
.
data
[
j
][
i
];
}
;
}
}
;
}
maxMinObj
=
this
.
_getMaxMinValueArray
(
this
.
calcProp
.
data
);
maxMinObj
=
this
.
_getMaxMinValueArray
(
this
.
calcProp
.
data
);
this
.
calcProp
.
max
=
maxMinObj
.
max
;
this
.
calcProp
.
max
=
maxMinObj
.
max
;
...
@@ -1142,14 +1142,14 @@ CChartsDrawer.prototype =
...
@@ -1142,14 +1142,14 @@ CChartsDrawer.prototype =
summValue
[
j
]
=
0
;
summValue
[
j
]
=
0
;
for
(
var
i
=
0
;
i
<
firstData
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
firstData
.
length
;
i
++
)
{
summValue
[
j
]
+=
Math
.
abs
(
firstData
[
i
][
j
])
summValue
[
j
]
+=
Math
.
abs
(
firstData
[
i
][
j
])
}
;
}
}
;
}
for
(
var
j
=
0
;
j
<
(
this
.
calcProp
.
data
.
length
-
1
);
j
++
)
{
for
(
var
j
=
0
;
j
<
(
this
.
calcProp
.
data
.
length
-
1
);
j
++
)
{
for
(
var
i
=
0
;
i
<
this
.
calcProp
.
data
[
j
].
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
calcProp
.
data
[
j
].
length
;
i
++
)
{
this
.
calcProp
.
data
[
j
+
1
][
i
]
=
this
.
calcProp
.
data
[
j
+
1
][
i
]
+
this
.
calcProp
.
data
[
j
][
i
]
this
.
calcProp
.
data
[
j
+
1
][
i
]
=
this
.
calcProp
.
data
[
j
+
1
][
i
]
+
this
.
calcProp
.
data
[
j
][
i
]
}
;
}
}
;
}
var
tempData
=
this
.
calcProp
.
data
;
var
tempData
=
this
.
calcProp
.
data
;
...
@@ -1159,8 +1159,8 @@ CChartsDrawer.prototype =
...
@@ -1159,8 +1159,8 @@ CChartsDrawer.prototype =
tempData
[
i
][
j
]
=
0
;
tempData
[
i
][
j
]
=
0
;
else
else
tempData
[
i
][
j
]
=
(
100
*
tempData
[
i
][
j
])
/
(
summValue
[
j
]);
tempData
[
i
][
j
]
=
(
100
*
tempData
[
i
][
j
])
/
(
summValue
[
j
]);
}
;
}
}
;
}
maxMinObj
=
this
.
_getMaxMinValueArray
(
tempData
);
maxMinObj
=
this
.
_getMaxMinValueArray
(
tempData
);
this
.
calcProp
.
max
=
maxMinObj
.
max
;
this
.
calcProp
.
max
=
maxMinObj
.
max
;
...
@@ -2319,7 +2319,7 @@ CChartsDrawer.prototype =
...
@@ -2319,7 +2319,7 @@ CChartsDrawer.prototype =
{
{
min
=
array
[
i
][
j
];
min
=
array
[
i
][
j
];
max
=
array
[
i
][
j
];
max
=
array
[
i
][
j
];
}
;
}
if
(
array
[
i
][
j
]
>
max
)
if
(
array
[
i
][
j
]
>
max
)
max
=
array
[
i
][
j
];
max
=
array
[
i
][
j
];
...
@@ -2583,7 +2583,7 @@ CChartsDrawer.prototype =
...
@@ -2583,7 +2583,7 @@ CChartsDrawer.prototype =
var
x
=
(
x10
*
m0
*
l1
-
x11
*
m1
*
l0
-
y10
*
l0
*
l1
+
y11
*
l0
*
l1
)
/
(
m0
*
l1
-
m1
*
l0
);
var
x
=
(
x10
*
m0
*
l1
-
x11
*
m1
*
l0
-
y10
*
l0
*
l1
+
y11
*
l0
*
l1
)
/
(
m0
*
l1
-
m1
*
l0
);
var
y
=
(
y10
*
l0
*
m1
-
y11
*
l1
*
m0
-
x10
*
m0
*
m1
+
x11
*
m0
*
m1
)
/
(
l0
*
m1
-
l1
*
m0
);
var
y
=
(
y10
*
l0
*
m1
-
y11
*
l1
*
m0
-
x10
*
m0
*
m1
+
x11
*
m0
*
m1
)
/
(
l0
*
m1
-
l1
*
m0
);
var
z
=
(
z10
*
m0
*
n1
-
z11
*
m1
*
n0
-
y10
*
n0
*
n1
+
y11
*
n0
*
n1
)
/
(
m0
*
n1
-
m1
*
n0
)
var
z
=
(
z10
*
m0
*
n1
-
z11
*
m1
*
n0
-
y10
*
n0
*
n1
+
y11
*
n0
*
n1
)
/
(
m0
*
n1
-
m1
*
n0
)
;
var
xo
=
equation1
.
x1
;
var
xo
=
equation1
.
x1
;
...
@@ -2600,9 +2600,9 @@ CChartsDrawer.prototype =
...
@@ -2600,9 +2600,9 @@ CChartsDrawer.prototype =
var
q1
=
equation2
.
m
;
var
q1
=
equation2
.
m
;
var
r1
=
equation2
.
n
;
var
r1
=
equation2
.
n
;
var
x
=
(
xo
*
q
*
p1
-
x1
*
q1
*
p
-
yo
*
p
*
p1
+
y1
*
p
*
p1
)
/
(
q
*
p1
-
q1
*
p
)
var
x
=
(
xo
*
q
*
p1
-
x1
*
q1
*
p
-
yo
*
p
*
p1
+
y1
*
p
*
p1
)
/
(
q
*
p1
-
q1
*
p
);
var
y
=
(
yo
*
p
*
q1
-
y1
*
p1
*
q
-
xo
*
q
*
q1
+
x1
*
q
*
q1
)
/
(
p
*
q1
-
p1
*
q
)
var
y
=
(
yo
*
p
*
q1
-
y1
*
p1
*
q
-
xo
*
q
*
q1
+
x1
*
q
*
q1
)
/
(
p
*
q1
-
p1
*
q
);
var
z
=
(
zo
*
q
*
r1
-
z1
*
q1
*
r
-
yo
*
r
*
r1
+
y1
*
r
*
r1
)
/
(
q
*
r1
-
q1
*
r
)
var
z
=
(
zo
*
q
*
r1
-
z1
*
q1
*
r
-
yo
*
r
*
r1
+
y1
*
r
*
r1
)
/
(
q
*
r1
-
q1
*
r
);
return
{
x
:
x
,
y
:
y
,
z
:
z
};
return
{
x
:
x
,
y
:
y
,
z
:
z
};
},
},
...
@@ -2750,13 +2750,13 @@ CChartsDrawer.prototype =
...
@@ -2750,13 +2750,13 @@ CChartsDrawer.prototype =
var
m
=
0
;
var
m
=
0
;
var
k
=
0
;
var
k
=
0
;
var
len
=
oldmat
.
length
;
var
len
=
oldmat
.
length
;
var
retmat
=
new
Array
()
;
var
retmat
=
[]
;
if
((
len
<=
row
)
||
(
len
<=
col
))
return
0
;
if
((
len
<=
row
)
||
(
len
<=
col
))
return
0
;
for
(
j
=
0
;
j
<
len
;
j
++
)
{
for
(
j
=
0
;
j
<
len
;
j
++
)
{
if
(
j
!=
row
)
{
if
(
j
!=
row
)
{
retmat
[
k
]
=
new
Array
()
;
retmat
[
k
]
=
[]
;
for
(
i
=
0
;
i
<
len
;
i
++
)
{
for
(
i
=
0
;
i
<
len
;
i
++
)
{
if
(
i
!=
col
)
{
if
(
i
!=
col
)
{
retmat
[
k
][
m
]
=
oldmat
[
j
][
i
];
retmat
[
k
][
m
]
=
oldmat
[
j
][
i
];
...
@@ -2775,8 +2775,8 @@ CChartsDrawer.prototype =
...
@@ -2775,8 +2775,8 @@ CChartsDrawer.prototype =
var
i
;
var
i
;
var
tmpVal
=
0
;
var
tmpVal
=
0
;
var
row
=
mat
.
length
;
var
row
=
mat
.
length
;
var
newDet
=
new
Array
()
;
var
newDet
=
[]
;
newDet
[
0
]
=
new
Array
()
;
newDet
[
0
]
=
[]
;
switch
(
row
)
{
switch
(
row
)
{
case
1
:
case
1
:
...
@@ -2800,10 +2800,10 @@ CChartsDrawer.prototype =
...
@@ -2800,10 +2800,10 @@ CChartsDrawer.prototype =
{
{
var
i
=
0
;
var
i
=
0
;
var
j
=
0
;
var
j
=
0
;
var
tmp
=
new
Array
()
;
var
tmp
=
[]
;
for
(
i
=
0
;
i
<
mat
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
mat
.
length
;
i
++
)
{
tmp
[
i
]
=
new
Array
()
;
tmp
[
i
]
=
[]
;
for
(
j
=
0
;
j
<
mat
.
length
;
j
++
)
{
for
(
j
=
0
;
j
<
mat
.
length
;
j
++
)
{
if
(
col
==
j
)
if
(
col
==
j
)
...
@@ -2826,7 +2826,7 @@ CChartsDrawer.prototype =
...
@@ -2826,7 +2826,7 @@ CChartsDrawer.prototype =
var
b3
=
point3
.
y
;
var
b3
=
point3
.
y
;
var
c3
=
point3
.
z
;
var
c3
=
point3
.
z
;
var
mat
=
new
Array
()
;
var
mat
=
[]
;
mat
[
0
]
=
[];
mat
[
1
]
=
[];
mat
[
2
]
=
[];
mat
[
0
]
=
[];
mat
[
1
]
=
[];
mat
[
2
]
=
[];
mat
[
0
][
0
]
=
a1
;
mat
[
0
][
1
]
=
b1
;
mat
[
0
][
2
]
=
c1
;
mat
[
0
][
0
]
=
a1
;
mat
[
0
][
1
]
=
b1
;
mat
[
0
][
2
]
=
c1
;
mat
[
1
][
0
]
=
a2
;
mat
[
1
][
1
]
=
b2
;
mat
[
1
][
2
]
=
c2
;
mat
[
1
][
0
]
=
a2
;
mat
[
1
][
1
]
=
b2
;
mat
[
1
][
2
]
=
c2
;
...
@@ -6777,7 +6777,7 @@ drawHBarChart.prototype =
...
@@ -6777,7 +6777,7 @@ drawHBarChart.prototype =
point7
=
this
.
cChartDrawer
.
_convertAndTurnPoint
(
x7
,
y7
,
z7
);
point7
=
this
.
cChartDrawer
.
_convertAndTurnPoint
(
x7
,
y7
,
z7
);
point8
=
this
.
cChartDrawer
.
_convertAndTurnPoint
(
x8
,
y8
,
z8
);
point8
=
this
.
cChartDrawer
.
_convertAndTurnPoint
(
x8
,
y8
,
z8
);
paths
=
this
.
cChartDrawer
.
calculateRect3D
(
point1
,
point2
,
point3
,
point4
,
point5
,
point6
,
point7
,
point8
,
val
);
paths
=
this
.
cChartDrawer
.
calculateRect3D
(
point1
,
point2
,
point3
,
point4
,
point5
,
point6
,
point7
,
point8
,
val
,
null
,
true
);
if
(
this
.
cChartDrawer
.
processor3D
.
view3D
.
rAngAx
)
if
(
this
.
cChartDrawer
.
processor3D
.
view3D
.
rAngAx
)
{
{
...
@@ -6790,9 +6790,9 @@ drawHBarChart.prototype =
...
@@ -6790,9 +6790,9 @@ drawHBarChart.prototype =
var
sortPaths
=
[
controlPoint1
,
controlPoint2
,
controlPoint3
,
controlPoint4
,
controlPoint5
,
controlPoint6
];
var
sortPaths
=
[
controlPoint1
,
controlPoint2
,
controlPoint3
,
controlPoint4
,
controlPoint5
,
controlPoint6
];
for
(
var
k
=
0
;
k
<
paths
.
length
;
k
++
)
for
(
var
k
=
0
;
k
<
paths
.
frontPaths
.
length
;
k
++
)
{
{
this
.
sortZIndexPaths
.
push
({
seria
:
i
,
point
:
idx
,
verge
:
k
,
paths
:
p
aths
[
k
],
x
:
sortPaths
[
k
].
x
,
y
:
sortPaths
[
k
].
y
,
zIndex
:
sortPaths
[
k
].
z
});
this
.
sortZIndexPaths
.
push
({
seria
:
i
,
point
:
idx
,
verge
:
k
,
frontPaths
:
paths
.
frontPaths
[
k
],
darkPaths
:
paths
.
darkP
aths
[
k
],
x
:
sortPaths
[
k
].
x
,
y
:
sortPaths
[
k
].
y
,
zIndex
:
sortPaths
[
k
].
z
});
}
}
}
}
else
else
...
@@ -6845,16 +6845,16 @@ drawHBarChart.prototype =
...
@@ -6845,16 +6845,16 @@ drawHBarChart.prototype =
this
.
temp
[
cubeCount
].
z
=
point11
.
z
;
this
.
temp
[
cubeCount
].
z
=
point11
.
z
;
}
}
for
(
var
k
=
0
;
k
<
paths
.
length
;
k
++
)
for
(
var
k
=
0
;
k
<
paths
.
frontPaths
.
length
;
k
++
)
{
{
if
(
null
===
paths
[
k
])
if
(
null
===
paths
.
frontPaths
[
k
]
&&
null
===
paths
.
darkPaths
[
k
])
continue
;
continue
;
//this.sortZIndexPaths.push({seria: i, point: idx, verge: k, paths: paths[k], points: arrPoints2[k], points2: arrPoints[k], plainEquation: plainEquation});
//this.sortZIndexPaths.push({seria: i, point: idx, verge: k, paths: paths[k], points: arrPoints2[k], points2: arrPoints[k], plainEquation: plainEquation});
var
plainEquation
=
this
.
cChartDrawer
.
getPlainEquation
(
arrPoints2
[
k
][
0
],
arrPoints2
[
k
][
1
],
arrPoints2
[
k
][
2
],
arrPoints2
[
k
][
3
]);
var
plainEquation
=
this
.
cChartDrawer
.
getPlainEquation
(
arrPoints2
[
k
][
0
],
arrPoints2
[
k
][
1
],
arrPoints2
[
k
][
2
],
arrPoints2
[
k
][
3
]);
var
plainArea
=
this
.
cChartDrawer
.
getAreaQuadrilateral
(
arrPoints
[
k
][
0
],
arrPoints
[
k
][
1
],
arrPoints
[
k
][
2
],
arrPoints
[
k
][
3
]);
var
plainArea
=
this
.
cChartDrawer
.
getAreaQuadrilateral
(
arrPoints
[
k
][
0
],
arrPoints
[
k
][
1
],
arrPoints
[
k
][
2
],
arrPoints
[
k
][
3
]);
this
.
temp
[
cubeCount
].
faces
.
push
({
seria
:
i
,
point
:
idx
,
verge
:
k
,
paths
:
p
aths
[
k
],
points
:
arrPoints2
[
k
],
points2
:
arrPoints
[
k
],
plainEquation
:
plainEquation
,
plainArea
:
plainArea
});
this
.
temp
[
cubeCount
].
faces
.
push
({
seria
:
i
,
point
:
idx
,
verge
:
k
,
frontPaths
:
paths
.
frontPaths
[
k
],
darkPaths
:
paths
.
darkP
aths
[
k
],
points
:
arrPoints2
[
k
],
points2
:
arrPoints
[
k
],
plainEquation
:
plainEquation
,
plainArea
:
plainArea
});
}
}
}
}
...
@@ -6925,7 +6925,6 @@ drawHBarChart.prototype =
...
@@ -6925,7 +6925,6 @@ drawHBarChart.prototype =
{
{
drawReverse
(
true
);
drawReverse
(
true
);
draw
(
false
);
draw
(
false
);
}
}
else
else
{
{
...
@@ -7043,14 +7042,20 @@ drawHBarChart.prototype =
...
@@ -7043,14 +7042,20 @@ drawHBarChart.prototype =
var
t
=
this
;
var
t
=
this
;
var
processor3D
=
this
.
cChartDrawer
.
processor3D
;
var
processor3D
=
this
.
cChartDrawer
.
processor3D
;
var
drawVerges
=
function
(
i
,
j
,
paths
,
onlyLessNull
,
k
)
var
drawVerges
=
function
(
i
,
j
,
paths
,
onlyLessNull
,
k
,
isNotPen
,
isNotBrush
)
{
{
var
brush
,
pen
,
options
;
var
brush
,
pen
,
options
;
options
=
t
.
_getOptionsForDrawing
(
i
,
j
,
onlyLessNull
);
options
=
t
.
_getOptionsForDrawing
(
i
,
j
,
onlyLessNull
);
if
(
paths
!==
null
&&
options
!==
null
)
if
(
paths
!==
null
&&
options
!==
null
)
{
{
pen
=
options
.
pen
;
if
(
!
isNotPen
)
brush
=
options
.
brush
;
{
pen
=
options
.
pen
;
}
if
(
!
isNotBrush
)
{
brush
=
options
.
brush
;
}
t
.
_drawBar3D
(
paths
,
pen
,
brush
,
k
);
t
.
_drawBar3D
(
paths
,
pen
,
brush
,
k
);
}
}
...
@@ -7060,7 +7065,12 @@ drawHBarChart.prototype =
...
@@ -7060,7 +7065,12 @@ drawHBarChart.prototype =
{
{
for
(
var
i
=
0
;
i
<
this
.
sortZIndexPaths
.
length
;
i
++
)
for
(
var
i
=
0
;
i
<
this
.
sortZIndexPaths
.
length
;
i
++
)
{
{
drawVerges
(
this
.
sortZIndexPaths
[
i
].
seria
,
this
.
sortZIndexPaths
[
i
].
point
,
this
.
sortZIndexPaths
[
i
].
paths
,
null
,
this
.
sortZIndexPaths
[
i
].
verge
);
drawVerges
(
this
.
sortZIndexPaths
[
i
].
seria
,
this
.
sortZIndexPaths
[
i
].
point
,
this
.
sortZIndexPaths
[
i
].
darkPaths
,
null
,
this
.
sortZIndexPaths
[
i
].
verge
,
null
,
true
);
}
for
(
var
i
=
0
;
i
<
this
.
sortZIndexPaths
.
length
;
i
++
)
{
drawVerges
(
this
.
sortZIndexPaths
[
i
].
seria
,
this
.
sortZIndexPaths
[
i
].
point
,
this
.
sortZIndexPaths
[
i
].
frontPaths
,
null
,
this
.
sortZIndexPaths
[
i
].
verge
);
}
}
}
}
else
else
...
@@ -7072,7 +7082,18 @@ drawHBarChart.prototype =
...
@@ -7072,7 +7082,18 @@ drawHBarChart.prototype =
for
(
var
j
=
0
;
j
<
faces
.
length
;
j
++
)
for
(
var
j
=
0
;
j
<
faces
.
length
;
j
++
)
{
{
var
face
=
faces
[
j
];
var
face
=
faces
[
j
];
drawVerges
(
face
.
seria
,
face
.
point
,
face
.
paths
,
null
,
face
.
verge
);
drawVerges
(
face
.
seria
,
face
.
point
,
face
.
darkPaths
,
null
,
face
.
verge
,
null
,
true
);
}
}
for
(
var
i
=
0
;
i
<
this
.
sortParallelepipeds
.
length
;
i
++
)
{
var
index
=
this
.
sortParallelepipeds
[
i
].
nextIndex
;
var
faces
=
this
.
temp
[
index
].
faces
;
for
(
var
j
=
0
;
j
<
faces
.
length
;
j
++
)
{
var
face
=
faces
[
j
];
drawVerges
(
face
.
seria
,
face
.
point
,
face
.
frontPaths
,
null
,
face
.
verge
);
}
}
}
}
}
}
...
@@ -7084,47 +7105,60 @@ drawHBarChart.prototype =
...
@@ -7084,47 +7105,60 @@ drawHBarChart.prototype =
//в excel всегда темные боковые стороны, лицевая и задняя стороны светлые
//в excel всегда темные боковые стороны, лицевая и задняя стороны светлые
//pen = this.cChartSpace.chart.plotArea.valAx.compiledMajorGridLines;
//pen = this.cChartSpace.chart.plotArea.valAx.compiledMajorGridLines;
//pen.setFill(brush);
//pen.setFill(brush);
pen
=
AscFormat
.
CreatePenFromParams
(
brush
,
undefined
,
undefined
,
undefined
,
undefined
,
0.1
);
if
(
null
===
pen
||
(
null
!==
pen
&&
null
===
pen
.
Fill
)
||
(
null
!==
pen
&&
null
!==
pen
.
Fill
&&
null
===
pen
.
Fill
.
fill
))
{
pen
=
AscFormat
.
CreatePenFromParams
(
brush
,
undefined
,
undefined
,
undefined
,
undefined
,
0.1
);
}
if
(
k
!=
5
&&
k
!=
0
)
if
(
k
!=
5
&&
k
!=
0
)
{
{
var
props
=
this
.
cChartSpace
.
getParentObjects
();
var
duplicateBrush
=
brush
;
var
duplicateBrush
=
brush
.
createDuplicate
();
if
(
brush
)
var
cColorMod
=
new
AscFormat
.
CColorMod
;
if
(
k
===
1
||
k
===
4
)
{
{
//для градиентной заливки верхнюю и нижнюю грань закрашиываем первым и последним цветом соотвенственно
var
props
=
this
.
cChartSpace
.
getParentObjects
();
if
(
duplicateBrush
.
fill
&&
AscDFH
.
historyitem_type_GradFill
===
duplicateBrush
.
fill
.
getObjectType
())
var
duplicateBrush
=
brush
.
createDuplicate
();
var
cColorMod
=
new
AscFormat
.
CColorMod
;
if
(
k
===
1
||
k
===
4
)
{
{
var
colors
=
duplicateBrush
.
fill
.
colors
;
//для градиентной заливки верхнюю и нижнюю грань закрашиываем первым и последним цветом соотвенственно
if
(
k
===
1
&&
colors
&&
colors
[
0
]
&&
colors
[
0
].
color
)
if
(
duplicateBrush
.
fill
&&
AscDFH
.
historyitem_type_GradFill
===
duplicateBrush
.
fill
.
getObjectType
())
{
var
tempColor
=
new
AscFormat
.
CUniFill
();
tempColor
.
setFill
(
new
AscFormat
.
CSolidFill
());
tempColor
.
fill
.
setColor
(
colors
[
0
].
color
);
duplicateBrush
=
tempColor
;
}
else
if
(
k
===
4
&&
colors
[
colors
.
length
-
1
]
&&
colors
[
colors
.
length
-
1
].
color
)
{
{
var
tempColor
=
new
AscFormat
.
CUniFill
();
var
colors
=
duplicateBrush
.
fill
.
colors
;
tempColor
.
setFill
(
new
AscFormat
.
CSolidFill
());
if
(
k
===
1
&&
colors
&&
colors
[
0
]
&&
colors
[
0
].
color
)
tempColor
.
fill
.
setColor
(
colors
[
colors
.
length
-
1
].
color
);
{
duplicateBrush
=
tempColor
;
var
tempColor
=
new
AscFormat
.
CUniFill
();
tempColor
.
setFill
(
new
AscFormat
.
CSolidFill
());
tempColor
.
fill
.
setColor
(
colors
[
0
].
color
);
duplicateBrush
=
tempColor
;
}
else
if
(
k
===
4
&&
colors
[
colors
.
length
-
1
]
&&
colors
[
colors
.
length
-
1
].
color
)
{
var
tempColor
=
new
AscFormat
.
CUniFill
();
tempColor
.
setFill
(
new
AscFormat
.
CSolidFill
());
tempColor
.
fill
.
setColor
(
colors
[
colors
.
length
-
1
].
color
);
duplicateBrush
=
tempColor
;
}
}
}
}
cColorMod
.
val
=
45000
;
cColorMod
.
val
=
45000
;
}
}
else
else
{
{
cColorMod
.
val
=
35000
;
cColorMod
.
val
=
35000
;
}
cColorMod
.
name
=
"
shade
"
;
duplicateBrush
.
addColorMod
(
cColorMod
);
duplicateBrush
.
calculate
(
props
.
theme
,
props
.
slide
,
props
.
layout
,
props
.
master
,
new
AscFormat
.
CUniColor
().
RGBA
);
if
(
null
===
pen
)
{
pen
.
setFill
(
duplicateBrush
);
}
}
}
cColorMod
.
name
=
"
shade
"
;
duplicateBrush
.
addColorMod
(
cColorMod
);
duplicateBrush
.
calculate
(
props
.
theme
,
props
.
slide
,
props
.
layout
,
props
.
master
,
new
AscFormat
.
CUniColor
().
RGBA
);
pen
.
setFill
(
duplicateBrush
);
this
.
cChartDrawer
.
drawPath
(
path
,
pen
,
duplicateBrush
);
this
.
cChartDrawer
.
drawPath
(
path
,
pen
,
duplicateBrush
);
}
}
else
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