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
03e1bb07
Commit
03e1bb07
authored
Mar 13, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typo
parent
06b7fa1c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
c3.js
c3.js
+10
-10
No files found.
c3.js
View file @
03e1bb07
...
...
@@ -492,7 +492,7 @@
return
__axis_x_tick_culling
&&
maxDataCount
>
__axis_x_tick_count
?
__axis_x_tick_count
:
maxDataCount
;
}
function
getAxisLab
le
Text
(
option
)
{
function
getAxisLab
el
Text
(
option
)
{
return
typeof
option
===
'string'
?
option
:
option
?
option
.
text
:
null
;
}
function
getAxisLabelPosition
(
option
,
defaultPosition
)
{
...
...
@@ -515,10 +515,10 @@
return
getAxisLabelPosition
(
__axis_y_label
,
'inner-top'
);
}
function
textForXAxisLabel
()
{
return
getAxisLab
le
Text
(
__axis_x_label
);
return
getAxisLab
el
Text
(
__axis_x_label
);
}
function
textForYAxisLabel
()
{
return
getAxisLab
le
Text
(
__axis_y_label
);
return
getAxisLab
el
Text
(
__axis_y_label
);
}
function
xForXAxisLabel
()
{
var
position
=
getXAxisLabelPosition
();
...
...
@@ -597,7 +597,7 @@
function
getArc
(
d
,
withoutUpdate
)
{
return
isArcType
(
d
.
data
)
?
svgArc
(
d
,
withoutUpdate
)
:
"M 0 0"
;
}
function
transformForArcLab
le
(
d
)
{
function
transformForArcLab
el
(
d
)
{
var
updated
=
updateAngle
(
d
),
c
,
x
,
y
,
h
,
translate
=
""
;
if
(
updated
)
{
c
=
svgArc
.
centroid
(
updated
);
...
...
@@ -609,7 +609,7 @@
function
getArcRatio
(
d
)
{
return
(
d
.
endAngle
-
d
.
startAngle
)
/
(
Math
.
PI
*
2
);
}
function
textForArcLab
le
(
d
)
{
function
textForArcLab
el
(
d
)
{
var
ratio
;
if
(
!
__arc_label_show
)
{
return
""
;
}
ratio
=
getArcRatio
(
d
);
...
...
@@ -700,12 +700,12 @@
domainLength
,
padding
,
padding_top
,
padding_bottom
,
center
=
axisId
===
'y2'
?
__axis_y2_center
:
__axis_y_center
,
yDomainAbs
,
widths
,
diff
,
ratio
,
showDataLab
le
=
hasDataLabel
()
&&
__axis_rotated
;
showDataLab
el
=
hasDataLabel
()
&&
__axis_rotated
;
if
(
yDomainMin
===
yDomainMax
)
{
yDomainMin
<
0
?
yDomainMax
=
0
:
yDomainMin
=
0
;
}
domainLength
=
Math
.
abs
(
yDomainMax
-
yDomainMin
);
padding
=
padding_top
=
padding_bottom
=
showDataLab
le
?
0
:
domainLength
*
0.1
;
padding
=
padding_top
=
padding_bottom
=
showDataLab
el
?
0
:
domainLength
*
0.1
;
if
(
center
)
{
yDomainAbs
=
Math
.
max
(
Math
.
abs
(
yDomainMin
),
Math
.
abs
(
yDomainMax
));
yDomainMax
=
yDomainAbs
-
center
;
...
...
@@ -720,7 +720,7 @@
padding_bottom
=
isValue
(
__axis_y2_padding
.
bottom
)
?
__axis_y2_padding
.
bottom
:
padding
;
}
// add padding for data label
if
(
showDataLab
le
)
{
if
(
showDataLab
el
)
{
widths
=
getDataLabelWidth
(
yDomainMin
,
yDomainMax
);
diff
=
diffDomain
(
y
.
range
());
ratio
=
[
widths
[
0
]
/
diff
,
widths
[
1
]
/
diff
];
...
...
@@ -2511,10 +2511,10 @@
.
attr
(
"transform"
,
withTransform
?
"scale(1)"
:
""
)
.
style
(
"opacity"
,
1
);
main
.
selectAll
(
'.chart-arc'
).
select
(
'text'
)
.
attr
(
"transform"
,
transformForArcLab
le
)
.
attr
(
"transform"
,
transformForArcLab
el
)
.
style
(
"opacity"
,
0
)
.
transition
().
duration
(
duration
)
.
text
(
textForArcLab
le
)
.
text
(
textForArcLab
el
)
.
style
(
"opacity"
,
function
(
d
)
{
return
isArcType
(
d
.
data
)
?
1
:
0
;
});
main
.
select
(
'.chart-arcs-title'
)
.
style
(
"opacity"
,
hasDonutType
(
c3
.
data
.
targets
)
?
1
:
0
);
...
...
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