Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
c3-closed
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Evgeny
c3-closed
Commits
4c193b03
Commit
4c193b03
authored
Aug 07, 2015
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1275 from ggamir/patch-1
Allow data series with unequal amount of x-values
parents
25a5f39f
034fad22
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
shape.js
src/shape.js
+15
-0
No files found.
src/shape.js
View file @
4c193b03
...
@@ -41,10 +41,25 @@ c3_chart_internal_fn.getShapeOffset = function (typeFilter, indices, isSub) {
...
@@ -41,10 +41,25 @@ c3_chart_internal_fn.getShapeOffset = function (typeFilter, indices, isSub) {
var
values
=
$$
.
isStepType
(
d
)
?
$$
.
convertValuesToStep
(
t
.
values
)
:
t
.
values
;
var
values
=
$$
.
isStepType
(
d
)
?
$$
.
convertValuesToStep
(
t
.
values
)
:
t
.
values
;
if
(
t
.
id
===
d
.
id
||
indices
[
t
.
id
]
!==
indices
[
d
.
id
])
{
return
;
}
if
(
t
.
id
===
d
.
id
||
indices
[
t
.
id
]
!==
indices
[
d
.
id
])
{
return
;
}
if
(
targetIds
.
indexOf
(
t
.
id
)
<
targetIds
.
indexOf
(
d
.
id
))
{
if
(
targetIds
.
indexOf
(
t
.
id
)
<
targetIds
.
indexOf
(
d
.
id
))
{
// check if the x values line up
if
(
typeof
values
[
i
]
===
'undefined'
||
(
values
[
i
].
x
!==
d
.
x
)
&&
(
values
[
i
].
x
-
d
.
x
!==
0
))
{
// if not, try to find the value that does line up
i
=
-
1
;
for
(
var
j
in
values
)
{
if
((
values
[
j
].
x
===
d
.
x
)
||
(
values
[
j
].
x
-
d
.
x
===
0
))
{
i
=
j
;
break
;
}
}
}
if
(
i
in
values
)
{
if
(
values
[
i
].
value
*
d
.
value
>=
0
)
{
if
(
values
[
i
].
value
*
d
.
value
>=
0
)
{
offset
+=
scale
(
values
[
i
].
value
)
-
y0
;
offset
+=
scale
(
values
[
i
].
value
)
-
y0
;
}
}
}
}
}
});
});
return
offset
;
return
offset
;
};
};
...
...
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