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
c60b63b6
Commit
c60b63b6
authored
Mar 24, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add axis.x.min and axis.x.max - #74
parent
f2c7a5ac
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
c3.js
c3.js
+5
-3
c3.min.js
c3.min.js
+0
-0
No files found.
c3.js
View file @
c60b63b6
...
@@ -89,6 +89,8 @@
...
@@ -89,6 +89,8 @@
__axis_x_tick_format
=
getConfig
([
'axis'
,
'x'
,
'tick'
,
'format'
],
null
),
__axis_x_tick_format
=
getConfig
([
'axis'
,
'x'
,
'tick'
,
'format'
],
null
),
__axis_x_tick_culling
=
getConfig
([
'axis'
,
'x'
,
'tick'
,
'culling'
],
__axis_x_type
===
'categorized'
?
false
:
true
),
__axis_x_tick_culling
=
getConfig
([
'axis'
,
'x'
,
'tick'
,
'culling'
],
__axis_x_type
===
'categorized'
?
false
:
true
),
__axis_x_tick_count
=
getConfig
([
'axis'
,
'x'
,
'tick'
,
'count'
],
10
),
__axis_x_tick_count
=
getConfig
([
'axis'
,
'x'
,
'tick'
,
'count'
],
10
),
__axis_x_max
=
getConfig
([
'axis'
,
'x'
,
'max'
],
null
),
__axis_x_min
=
getConfig
([
'axis'
,
'x'
,
'min'
],
null
),
__axis_x_default
=
getConfig
([
'axis'
,
'x'
,
'default'
],
null
),
__axis_x_default
=
getConfig
([
'axis'
,
'x'
,
'default'
],
null
),
__axis_x_label
=
getConfig
([
'axis'
,
'x'
,
'label'
],
null
),
__axis_x_label
=
getConfig
([
'axis'
,
'x'
,
'label'
],
null
),
__axis_y_max
=
getConfig
([
'axis'
,
'y'
,
'max'
],
null
),
__axis_y_max
=
getConfig
([
'axis'
,
'y'
,
'max'
],
null
),
...
@@ -872,10 +874,10 @@
...
@@ -872,10 +874,10 @@
return
isSub
||
currentDiff
===
0
?
1
:
orgDiff
/
currentDiff
;
return
isSub
||
currentDiff
===
0
?
1
:
orgDiff
/
currentDiff
;
}
}
function
getXDomainMin
(
targets
)
{
function
getXDomainMin
(
targets
)
{
return
d3
.
min
(
targets
,
function
(
t
)
{
return
d3
.
min
(
t
.
values
,
function
(
v
)
{
return
v
.
x
;
});
});
return
__axis_x_min
?
__axis_x_min
:
d3
.
min
(
targets
,
function
(
t
)
{
return
d3
.
min
(
t
.
values
,
function
(
v
)
{
return
v
.
x
;
});
});
}
}
function
getXDomainMax
(
targets
)
{
function
getXDomainMax
(
targets
)
{
return
d3
.
max
(
targets
,
function
(
t
)
{
return
d3
.
max
(
t
.
values
,
function
(
v
)
{
return
v
.
x
;
});
});
return
__axis_x_max
?
__axis_x_max
:
d3
.
max
(
targets
,
function
(
t
)
{
return
d3
.
max
(
t
.
values
,
function
(
v
)
{
return
v
.
x
;
});
});
}
}
function
getXDomainPadding
(
targets
,
domain
)
{
function
getXDomainPadding
(
targets
,
domain
)
{
var
firstX
=
domain
[
0
],
lastX
=
domain
[
1
],
diff
=
Math
.
abs
(
firstX
-
lastX
),
maxDataCount
,
padding
;
var
firstX
=
domain
[
0
],
lastX
=
domain
[
1
],
diff
=
Math
.
abs
(
firstX
-
lastX
),
maxDataCount
,
padding
;
...
@@ -3055,7 +3057,7 @@
...
@@ -3055,7 +3057,7 @@
function
updateLegend
(
targets
,
options
)
{
function
updateLegend
(
targets
,
options
)
{
var
ids
=
getTargetIds
(
targets
),
l
;
var
ids
=
getTargetIds
(
targets
),
l
;
var
xForLegend
,
xForLegendText
,
xForLegendRect
,
yForLegend
,
yForLegendText
,
yForLegendRect
;
var
xForLegend
,
xForLegendText
,
xForLegendRect
,
yForLegend
,
yForLegendText
,
yForLegendRect
;
var
paddingTop
=
4
,
paddingRight
=
26
,
maxWidth
,
maxHeight
,
posMin
=
10
;
var
paddingTop
=
4
,
paddingRight
=
26
,
maxWidth
=
0
,
maxHeight
=
0
,
posMin
=
10
;
var
totalLength
=
0
,
offsets
=
{},
widths
=
{},
heights
=
{},
margins
=
{},
steps
=
{},
step
=
0
;
var
totalLength
=
0
,
offsets
=
{},
widths
=
{},
heights
=
{},
margins
=
{},
steps
=
{},
step
=
0
;
var
withTransition
;
var
withTransition
;
...
...
c3.min.js
View file @
c60b63b6
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