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
de502600
You need to sign in or sign up before continuing.
Commit
de502600
authored
Nov 20, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug for zoom.rescale - #738
parent
a66beb31
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
8 deletions
+14
-8
c3.js
c3.js
+7
-4
c3.min.js
c3.min.js
+0
-0
core.js
src/core.js
+3
-2
subchart.js
src/subchart.js
+2
-1
zoom.js
src/zoom.js
+2
-1
No files found.
c3.js
View file @
de502600
...
...
@@ -427,7 +427,7 @@
c3_chart_internal_fn
.
redraw
=
function
(
options
,
transitions
)
{
var
$$
=
this
,
main
=
$$
.
main
,
d3
=
$$
.
d3
,
config
=
$$
.
config
;
var
areaIndices
=
$$
.
getShapeIndices
(
$$
.
isAreaType
),
barIndices
=
$$
.
getShapeIndices
(
$$
.
isBarType
),
lineIndices
=
$$
.
getShapeIndices
(
$$
.
isLineType
);
var
withY
,
withSubchart
,
withTransition
,
withTransitionForExit
,
withTransitionForAxis
,
withTransform
,
withUpdateXDomain
,
withUpdateOrgXDomain
,
withTrimXDomain
,
withLegend
,
withEventRect
;
var
withY
,
withSubchart
,
withTransition
,
withTransitionForExit
,
withTransitionForAxis
,
withTransform
,
withUpdateXDomain
,
withUpdateOrgXDomain
,
withTrimXDomain
,
withLegend
,
withEventRect
,
withDimension
;
var
hideAxis
=
$$
.
hasArcType
();
var
drawArea
,
drawBar
,
drawLine
,
xForText
,
yForText
;
var
duration
,
durationForExit
,
durationForAxis
;
...
...
@@ -445,6 +445,7 @@
withTrimXDomain
=
getOption
(
options
,
"withTrimXDomain"
,
true
);
withLegend
=
getOption
(
options
,
"withLegend"
,
false
);
withEventRect
=
getOption
(
options
,
"withEventRect"
,
true
);
withDimension
=
getOption
(
options
,
"withDimension"
,
true
);
withTransitionForExit
=
getOption
(
options
,
"withTransitionForExit"
,
withTransition
);
withTransitionForAxis
=
getOption
(
options
,
"withTransitionForAxis"
,
withTransition
);
...
...
@@ -457,7 +458,7 @@
// update legend and transform each g
if
(
withLegend
&&
config
.
legend_show
)
{
$$
.
updateLegend
(
$$
.
mapToIds
(
$$
.
data
.
targets
),
options
,
transitions
);
}
else
if
(
(
!
config
.
axis_rotated
&&
withY
)
||
(
config
.
axis_rotated
&&
withUpdateXDomain
)
)
{
}
else
if
(
withDimension
)
{
// need to update dimension (e.g. axis.y.tick.values) because y tick values should change
// no need to update axis in it because they will be updated in redraw()
$$
.
updateDimension
(
true
);
...
...
@@ -5192,7 +5193,8 @@
withTransition
:
false
,
withY
:
$$
.
config
.
zoom_rescale
,
withSubchart
:
false
,
withUpdateXDomain
:
true
withUpdateXDomain
:
true
,
withDimension
:
false
});
$$
.
config
.
subchart_onbrush
.
call
(
$$
.
api
,
x
.
orgDomain
());
};
...
...
@@ -5277,7 +5279,8 @@
withTransition
:
false
,
withY
:
config
.
zoom_rescale
,
withSubchart
:
false
,
withEventRect
:
false
withEventRect
:
false
,
withDimension
:
false
});
if
(
d3
.
event
.
sourceEvent
.
type
===
'mousemove'
)
{
$$
.
cancelClick
=
true
;
...
...
c3.min.js
View file @
de502600
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/core.js
View file @
de502600
...
...
@@ -422,7 +422,7 @@ c3_chart_internal_fn.updateTargets = function (targets) {
c3_chart_internal_fn
.
redraw
=
function
(
options
,
transitions
)
{
var
$$
=
this
,
main
=
$$
.
main
,
d3
=
$$
.
d3
,
config
=
$$
.
config
;
var
areaIndices
=
$$
.
getShapeIndices
(
$$
.
isAreaType
),
barIndices
=
$$
.
getShapeIndices
(
$$
.
isBarType
),
lineIndices
=
$$
.
getShapeIndices
(
$$
.
isLineType
);
var
withY
,
withSubchart
,
withTransition
,
withTransitionForExit
,
withTransitionForAxis
,
withTransform
,
withUpdateXDomain
,
withUpdateOrgXDomain
,
withTrimXDomain
,
withLegend
,
withEventRect
;
var
withY
,
withSubchart
,
withTransition
,
withTransitionForExit
,
withTransitionForAxis
,
withTransform
,
withUpdateXDomain
,
withUpdateOrgXDomain
,
withTrimXDomain
,
withLegend
,
withEventRect
,
withDimension
;
var
hideAxis
=
$$
.
hasArcType
();
var
drawArea
,
drawBar
,
drawLine
,
xForText
,
yForText
;
var
duration
,
durationForExit
,
durationForAxis
;
...
...
@@ -440,6 +440,7 @@ c3_chart_internal_fn.redraw = function (options, transitions) {
withTrimXDomain
=
getOption
(
options
,
"withTrimXDomain"
,
true
);
withLegend
=
getOption
(
options
,
"withLegend"
,
false
);
withEventRect
=
getOption
(
options
,
"withEventRect"
,
true
);
withDimension
=
getOption
(
options
,
"withDimension"
,
true
);
withTransitionForExit
=
getOption
(
options
,
"withTransitionForExit"
,
withTransition
);
withTransitionForAxis
=
getOption
(
options
,
"withTransitionForAxis"
,
withTransition
);
...
...
@@ -452,7 +453,7 @@ c3_chart_internal_fn.redraw = function (options, transitions) {
// update legend and transform each g
if
(
withLegend
&&
config
.
legend_show
)
{
$$
.
updateLegend
(
$$
.
mapToIds
(
$$
.
data
.
targets
),
options
,
transitions
);
}
else
if
(
(
!
config
.
axis_rotated
&&
withY
)
||
(
config
.
axis_rotated
&&
withUpdateXDomain
)
)
{
}
else
if
(
withDimension
)
{
// need to update dimension (e.g. axis.y.tick.values) because y tick values should change
// no need to update axis in it because they will be updated in redraw()
$$
.
updateDimension
(
true
);
...
...
src/subchart.js
View file @
de502600
...
...
@@ -166,7 +166,8 @@ c3_chart_internal_fn.redrawForBrush = function () {
withTransition
:
false
,
withY
:
$$
.
config
.
zoom_rescale
,
withSubchart
:
false
,
withUpdateXDomain
:
true
withUpdateXDomain
:
true
,
withDimension
:
false
});
$$
.
config
.
subchart_onbrush
.
call
(
$$
.
api
,
x
.
orgDomain
());
};
...
...
src/zoom.js
View file @
de502600
...
...
@@ -59,7 +59,8 @@ c3_chart_internal_fn.redrawForZoom = function () {
withTransition
:
false
,
withY
:
config
.
zoom_rescale
,
withSubchart
:
false
,
withEventRect
:
false
withEventRect
:
false
,
withDimension
:
false
});
if
(
d3
.
event
.
sourceEvent
.
type
===
'mousemove'
)
{
$$
.
cancelClick
=
true
;
...
...
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