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
3c674ef7
You need to sign in or sign up before continuing.
Commit
3c674ef7
authored
Apr 04, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Accept function as axis.x.tick.count - #67
parent
1987be65
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
c3.js
c3.js
+7
-5
c3.min.js
c3.min.js
+0
-0
No files found.
c3.js
View file @
3c674ef7
...
@@ -1457,15 +1457,17 @@
...
@@ -1457,15 +1457,17 @@
return
isTimeSeries
?
xs
.
map
(
function
(
x
)
{
return
new
Date
(
x
);
})
:
xs
.
map
(
function
(
x
)
{
return
+
x
;
});
return
isTimeSeries
?
xs
.
map
(
function
(
x
)
{
return
new
Date
(
x
);
})
:
xs
.
map
(
function
(
x
)
{
return
+
x
;
});
}
}
function
generateTickValues
(
xs
)
{
function
generateTickValues
(
xs
)
{
var
tickValues
=
xs
,
start
,
end
,
count
,
interval
,
i
,
tickValue
;
var
tickValues
=
xs
,
targetCount
,
start
,
end
,
count
,
interval
,
i
,
tickValue
;
if
(
!
__axis_x_tick_fit
&&
__axis_x_tick_count
)
{
if
(
!
__axis_x_tick_fit
&&
__axis_x_tick_count
)
{
// TODO: need some arguments for __axis_x_tick_count()?
targetCount
=
typeof
__axis_x_tick_count
===
'function'
?
__axis_x_tick_count
()
:
__axis_x_tick_count
;
// compute ticks according to __axis_x_tick_count
// compute ticks according to __axis_x_tick_count
if
(
__axis_x_tick_c
ount
===
1
)
{
if
(
targetC
ount
===
1
)
{
tickValues
=
[
xs
[
0
]];
tickValues
=
[
xs
[
0
]];
}
else
if
(
__axis_x_tick_c
ount
===
2
)
{
}
else
if
(
targetC
ount
===
2
)
{
tickValues
=
[
xs
[
0
],
xs
[
xs
.
length
-
1
]];
tickValues
=
[
xs
[
0
],
xs
[
xs
.
length
-
1
]];
}
else
if
(
__axis_x_tick_c
ount
>
2
)
{
}
else
if
(
targetC
ount
>
2
)
{
count
=
__axis_x_tick_c
ount
-
2
;
count
=
targetC
ount
-
2
;
start
=
xs
[
0
];
start
=
xs
[
0
];
end
=
xs
[
xs
.
length
-
1
];
end
=
xs
[
xs
.
length
-
1
];
interval
=
(
end
-
start
)
/
(
count
+
1
);
interval
=
(
end
-
start
)
/
(
count
+
1
);
...
...
c3.min.js
View file @
3c674ef7
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