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
dbfeb969
Commit
dbfeb969
authored
Mar 12, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix clip path when URL has anchor - #52
parent
03666fff
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
c3.js
c3.js
+8
-4
c3.min.js
c3.min.js
+0
-0
No files found.
c3.js
View file @
dbfeb969
...
...
@@ -167,7 +167,7 @@
/*-- Set Variables --*/
var
clipId
=
__bindto
.
replace
(
'#'
,
''
)
+
'-clip'
,
clipPath
=
"url("
+
document
.
URL
+
"#"
+
clipId
+
")"
;
clipPath
=
getClipPath
(
clipId
)
;
var
isTimeSeries
=
(
__axis_x_type
===
'timeseries'
),
isCategorized
=
(
__axis_x_type
===
'categorized'
),
...
...
@@ -221,6 +221,10 @@
/*-- Define Functions --*/
function
getClipPath
(
id
)
{
return
"url("
+
document
.
URL
.
split
(
'#'
)[
0
]
+
"#"
+
id
;
}
function
transformMain
()
{
main
.
attr
(
"transform"
,
translate
.
main
);
main
.
select
(
'.x.axis'
).
attr
(
"transform"
,
translate
.
x
);
...
...
@@ -1805,7 +1809,7 @@
// Add Axis
main
.
append
(
"g"
)
.
attr
(
"class"
,
"x axis"
)
.
attr
(
"clip-path"
,
__axis_rotated
?
""
:
"url("
+
document
.
URL
+
"#xaxis-clip)"
)
.
attr
(
"clip-path"
,
__axis_rotated
?
""
:
getClipPath
(
"xaxis-clip"
)
)
.
attr
(
"transform"
,
translate
.
x
)
.
append
(
"text"
)
.
attr
(
"class"
,
"-axis-x-label"
)
...
...
@@ -1814,7 +1818,7 @@
.
text
(
__axis_rotated
?
textForYAxisLabel
:
textForXAxisLabel
);
main
.
append
(
"g"
)
.
attr
(
"class"
,
"y axis"
)
.
attr
(
"clip-path"
,
__axis_rotated
?
"url("
+
document
.
URL
+
"#yaxis-clip)"
:
""
)
.
attr
(
"clip-path"
,
__axis_rotated
?
getClipPath
(
"yaxis-clip"
)
:
""
)
.
append
(
"text"
)
.
attr
(
"class"
,
"-axis-y-label"
)
.
attr
(
"transform"
,
"rotate(-90)"
)
...
...
@@ -1940,7 +1944,7 @@
context
.
append
(
"g"
)
.
attr
(
"class"
,
"x axis"
)
.
attr
(
"transform"
,
translate
.
subx
)
.
attr
(
"clip-path"
,
__axis_rotated
?
"url("
+
document
.
URL
+
"#yaxis-clip)"
:
""
);
.
attr
(
"clip-path"
,
__axis_rotated
?
getClipPath
(
"yaxis-clip"
)
:
""
);
}
/*-- Legend Region --*/
...
...
c3.min.js
View file @
dbfeb969
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