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
a320d662
Commit
a320d662
authored
May 22, 2014
by
Brandon Bernal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Spacing and Tabbing reported by Travis CI.
parent
e29f418c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
c3.js
c3.js
+13
-11
No files found.
c3.js
View file @
a320d662
...
...
@@ -515,7 +515,7 @@
function
updateRadius
()
{
radiusExpanded
=
Math
.
min
(
arcWidth
,
arcHeight
)
/
2
;
radius
=
radiusExpanded
*
0.95
;
var
innerRadiusRatio
=
__gauge_width
?
((
radius
-
__gauge_width
)
/
radius
)
:
0.6
;
var
innerRadiusRatio
=
__gauge_width
?
((
radius
-
__gauge_width
)
/
radius
)
:
0.6
;
innerRadius
=
hasDonutType
(
c3
.
data
.
targets
)
||
hasGaugeType
(
c3
.
data
.
targets
)
?
radius
*
innerRadiusRatio
:
0
;
}
function
getSvgLeft
()
{
...
...
@@ -991,14 +991,16 @@
d
=
t
;
}
});
if
(
isNaN
(
d
.
endAngle
))
d
.
endAngle
=
d
.
startAngle
;
if
(
isNaN
(
d
.
endAngle
))
{
d
.
endAngle
=
d
.
startAngle
;
}
if
(
isGaugeType
(
d
.
data
))
{
var
sA
=
d
.
startAngle
,
eA
=
d
.
endAngle
;
var
gMin
=
__gauge_min
,
gMax
=
__gauge_max
,
gF
=
Math
.
abs
(
gMin
)
+
gMax
,
fA
=
Math
.
abs
(
sA
)
+
eA
,
aTic
=
(
Math
.
PI
)
/
gF
;
d
.
startAngle
=
(
-
1
*
(
Math
.
PI
/
2
))
+
(
aTic
*
Math
.
abs
(
gMin
));
d
.
endAngle
=
d
.
startAngle
+
(
aTic
*
(
(
d
.
value
>
gMax
)
?
gMax
:
d
.
value
));
gF
=
Math
.
abs
(
gMin
)
+
gMax
,
fA
=
Math
.
abs
(
sA
)
+
eA
,
aTic
=
(
Math
.
PI
)
/
gF
;
d
.
startAngle
=
(
-
1
*
(
Math
.
PI
/
2
))
+
(
aTic
*
Math
.
abs
(
gMin
));
d
.
endAngle
=
d
.
startAngle
+
(
aTic
*
(
(
d
.
value
>
gMax
)
?
gMax
:
d
.
value
));
}
return
found
?
d
:
null
;
}
...
...
@@ -1034,7 +1036,7 @@
h
=
Math
.
sqrt
(
x
*
x
+
y
*
y
);
// TODO: ratio should be an option?
ratio
=
(
36
/
radius
>
0.375
?
1.175
-
36
/
radius
:
0.8
)
*
radius
/
h
;
translate
=
__gauge_style
==
'arc'
?
"translate(1,1)"
:
"translate("
+
(
x
*
ratio
)
+
','
+
(
y
*
ratio
)
+
")"
;
translate
=
__gauge_style
==
=
'arc'
?
"translate(1,1)"
:
"translate("
+
(
x
*
ratio
)
+
','
+
(
y
*
ratio
)
+
")"
;
}
return
translate
;
}
...
...
@@ -1957,9 +1959,9 @@
function
circleX
(
d
)
{
return
d
.
x
||
d
.
x
===
0
?
x
(
d
.
x
)
:
null
;
}
function
circleY
(
d
,
i
)
{
function
circleY
(
d
,
i
)
{
var
lineIndices
=
getLineIndices
(),
getPoint
=
generateGetLinePoint
(
lineIndices
);
if
(
__data_groups
.
length
>
0
)
{
var
point
=
getPoint
(
d
,
i
);
return
point
[
0
][
1
];
}
if
(
__data_groups
.
length
>
0
)
{
var
point
=
getPoint
(
d
,
i
);
return
point
[
0
][
1
];
}
return
getYScale
(
d
.
id
)(
d
.
value
);
}
...
...
@@ -2253,8 +2255,8 @@
levels
=
_values
;
return
function
(
value
)
{
for
(
var
a
=
1
;
a
<
levels
.
length
;
a
++
)
{
if
(
levels
[
0
]
===
'percentage'
&&
((
value
/
__gauge_max
)
*
100
)
<
levels
[
a
])
{
for
(
var
a
=
1
;
a
<
levels
.
length
;
a
++
)
{
if
(
levels
[
0
]
===
'percentage'
&&
((
value
/
__gauge_max
)
*
100
)
<
levels
[
a
])
{
return
colors
[
a
-
1
];
}
if
(
levels
[
0
]
===
'whole'
&&
value
<
levels
[
a
])
{
...
...
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