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
71a74885
Commit
71a74885
authored
Apr 30, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove revert when show/hide
parent
94976e50
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
12 deletions
+9
-12
c3.js
c3.js
+9
-12
c3.min.js
c3.min.js
+0
-0
No files found.
c3.js
View file @
71a74885
...
...
@@ -2630,7 +2630,7 @@
// MEMO: call here to update legend box and tranlate for all
// MEMO: translate will be upated by this, so transform not needed in updateLegend()
updateLegend
(
mapToIds
(
c3
.
data
.
targets
),
{
withTransform
:
false
,
withTransitionForTransform
:
false
});
updateLegend
(
mapToIds
(
c3
.
data
.
targets
),
{
withTransform
:
false
,
withTransitionForTransform
:
false
,
withLegendState
:
true
});
/*-- Main Region --*/
...
...
@@ -3960,12 +3960,11 @@
var
xForLegend
,
xForLegendText
,
xForLegendRect
,
yForLegend
,
yForLegendText
,
yForLegendRect
;
var
paddingTop
=
4
,
paddingRight
=
26
,
maxWidth
=
0
,
maxHeight
=
0
,
posMin
=
10
;
var
l
,
totalLength
=
0
,
offsets
=
{},
widths
=
{},
heights
=
{},
margins
=
[
0
],
steps
=
{},
step
=
0
;
var
withTransition
,
withTransitionForTransform
,
withTransformAll
;
var
withTransition
,
withTransitionForTransform
;
options
=
options
||
{};
withTransition
=
isDefined
(
options
.
withTransition
)
?
options
.
withTransition
:
true
;
withTransitionForTransform
=
isDefined
(
options
.
withTransitionForTransform
)
?
options
.
withTransitionForTransform
:
true
;
withTransformAll
=
isDefined
(
options
.
withTransformAll
)
?
options
.
withTransformAll
:
true
;
function
updatePositions
(
textElement
,
id
,
reset
)
{
var
box
=
textElement
.
getBoundingClientRect
(),
...
...
@@ -4108,10 +4107,12 @@
.
attr
(
'y'
,
yForLegend
);
// toggle legend state
legend
.
selectAll
(
'.'
+
CLASS
.
legendItem
)
.
classed
(
CLASS
.
legendItemHidden
,
function
(
id
)
{
return
!
isTargetToShow
(
id
);
})
.
transition
()
.
style
(
'opacity'
,
function
(
id
)
{
return
isTargetToShow
(
id
)
?
1
:
legendOpacityForHidden
;
});
if
(
options
.
withLegendState
)
{
legend
.
selectAll
(
'.'
+
CLASS
.
legendItem
)
.
classed
(
CLASS
.
legendItemHidden
,
function
(
id
)
{
return
!
isTargetToShow
(
id
);
})
.
transition
()
.
style
(
'opacity'
,
function
(
id
)
{
return
isTargetToShow
(
id
)
?
1
:
legendOpacityForHidden
;
});
}
// Update all to reflect change of legend
updateLegendItemWidth
(
maxWidth
);
...
...
@@ -4122,9 +4123,7 @@
updateScales
();
updateSvgSize
();
// Update g positions
if
(
withTransformAll
)
{
transformAll
(
withTransitionForTransform
,
transitions
);
}
transformAll
(
withTransitionForTransform
,
transitions
);
}
/*-- Event Handling --*/
...
...
@@ -4209,7 +4208,6 @@
}
redraw
({
withUpdateOrgXDomain
:
true
,
withUpdateXDomain
:
true
,
withLegend
:
true
});
c3
.
revert
();
};
c3
.
hide
=
function
(
targetIds
,
options
)
{
...
...
@@ -4226,7 +4224,6 @@
}
redraw
({
withUpdateOrgXDomain
:
true
,
withUpdateXDomain
:
true
,
withLegend
:
true
});
c3
.
revert
();
};
c3
.
toggle
=
function
(
targetId
)
{
...
...
c3.min.js
View file @
71a74885
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