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
a212a8b9
Commit
a212a8b9
authored
May 21, 2013
by
Masayuki Tanaka
Committed by
masayuki
May 21, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix grid x lines
parent
0ec2bcc6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
c3.js
c3.js
+17
-10
No files found.
c3.js
View file @
a212a8b9
...
...
@@ -487,6 +487,9 @@
function
xx
(
d
)
{
return
x
(
d
.
x
)
}
function
xv
(
d
)
{
return
x
(
d
.
value
)
}
function
yv
(
d
)
{
return
y
(
d
.
value
)
}
...
...
@@ -756,15 +759,16 @@
.
attr
(
"class"
,
"xgrid-line"
)
xgridLine
.
append
(
'line'
)
.
attr
(
"class"
,
function
(
d
){
return
""
+
d
[
'class'
]
})
.
attr
(
"x1"
,
function
(
d
){
return
x
(
d
.
value
)
}
)
.
attr
(
"x2"
,
function
(
d
){
return
x
(
d
.
value
)
}
)
.
attr
(
"y1"
,
margin
.
top
)
.
attr
(
"y2"
,
height
)
.
attr
(
"x1"
,
__axis_rotated
?
0
:
xv
)
.
attr
(
"x2"
,
__axis_rotated
?
width
:
xv
)
.
attr
(
"y1"
,
__axis_rotated
?
xv
:
margin
.
top
)
.
attr
(
"y2"
,
__axis_rotated
?
xv
:
height
)
xgridLine
.
append
(
'text'
)
.
attr
(
"class"
,
function
(
d
){
return
""
+
d
[
'class'
]
})
.
attr
(
'x'
,
function
(
d
){
return
x
(
d
.
value
)
})
.
attr
(
'y'
,
height
-
8
)
.
attr
(
'dx'
,
6
)
.
attr
(
"text-anchor"
,
"end"
)
.
attr
(
"transform"
,
__axis_rotated
?
""
:
"rotate(-90)"
)
.
attr
(
'dx'
,
__axis_rotated
?
0
:
-
margin
.
top
)
.
attr
(
'dy'
,
-
6
)
.
text
(
function
(
d
){
return
d
.
text
})
}
if
(
__point_focus_line_enabled
)
{
...
...
@@ -1138,10 +1142,13 @@
if
(
__grid_x_lines
)
{
xgridLine
=
main
.
selectAll
(
".xgrid-lines"
)
xgridLine
.
selectAll
(
'line'
)
.
attr
(
"x1"
,
function
(
d
){
return
x
(
d
.
value
)
})
.
attr
(
"x2"
,
function
(
d
){
return
x
(
d
.
value
)
})
.
attr
(
"x1"
,
__axis_rotated
?
0
:
xv
)
.
attr
(
"x2"
,
__axis_rotated
?
width
:
xv
)
.
attr
(
"y1"
,
__axis_rotated
?
xv
:
margin
.
top
)
.
attr
(
"y2"
,
__axis_rotated
?
xv
:
height
)
xgridLine
.
selectAll
(
'text'
)
.
attr
(
"x"
,
function
(
d
){
return
x
(
d
.
value
)
})
.
attr
(
"x"
,
__axis_rotated
?
width
:
0
)
.
attr
(
"y"
,
xv
)
}
// Y-Grid
if
(
withY
&&
__grid_y_show
)
{
...
...
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