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
cd004fea
Commit
cd004fea
authored
Apr 09, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Purge getBBox - #131
parent
b0af2e82
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
c3.js
c3.js
+7
-6
c3.min.js
c3.min.js
+0
-0
No files found.
c3.js
View file @
cd004fea
...
...
@@ -785,7 +785,7 @@
function
getMaxTickWidth
(
id
)
{
var
maxWidth
=
0
,
axisClass
=
id
===
'x'
?
CLASS
.
axisX
:
id
===
'y'
?
CLASS
.
axisY
:
CLASS
.
axisY2
;
d3
.
selectAll
(
'.'
+
axisClass
+
' .tick text'
).
each
(
function
()
{
var
box
=
this
.
getB
Box
();
var
box
=
this
.
getB
oundingClientRect
();
if
(
maxWidth
<
box
.
width
)
{
maxWidth
=
box
.
width
;
}
});
return
maxWidth
<
20
?
20
:
maxWidth
;
...
...
@@ -1628,7 +1628,7 @@
.
data
([
min
,
max
])
.
enter
().
append
(
'text'
)
.
text
(
function
(
d
)
{
return
d
;
})
.
each
(
function
(
d
,
i
)
{
var
box
=
this
.
getBBox
();
widths
[
i
]
=
box
.
width
*
paddingCoef
;
})
.
each
(
function
(
d
,
i
)
{
widths
[
i
]
=
this
.
getBoundingClientRect
()
.
width
*
paddingCoef
;
})
.
remove
();
return
widths
;
}
...
...
@@ -2017,8 +2017,9 @@
return
Math
.
sqrt
(
Math
.
pow
(
cx
-
mouse
[
0
],
2
)
+
Math
.
pow
(
cy
-
mouse
[
1
],
2
))
<
_r
;
}
function
isWithinBar
(
_this
)
{
var
mouse
=
d3
.
mouse
(
_this
),
box
=
_this
.
getBBox
();
var
x
=
box
.
x
,
y
=
box
.
y
,
w
=
box
.
width
,
h
=
box
.
height
,
offset
=
2
;
var
mouse
=
d3
.
mouse
(
_this
),
box
=
_this
.
getBoundingClientRect
(),
seg0
=
_this
.
pathSegList
.
getItem
(
0
),
seg1
=
_this
.
pathSegList
.
getItem
(
1
);
var
x
=
seg0
.
x
,
y
=
Math
.
min
(
seg0
.
y
,
seg1
.
y
),
w
=
box
.
width
,
h
=
box
.
height
,
offset
=
2
;
var
sx
=
x
-
offset
,
ex
=
x
+
w
+
offset
,
sy
=
y
+
h
+
offset
,
ey
=
y
-
offset
;
return
sx
<
mouse
[
0
]
&&
mouse
[
0
]
<
ex
&&
ey
<
mouse
[
1
]
&&
mouse
[
1
]
<
sy
;
}
...
...
@@ -2212,7 +2213,7 @@
}
}
function
getYForText
(
points
,
d
,
textElement
)
{
var
box
=
textElement
.
getB
Box
();
var
box
=
textElement
.
getB
oundingClientRect
();
if
(
__axis_rotated
)
{
return
(
points
[
0
][
0
]
+
points
[
2
][
0
]
+
box
.
height
*
0.6
)
/
2
;
}
else
{
...
...
@@ -3719,7 +3720,7 @@
withTransformAll
=
isDefined
(
options
.
withTransformAll
)
?
options
.
withTransformAll
:
true
;
function
updatePositions
(
textElement
,
id
,
reset
)
{
var
box
=
textElement
.
getB
Box
(),
var
box
=
textElement
.
getB
oundingClientRect
(),
itemWidth
=
Math
.
ceil
((
box
.
width
+
paddingRight
)
/
10
)
*
10
,
itemHeight
=
Math
.
ceil
((
box
.
height
+
paddingTop
)
/
10
)
*
10
,
itemLength
=
isLegendRight
?
itemHeight
:
itemWidth
,
...
...
c3.min.js
View file @
cd004fea
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