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
a7888403
You need to sign in or sign up before continuing.
Commit
a7888403
authored
Nov 21, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Tropicalista-master'
parents
dbd64612
d826f88d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
18 deletions
+30
-18
c3.js
c3.js
+15
-9
c3.min.js
c3.min.js
+0
-0
axis.js
src/axis.js
+3
-3
clip.js
src/clip.js
+2
-2
config.js
src/config.js
+2
-0
core.js
src/core.js
+2
-2
size.js
src/size.js
+6
-2
No files found.
c3.js
View file @
a7888403
...
@@ -113,8 +113,8 @@
...
@@ -113,8 +113,8 @@
$$
.
defocusedTargetIds
=
[];
$$
.
defocusedTargetIds
=
[];
$$
.
xOrient
=
config
.
axis_rotated
?
"left"
:
"bottom"
;
$$
.
xOrient
=
config
.
axis_rotated
?
"left"
:
"bottom"
;
$$
.
yOrient
=
config
.
axis_rotated
?
"bottom"
:
"left"
;
$$
.
yOrient
=
config
.
axis_rotated
?
(
config
.
axis_y_inner
?
"top"
:
"bottom"
)
:
(
config
.
axis_y_inner
?
"right"
:
"left"
)
;
$$
.
y2Orient
=
config
.
axis_rotated
?
"top"
:
"right"
;
$$
.
y2Orient
=
config
.
axis_rotated
?
(
config
.
axis_y_inner
?
"bottom"
:
"top"
)
:
(
config
.
axis_y_inner
?
"left"
:
"right"
)
;
$$
.
subXOrient
=
config
.
axis_rotated
?
"left"
:
"bottom"
;
$$
.
subXOrient
=
config
.
axis_rotated
?
"left"
:
"bottom"
;
$$
.
isLegendRight
=
config
.
legend_position
===
'right'
;
$$
.
isLegendRight
=
config
.
legend_position
===
'right'
;
...
@@ -1029,6 +1029,7 @@
...
@@ -1029,6 +1029,7 @@
axis_y_max
:
undefined
,
axis_y_max
:
undefined
,
axis_y_min
:
undefined
,
axis_y_min
:
undefined
,
axis_y_center
:
undefined
,
axis_y_center
:
undefined
,
axis_y_inner
:
undefined
,
axis_y_label
:
{},
axis_y_label
:
{},
axis_y_tick_format
:
undefined
,
axis_y_tick_format
:
undefined
,
axis_y_tick_outer
:
true
,
axis_y_tick_outer
:
true
,
...
@@ -1042,6 +1043,7 @@
...
@@ -1042,6 +1043,7 @@
axis_y2_max
:
undefined
,
axis_y2_max
:
undefined
,
axis_y2_min
:
undefined
,
axis_y2_min
:
undefined
,
axis_y2_center
:
undefined
,
axis_y2_center
:
undefined
,
axis_y2_inner
:
undefined
,
axis_y2_label
:
{},
axis_y2_label
:
{},
axis_y2_tick_format
:
undefined
,
axis_y2_tick_format
:
undefined
,
axis_y2_tick_outer
:
true
,
axis_y2_tick_outer
:
true
,
...
@@ -2501,8 +2503,10 @@
...
@@ -2501,8 +2503,10 @@
return
config
.
padding_left
;
return
config
.
padding_left
;
}
else
if
(
config
.
axis_rotated
)
{
}
else
if
(
config
.
axis_rotated
)
{
return
!
config
.
axis_x_show
?
1
:
Math
.
max
(
ceil10
(
$$
.
getAxisWidthByAxisId
(
'x'
,
withoutRecompute
)),
40
);
return
!
config
.
axis_x_show
?
1
:
Math
.
max
(
ceil10
(
$$
.
getAxisWidthByAxisId
(
'x'
,
withoutRecompute
)),
40
);
}
else
if
(
!
config
.
axis_y_show
||
config
.
axis_y_inner
)
{
// && !config.axis_rotated
return
$$
.
getYAxisLabelPosition
().
isOuter
?
30
:
1
;
}
else
{
}
else
{
return
!
config
.
axis_y_show
?
1
:
ceil10
(
$$
.
getAxisWidthByAxisId
(
'y'
,
withoutRecompute
));
return
ceil10
(
$$
.
getAxisWidthByAxisId
(
'y'
,
withoutRecompute
));
}
}
};
};
c3_chart_internal_fn
.
getCurrentPaddingRight
=
function
()
{
c3_chart_internal_fn
.
getCurrentPaddingRight
=
function
()
{
...
@@ -2512,8 +2516,10 @@
...
@@ -2512,8 +2516,10 @@
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
defaultPadding
+
legendWidthOnRight
;
}
else
if
(
!
config
.
axis_y2_show
||
config
.
axis_y2_inner
)
{
// && !config.axis_rotated
return
defaultPadding
+
legendWidthOnRight
+
(
$$
.
getY2AxisLabelPosition
().
isOuter
?
20
:
0
);
}
else
{
}
else
{
return
(
!
config
.
axis_y2_show
?
defaultPadding
:
ceil10
(
$$
.
getAxisWidthByAxisId
(
'y2'
)
))
+
legendWidthOnRight
;
return
ceil10
(
$$
.
getAxisWidthByAxisId
(
'y2'
))
+
legendWidthOnRight
;
}
}
};
};
...
@@ -3983,7 +3989,7 @@
...
@@ -3983,7 +3989,7 @@
$$
.
axes
.
y
=
main
.
append
(
"g"
)
$$
.
axes
.
y
=
main
.
append
(
"g"
)
.
attr
(
"class"
,
CLASS
.
axis
+
' '
+
CLASS
.
axisY
)
.
attr
(
"class"
,
CLASS
.
axis
+
' '
+
CLASS
.
axisY
)
.
attr
(
"clip-path"
,
$$
.
clipPathForYAxis
)
.
attr
(
"clip-path"
,
config
.
axis_y_inner
?
""
:
$$
.
clipPathForYAxis
)
.
attr
(
"transform"
,
$$
.
getTranslate
(
'y'
))
.
attr
(
"transform"
,
$$
.
getTranslate
(
'y'
))
.
style
(
"visibility"
,
config
.
axis_y_show
?
'visible'
:
'hidden'
);
.
style
(
"visibility"
,
config
.
axis_y_show
?
'visible'
:
'hidden'
);
$$
.
axes
.
y
.
append
(
"text"
)
$$
.
axes
.
y
.
append
(
"text"
)
...
@@ -4194,7 +4200,7 @@
...
@@ -4194,7 +4200,7 @@
if
(
$$
.
config
.
axis_rotated
)
{
if
(
$$
.
config
.
axis_rotated
)
{
return
position
.
isInner
?
"-0.5em"
:
"3em"
;
return
position
.
isInner
?
"-0.5em"
:
"3em"
;
}
else
{
}
else
{
return
position
.
isInner
?
"1.2em"
:
-
20
-
$$
.
getMaxTickWidth
(
'y'
);
return
position
.
isInner
?
"1.2em"
:
-
10
-
(
$$
.
config
.
axis_y_inner
?
0
:
(
$$
.
getMaxTickWidth
(
'y'
)
+
10
)
);
}
}
};
};
c3_chart_internal_fn
.
dyForY2AxisLabel
=
function
()
{
c3_chart_internal_fn
.
dyForY2AxisLabel
=
function
()
{
...
@@ -4203,7 +4209,7 @@
...
@@ -4203,7 +4209,7 @@
if
(
$$
.
config
.
axis_rotated
)
{
if
(
$$
.
config
.
axis_rotated
)
{
return
position
.
isInner
?
"1.2em"
:
"-2.2em"
;
return
position
.
isInner
?
"1.2em"
:
"-2.2em"
;
}
else
{
}
else
{
return
position
.
isInner
?
"-0.5em"
:
30
+
this
.
getMaxTickWidth
(
'y2'
);
return
position
.
isInner
?
"-0.5em"
:
15
+
(
$$
.
config
.
axis_y2_inner
?
0
:
(
this
.
getMaxTickWidth
(
'y2'
)
+
15
)
);
}
}
};
};
c3_chart_internal_fn
.
textAnchorForXAxisLabel
=
function
()
{
c3_chart_internal_fn
.
textAnchorForXAxisLabel
=
function
()
{
...
@@ -4367,7 +4373,7 @@
...
@@ -4367,7 +4373,7 @@
};
};
c3_chart_internal_fn
.
getYAxisClipX
=
function
()
{
c3_chart_internal_fn
.
getYAxisClipX
=
function
()
{
var
$$
=
this
;
var
$$
=
this
;
return
$$
.
getAxisClipX
(
$$
.
config
.
axis_rotated
);
return
$$
.
config
.
axis_y_inner
?
-
1
:
$$
.
getAxisClipX
(
$$
.
config
.
axis_rotated
);
};
};
c3_chart_internal_fn
.
getYAxisClipY
=
function
()
{
c3_chart_internal_fn
.
getYAxisClipY
=
function
()
{
var
$$
=
this
;
var
$$
=
this
;
...
@@ -4393,7 +4399,7 @@
...
@@ -4393,7 +4399,7 @@
};
};
c3_chart_internal_fn
.
getYAxisClipWidth
=
function
()
{
c3_chart_internal_fn
.
getYAxisClipWidth
=
function
()
{
var
$$
=
this
;
var
$$
=
this
;
return
$$
.
getAxisClipWidth
(
$$
.
config
.
axis_rotated
);
return
$$
.
getAxisClipWidth
(
$$
.
config
.
axis_rotated
)
+
(
$$
.
config
.
axis_y_inner
?
20
:
0
)
;
};
};
c3_chart_internal_fn
.
getYAxisClipHeight
=
function
()
{
c3_chart_internal_fn
.
getYAxisClipHeight
=
function
()
{
var
$$
=
this
;
var
$$
=
this
;
...
...
c3.min.js
View file @
a7888403
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/axis.js
View file @
a7888403
...
@@ -12,7 +12,7 @@ c3_chart_internal_fn.initAxis = function () {
...
@@ -12,7 +12,7 @@ c3_chart_internal_fn.initAxis = function () {
$$
.
axes
.
y
=
main
.
append
(
"g"
)
$$
.
axes
.
y
=
main
.
append
(
"g"
)
.
attr
(
"class"
,
CLASS
.
axis
+
' '
+
CLASS
.
axisY
)
.
attr
(
"class"
,
CLASS
.
axis
+
' '
+
CLASS
.
axisY
)
.
attr
(
"clip-path"
,
$$
.
clipPathForYAxis
)
.
attr
(
"clip-path"
,
config
.
axis_y_inner
?
""
:
$$
.
clipPathForYAxis
)
.
attr
(
"transform"
,
$$
.
getTranslate
(
'y'
))
.
attr
(
"transform"
,
$$
.
getTranslate
(
'y'
))
.
style
(
"visibility"
,
config
.
axis_y_show
?
'visible'
:
'hidden'
);
.
style
(
"visibility"
,
config
.
axis_y_show
?
'visible'
:
'hidden'
);
$$
.
axes
.
y
.
append
(
"text"
)
$$
.
axes
.
y
.
append
(
"text"
)
...
@@ -223,7 +223,7 @@ c3_chart_internal_fn.dyForYAxisLabel = function () {
...
@@ -223,7 +223,7 @@ c3_chart_internal_fn.dyForYAxisLabel = function () {
if
(
$$
.
config
.
axis_rotated
)
{
if
(
$$
.
config
.
axis_rotated
)
{
return
position
.
isInner
?
"-0.5em"
:
"3em"
;
return
position
.
isInner
?
"-0.5em"
:
"3em"
;
}
else
{
}
else
{
return
position
.
isInner
?
"1.2em"
:
-
20
-
$$
.
getMaxTickWidth
(
'y'
);
return
position
.
isInner
?
"1.2em"
:
-
10
-
(
$$
.
config
.
axis_y_inner
?
0
:
(
$$
.
getMaxTickWidth
(
'y'
)
+
10
)
);
}
}
};
};
c3_chart_internal_fn
.
dyForY2AxisLabel
=
function
()
{
c3_chart_internal_fn
.
dyForY2AxisLabel
=
function
()
{
...
@@ -232,7 +232,7 @@ c3_chart_internal_fn.dyForY2AxisLabel = function () {
...
@@ -232,7 +232,7 @@ c3_chart_internal_fn.dyForY2AxisLabel = function () {
if
(
$$
.
config
.
axis_rotated
)
{
if
(
$$
.
config
.
axis_rotated
)
{
return
position
.
isInner
?
"1.2em"
:
"-2.2em"
;
return
position
.
isInner
?
"1.2em"
:
"-2.2em"
;
}
else
{
}
else
{
return
position
.
isInner
?
"-0.5em"
:
30
+
this
.
getMaxTickWidth
(
'y2'
);
return
position
.
isInner
?
"-0.5em"
:
15
+
(
$$
.
config
.
axis_y2_inner
?
0
:
(
this
.
getMaxTickWidth
(
'y2'
)
+
15
)
);
}
}
};
};
c3_chart_internal_fn
.
textAnchorForXAxisLabel
=
function
()
{
c3_chart_internal_fn
.
textAnchorForXAxisLabel
=
function
()
{
...
...
src/clip.js
View file @
a7888403
...
@@ -23,7 +23,7 @@ c3_chart_internal_fn.getXAxisClipY = function () {
...
@@ -23,7 +23,7 @@ c3_chart_internal_fn.getXAxisClipY = function () {
};
};
c3_chart_internal_fn
.
getYAxisClipX
=
function
()
{
c3_chart_internal_fn
.
getYAxisClipX
=
function
()
{
var
$$
=
this
;
var
$$
=
this
;
return
$$
.
getAxisClipX
(
$$
.
config
.
axis_rotated
);
return
$$
.
config
.
axis_y_inner
?
-
1
:
$$
.
getAxisClipX
(
$$
.
config
.
axis_rotated
);
};
};
c3_chart_internal_fn
.
getYAxisClipY
=
function
()
{
c3_chart_internal_fn
.
getYAxisClipY
=
function
()
{
var
$$
=
this
;
var
$$
=
this
;
...
@@ -49,7 +49,7 @@ c3_chart_internal_fn.getXAxisClipHeight = function () {
...
@@ -49,7 +49,7 @@ c3_chart_internal_fn.getXAxisClipHeight = function () {
};
};
c3_chart_internal_fn
.
getYAxisClipWidth
=
function
()
{
c3_chart_internal_fn
.
getYAxisClipWidth
=
function
()
{
var
$$
=
this
;
var
$$
=
this
;
return
$$
.
getAxisClipWidth
(
$$
.
config
.
axis_rotated
);
return
$$
.
getAxisClipWidth
(
$$
.
config
.
axis_rotated
)
+
(
$$
.
config
.
axis_y_inner
?
20
:
0
)
;
};
};
c3_chart_internal_fn
.
getYAxisClipHeight
=
function
()
{
c3_chart_internal_fn
.
getYAxisClipHeight
=
function
()
{
var
$$
=
this
;
var
$$
=
this
;
...
...
src/config.js
View file @
a7888403
...
@@ -106,6 +106,7 @@ c3_chart_internal_fn.getDefaultConfig = function () {
...
@@ -106,6 +106,7 @@ c3_chart_internal_fn.getDefaultConfig = function () {
axis_y_max
:
undefined
,
axis_y_max
:
undefined
,
axis_y_min
:
undefined
,
axis_y_min
:
undefined
,
axis_y_center
:
undefined
,
axis_y_center
:
undefined
,
axis_y_inner
:
undefined
,
axis_y_label
:
{},
axis_y_label
:
{},
axis_y_tick_format
:
undefined
,
axis_y_tick_format
:
undefined
,
axis_y_tick_outer
:
true
,
axis_y_tick_outer
:
true
,
...
@@ -119,6 +120,7 @@ c3_chart_internal_fn.getDefaultConfig = function () {
...
@@ -119,6 +120,7 @@ c3_chart_internal_fn.getDefaultConfig = function () {
axis_y2_max
:
undefined
,
axis_y2_max
:
undefined
,
axis_y2_min
:
undefined
,
axis_y2_min
:
undefined
,
axis_y2_center
:
undefined
,
axis_y2_center
:
undefined
,
axis_y2_inner
:
undefined
,
axis_y2_label
:
{},
axis_y2_label
:
{},
axis_y2_tick_format
:
undefined
,
axis_y2_tick_format
:
undefined
,
axis_y2_tick_outer
:
true
,
axis_y2_tick_outer
:
true
,
...
...
src/core.js
View file @
a7888403
...
@@ -108,8 +108,8 @@ c3_chart_internal_fn.initParams = function () {
...
@@ -108,8 +108,8 @@ c3_chart_internal_fn.initParams = function () {
$$
.
defocusedTargetIds
=
[];
$$
.
defocusedTargetIds
=
[];
$$
.
xOrient
=
config
.
axis_rotated
?
"left"
:
"bottom"
;
$$
.
xOrient
=
config
.
axis_rotated
?
"left"
:
"bottom"
;
$$
.
yOrient
=
config
.
axis_rotated
?
"bottom"
:
"left"
;
$$
.
yOrient
=
config
.
axis_rotated
?
(
config
.
axis_y_inner
?
"top"
:
"bottom"
)
:
(
config
.
axis_y_inner
?
"right"
:
"left"
)
;
$$
.
y2Orient
=
config
.
axis_rotated
?
"top"
:
"right"
;
$$
.
y2Orient
=
config
.
axis_rotated
?
(
config
.
axis_y_inner
?
"bottom"
:
"top"
)
:
(
config
.
axis_y_inner
?
"left"
:
"right"
)
;
$$
.
subXOrient
=
config
.
axis_rotated
?
"left"
:
"bottom"
;
$$
.
subXOrient
=
config
.
axis_rotated
?
"left"
:
"bottom"
;
$$
.
isLegendRight
=
config
.
legend_position
===
'right'
;
$$
.
isLegendRight
=
config
.
legend_position
===
'right'
;
...
...
src/size.js
View file @
a7888403
...
@@ -21,8 +21,10 @@ c3_chart_internal_fn.getCurrentPaddingLeft = function (withoutRecompute) {
...
@@ -21,8 +21,10 @@ c3_chart_internal_fn.getCurrentPaddingLeft = function (withoutRecompute) {
return
config
.
padding_left
;
return
config
.
padding_left
;
}
else
if
(
config
.
axis_rotated
)
{
}
else
if
(
config
.
axis_rotated
)
{
return
!
config
.
axis_x_show
?
1
:
Math
.
max
(
ceil10
(
$$
.
getAxisWidthByAxisId
(
'x'
,
withoutRecompute
)),
40
);
return
!
config
.
axis_x_show
?
1
:
Math
.
max
(
ceil10
(
$$
.
getAxisWidthByAxisId
(
'x'
,
withoutRecompute
)),
40
);
}
else
if
(
!
config
.
axis_y_show
||
config
.
axis_y_inner
)
{
// && !config.axis_rotated
return
$$
.
getYAxisLabelPosition
().
isOuter
?
30
:
1
;
}
else
{
}
else
{
return
!
config
.
axis_y_show
?
1
:
ceil10
(
$$
.
getAxisWidthByAxisId
(
'y'
,
withoutRecompute
));
return
ceil10
(
$$
.
getAxisWidthByAxisId
(
'y'
,
withoutRecompute
));
}
}
};
};
c3_chart_internal_fn
.
getCurrentPaddingRight
=
function
()
{
c3_chart_internal_fn
.
getCurrentPaddingRight
=
function
()
{
...
@@ -32,8 +34,10 @@ c3_chart_internal_fn.getCurrentPaddingRight = function () {
...
@@ -32,8 +34,10 @@ c3_chart_internal_fn.getCurrentPaddingRight = function () {
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
defaultPadding
+
legendWidthOnRight
;
}
else
if
(
!
config
.
axis_y2_show
||
config
.
axis_y2_inner
)
{
// && !config.axis_rotated
return
defaultPadding
+
legendWidthOnRight
+
(
$$
.
getY2AxisLabelPosition
().
isOuter
?
20
:
0
);
}
else
{
}
else
{
return
(
!
config
.
axis_y2_show
?
defaultPadding
:
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