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
b90685c7
Commit
b90685c7
authored
Aug 30, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix svg height when gauge - #470
parent
140cf726
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
2 deletions
+14
-2
c3.js
c3.js
+7
-1
c3.min.js
c3.min.js
+0
-0
arc.js
src/arc.js
+3
-0
core.js
src/core.js
+3
-0
size.js
src/size.js
+1
-1
No files found.
c3.js
View file @
b90685c7
...
...
@@ -371,6 +371,9 @@
// for arc
$$
.
arcWidth
=
$$
.
width
-
(
$$
.
isLegendRight
?
legendWidth
+
10
:
0
);
$$
.
arcHeight
=
$$
.
height
-
(
$$
.
isLegendRight
?
0
:
10
);
if
(
$$
.
hasType
(
'gauge'
))
{
$$
.
arcHeight
+=
$$
.
height
-
$$
.
getGaugeLabelHeight
();
}
if
(
$$
.
updateRadius
)
{
$$
.
updateRadius
();
}
if
(
$$
.
isLegendRight
&&
hasArc
)
{
...
...
@@ -2257,7 +2260,7 @@
c3_chart_internal_fn
.
getCurrentHeight
=
function
()
{
var
$$
=
this
,
config
=
$$
.
config
,
h
=
config
.
size_height
?
config
.
size_height
:
$$
.
getParentHeight
();
return
h
>
0
?
h
:
320
;
return
h
>
0
?
h
:
320
/
(
$$
.
hasType
(
'gauge'
)
?
2
:
1
)
;
};
c3_chart_internal_fn
.
getCurrentPaddingTop
=
function
()
{
var
config
=
this
.
config
;
...
...
@@ -4399,6 +4402,9 @@
.
text
(
config
.
gauge_label_show
?
config
.
gauge_max
:
''
);
}
};
c3_chart_internal_fn
.
getGaugeLabelHeight
=
function
()
{
return
this
.
config
.
gauge_label_show
?
20
:
0
;
};
c3_chart_internal_fn
.
initRegion
=
function
()
{
var
$$
=
this
;
...
...
c3.min.js
View file @
b90685c7
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/arc.js
View file @
b90685c7
...
...
@@ -360,3 +360,6 @@ c3_chart_internal_fn.initGauge = function () {
.
text
(
config
.
gauge_label_show
?
config
.
gauge_max
:
''
);
}
};
c3_chart_internal_fn
.
getGaugeLabelHeight
=
function
()
{
return
this
.
config
.
gauge_label_show
?
20
:
0
;
};
src/core.js
View file @
b90685c7
...
...
@@ -366,6 +366,9 @@ c3_chart_internal_fn.updateSizes = function () {
// for arc
$$
.
arcWidth
=
$$
.
width
-
(
$$
.
isLegendRight
?
legendWidth
+
10
:
0
);
$$
.
arcHeight
=
$$
.
height
-
(
$$
.
isLegendRight
?
0
:
10
);
if
(
$$
.
hasType
(
'gauge'
))
{
$$
.
arcHeight
+=
$$
.
height
-
$$
.
getGaugeLabelHeight
();
}
if
(
$$
.
updateRadius
)
{
$$
.
updateRadius
();
}
if
(
$$
.
isLegendRight
&&
hasArc
)
{
...
...
src/size.js
View file @
b90685c7
...
...
@@ -5,7 +5,7 @@ c3_chart_internal_fn.getCurrentWidth = function () {
c3_chart_internal_fn
.
getCurrentHeight
=
function
()
{
var
$$
=
this
,
config
=
$$
.
config
,
h
=
config
.
size_height
?
config
.
size_height
:
$$
.
getParentHeight
();
return
h
>
0
?
h
:
320
;
return
h
>
0
?
h
:
320
/
(
$$
.
hasType
(
'gauge'
)
?
2
:
1
)
;
};
c3_chart_internal_fn
.
getCurrentPaddingTop
=
function
()
{
var
config
=
this
.
config
;
...
...
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