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
e7d1776d
Commit
e7d1776d
authored
Nov 14, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify to update dimension when redraw - #702
parent
c42899d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
14 deletions
+26
-14
c3.js
c3.js
+13
-7
c3.min.js
c3.min.js
+0
-0
core.js
src/core.js
+13
-7
No files found.
c3.js
View file @
e7d1776d
...
...
@@ -459,6 +459,10 @@
// 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
))
{
// 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
);
}
// MEMO: needed for grids calculation
...
...
@@ -788,14 +792,16 @@
};
c3_chart_internal_fn
.
updateDimension
=
function
()
{
c3_chart_internal_fn
.
updateDimension
=
function
(
withoutAxis
)
{
var
$$
=
this
;
if
(
$$
.
config
.
axis_rotated
)
{
$$
.
axes
.
x
.
call
(
$$
.
xAxis
);
$$
.
axes
.
subx
.
call
(
$$
.
subXAxis
);
}
else
{
$$
.
axes
.
y
.
call
(
$$
.
yAxis
);
$$
.
axes
.
y2
.
call
(
$$
.
y2Axis
);
if
(
!
withoutAxis
)
{
if
(
$$
.
config
.
axis_rotated
)
{
$$
.
axes
.
x
.
call
(
$$
.
xAxis
);
$$
.
axes
.
subx
.
call
(
$$
.
subXAxis
);
}
else
{
$$
.
axes
.
y
.
call
(
$$
.
yAxis
);
$$
.
axes
.
y2
.
call
(
$$
.
y2Axis
);
}
}
$$
.
updateSizes
();
$$
.
updateScales
();
...
...
c3.min.js
View file @
e7d1776d
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/core.js
View file @
e7d1776d
...
...
@@ -454,6 +454,10 @@ 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
))
{
// 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
);
}
// MEMO: needed for grids calculation
...
...
@@ -783,14 +787,16 @@ c3_chart_internal_fn.updateSvgSize = function () {
};
c3_chart_internal_fn
.
updateDimension
=
function
()
{
c3_chart_internal_fn
.
updateDimension
=
function
(
withoutAxis
)
{
var
$$
=
this
;
if
(
$$
.
config
.
axis_rotated
)
{
$$
.
axes
.
x
.
call
(
$$
.
xAxis
);
$$
.
axes
.
subx
.
call
(
$$
.
subXAxis
);
}
else
{
$$
.
axes
.
y
.
call
(
$$
.
yAxis
);
$$
.
axes
.
y2
.
call
(
$$
.
y2Axis
);
if
(
!
withoutAxis
)
{
if
(
$$
.
config
.
axis_rotated
)
{
$$
.
axes
.
x
.
call
(
$$
.
xAxis
);
$$
.
axes
.
subx
.
call
(
$$
.
subXAxis
);
}
else
{
$$
.
axes
.
y
.
call
(
$$
.
yAxis
);
$$
.
axes
.
y2
.
call
(
$$
.
y2Axis
);
}
}
$$
.
updateSizes
();
$$
.
updateScales
();
...
...
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