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
b9342ab1
Commit
b9342ab1
authored
Apr 22, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert legend item hidden style because of flicker
parent
0fd30419
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
11 deletions
+10
-11
c3.css
c3.css
+0
-3
c3.js
c3.js
+10
-8
c3.min.js
c3.min.js
+0
-0
No files found.
c3.css
View file @
b9342ab1
...
...
@@ -115,9 +115,6 @@
.c3-legend-item
{
font-size
:
12px
;
}
.c3-legend-item-hidden
{
opacity
:
0.1
;
}
/*-- Tooltip --*/
...
...
c3.js
View file @
b9342ab1
...
...
@@ -3744,16 +3744,14 @@
/*-- Draw Legend --*/
function
opacityForLegend
(
id
)
{
var
item
=
legend
.
select
(
selectorLegend
(
id
));
item
.
style
(
'opacity'
,
null
);
// MEMO: remove to get opacity by css
return
item
.
classed
(
CLASS
.
legendItemHidden
)
?
item
.
style
(
'opacity'
)
:
1
;
return
d3
.
select
(
selectorLegend
(
id
)).
classed
(
CLASS
.
legendItemHidden
)
?
0.5
:
1
;
}
function
toggleFocusLegend
(
id
,
focus
)
{
var
items
=
legend
.
selectAll
(
'.'
+
CLASS
.
legendItem
).
filter
(
function
()
{
return
!
d3
.
select
(
this
).
classed
(
CLASS
.
legendItemHidden
);
}
),
var
legendItem
=
legend
.
selectAll
(
'.'
+
CLASS
.
legendItem
),
isTarget
=
function
(
d
)
{
return
(
!
id
||
d
===
id
);
},
notTarget
=
function
(
d
)
{
return
!
isTarget
(
d
);
};
items
.
filter
(
notTarget
).
transition
().
duration
(
100
).
style
(
'opacity'
,
focus
?
0.3
:
opacityForLegend
);
items
.
filter
(
isTarget
).
transition
().
duration
(
100
).
style
(
'opacity'
,
focus
?
opacityForLegend
:
0.3
);
legendItem
.
filter
(
notTarget
).
transition
().
duration
(
100
).
style
(
'opacity'
,
focus
?
0.3
:
opacityForLegend
);
legendItem
.
filter
(
isTarget
).
transition
().
duration
(
100
).
style
(
'opacity'
,
focus
?
opacityForLegend
:
0.3
);
}
function
focusLegend
(
id
)
{
toggleFocusLegend
(
id
,
true
);
...
...
@@ -4023,7 +4021,9 @@
showLegend
(
targetIds
);
}
else
{
legend
.
selectAll
(
selectorLegends
(
targetIds
))
.
classed
(
CLASS
.
legendItemHidden
,
false
);
.
classed
(
CLASS
.
legendItemHidden
,
false
)
.
transition
()
.
style
(
'opacity'
,
1
);
}
redraw
({
withUpdateOrgXDomain
:
true
,
withUpdateXDomain
:
true
,
withTransitionForHorizontalAxis
:
false
});
...
...
@@ -4042,7 +4042,9 @@
hideLegend
(
targetIds
);
}
else
{
legend
.
selectAll
(
selectorLegends
(
targetIds
))
.
classed
(
CLASS
.
legendItemHidden
,
true
);
.
classed
(
CLASS
.
legendItemHidden
,
true
)
.
transition
()
.
style
(
'opacity'
,
0.5
);
}
redraw
({
withUpdateOrgXDomain
:
true
,
withUpdateXDomain
:
true
,
withTransitionForHorizontalAxis
:
false
});
...
...
c3.min.js
View file @
b9342ab1
This diff is collapsed.
Click to expand it.
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