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
c89aec0f
Commit
c89aec0f
authored
Feb 22, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix check value
parent
45a0ff4d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
c3.js
c3.js
+8
-5
c3.min.js
c3.min.js
+0
-0
No files found.
c3.js
View file @
c89aec0f
...
@@ -137,10 +137,10 @@
...
@@ -137,10 +137,10 @@
var
title
=
getXAxisTickFormat
()(
d
[
0
].
x
),
var
title
=
getXAxisTickFormat
()(
d
[
0
].
x
),
text
=
"<table class='-tooltip'><tr><th colspan='2'>"
+
title
+
"</th></tr>"
,
i
,
value
,
name
;
text
=
"<table class='-tooltip'><tr><th colspan='2'>"
+
title
+
"</th></tr>"
,
i
,
value
,
name
;
for
(
i
=
0
;
i
<
d
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
d
.
length
;
i
++
)
{
if
(
!
d
[
i
]
||
!
(
d
[
i
].
value
||
d
[
i
].
value
===
0
))
{
continue
;
}
if
(
!
d
[
i
]
||
!
isValue
(
d
[
i
].
value
))
{
continue
;
}
value
=
'-'
;
value
=
'-'
;
if
(
is
Defined
(
d
[
i
].
value
))
{
if
(
is
Value
(
d
[
i
].
value
))
{
value
=
__axis_y_tick_format
((
Math
.
round
(
d
[
i
].
value
*
100
)
/
100
).
toFixed
(
2
));
value
=
__axis_y_tick_format
((
Math
.
round
(
d
[
i
].
value
*
100
)
/
100
).
toFixed
(
2
));
}
}
...
@@ -839,7 +839,7 @@
...
@@ -839,7 +839,7 @@
function
classEvent
(
d
,
i
)
{
return
"event-rect event-rect-"
+
i
;
}
function
classEvent
(
d
,
i
)
{
return
"event-rect event-rect-"
+
i
;
}
function
opacityCircle
(
d
)
{
function
opacityCircle
(
d
)
{
return
d
.
value
?
isScatterType
(
d
)
?
0.5
:
1
:
0
;
return
isValue
(
d
.
value
)
?
isScatterType
(
d
)
?
0.5
:
1
:
0
;
}
}
function
xx
(
d
)
{
function
xx
(
d
)
{
...
@@ -928,7 +928,7 @@
...
@@ -928,7 +928,7 @@
var
svgLeft
,
tooltipLeft
,
tooltipRight
,
tooltipTop
,
chartRight
;
var
svgLeft
,
tooltipLeft
,
tooltipRight
,
tooltipTop
,
chartRight
;
if
(
!
__tooltip_enabled
)
{
return
;
}
if
(
!
__tooltip_enabled
)
{
return
;
}
// don't show tooltip when no data
// don't show tooltip when no data
if
(
selectedData
.
filter
(
function
(
d
)
{
return
d
&&
d
.
value
;
}).
length
===
0
)
{
return
;
}
if
(
selectedData
.
filter
(
function
(
d
)
{
return
d
&&
isValue
(
d
.
value
)
;
}).
length
===
0
)
{
return
;
}
// Construct tooltip
// Construct tooltip
tooltip
.
html
(
__tooltip_contents
(
selectedData
))
tooltip
.
html
(
__tooltip_contents
(
selectedData
))
.
style
(
"visibility"
,
"hidden"
)
.
style
(
"visibility"
,
"hidden"
)
...
@@ -1222,7 +1222,7 @@
...
@@ -1222,7 +1222,7 @@
}
}
function
filterRemoveNull
(
data
)
{
function
filterRemoveNull
(
data
)
{
return
data
.
filter
(
function
(
d
)
{
return
d
.
value
!==
null
;
});
return
data
.
filter
(
function
(
d
)
{
return
isValue
(
d
.
value
)
;
});
}
}
//-- Shape --//
//-- Shape --//
...
@@ -3065,6 +3065,9 @@
...
@@ -3065,6 +3065,9 @@
return
axis
;
return
axis
;
}
}
function
isValue
(
v
)
{
return
v
||
v
===
0
;
}
function
isUndefined
(
v
)
{
function
isUndefined
(
v
)
{
return
typeof
v
===
'undefined'
;
return
typeof
v
===
'undefined'
;
}
}
...
...
c3.min.js
View file @
c89aec0f
This diff is collapsed.
Click to expand it.
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