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
3f5c8f07
Commit
3f5c8f07
authored
Aug 20, 2015
by
Jan Teichmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
address comments
parent
8dfe05ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
tooltip.js
src/tooltip.js
+3
-4
No files found.
src/tooltip.js
View file @
3f5c8f07
...
...
@@ -30,20 +30,19 @@ c3_chart_internal_fn.getTooltipContent = function (d, defaultTitleFormat, defaul
nameFormat
=
config
.
tooltip_format_name
||
function
(
name
)
{
return
name
;
},
valueFormat
=
config
.
tooltip_format_value
||
defaultValueFormat
,
text
,
i
,
title
,
value
,
name
,
bgcolor
,
orderAsc
=
$$
.
isOrderAsc
()
,
orderDesc
=
$$
.
isOrderDesc
()
;
orderAsc
=
$$
.
isOrderAsc
();
if
(
config
.
data_groups
.
length
===
0
)
{
d
.
sort
(
function
(
a
,
b
){
return
orderAsc
?
a
.
value
-
b
.
value
:
b
.
value
-
a
.
value
;
});
}
else
{
var
targets
=
$$
.
orderTargets
(
$$
.
data
.
targets
);
var
data_targets
=
targets
.
map
(
function
(
i
)
{
var
ids
=
$$
.
orderTargets
(
$$
.
data
.
targets
).
map
(
function
(
i
)
{
return
i
.
id
;
});
d
.
sort
(
function
(
a
,
b
)
{
if
(
a
.
value
>
0
&&
b
.
value
>
0
)
{
return
orderAsc
?
data_targets
.
indexOf
(
a
.
id
)
-
data_targets
.
indexOf
(
b
.
id
)
:
data_targets
.
indexOf
(
b
.
id
)
-
data_target
s
.
indexOf
(
a
.
id
);
return
orderAsc
?
ids
.
indexOf
(
a
.
id
)
-
ids
.
indexOf
(
b
.
id
)
:
ids
.
indexOf
(
b
.
id
)
-
id
s
.
indexOf
(
a
.
id
);
}
else
{
return
orderAsc
?
a
.
value
-
b
.
value
:
b
.
value
-
a
.
value
;
}
...
...
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