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
9142800b
Commit
9142800b
authored
Sep 21, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix only one data with custom x - #548
parent
4a624a1f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
c3.js
c3.js
+7
-2
c3.min.js
c3.min.js
+0
-0
domain.js
src/domain.js
+7
-2
No files found.
c3.js
View file @
9142800b
...
...
@@ -1345,8 +1345,13 @@
min
=
0
,
max
=
0
;
// show center of x domain if min and max are the same
if
((
firstX
-
lastX
)
===
0
&&
!
$$
.
isCategorized
())
{
firstX
=
$$
.
isTimeSeries
()
?
new
Date
(
firstX
.
getTime
()
*
0.5
)
:
-
0.5
;
lastX
=
$$
.
isTimeSeries
()
?
new
Date
(
lastX
.
getTime
()
*
1.5
)
:
0.5
;
if
(
$$
.
isTimeSeries
())
{
firstX
=
new
Date
(
firstX
.
getTime
()
*
0.5
);
lastX
=
new
Date
(
lastX
.
getTime
()
*
1.5
);
}
else
{
firstX
=
firstX
===
0
?
1
:
(
firstX
*
0.5
);
lastX
=
lastX
===
0
?
-
1
:
(
lastX
*
1.5
);
}
}
if
(
firstX
||
firstX
===
0
)
{
min
=
$$
.
isTimeSeries
()
?
new
Date
(
firstX
.
getTime
()
-
padding
.
left
)
:
firstX
-
padding
.
left
;
...
...
c3.min.js
View file @
9142800b
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/domain.js
View file @
9142800b
...
...
@@ -176,8 +176,13 @@ c3_chart_internal_fn.getXDomain = function (targets) {
min
=
0
,
max
=
0
;
// show center of x domain if min and max are the same
if
((
firstX
-
lastX
)
===
0
&&
!
$$
.
isCategorized
())
{
firstX
=
$$
.
isTimeSeries
()
?
new
Date
(
firstX
.
getTime
()
*
0.5
)
:
-
0.5
;
lastX
=
$$
.
isTimeSeries
()
?
new
Date
(
lastX
.
getTime
()
*
1.5
)
:
0.5
;
if
(
$$
.
isTimeSeries
())
{
firstX
=
new
Date
(
firstX
.
getTime
()
*
0.5
);
lastX
=
new
Date
(
lastX
.
getTime
()
*
1.5
);
}
else
{
firstX
=
firstX
===
0
?
1
:
(
firstX
*
0.5
);
lastX
=
lastX
===
0
?
-
1
:
(
lastX
*
1.5
);
}
}
if
(
firstX
||
firstX
===
0
)
{
min
=
$$
.
isTimeSeries
()
?
new
Date
(
firstX
.
getTime
()
-
padding
.
left
)
:
firstX
-
padding
.
left
;
...
...
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