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
9ab4969a
Commit
9ab4969a
authored
Mar 09, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix padding when data label show - #45
parent
d5899c93
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
c3.js
c3.js
+11
-7
c3.min.js
c3.min.js
+0
-0
No files found.
c3.js
View file @
9ab4969a
...
@@ -687,7 +687,7 @@
...
@@ -687,7 +687,7 @@
yMax
=
axisId
===
'y2'
?
__axis_y2_max
:
__axis_y_max
,
yMax
=
axisId
===
'y2'
?
__axis_y2_max
:
__axis_y_max
,
yDomainMin
=
isValue
(
yMin
)
?
yMin
:
getYDomainMin
(
yTargets
),
yDomainMin
=
isValue
(
yMin
)
?
yMin
:
getYDomainMin
(
yTargets
),
yDomainMax
=
isValue
(
yMax
)
?
yMax
:
getYDomainMax
(
yTargets
),
yDomainMax
=
isValue
(
yMax
)
?
yMax
:
getYDomainMax
(
yTargets
),
padding
=
Math
.
abs
(
yDomainMax
-
yDomainMin
)
*
0.22
,
//0.1 -> 0.22 - 23.2.2014 - fiery-
padding
=
Math
.
abs
(
yDomainMax
-
yDomainMin
)
*
(
hasDataLabel
()
&&
__axis_rotated
?
0.125
:
0.1
),
padding_top
=
padding
,
padding_bottom
=
padding
,
padding_top
=
padding
,
padding_bottom
=
padding
,
center
=
axisId
===
'y2'
?
__axis_y2_center
:
__axis_y_center
;
center
=
axisId
===
'y2'
?
__axis_y2_center
:
__axis_y_center
;
if
(
center
)
{
if
(
center
)
{
...
@@ -1004,14 +1004,18 @@
...
@@ -1004,14 +1004,18 @@
return
isValue
(
d
.
value
)
?
isScatterType
(
d
)
?
0.5
:
1
:
0
;
return
isValue
(
d
.
value
)
?
isScatterType
(
d
)
?
0.5
:
1
:
0
;
}
}
function
opacityForText
(
d
)
{
function
opacityForText
(
d
)
{
return
hasDataLabel
(
d
)
?
1
:
0
;
}
function
hasDataLabel
(
d
)
{
var
id
=
d
?
d
.
id
:
null
;
if
(
typeof
__data_labels
===
'boolean'
&&
__data_labels
)
{
if
(
typeof
__data_labels
===
'boolean'
&&
__data_labels
)
{
return
1
;
return
true
;
}
else
if
(
__data_labels
[
d
.
id
]
===
'boolean'
&&
__data_labels
[
d
.
id
])
{
}
else
if
(
__data_labels
[
id
]
===
'boolean'
&&
__data_labels
[
id
])
{
return
1
;
return
true
;
}
else
if
(
__data_labels
[
d
.
id
]
&&
__data_labels
[
d
.
id
].
show
)
{
}
else
if
(
__data_labels
[
id
]
&&
__data_labels
[
id
].
show
)
{
return
1
;
return
true
;
}
}
return
0
;
return
false
;
}
}
function
xx
(
d
)
{
function
xx
(
d
)
{
...
...
c3.min.js
View file @
9ab4969a
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