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
ad468b67
Commit
ad468b67
authored
Oct 21, 2013
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix zoom.enable = false
parent
925e106e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
c3.js
c3.js
+12
-10
c3.min.js
c3.min.js
+0
-0
No files found.
c3.js
View file @
ad468b67
...
...
@@ -838,7 +838,7 @@
/*-- Define brush --*/
var
brush
=
d3
.
svg
.
brush
().
on
(
"brush"
,
redrawForBrush
);
var
zoom
=
d3
.
behavior
.
zoom
().
on
(
"zoom"
,
redrawForZoom
);
var
zoom
=
d3
.
behavior
.
zoom
().
on
(
"zoom"
,
__zoom_enabled
?
redrawForZoom
:
null
);
/*-- Draw Chart --*/
...
...
@@ -877,7 +877,7 @@
// MEMO: must set x here for timeseries data
brush
.
x
(
subX
);
zoom
.
x
(
x
);
if
(
__zoom_enabled
)
zoom
.
x
(
x
);
/*-- Main Region --*/
...
...
@@ -905,12 +905,14 @@
.
call
(
yAxis2
);
}
main
.
append
(
'rect'
)
.
attr
(
'class'
,
'zoom-rect'
)
.
attr
(
'width'
,
width
)
.
attr
(
'height'
,
height
)
.
style
(
'opacity'
,
0
)
.
call
(
zoom
).
on
(
"dblclick.zoom"
,
null
);
if
(
__zoom_enabled
)
{
main
.
append
(
'rect'
)
.
attr
(
'class'
,
'zoom-rect'
)
.
attr
(
'width'
,
width
)
.
attr
(
'height'
,
height
)
.
style
(
'opacity'
,
0
)
.
call
(
zoom
).
on
(
"dblclick.zoom"
,
null
);
}
// Grids
grid
=
main
.
append
(
'g'
)
...
...
@@ -1255,7 +1257,7 @@
// ATTENTION: call here to update tickOffset
if
(
withUpdateXDomain
)
{
x
.
domain
(
brush
.
empty
()
?
subX
.
domain
()
:
brush
.
extent
());
zoom
.
x
(
x
);
if
(
__zoom_enabled
)
zoom
.
x
(
x
);
}
y
.
domain
(
getYDomain
(
c3
.
data
.
targets
,
'y'
));
y2
.
domain
(
getYDomain
(
c3
.
data
.
targets
,
'y2'
));
...
...
@@ -1455,7 +1457,7 @@
updateSizes
();
updateScales
();
// Set x for zoom again because of scale update
zoom
.
x
(
x
);
if
(
__zoom_enabled
)
zoom
.
x
(
x
);
// Resize svg
d3
.
select
(
'svg'
).
attr
(
'width'
,
width
+
margin
.
left
+
margin
.
right
);
d3
.
select
(
'#'
+
clipId
).
select
(
'rect'
).
attr
(
'width'
,
width
);
...
...
c3.min.js
View file @
ad468b67
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