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
dcb656d3
Commit
dcb656d3
authored
Apr 22, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix axis.x.tick.fit/count logic - #156
parent
ffe5202d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
c3.js
c3.js
+4
-4
c3.min.js
c3.min.js
+0
-0
scatter.html
htdocs/samples/scatter.html
+4
-1
No files found.
c3.js
View file @
dcb656d3
...
...
@@ -174,7 +174,7 @@
__axis_x_tick_culling
=
getConfig
([
'axis'
,
'x'
,
'tick'
,
'culling'
],
{}),
__axis_x_tick_culling_max
=
getConfig
([
'axis'
,
'x'
,
'tick'
,
'culling'
,
'max'
],
10
),
__axis_x_tick_count
=
getConfig
([
'axis'
,
'x'
,
'tick'
,
'count'
]),
__axis_x_tick_fit
=
getConfig
([
'axis'
,
'x'
,
'tick'
,
'fit'
],
fals
e
),
__axis_x_tick_fit
=
getConfig
([
'axis'
,
'x'
,
'tick'
,
'fit'
],
tru
e
),
__axis_x_tick_values
=
getConfig
([
'axis'
,
'x'
,
'tick'
,
'values'
],
null
),
__axis_x_max
=
getConfig
([
'axis'
,
'x'
,
'max'
]),
__axis_x_min
=
getConfig
([
'axis'
,
'x'
,
'min'
]),
...
...
@@ -1553,7 +1553,7 @@
}
function
generateTickValues
(
xs
)
{
var
tickValues
=
xs
,
targetCount
,
start
,
end
,
count
,
interval
,
i
,
tickValue
;
if
(
!
__axis_x_tick_fit
&&
__axis_x_tick_count
)
{
if
(
__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
...
...
@@ -3056,8 +3056,8 @@
y
.
domain
(
getYDomain
(
targetsToShow
,
'y'
));
y2
.
domain
(
getYDomain
(
targetsToShow
,
'y2'
));
// update axis tick values according to options
, except for scatter plot
if
(
!
hasScatterType
(
targetsToShow
))
{
// TODO: fix this
// update axis tick values according to options
if
(
__axis_x_tick_fit
||
__axis_x_tick_count
)
{
tickValues
=
__axis_x_tick_values
?
__axis_x_tick_values
:
generateTickValues
(
mapTargetsToUniqueXs
(
targetsToShow
));
xAxis
.
tickValues
(
tickValues
);
subXAxis
.
tickValues
(
tickValues
);
...
...
c3.min.js
View file @
dcb656d3
This source diff could not be displayed because it is too large. You can
view the blob
instead.
htdocs/samples/scatter.html
View file @
dcb656d3
...
...
@@ -27,7 +27,10 @@
},
axis
:
{
x
:
{
label
:
'Sepal.Width'
label
:
'Sepal.Width'
,
tick
:
{
fit
:
false
}
},
y
:
{
label
:
'Petal.Width'
...
...
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