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
1d10f5b5
Commit
1d10f5b5
authored
Mar 16, 2016
by
Дмитрий Никулин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix right padding when legend is not right
parent
c08c14f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
size.js
src/size.js
+3
-3
No files found.
src/size.js
View file @
1d10f5b5
...
@@ -29,13 +29,13 @@ c3_chart_internal_fn.getCurrentPaddingLeft = function (withoutRecompute) {
...
@@ -29,13 +29,13 @@ c3_chart_internal_fn.getCurrentPaddingLeft = function (withoutRecompute) {
};
};
c3_chart_internal_fn
.
getCurrentPaddingRight
=
function
()
{
c3_chart_internal_fn
.
getCurrentPaddingRight
=
function
()
{
var
$$
=
this
,
config
=
$$
.
config
,
var
$$
=
this
,
config
=
$$
.
config
,
defaultPadding
=
1
0
,
legendWidthOnRight
=
$$
.
isLegendRight
?
$$
.
getLegendWidth
()
+
20
:
0
;
defaultPadding
=
3
0
,
legendWidthOnRight
=
$$
.
isLegendRight
?
$$
.
getLegendWidth
()
+
20
:
0
;
if
(
isValue
(
config
.
padding_right
))
{
if
(
isValue
(
config
.
padding_right
))
{
return
config
.
padding_right
+
1
;
// 1 is needed not to hide tick line
return
config
.
padding_right
+
1
;
// 1 is needed not to hide tick line
}
else
if
(
config
.
axis_rotated
)
{
}
else
if
(
config
.
axis_rotated
)
{
return
defaultPadding
+
legendWidthOnRight
;
return
(
$$
.
isLegendRight
?
0
:
defaultPadding
)
+
legendWidthOnRight
;
}
else
if
(
!
config
.
axis_y2_show
||
config
.
axis_y2_inner
)
{
// && !config.axis_rotated
}
else
if
(
!
config
.
axis_y2_show
||
config
.
axis_y2_inner
)
{
// && !config.axis_rotated
return
2
+
legendWidthOnRight
+
(
$$
.
getY2AxisLabelPosition
().
isOuter
?
20
:
0
);
return
(
$$
.
isLegendRight
?
0
:
defaultPadding
)
+
legendWidthOnRight
+
(
$$
.
getY2AxisLabelPosition
().
isOuter
?
20
:
0
);
}
else
{
}
else
{
return
ceil10
(
$$
.
getAxisWidthByAxisId
(
'y2'
))
+
legendWidthOnRight
;
return
ceil10
(
$$
.
getAxisWidthByAxisId
(
'y2'
))
+
legendWidthOnRight
;
}
}
...
...
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