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
charts
c3-closed
Commits
a9c03397
Commit
a9c03397
authored
Jan 09, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix jshint
parent
8f1d1c1c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
c3.js
c3.js
+8
-8
c3.min.js
c3.min.js
+0
-0
No files found.
c3.js
View file @
a9c03397
...
...
@@ -450,7 +450,7 @@
// check __data_x is defined if timeseries
if
(
isTimeSeries
&&
!
__data_x
)
{
alert
(
'data.x must be specified when axis.x.type == "timeseries"'
);
window
.
alert
(
'data.x must be specified when axis.x.type == "timeseries"'
);
return
[];
}
...
...
@@ -499,10 +499,10 @@
};
}
function
getPrevX
(
i
)
{
return
i
>
0
?
c3
.
data
.
targets
[
0
].
values
[
i
-
1
].
x
:
undefined
;
return
i
>
0
?
c3
.
data
.
targets
[
0
].
values
[
i
-
1
].
x
:
undefined
;
}
function
getNextX
(
i
)
{
return
i
<
maxDataCount
()
-
1
?
c3
.
data
.
targets
[
0
].
values
[
i
+
1
].
x
:
undefined
;
return
i
<
maxDataCount
()
-
1
?
c3
.
data
.
targets
[
0
].
values
[
i
+
1
].
x
:
undefined
;
}
function
maxDataCount
()
{
return
d3
.
max
(
c3
.
data
.
targets
,
function
(
t
)
{
return
t
.
values
.
length
;
});
...
...
@@ -1495,17 +1495,17 @@
// rect for mouseover
if
(
isCustomX
)
{
rectW
=
function
(
d
,
i
)
{
rectW
=
function
(
d
,
i
)
{
var
prevX
=
getPrevX
(
i
),
nextX
=
getNextX
(
i
);
return
(
x
(
nextX
?
nextX
:
d
.
x
+
50
)
-
x
(
prevX
?
prevX
:
d
.
x
-
50
))
/
2
;
return
(
x
(
nextX
?
nextX
:
d
.
x
+
50
)
-
x
(
prevX
?
prevX
:
d
.
x
-
50
))
/
2
;
};
rectX
=
function
(
d
,
i
)
{
rectX
=
function
(
d
,
i
)
{
var
prevX
=
getPrevX
(
i
);
return
(
x
(
d
.
x
)
+
x
(
prevX
?
prevX
:
d
.
x
-
50
))
/
2
;
return
(
x
(
d
.
x
)
+
x
(
prevX
?
prevX
:
d
.
x
-
50
))
/
2
;
};
}
else
{
rectW
=
(((
__axis_rotated
?
height
:
width
)
*
getXDomainRatio
())
/
(
maxDataCount
()
-
1
));
rectX
=
function
(
d
,
i
)
{
return
x
(
d
.
x
)
-
(
rectW
/
2
);
};
rectX
=
function
(
d
)
{
return
x
(
d
.
x
)
-
(
rectW
/
2
);
};
}
main
.
selectAll
(
'.event-rect'
)
.
attr
(
"x"
,
__axis_rotated
?
0
:
rectX
)
...
...
c3.min.js
View file @
a9c03397
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