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
722c585f
Commit
722c585f
authored
8 years ago
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support persents in top10
parent
a36d3f2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
cell/model/Workbook.js
cell/model/Workbook.js
+5
-2
No files found.
cell/model/Workbook.js
View file @
722c585f
...
...
@@ -3519,7 +3519,7 @@ Woorksheet.prototype._updateConditionalFormatting = function(range) {
var
aRules
,
oRule
;
var
oRuleElement
=
null
;
var
o
;
var
i
,
j
,
cell
,
sqref
,
values
,
value
,
tmp
,
min
,
max
,
dxf
,
compareFunction
;
var
i
,
j
,
cell
,
sqref
,
values
,
value
,
tmp
,
min
,
max
,
dxf
,
compareFunction
,
nc
;
for
(
i
=
0
;
i
<
aCFs
.
length
;
++
i
)
{
sqref
=
aCFs
[
i
].
sqref
;
// ToDo убрать null === sqref когда научимся мультиселект обрабатывать (\\192.168.5.2\source\DOCUMENTS\XLSX\Matematika Quantum Sedekah.xlsx)
...
...
@@ -3574,11 +3574,13 @@ Woorksheet.prototype._updateConditionalFormatting = function(range) {
}
}
else
if
(
Asc
.
ECfType
.
top10
===
oRule
.
type
)
{
if
(
oRule
.
rank
>
0
&&
oRule
.
dxf
)
{
nc
=
0
;
values
=
this
.
_getValuesForConditionalFormatting
(
sqref
);
o
=
oRule
.
bottom
?
-
Number
.
MAX_VALUE
:
Number
.
MAX_VALUE
;
for
(
cell
=
0
;
cell
<
values
.
length
;
++
cell
)
{
value
=
values
[
cell
];
if
(
CellValueType
.
Number
===
value
.
c
.
getType
()
&&
!
isNaN
(
tmp
=
parseFloat
(
value
.
v
)))
{
++
nc
;
value
.
v
=
tmp
;
}
else
{
value
.
v
=
o
;
...
...
@@ -3591,9 +3593,10 @@ Woorksheet.prototype._updateConditionalFormatting = function(range) {
})(
oRule
.
bottom
?
-
1
:
1
));
tmp
=
0
;
nc
=
oRule
.
percent
?
Math
.
floor
(
nc
*
oRule
.
rank
/
100
)
:
oRule
.
rank
;
for
(
cell
=
0
;
cell
<
values
.
length
;
++
cell
)
{
value
=
values
[
cell
];
value
.
c
.
setConditionalFormattingStyle
((
o
!==
value
.
v
&&
tmp
<
oRule
.
rank
)
?
(
++
tmp
&&
oRule
.
dxf
)
:
null
);
value
.
c
.
setConditionalFormattingStyle
((
o
!==
value
.
v
&&
tmp
<
nc
)
?
(
++
tmp
&&
oRule
.
dxf
)
:
null
);
}
}
}
else
{
...
...
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