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
e5bb8804
Commit
e5bb8804
authored
Mar 04, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove references to inner function from tooltip.contents - #49
parent
bbd203c0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
c3.js
c3.js
+5
-5
No files found.
c3.js
View file @
e5bb8804
...
...
@@ -139,12 +139,12 @@
var
__tooltip_enabled
=
getConfig
([
'tooltip'
,
'enabled'
],
true
),
__tooltip_format_title
=
getConfig
([
'tooltip'
,
'format'
,
'title'
],
null
),
__tooltip_format_value
=
getConfig
([
'tooltip'
,
'format'
,
'value'
],
null
),
__tooltip_contents
=
getConfig
([
'tooltip'
,
'contents'
],
function
(
d
)
{
var
titleFormat
=
__tooltip_format_title
?
__tooltip_format_title
:
getXAxisTickFormat
()
,
__tooltip_contents
=
getConfig
([
'tooltip'
,
'contents'
],
function
(
d
,
defaultTitleFormat
,
defaultValueFormat
,
color
)
{
var
titleFormat
=
__tooltip_format_title
?
__tooltip_format_title
:
defaultTitleFormat
,
valueFormat
=
__tooltip_format_value
?
__tooltip_format_value
:
defaultValueFormat
,
text
,
i
,
title
,
value
,
name
;
for
(
i
=
0
;
i
<
d
.
length
;
i
++
)
{
if
(
!
d
[
i
]
||
!
isValue
(
d
[
i
].
value
))
{
continue
;
}
if
(
!
(
d
[
i
]
&&
(
d
[
i
].
value
||
d
[
i
].
value
===
0
)
))
{
continue
;
}
if
(
!
text
)
{
title
=
titleFormat
?
titleFormat
(
d
[
i
].
x
)
:
d
[
i
].
x
;
...
...
@@ -1014,7 +1014,7 @@
// don't show tooltip when no data
if
(
dataToShow
.
length
===
0
)
{
return
;
}
// Construct tooltip
tooltip
.
html
(
__tooltip_contents
(
selectedData
))
tooltip
.
html
(
__tooltip_contents
(
selectedData
,
getXAxisTickFormat
(),
defaultValueFormat
,
color
))
.
style
(
"visibility"
,
"hidden"
)
.
style
(
"display"
,
"block"
);
// Get tooltip dimensions
...
...
@@ -1837,7 +1837,7 @@
}
tooltip
.
html
(
__tooltip_contents
(
c3
.
data
.
targets
.
map
(
function
(
d
)
{
return
addName
(
d
.
values
[
__tooltip_init_x
]);
})));
})
,
getXAxisTickFormat
(),
defaultValueFormat
,
color
));
tooltip
.
style
(
"top"
,
__tooltip_init_position
.
top
)
.
style
(
"left"
,
__tooltip_init_position
.
left
)
.
style
(
"display"
,
"block"
);
...
...
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