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
0eaad0cb
Commit
0eaad0cb
authored
Oct 17, 2013
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move axis init location
parent
dc7f69fe
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
25 deletions
+25
-25
c3.js
c3.js
+25
-25
c3.min.js
c3.min.js
+0
-0
No files found.
c3.js
View file @
0eaad0cb
...
...
@@ -833,6 +833,31 @@
/*-- Main Region --*/
// Add Axis
main
.
append
(
"g"
)
.
attr
(
"class"
,
"x axis"
)
.
attr
(
"clip-path"
,
__axis_rotated
?
""
:
"url(#xaxis-clip)"
)
.
attr
(
"transform"
,
"translate(0,"
+
height
+
")"
)
.
call
(
__axis_rotated
?
yAxis
:
xAxis
);
main
.
append
(
"g"
)
.
attr
(
"class"
,
"y axis"
)
.
attr
(
"clip-path"
,
__axis_rotated
?
"url(#yaxis-clip)"
:
""
)
.
call
(
__axis_rotated
?
xAxis
:
yAxis
)
.
append
(
"text"
)
.
attr
(
"transform"
,
"rotate(-90)"
)
.
attr
(
"dy"
,
"1.4em"
)
.
attr
(
"dx"
,
"-.8em"
)
.
style
(
"text-anchor"
,
"end"
)
.
text
(
__axis_y_text
);
if
(
__axis_y2_show
)
{
main
.
append
(
"g"
)
.
attr
(
"class"
,
"y2 axis"
)
.
attr
(
"transform"
,
"translate("
+
(
__axis_rotated
?
0
:
width
)
+
","
+
(
__axis_rotated
?
10
:
0
)
+
")"
)
.
call
(
yAxis2
);
}
// Grids
grid
=
main
.
append
(
'g'
)
.
attr
(
"clip-path"
,
clipPath
)
.
attr
(
'class'
,
'grid'
);
...
...
@@ -1084,31 +1109,6 @@
main
.
select
(
".chart"
).
append
(
"g"
)
.
attr
(
"class"
,
"chart-lines"
);
// ATTENTION: This must be called AFTER chart added
// Add Axis
main
.
append
(
"g"
)
.
attr
(
"class"
,
"x axis"
)
.
attr
(
"clip-path"
,
__axis_rotated
?
""
:
"url(#xaxis-clip)"
)
.
attr
(
"transform"
,
"translate(0,"
+
height
+
")"
)
.
call
(
__axis_rotated
?
yAxis
:
xAxis
);
main
.
append
(
"g"
)
.
attr
(
"class"
,
"y axis"
)
.
attr
(
"clip-path"
,
__axis_rotated
?
"url(#yaxis-clip)"
:
""
)
.
call
(
__axis_rotated
?
xAxis
:
yAxis
)
.
append
(
"text"
)
.
attr
(
"transform"
,
"rotate(-90)"
)
.
attr
(
"dy"
,
"1.4em"
)
.
attr
(
"dx"
,
"-.8em"
)
.
style
(
"text-anchor"
,
"end"
)
.
text
(
__axis_y_text
);
if
(
__axis_y2_show
)
{
main
.
append
(
"g"
)
.
attr
(
"class"
,
"y2 axis"
)
.
attr
(
"transform"
,
"translate("
+
(
__axis_rotated
?
0
:
width
)
+
","
+
(
__axis_rotated
?
10
:
0
)
+
")"
)
.
call
(
yAxis2
);
}
/*-- Context Region --*/
if
(
__subchart_show
)
{
...
...
c3.min.js
View file @
0eaad0cb
This diff is collapsed.
Click to expand it.
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