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
a5f1e56b
Commit
a5f1e56b
authored
Nov 20, 2013
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix y2 x position
parent
35a6172c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
c3.js
c3.js
+1
-1
c3.min.js
c3.min.js
+1
-1
No files found.
c3.js
View file @
a5f1e56b
...
...
@@ -202,7 +202,7 @@
currentWidth
=
getCurrentWidth
();
currentHeight
=
getCurrentHeight
();
bottom
=
20
+
__subchart_size_height
+
legendHeight
;
right
=
__axis_y2_show
&&
!
__axis_rotated
&&
!
__axis_y2_inner
?
50
:
1
;
right
=
__axis_y2_show
&&
!
__axis_rotated
&&
!
__axis_y2_inner
?
50
:
0
;
left
=
__axis_y_inner
?
0
:
40
;
top2
=
currentHeight
-
__subchart_size_height
-
legendHeight
;
bottom2
=
20
+
legendHeight
;
...
...
c3.min.js
View file @
a5f1e56b
...
...
@@ -3,7 +3,7 @@
M
(
0
))
/
2
;
L
=
c
?
0
:
U
;
switch
(
w
){
case
"bottom"
:
C
=
n
;
sa
.
attr
(
"y2"
,
D
);
Ca
.
attr
(
"y"
,
Math
.
max
(
D
,
0
)
+
I
);
Ba
.
attr
(
"x1"
,
L
).
attr
(
"x2"
,
L
).
attr
(
"y2"
,
D
);
Da
.
attr
(
"x"
,
0
).
attr
(
"y"
,
Math
.
max
(
D
,
0
)
+
I
);
fa
.
attr
(
"dy"
,
".71em"
).
style
(
"text-anchor"
,
"middle"
);
fa
.
text
(
function
(
e
){
return
l
.
length
<
P
||
0
===
e
%
Math
.
ceil
(
l
.
length
/
P
)?
e
<
N
.
length
?
N
[
e
]:
e
:
""
});
x
.
attr
(
"d"
,
"M"
+
V
[
0
]
+
","
+
W
+
"V0H"
+
V
[
1
]
+
"V"
+
W
);
break
;
case
"left"
:
C
=
s
,
sa
.
attr
(
"x2"
,
-
D
),
Ca
.
attr
(
"x"
,
-
(
Math
.
max
(
D
,
0
)
+
I
)),
Ba
.
attr
(
"x2"
,
-
D
).
attr
(
"y2"
,
0
),
Da
.
attr
(
"x"
,
-
(
Math
.
max
(
D
,
0
)
+
I
)).
attr
(
"y"
,
U
),
fa
.
attr
(
"dy"
,
".32em"
).
style
(
"text-anchor"
,
"end"
),
fa
.
text
(
function
(
e
){
return
l
.
length
<
P
||
0
===
e
%
Math
.
ceil
(
l
.
length
/
P
)?
e
<
N
.
length
?
N
[
e
]:
e
:
""
}),
x
.
attr
(
"d"
,
"M"
+-
W
+
","
+
V
[
0
]
+
"H0V"
+
V
[
1
]
+
"H"
+-
W
)}
if
(
H
.
ticks
)
B
.
call
(
C
,
eb
),
ra
.
call
(
C
,
M
),
qa
.
call
(
C
,
M
);
else
{
var
ga
=
M
.
rangeBand
()
/
2
,
qa
=
function
(
e
){
return
M
(
e
)
+
ga
};
B
.
call
(
C
,
qa
);
ra
.
call
(
C
,
qa
)}})}
var
H
=
e
.
scale
.
linear
(),
w
=
"bottom"
,
D
=
6
,
W
=
6
,
I
=
3
,
c
=!
1
,
P
=
10
,
U
=
0
,
N
=
[];
l
.
scale
=
function
(
e
){
if
(
!
arguments
.
length
)
return
H
;
H
=
e
;
return
l
};
l
.
orient
=
function
(
e
){
if
(
!
arguments
.
length
)
return
w
;
w
=
e
in
{
top
:
1
,
right
:
1
,
bottom
:
1
,
left
:
1
}?
e
+
""
:
"bottom"
;
return
l
};
l
.
categories
=
function
(
e
){
if
(
!
arguments
.
length
)
return
N
;
N
=
e
;
return
l
};
l
.
tickCentered
=
function
(
e
){
if
(
!
arguments
.
length
)
return
c
;
c
=
e
;
return
l
};
l
.
tickTextNum
=
function
(
e
){
if
(
!
arguments
.
length
)
return
P
;
P
=
e
;
return
l
};
l
.
tickOffset
=
function
(){
return
U
};
l
.
ticks
=
function
(){};
return
l
}
function
s
(
e
){
return
"undefined"
===
typeof
e
}
function
n
(
e
){
return
"undefined"
!==
typeof
e
}
var
fb
=
pa
.
c3
=
{},
e
=
pa
.
d3
;
fb
.
generate
=
function
(
T
){
var
Bb
,
Cb
,
Aa
,
l
,
H
,
w
,
D
,
W
,
I
;
function
c
(
a
,
b
){
for
(
var
d
=
T
,
h
=
0
;
h
<
a
.
length
;
h
++
){
if
(
!
(
a
[
h
]
in
d
))
return
b
;
d
=
d
[
a
[
h
]]}
return
d
}
function
P
(){
gb
=
null
===
Eb
?
+
e
.
select
(
ta
).
style
(
"width"
).
replace
(
"px"
,
""
):
Eb
;
var
a
=
null
===
Fb
?
+
e
.
select
(
ta
).
style
(
"height"
).
replace
(
"px"
,
""
):
Fb
;
ua
=
0
<
a
?
a
:
320
;
Gb
=
20
+
Hb
+
ha
;
Ib
=!
Jb
||
f
||
hb
?
1
:
50
;
Ta
=
ib
?
0
:
40
;
Kb
=
ua
-
Hb
-
ha
;
Lb
=
20
+
ha
;
Mb
=
ua
-
ha
;
w
=
0
;
D
=
Ib
;
W
=
Gb
;
I
=
Ta
;
Aa
=
Kb
;
l
=
Lb
;
H
=
Ta
;
Bb
=
Mb
;
Cb
=
Ta
;
q
=
gb
-
I
-
D
;
t
=
ua
-
w
-
W
;
ia
=
ua
-
Aa
-
l
}
function
U
(){
Nb
=
f
?
10
:
0
;
Ob
=
f
?
t
:
q
;
jb
=
f
?
0
:
t
;
kb
=
f
?
q
:
1
;
m
=
N
(
Nb
,
Ob
,
n
(
m
)?
m
.
domain
():
void
0
,
function
(){
return
O
.
tickOffset
()});
z
=
x
(
jb
,
b
){
for
(
var
d
=
T
,
h
=
0
;
h
<
a
.
length
;
h
++
){
if
(
!
(
a
[
h
]
in
d
))
return
b
;
d
=
d
[
a
[
h
]]}
return
d
}
function
P
(){
gb
=
null
===
Eb
?
+
e
.
select
(
ta
).
style
(
"width"
).
replace
(
"px"
,
""
):
Eb
;
var
a
=
null
===
Fb
?
+
e
.
select
(
ta
).
style
(
"height"
).
replace
(
"px"
,
""
):
Fb
;
ua
=
0
<
a
?
a
:
320
;
Gb
=
20
+
Hb
+
ha
;
Ib
=!
Jb
||
f
||
hb
?
0
:
50
;
Ta
=
ib
?
0
:
40
;
Kb
=
ua
-
Hb
-
ha
;
Lb
=
20
+
ha
;
Mb
=
ua
-
ha
;
w
=
0
;
D
=
Ib
;
W
=
Gb
;
I
=
Ta
;
Aa
=
Kb
;
l
=
Lb
;
H
=
Ta
;
Bb
=
Mb
;
Cb
=
Ta
;
q
=
gb
-
I
-
D
;
t
=
ua
-
w
-
W
;
ia
=
ua
-
Aa
-
l
}
function
U
(){
Nb
=
f
?
10
:
0
;
Ob
=
f
?
t
:
q
;
jb
=
f
?
0
:
t
;
kb
=
f
?
q
:
1
;
m
=
N
(
Nb
,
Ob
,
n
(
m
)?
m
.
domain
():
void
0
,
function
(){
return
O
.
tickOffset
()});
z
=
x
(
jb
,
kb
,
n
(
z
)?
z
.
domain
():
void
0
);
Q
=
x
(
jb
,
kb
,
n
(
Q
)?
Q
.
domain
():
void
0
);
X
=
N
(
0
,
q
,
n
(
R
)?
R
:
void
0
,
function
(
a
){
return
0
===
a
%
1
?
Ea
.
tickOffset
():
0
});
Ua
=
x
(
ia
,
10
);
Va
=
x
(
ia
,
10
);
O
=
L
(
m
,
rc
);
ja
=
e
.
svg
.
axis
().
scale
(
z
).
orient
(
sc
);
Wa
=
e
.
svg
.
axis
().
scale
(
Q
).
orient
(
tc
);
Ea
=
L
(
X
,
uc
)}
function
N
(
a
,
b
,
d
,
h
){
var
p
=
(
E
?
e
.
time
.
scale
():
e
.
scale
.
linear
()).
range
([
a
,
b
]);
p
.
orgDomain
=
function
(){
return
p
.
domain
()};
n
(
d
)
&&
p
.
domain
(
d
);
s
(
h
)
&&
(
h
=
function
(){
return
0
});
if
(
ka
){
var
va
=
p
,
c
,
p
=
function
(
a
){
return
va
(
a
)
+
h
(
a
)};
for
(
c
in
va
)
p
[
c
]
=
va
[
c
];
p
.
orgDomain
=
function
(){
return
va
.
domain
()};
p
.
domain
=
function
(
a
){
if
(
!
arguments
.
length
)
return
a
=
va
.
domain
(),[
a
[
0
],
a
[
1
]
+
1
];
va
.
domain
(
a
);
return
p
}}
return
p
}
function
x
(
a
,
b
){
return
e
.
scale
.
linear
().
range
([
a
,
b
])}
function
ea
(
a
){
return
"y2"
===
B
(
a
)?
Q
:
z
}
function
Sa
(
a
){
return
"y2"
===
B
(
a
)?
Va
:
Ua
}
function
L
(
a
,
b
){
var
d
=
(
ka
?
qc
():
e
.
svg
.
axis
()).
scale
(
a
).
orient
(
b
);
E
&&
d
.
tickFormat
(
vc
);
ka
?
d
.
categories
(
lb
).
tickCentered
(
wc
):
d
.
tickOffset
=
function
(){
return
0
};
return
d
}
function
B
(
a
){
return
a
in
Pb
?
Pb
[
a
]:
"y"
}
function
qa
(
a
){
return
e
.
min
(
a
,
function
(
a
){
return
e
.
min
(
a
.
values
,
function
(
a
){
return
a
.
value
})})}
function
ra
(
a
){
var
b
=
{},
d
,
h
;
a
.
forEach
(
function
(
a
){
b
[
a
.
id
]
=
[];
a
.
values
.
forEach
(
function
(
d
){
b
[
a
.
id
].
push
(
d
.
value
)})});
for
(
d
=
0
;
d
<
v
.
length
;
d
++
)
for
(
h
=
1
;
h
<
v
[
d
].
length
;
h
++
)
Fa
(
v
[
d
][
h
])
&&
(
s
(
b
[
v
[
d
][
h
]])
||
b
[
v
[
d
][
h
]].
forEach
(
function
(
a
,
e
){
B
(
v
[
d
][
h
])
===
B
(
v
[
d
][
0
])
&&
(
b
[
v
[
d
][
0
]][
e
]
+=
1
*
a
)}));
return
e
.
max
(
Object
.
keys
(
b
).
map
(
function
(
a
){
return
e
.
max
(
b
[
a
])}))}
function
C
(
a
,
b
){
var
d
=
Xa
(
function
(
a
){
return
B
(
a
.
id
)
===
b
}),
h
=
"y2"
===
b
?
xc
:
yc
,
p
=
"y2"
===
b
?
zc
:
Ac
,
h
=
null
!==
h
?
h
:
qa
(
d
),
p
=
null
!==
p
?
p
:
ra
(
d
),
...
...
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