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
fb345909
Commit
fb345909
authored
Jul 12, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add donut.width and remove donut.radius.inner
parent
e4e4b6c4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
17 deletions
+5
-17
c3.js
c3.js
+4
-14
c3.min.js
c3.min.js
+0
-0
chart_donut.html
htdocs/samples/chart_donut.html
+1
-3
No files found.
c3.js
View file @
fb345909
...
...
@@ -282,7 +282,7 @@
var
__donut_label_show
=
getConfig
([
'donut'
,
'label'
,
'show'
],
true
),
__donut_label_format
=
getConfig
([
'donut'
,
'label'
,
'format'
]),
__donut_label_threshold
=
getConfig
([
'donut'
,
'label'
,
'threshold'
],
0.05
),
__donut_
radius_inner
=
getConfig
([
'donut'
,
'radius'
,
'inner
'
]),
__donut_
width
=
getConfig
([
'donut'
,
'width
'
]),
__donut_sort
=
getConfig
([
'donut'
,
'sort'
],
true
),
__donut_expand
=
getConfig
([
'donut'
,
'expand'
],
true
),
__donut_title
=
getConfig
([
'donut'
,
'title'
],
""
);
...
...
@@ -530,21 +530,11 @@
.
attr
(
"y2"
,
__axis_rotated
?
-
10
:
height
);
}
function
updateRadius
()
{
var
innerRadiusRatio
;
var
innerRadiusRatio
,
w
=
__gauge_width
||
__donut_width
;
radiusExpanded
=
Math
.
min
(
arcWidth
,
arcHeight
)
/
2
;
radius
=
radiusExpanded
*
0.95
;
innerRadiusRatio
=
__gauge_width
?
(
radius
-
__gauge_width
)
/
radius
:
0.6
;
if
(
hasDonutType
(
c3
.
data
.
targets
)
||
hasGaugeType
(
c3
.
data
.
targets
))
{
if
(
typeof
__donut_radius_inner
===
'function'
)
{
innerRadius
=
__donut_radius_inner
(
radius
,
innerRadiusRatio
);
}
else
if
(
__donut_radius_inner
)
{
innerRadius
=
__donut_radius_inner
;
}
else
{
innerRadius
=
radius
*
innerRadiusRatio
;
}
}
else
{
innerRadius
=
0
;
}
innerRadiusRatio
=
w
?
(
radius
-
w
)
/
radius
:
0.6
;
innerRadius
=
hasDonutType
(
c3
.
data
.
targets
)
||
hasGaugeType
(
c3
.
data
.
targets
)
?
radius
*
innerRadiusRatio
:
0
;
}
function
getSvgLeft
()
{
var
leftAxisClass
=
__axis_rotated
?
CLASS
.
axisX
:
CLASS
.
axisY
,
...
...
c3.min.js
View file @
fb345909
This source diff could not be displayed because it is too large. You can
view the blob
instead.
htdocs/samples/chart_donut.html
View file @
fb345909
...
...
@@ -36,9 +36,7 @@
// format: function (d, ratio) { return ""; }
},
title
:
"Iris Petal Width"
,
radius
:
{
inner
:
60
}
width
:
70
}
});
...
...
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