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
d0126761
Commit
d0126761
authored
Aug 07, 2015
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1209 from jamesgarfield/bug/1208_Legend_Method_Customization
Change legend method customization to be consistent across all methods
parents
e21a8f85
26d8c3e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
legend.js
src/legend.js
+10
-6
No files found.
src/legend.js
View file @
d0126761
...
...
@@ -240,20 +240,24 @@ c3_chart_internal_fn.updateLegend = function (targetIds, options, transitions) {
}
})
.
on
(
'mouseover'
,
function
(
id
)
{
$$
.
d3
.
select
(
this
).
classed
(
CLASS
.
legendItemFocused
,
true
);
if
(
!
$$
.
transiting
&&
$$
.
isTargetToShow
(
id
))
{
$$
.
api
.
focus
(
id
);
}
if
(
config
.
legend_item_onmouseover
)
{
config
.
legend_item_onmouseover
.
call
(
$$
,
id
);
}
else
{
$$
.
d3
.
select
(
this
).
classed
(
CLASS
.
legendItemFocused
,
true
);
if
(
!
$$
.
transiting
&&
$$
.
isTargetToShow
(
id
))
{
$$
.
api
.
focus
(
id
);
}
}
})
.
on
(
'mouseout'
,
function
(
id
)
{
$$
.
d3
.
select
(
this
).
classed
(
CLASS
.
legendItemFocused
,
false
);
$$
.
api
.
revert
();
if
(
config
.
legend_item_onmouseout
)
{
config
.
legend_item_onmouseout
.
call
(
$$
,
id
);
}
else
{
$$
.
d3
.
select
(
this
).
classed
(
CLASS
.
legendItemFocused
,
false
);
$$
.
api
.
revert
();
}
});
l
.
append
(
'text'
)
.
text
(
function
(
id
)
{
return
isDefined
(
config
.
data_names
[
id
])
?
config
.
data_names
[
id
]
:
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