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
3746404f
Commit
3746404f
authored
Jun 04, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tick width when no tick exists - #295
parent
c4914d3d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
c3.js
c3.js
+9
-5
c3.min.js
c3.min.js
+0
-0
No files found.
c3.js
View file @
3746404f
...
...
@@ -378,6 +378,7 @@
var
isLegendRight
=
__legend_position
===
'right'
;
var
legendStep
=
0
,
legendItemWidth
=
0
,
legendItemHeight
=
0
,
legendOpacityForHidden
=
0.15
;
var
currentMaxTickWidth
=
0
;
/*-- Define Functions --*/
...
...
@@ -951,11 +952,14 @@
}
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
.
getBoundingClientRect
();
if
(
maxWidth
<
box
.
width
)
{
maxWidth
=
box
.
width
;
}
});
return
maxWidth
<
0
?
0
:
maxWidth
;
if
(
svg
)
{
svg
.
selectAll
(
'.'
+
axisClass
+
' .tick text'
).
each
(
function
()
{
var
box
=
this
.
getBoundingClientRect
();
if
(
maxWidth
<
box
.
width
)
{
maxWidth
=
box
.
width
;
}
});
}
currentMaxTickWidth
=
maxWidth
<=
0
?
currentMaxTickWidth
:
maxWidth
;
return
currentMaxTickWidth
;
}
function
updateAxisLabels
(
withTransition
)
{
var
axisXLabel
=
main
.
select
(
'.'
+
CLASS
.
axisX
+
' .'
+
CLASS
.
axisXLabel
),
...
...
c3.min.js
View file @
3746404f
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