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
d38d5559
Commit
d38d5559
authored
Oct 25, 2013
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix resize with zoom and brush
parent
34a5b475
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
c3.js
c3.js
+14
-10
c3.min.js
c3.min.js
+0
-0
No files found.
c3.js
View file @
d38d5559
...
...
@@ -1491,19 +1491,23 @@
d3
.
select
(
'#'
+
clipId
).
select
(
'rect'
).
attr
(
'width'
,
width
).
attr
(
'height'
,
height
);
d3
.
select
(
'#xaxis-clip'
).
select
(
'rect'
).
attr
(
'width'
,
width
+
2
);
d3
.
select
(
'.zoom-rect'
).
attr
(
'width'
,
width
);
context
.
select
(
'.x.brush'
).
selectAll
(
'rect'
).
attr
(
'height'
,
height2
);
context
.
select
(
'.x.brush'
).
call
(
brush
);
// Update g positions
context
.
attr
(
"transform"
,
translate
.
context
);
legend
.
attr
(
"transform"
,
translate
.
legend
);
// Update axis positions
// Update main positions
main
.
select
(
'.x.axis'
).
attr
(
"transform"
,
translate
.
x
);
main
.
select
(
'.y2.axis'
).
attr
(
"transform"
,
translate
.
y2
);
context
.
select
(
'.x.axis'
).
attr
(
"transform"
,
translate
.
subx
);
// Update legend
if
(
__legend_show
)
updateLegend
(
c3
.
data
.
targets
,
{
withTransition
:
false
});
// Update context sizes and positions
if
(
__subchart_show
)
{
context
.
select
(
'.x.brush'
).
selectAll
(
'rect'
).
attr
(
'height'
,
height2
);
context
.
select
(
'.x.brush'
).
call
(
brush
);
context
.
attr
(
"transform"
,
translate
.
context
);
context
.
select
(
'.x.axis'
).
attr
(
"transform"
,
translate
.
subx
);
}
// Update legend positions
if
(
__legend_show
)
{
legend
.
attr
(
"transform"
,
translate
.
legend
);
updateLegend
(
c3
.
data
.
targets
,
{
withTransition
:
false
});
}
// Draw with new sizes & scales
redraw
({
withTransition
:
false
});
redraw
({
withTransition
:
false
,
withUpdateXDomain
:
false
});
}
function
updateTargets
(
targets
)
{
...
...
c3.min.js
View file @
d38d5559
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