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
aafef003
Commit
aafef003
authored
Oct 21, 2016
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 33250
parent
26498d8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
8 deletions
+77
-8
common/Charts/ChartsDrawer.js
common/Charts/ChartsDrawer.js
+77
-8
No files found.
common/Charts/ChartsDrawer.js
View file @
aafef003
...
...
@@ -3781,7 +3781,7 @@ drawBarChart.prototype =
pen
=
options
.
pen
;
brush
=
options
.
brush
;
t
.
_drawBar3D
(
paths
,
pen
,
brush
,
k
);
t
.
_drawBar3D
(
paths
,
pen
,
brush
,
k
,
options
.
val
);
}
};
...
...
@@ -3859,25 +3859,66 @@ drawBarChart.prototype =
if
(
pt
.
brush
)
brush
=
pt
.
brush
;
return
{
pen
:
pen
,
brush
:
brush
}
return
{
pen
:
pen
,
brush
:
brush
,
val
:
pt
.
val
}
},
_drawBar3D
:
function
(
path
,
pen
,
brush
,
k
)
_drawBar3D
:
function
(
path
,
pen
,
brush
,
k
,
val
)
{
//затемнение боковых сторон
//в excel всегда темные боковые стороны, лицевая и задняя стороны светлые
//pen = this.cChartSpace.chart.plotArea.valAx.compiledMajorGridLines;
//pen.setFill(brush);
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
.
createDuplicate
();
var
cColorMod
=
new
AscFormat
.
CColorMod
;
if
(
k
==
1
||
k
==
4
)
if
(
k
===
1
||
k
===
4
)
{
//для градиентной заливки верхнюю и нижнюю грань закрашиываем первым и последним цветом соотвенственно
if
(
duplicateBrush
.
fill
&&
AscDFH
.
historyitem_type_GradFill
===
duplicateBrush
.
fill
.
getObjectType
())
{
var
colors
=
duplicateBrush
.
fill
.
colors
;
//ToDo проверить stacked charts!
var
color
;
var
valAxOrientation
=
this
.
cChartSpace
.
chart
.
plotArea
.
valAx
.
scaling
.
orientation
;
if
((
val
>
0
&&
valAxOrientation
===
ORIENTATION_MIN_MAX
)
||
(
val
<
0
&&
valAxOrientation
!==
ORIENTATION_MIN_MAX
))
{
if
(
k
===
4
&&
colors
&&
colors
[
0
]
&&
colors
[
0
].
color
)
{
color
=
colors
[
0
].
color
;
}
else
if
(
k
===
1
&&
colors
[
colors
.
length
-
1
]
&&
colors
[
colors
.
length
-
1
].
color
)
{
color
=
colors
[
colors
.
length
-
1
].
color
;
}
}
else
{
if
(
k
===
4
&&
colors
&&
colors
[
0
]
&&
colors
[
0
].
color
)
{
color
=
colors
[
colors
.
length
-
1
].
color
;
}
else
if
(
k
===
1
&&
colors
[
colors
.
length
-
1
]
&&
colors
[
colors
.
length
-
1
].
color
)
{
color
=
colors
[
0
].
color
;
}
}
var
tempColor
=
new
AscFormat
.
CUniFill
();
tempColor
.
setFill
(
new
AscFormat
.
CSolidFill
());
tempColor
.
fill
.
setColor
(
color
);
duplicateBrush
=
tempColor
;
}
cColorMod
.
val
=
45000
;
}
else
{
cColorMod
.
val
=
35000
;
}
cColorMod
.
name
=
"
shade
"
;
duplicateBrush
.
addColorMod
(
cColorMod
);
duplicateBrush
.
calculate
(
props
.
theme
,
props
.
slide
,
props
.
layout
,
props
.
master
,
new
AscFormat
.
CUniColor
().
RGBA
);
...
...
@@ -3886,7 +3927,9 @@ drawBarChart.prototype =
this
.
cChartDrawer
.
drawPath
(
path
,
pen
,
duplicateBrush
);
}
else
{
this
.
cChartDrawer
.
drawPath
(
path
,
pen
,
brush
);
}
},
_calculateRect3D
:
function
(
startX
,
startY
,
individualBarWidth
,
height
,
val
,
isValMoreZero
,
isValLessZero
,
serNum
)
...
...
@@ -7036,10 +7079,36 @@ drawHBarChart.prototype =
var
props
=
this
.
cChartSpace
.
getParentObjects
();
var
duplicateBrush
=
brush
.
createDuplicate
();
var
cColorMod
=
new
AscFormat
.
CColorMod
;
if
(
k
==
1
||
k
==
4
)
if
(
k
===
1
||
k
===
4
)
{
//для градиентной заливки верхнюю и нижнюю грань закрашиываем первым и последним цветом соотвенственно
if
(
duplicateBrush
.
fill
&&
AscDFH
.
historyitem_type_GradFill
===
duplicateBrush
.
fill
.
getObjectType
())
{
var
colors
=
duplicateBrush
.
fill
.
colors
;
if
(
k
===
1
&&
colors
&&
colors
[
0
]
&&
colors
[
0
].
color
)
{
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
;
}
else
{
cColorMod
.
val
=
35000
;
}
cColorMod
.
name
=
"
shade
"
;
duplicateBrush
.
addColorMod
(
cColorMod
);
duplicateBrush
.
calculate
(
props
.
theme
,
props
.
slide
,
props
.
layout
,
props
.
master
,
new
AscFormat
.
CUniColor
().
RGBA
);
...
...
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