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
f0164c7e
Commit
f0164c7e
authored
Apr 16, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add onmouseover/onmouseout for legend item
parent
0cf1c6de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
c3.js
c3.js
+9
-1
c3.min.js
c3.min.js
+0
-0
No files found.
c3.js
View file @
f0164c7e
...
@@ -160,6 +160,8 @@
...
@@ -160,6 +160,8 @@
var
__legend_show
=
getConfig
([
'legend'
,
'show'
],
true
),
var
__legend_show
=
getConfig
([
'legend'
,
'show'
],
true
),
__legend_position
=
getConfig
([
'legend'
,
'position'
],
'bottom'
),
__legend_position
=
getConfig
([
'legend'
,
'position'
],
'bottom'
),
__legend_item_onclick
=
getConfig
([
'legend'
,
'item'
,
'onclick'
]),
__legend_item_onclick
=
getConfig
([
'legend'
,
'item'
,
'onclick'
]),
__legend_item_onmouseover
=
getConfig
([
'legend'
,
'item'
,
'onmouseover'
]),
__legend_item_onmouseout
=
getConfig
([
'legend'
,
'item'
,
'onmouseout'
]),
__legend_equally
=
getConfig
([
'legend'
,
'equally'
],
false
);
__legend_equally
=
getConfig
([
'legend'
,
'equally'
],
false
);
// axis
// axis
...
@@ -3833,9 +3835,15 @@
...
@@ -3833,9 +3835,15 @@
})
})
.
on
(
'mouseover'
,
function
(
id
)
{
.
on
(
'mouseover'
,
function
(
id
)
{
c3
.
focus
(
id
);
c3
.
focus
(
id
);
if
(
typeof
__legend_item_onmouseover
===
'function'
)
{
__legend_item_onmouseover
(
id
);
}
})
})
.
on
(
'mouseout'
,
function
()
{
.
on
(
'mouseout'
,
function
(
id
)
{
c3
.
revert
();
c3
.
revert
();
if
(
typeof
__legend_item_onmouseout
===
'function'
)
{
__legend_item_onmouseout
(
id
);
}
});
});
l
.
append
(
'text'
)
l
.
append
(
'text'
)
.
text
(
function
(
id
)
{
return
isDefined
(
__data_names
[
id
])
?
__data_names
[
id
]
:
id
;
})
.
text
(
function
(
id
)
{
return
isDefined
(
__data_names
[
id
])
?
__data_names
[
id
]
:
id
;
})
...
...
c3.min.js
View file @
f0164c7e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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