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
25a67286
Commit
25a67286
authored
Aug 15, 2013
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix name and value for null data
parent
e8ecbf24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
c3.js
c3.js
+10
-3
No files found.
c3.js
View file @
25a67286
...
...
@@ -102,10 +102,16 @@
// tooltip - show when mouseover on each data
var
__tooltip_contents
=
getConfig
([
'tooltip'
,
'contents'
],
function
(
d
)
{
var
date
=
isTimeSeries
?
d
[
0
].
x
.
getFullYear
()
+
'.'
+
(
d
[
0
].
x
.
getMonth
()
+
1
)
+
'.'
+
d
[
0
].
x
.
getDate
()
:
isCategorized
?
category
(
d
[
0
].
x
)
:
d
[
0
].
x
,
text
=
"<table class='tooltip'><tr><th colspan='2'>"
+
date
+
"</th></tr>"
,
i
text
=
"<table class='tooltip'><tr><th colspan='2'>"
+
date
+
"</th></tr>"
,
i
,
value
,
name
;
for
(
i
=
0
;
i
<
d
.
length
;
i
++
){
var
value
=
typeof
d
[
i
].
value
!==
'undefined'
?
(
Math
.
round
(
d
[
i
].
value
*
100
)
/
100
).
toFixed
(
2
)
:
'-'
;
text
+=
"<tr><td>"
+
d
[
i
].
name
+
"</td><td class='value'>"
+
value
+
"</td></tr>"
if
(
typeof
d
[
i
]
!==
'undefined'
)
{
value
=
typeof
d
[
i
].
value
!==
'undefined'
?
(
Math
.
round
(
d
[
i
].
value
*
100
)
/
100
).
toFixed
(
2
)
:
'-'
;
name
=
d
[
i
].
name
;
}
else
{
value
=
'-'
;
name
=
'-'
;
}
text
+=
"<tr><td>"
+
name
+
"</td><td class='value'>"
+
value
+
"</td></tr>"
}
return
text
+
"</table>"
})
...
...
@@ -839,6 +845,7 @@
// Add id,name to selectedData
for
(
j
=
0
;
j
<
selectedData
.
length
;
j
++
)
{
if
(
typeof
selectedData
[
j
]
===
'undefined'
)
continue
;
name
=
__data_names
[
selectedData
[
j
].
id
];
selectedData
[
j
].
name
=
typeof
name
!==
'undefined'
?
name
:
selectedData
[
j
].
id
;
}
...
...
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