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
ff8b9de6
Commit
ff8b9de6
authored
May 16, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix event rect for timeseries - #225
parent
e516f8ed
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
c3.js
c3.js
+5
-4
c3.min.js
c3.min.js
+0
-0
No files found.
c3.js
View file @
ff8b9de6
...
...
@@ -1367,7 +1367,8 @@
if
(
isCustomX
||
isTimeSeries
)
{
// if included in input data
if
(
xs
.
indexOf
(
xKey
)
>=
0
)
{
c3
.
data
.
xs
[
id
]
=
data
.
map
(
function
(
d
)
{
return
d
[
xKey
];
}).
filter
(
isValue
);
c3
.
data
.
xs
[
id
]
=
data
.
map
(
function
(
d
)
{
return
d
[
xKey
];
}).
filter
(
isValue
).
map
(
function
(
rawX
,
i
)
{
return
generateTargetX
(
rawX
,
id
,
i
);
});
}
// if not included in input data, find from preloaded data of other id's x
else
if
(
__data_x
)
{
...
...
@@ -3537,14 +3538,14 @@
.
selectAll
(
'.'
+
CLASS
.
eventRect
).
remove
();
}
if
(
isCustomX
&&
!
isCategorized
)
{
if
(
(
isCustomX
||
isTimeSeries
)
&&
!
isCategorized
)
{
rectW
=
function
(
d
,
i
)
{
var
prevX
=
getPrevX
(
i
),
nextX
=
getNextX
(
i
),
dx
=
c3
.
data
.
xs
[
d
.
id
][
i
];
return
(
x
(
nextX
?
nextX
:
dx
+
50
)
-
x
(
prevX
?
prevX
:
dx
-
50
))
/
2
;
return
(
x
(
nextX
?
nextX
:
dx
*
1.1
)
-
x
(
prevX
?
prevX
:
dx
*
0.9
))
/
2
;
};
rectX
=
function
(
d
,
i
)
{
var
prevX
=
getPrevX
(
i
),
dx
=
c3
.
data
.
xs
[
d
.
id
][
i
];
return
(
x
(
dx
)
+
x
(
prevX
?
prevX
:
dx
-
50
))
/
2
;
return
(
x
(
dx
)
+
x
(
prevX
?
prevX
:
dx
*
0.9
))
/
2
;
};
}
else
{
rectW
=
getEventRectWidth
();
...
...
c3.min.js
View file @
ff8b9de6
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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