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
bb6536b8
Commit
bb6536b8
authored
Sep 21, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix focus/defocus
parent
9142800b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
22 deletions
+46
-22
c3.js
c3.js
+23
-11
c3.min.js
c3.min.js
+0
-0
api.focus.js
src/api.focus.js
+3
-3
api.show.js
src/api.show.js
+20
-8
No files found.
c3.js
View file @
bb6536b8
...
...
@@ -5353,7 +5353,7 @@
c3_chart_fn
.
focus
=
function
(
targetIds
)
{
var
$$
=
this
.
internal
,
candidates
;
targetIds
=
$$
.
mapToTargetIds
(
targetIds
);
targetIds
=
$$
.
mapToTargetIds
(
targetIds
)
.
filter
(
$$
.
isTargetToShow
,
$$
)
;
candidates
=
$$
.
svg
.
selectAll
(
$$
.
selectorTargets
(
targetIds
)),
this
.
revert
();
...
...
@@ -5373,7 +5373,7 @@
c3_chart_fn
.
defocus
=
function
(
targetIds
)
{
var
$$
=
this
.
internal
,
candidates
;
targetIds
=
$$
.
mapToTargetIds
(
targetIds
);
targetIds
=
$$
.
mapToTargetIds
(
targetIds
)
.
filter
(
$$
.
isTargetToShow
,
$$
)
;
candidates
=
$$
.
svg
.
selectAll
(
$$
.
selectorTargets
(
targetIds
)),
this
.
revert
();
...
...
@@ -5392,7 +5392,7 @@
c3_chart_fn
.
revert
=
function
(
targetIds
)
{
var
$$
=
this
.
internal
,
candidates
;
targetIds
=
$$
.
mapToTargetIds
(
targetIds
);
targetIds
=
$$
.
mapToTargetIds
(
targetIds
)
.
filter
(
$$
.
isTargetToShow
,
$$
)
;
candidates
=
$$
.
svg
.
selectAll
(
$$
.
selectorTargets
(
targetIds
));
candidates
.
classed
(
CLASS
.
focused
,
false
).
classed
(
CLASS
.
defocused
,
false
);
...
...
@@ -5406,15 +5406,21 @@
};
c3_chart_fn
.
show
=
function
(
targetIds
,
options
)
{
var
$$
=
this
.
internal
;
var
$$
=
this
.
internal
,
targets
;
targetIds
=
$$
.
mapToTargetIds
(
targetIds
);
options
=
options
||
{};
$$
.
removeHiddenTargetIds
(
targetIds
);
$$
.
svg
.
selectAll
(
$$
.
selectorTargets
(
targetIds
))
.
transition
()
.
style
(
'opacity'
,
1
);
targets
=
$$
.
svg
.
selectAll
(
$$
.
selectorTargets
(
targetIds
));
targets
.
transition
()
.
style
(
'opacity'
,
1
,
'important'
)
.
call
(
$$
.
endall
,
function
()
{
targets
.
style
(
'opacity'
,
null
).
style
(
'opacity'
,
1
)
.
classed
(
CLASS
.
focused
,
false
)
.
classed
(
CLASS
.
defocused
,
false
);
});
if
(
options
.
withLegend
)
{
$$
.
showLegend
(
targetIds
);
...
...
@@ -5424,15 +5430,21 @@
};
c3_chart_fn
.
hide
=
function
(
targetIds
,
options
)
{
var
$$
=
this
.
internal
;
var
$$
=
this
.
internal
,
targets
;
targetIds
=
$$
.
mapToTargetIds
(
targetIds
);
options
=
options
||
{};
$$
.
addHiddenTargetIds
(
targetIds
);
$$
.
svg
.
selectAll
(
$$
.
selectorTargets
(
targetIds
))
.
transition
()
.
style
(
'opacity'
,
0
);
targets
=
$$
.
svg
.
selectAll
(
$$
.
selectorTargets
(
targetIds
));
targets
.
transition
()
.
style
(
'opacity'
,
0
,
'important'
)
.
call
(
$$
.
endall
,
function
()
{
targets
.
style
(
'opacity'
,
null
).
style
(
'opacity'
,
0
)
.
classed
(
CLASS
.
focused
,
false
)
.
classed
(
CLASS
.
defocused
,
false
);
});
if
(
options
.
withLegend
)
{
$$
.
hideLegend
(
targetIds
);
...
...
c3.min.js
View file @
bb6536b8
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/api.focus.js
View file @
bb6536b8
c3_chart_fn
.
focus
=
function
(
targetIds
)
{
var
$$
=
this
.
internal
,
candidates
;
targetIds
=
$$
.
mapToTargetIds
(
targetIds
);
targetIds
=
$$
.
mapToTargetIds
(
targetIds
)
.
filter
(
$$
.
isTargetToShow
,
$$
)
;
candidates
=
$$
.
svg
.
selectAll
(
$$
.
selectorTargets
(
targetIds
)),
this
.
revert
();
...
...
@@ -21,7 +21,7 @@ c3_chart_fn.focus = function (targetIds) {
c3_chart_fn
.
defocus
=
function
(
targetIds
)
{
var
$$
=
this
.
internal
,
candidates
;
targetIds
=
$$
.
mapToTargetIds
(
targetIds
);
targetIds
=
$$
.
mapToTargetIds
(
targetIds
)
.
filter
(
$$
.
isTargetToShow
,
$$
)
;
candidates
=
$$
.
svg
.
selectAll
(
$$
.
selectorTargets
(
targetIds
)),
this
.
revert
();
...
...
@@ -40,7 +40,7 @@ c3_chart_fn.defocus = function (targetIds) {
c3_chart_fn
.
revert
=
function
(
targetIds
)
{
var
$$
=
this
.
internal
,
candidates
;
targetIds
=
$$
.
mapToTargetIds
(
targetIds
);
targetIds
=
$$
.
mapToTargetIds
(
targetIds
)
.
filter
(
$$
.
isTargetToShow
,
$$
)
;
candidates
=
$$
.
svg
.
selectAll
(
$$
.
selectorTargets
(
targetIds
));
candidates
.
classed
(
CLASS
.
focused
,
false
).
classed
(
CLASS
.
defocused
,
false
);
...
...
src/api.show.js
View file @
bb6536b8
c3_chart_fn
.
show
=
function
(
targetIds
,
options
)
{
var
$$
=
this
.
internal
;
var
$$
=
this
.
internal
,
targets
;
targetIds
=
$$
.
mapToTargetIds
(
targetIds
);
options
=
options
||
{};
$$
.
removeHiddenTargetIds
(
targetIds
);
$$
.
svg
.
selectAll
(
$$
.
selectorTargets
(
targetIds
))
.
transition
()
.
style
(
'opacity'
,
1
);
targets
=
$$
.
svg
.
selectAll
(
$$
.
selectorTargets
(
targetIds
));
targets
.
transition
()
.
style
(
'opacity'
,
1
,
'important'
)
.
call
(
$$
.
endall
,
function
()
{
targets
.
style
(
'opacity'
,
null
).
style
(
'opacity'
,
1
)
.
classed
(
CLASS
.
focused
,
false
)
.
classed
(
CLASS
.
defocused
,
false
);
});
if
(
options
.
withLegend
)
{
$$
.
showLegend
(
targetIds
);
...
...
@@ -17,15 +23,21 @@ c3_chart_fn.show = function (targetIds, options) {
};
c3_chart_fn
.
hide
=
function
(
targetIds
,
options
)
{
var
$$
=
this
.
internal
;
var
$$
=
this
.
internal
,
targets
;
targetIds
=
$$
.
mapToTargetIds
(
targetIds
);
options
=
options
||
{};
$$
.
addHiddenTargetIds
(
targetIds
);
$$
.
svg
.
selectAll
(
$$
.
selectorTargets
(
targetIds
))
.
transition
()
.
style
(
'opacity'
,
0
);
targets
=
$$
.
svg
.
selectAll
(
$$
.
selectorTargets
(
targetIds
));
targets
.
transition
()
.
style
(
'opacity'
,
0
,
'important'
)
.
call
(
$$
.
endall
,
function
()
{
targets
.
style
(
'opacity'
,
null
).
style
(
'opacity'
,
0
)
.
classed
(
CLASS
.
focused
,
false
)
.
classed
(
CLASS
.
defocused
,
false
);
});
if
(
options
.
withLegend
)
{
$$
.
hideLegend
(
targetIds
);
...
...
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