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
4214343c
Commit
4214343c
authored
Oct 14, 2015
by
Evgeny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move axisLabels
parent
87ed79f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
1 deletion
+39
-1
axis.js
src/axis.js
+39
-1
No files found.
src/axis.js
View file @
4214343c
...
...
@@ -578,7 +578,7 @@ c3_chart_internal_fn.getAxisData = function(min, max, isAbscissa) {
return
axis
;
};
c3
.
chart
.
internal
.
fn
.
findMinMax
=
function
()
{
c3
_chart_internal_
fn
.
findMinMax
=
function
()
{
var
$$
=
this
,
data
=
$$
.
data
.
targets
;
var
minY
,
maxY
,
minX
,
maxX
;
var
i
,
j
,
id
;
...
...
@@ -652,3 +652,41 @@ c3.chart.internal.fn.findMinMax = function () {
return
{
minY
:
minY
,
maxY
:
maxY
,
minX
:
minX
,
maxX
:
maxX
};
};
c3_chart_fn
.
axisLabelX
=
function
(
label
)
{
var
$$
=
this
.
internal
;
if
(
!
arguments
.
length
)
{
if
(
isUndefined
(
$$
.
config
.
axis_x_label
))
return
undefined
;
return
{
text
:
$$
.
config
.
axis_x_label
.
text
,
position
:
$$
.
config
.
axis_x_label
.
position
};
}
if
(
isUndefined
(
label
)){
$$
.
config
.
axis_x_label
=
{};
}
else
{
$$
.
config
.
axis_x_label
.
text
=
label
.
text
;
$$
.
config
.
axis_x_label
.
position
=
label
.
position
;
}
$$
.
cachedRedraw
({
withLegend
:
true
});
};
c3_chart_fn
.
axisLabelY
=
function
(
label
)
{
var
$$
=
this
.
internal
;
if
(
!
arguments
.
length
)
{
if
(
isUndefined
(
$$
.
config
.
axis_y_label
))
return
undefined
;
return
{
text
:
$$
.
config
.
axis_y_label
.
text
,
position
:
$$
.
config
.
axis_y_label
.
position
};
}
if
(
isUndefined
(
label
)){
$$
.
config
.
axis_y_label
=
{};
}
else
{
$$
.
config
.
axis_y_label
.
text
=
label
.
text
;
$$
.
config
.
axis_y_label
.
position
=
label
.
position
;
}
$$
.
cachedRedraw
({
withLegend
:
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