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
6f2091f2
Commit
6f2091f2
authored
Jun 18, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix grid height when padding.top specified - #368
parent
ed67f04e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
142 deletions
+68
-142
c3.js
c3.js
+2
-2
c3.min.js
c3.min.js
+0
-0
padding.html
htdocs/samples/padding.html
+66
-140
No files found.
c3.js
View file @
6f2091f2
...
@@ -523,7 +523,7 @@
...
@@ -523,7 +523,7 @@
main
.
select
(
'line.'
+
CLASS
.
xgridFocus
)
main
.
select
(
'line.'
+
CLASS
.
xgridFocus
)
.
attr
(
"x1"
,
__axis_rotated
?
0
:
-
10
)
.
attr
(
"x1"
,
__axis_rotated
?
0
:
-
10
)
.
attr
(
"x2"
,
__axis_rotated
?
width
:
-
10
)
.
attr
(
"x2"
,
__axis_rotated
?
width
:
-
10
)
.
attr
(
"y1"
,
__axis_rotated
?
-
10
:
margin
.
top
)
.
attr
(
"y1"
,
__axis_rotated
?
-
10
:
0
)
.
attr
(
"y2"
,
__axis_rotated
?
-
10
:
height
);
.
attr
(
"y2"
,
__axis_rotated
?
-
10
:
height
);
}
}
function
updateRadius
()
{
function
updateRadius
()
{
...
@@ -3627,7 +3627,7 @@
...
@@ -3627,7 +3627,7 @@
}
:
{
}
:
{
'x1'
:
function
(
d
)
{
return
x
(
d
)
+
tickOffset
;
},
'x1'
:
function
(
d
)
{
return
x
(
d
)
+
tickOffset
;
},
'x2'
:
function
(
d
)
{
return
x
(
d
)
+
tickOffset
;
},
'x2'
:
function
(
d
)
{
return
x
(
d
)
+
tickOffset
;
},
'y1'
:
margin
.
top
,
'y1'
:
0
,
'y2'
:
height
'y2'
:
height
};
};
// this is used to flow
// this is used to flow
...
...
c3.min.js
View file @
6f2091f2
This source diff could not be displayed because it is too large. You can
view the blob
instead.
htdocs/samples/padding.html
View file @
6f2091f2
...
@@ -15,13 +15,17 @@
...
@@ -15,13 +15,17 @@
<div
id=
"chart3"
></div>
<div
id=
"chart3"
></div>
<div
id=
"chart4"
></div>
<div
id=
"chart4"
></div>
<div
id=
"chart5"
></div>
<div
id=
"chart5"
></div>
<div
id=
"chart6"
></div>
<div
id=
"chart7"
></div>
<div
id=
"chart8"
></div>
<div
id=
"chart9"
></div>
<div
id=
"chart10"
></div>
<script
src=
"http://d3js.org/d3.v3.min.js"
charset=
"utf-8"
></script>
<script
src=
"http://d3js.org/d3.v3.min.js"
charset=
"utf-8"
></script>
<script
src=
"/js/c3.js"
></script>
<script
src=
"/js/c3.js"
></script>
<script>
<script>
var
chart1
=
c3
.
generate
({
var
option
=
{
bindto
:
'#chart1'
,
padding
:
{
padding
:
{
top
:
50
,
top
:
50
,
right
:
200
,
right
:
200
,
...
@@ -52,160 +56,82 @@
...
@@ -52,160 +56,82 @@
position
:
'outer-center'
position
:
'outer-center'
}
}
}
}
}
});
var
chart2
=
c3
.
generate
({
bindto
:
'#chart2'
,
padding
:
{
top
:
50
,
right
:
200
,
bottom
:
50
,
left
:
200
,
},
data
:
{
columns
:
[
[
'data1'
,
30
,
200
,
100
,
400
,
150
,
250
],
[
'data2'
,
130
,
100
,
200
,
100
,
150
,
150
]
],
axes
:
{
data2
:
'y2'
},
},
},
legend
:
{
legend
:
{
position
:
'right'
position
:
'bottom'
},
axis
:
{
rotated
:
true
,
y
:
{
label
:
{
text
:
'Y Label'
,
position
:
'outer-center'
}
},
y2
:
{
show
:
true
,
label
:
{
text
:
'Y2 Label'
,
position
:
'outer-center'
}
}
}
});
var
chart3
=
c3
.
generate
({
bindto
:
'#chart3'
,
padding
:
{
top
:
50
,
right
:
200
,
bottom
:
50
,
left
:
200
,
},
data
:
{
columns
:
[
[
'data1'
,
30
,
200
,
100
,
400
,
150
,
250
],
[
'data2'
,
130
,
100
,
200
,
100
,
150
,
150
]
],
axes
:
{
data2
:
'y2'
},
},
},
subchart
:
{
subchart
:
{
show
:
tru
e
show
:
fals
e
},
},
axis
:
{
grid
:
{
rotated
:
true
,
x
:
{
y
:
{
label
:
{
text
:
'Y Label'
,
position
:
'outer-center'
}
},
y2
:
{
show
:
true
,
show
:
true
,
label
:
{
text
:
'Y2 Label'
,
position
:
'outer-center'
}
}
}
});
var
chart4
=
c3
.
generate
({
bindto
:
'#chart4'
,
padding
:
{
top
:
50
,
right
:
200
,
bottom
:
50
,
left
:
200
,
},
data
:
{
columns
:
[
[
'data1'
,
30
,
200
,
100
,
400
,
150
,
250
],
[
'data2'
,
130
,
100
,
200
,
100
,
150
,
150
]
],
axes
:
{
data2
:
'y2'
},
},
},
legend
:
{
position
:
'right'
},
subchart
:
{
show
:
true
},
axis
:
{
rotated
:
true
,
y
:
{
y
:
{
label
:
{
text
:
'Y Label'
,
position
:
'outer-center'
}
},
y2
:
{
show
:
true
,
show
:
true
,
label
:
{
text
:
'Y2 Label'
,
position
:
'outer-center'
}
}
}
}
}
}
)
;
};
var
chart5
=
c3
.
generate
({
bindto
:
'#chart5'
,
option
.
bindto
=
'#chart1'
;
padding
:
{
var
chart1
=
c3
.
generate
(
option
);
option
.
bindto
=
'#chart2'
;
option
.
legend
.
position
=
'right'
var
chart2
=
c3
.
generate
(
option
);
option
.
bindto
=
'#chart3'
;
option
.
legend
.
position
=
'bottom'
;
option
.
subchart
.
show
=
true
;
var
chart3
=
c3
.
generate
(
option
);
option
.
bindto
=
'#chart4'
;
option
.
legend
.
position
=
'right'
;
option
.
subchart
.
show
=
true
;
var
chart4
=
c3
.
generate
(
option
);
option
.
bindto
=
'#chart5'
;
option
.
padding
=
{
top
:
0
,
top
:
0
,
right
:
0
,
right
:
0
,
bottom
:
0
,
bottom
:
0
,
left
:
0
,
left
:
0
,
},
};
data
:
{
option
.
subchart
.
show
=
false
;
columns
:
[
option
.
legend
.
position
=
'bottom'
;
[
'data1'
,
30
,
200
,
100
,
400
,
150
,
250
],
var
chart5
=
c3
.
generate
(
option
);
[
'data2'
,
130
,
100
,
200
,
100
,
150
,
150
]
],
axes
:
{
option
.
axis
.
rotated
=
false
;
data2
:
'y2'
},
option
.
bindto
=
'#chart6'
;
},
var
chart6
=
c3
.
generate
(
option
);
axis
:
{
rotated
:
true
,
option
.
bindto
=
'#chart7'
;
y
:
{
option
.
legend
.
position
=
'right'
label
:
{
var
chart7
=
c3
.
generate
(
option
);
text
:
'Y Label'
,
position
:
'outer-center'
option
.
bindto
=
'#chart8'
;
}
option
.
legend
.
position
=
'bottom'
;
},
option
.
subchart
.
show
=
true
;
y2
:
{
var
chart8
=
c3
.
generate
(
option
);
show
:
true
,
label
:
{
option
.
bindto
=
'#chart9'
;
text
:
'Y2 Label'
,
option
.
legend
.
position
=
'right'
;
position
:
'outer-center'
option
.
subchart
.
show
=
true
;
}
var
chart9
=
c3
.
generate
(
option
);
}
}
option
.
bindto
=
'#chart10'
;
});
option
.
padding
=
{
top
:
0
,
right
:
0
,
bottom
:
0
,
left
:
0
,
};
option
.
subchart
.
show
=
false
;
option
.
legend
.
position
=
'bottom'
;
var
chart10
=
c3
.
generate
(
option
);
</script>
</script>
</body>
</body>
...
...
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