Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
morpheus.js
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Daria Zenkova
morpheus.js
Commits
dc0545ce
Commit
dc0545ce
authored
Jun 08, 2016
by
Joshua Gould
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bin count for stacked bars
parent
3b8bc217
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
src/ui/vector_track.js
src/ui/vector_track.js
+6
-5
No files found.
src/ui/vector_track.js
View file @
dc0545ce
...
...
@@ -2189,17 +2189,18 @@ morpheus.VectorTrack.prototype = {
for
(
var
i
=
start
;
i
<
end
;
i
++
)
{
var
array
=
vector
.
getValue
(
i
);
if
(
array
!=
null
)
{
var
selectedBin
s
=
new
morpheus
.
Set
();
var
selectedBin
ToCount
=
new
morpheus
.
Map
();
if
(
array
.
modelIndexToBin
!=
null
)
{
for
(
var
j
=
0
;
j
<
selectedModelIndices
.
length
;
j
++
)
{
var
bin
=
array
.
modelIndexToBin
.
get
(
selectedModelIndices
[
j
]);
if
(
bin
!==
undefined
)
{
selectedBins
.
add
(
bin
);
var
prior
=
selectedBinToCount
.
get
(
bin
)
||
0
;
selectedBinToCount
.
set
(
bin
,
prior
+
1
);
}
}
}
var
position
=
positions
.
getPosition
(
i
);
var
size
=
positions
.
getItemSize
(
i
);
var
positivePairs
=
[];
...
...
@@ -2243,7 +2244,7 @@ morpheus.VectorTrack.prototype = {
-
scaledValue
),
size
);
context
.
fill
();
}
if
(
selectedBin
s
.
has
(
index
))
{
if
(
selectedBin
ToCount
.
has
(
index
))
{
context
.
beginPath
();
var
ytop
=
(
nextScaledValue
+
scaledValue
)
/
2
;
context
.
moveTo
(
position
,
ytop
);
...
...
@@ -2277,7 +2278,7 @@ morpheus.VectorTrack.prototype = {
-
scaledValue
),
size
);
context
.
fill
();
}
if
(
selectedBin
s
.
has
(
index
))
{
if
(
selectedBin
ToCount
.
has
(
index
))
{
// draw a line at top of bin
context
.
beginPath
();
var
ytop
=
(
nextScaledValue
+
scaledValue
)
/
2
;
...
...
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