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
5b6b5a26
Commit
5b6b5a26
authored
Jun 15, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add area.zerobased option - #360
parent
fa669e81
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
1 deletion
+35
-1
c3.js
c3.js
+4
-1
c3.min.js
c3.min.js
+0
-0
index.html
htdocs/index.html
+6
-0
area_zerobased.html
htdocs/samples/area_zerobased.html
+25
-0
No files found.
c3.js
View file @
5b6b5a26
...
...
@@ -257,6 +257,9 @@
__bar_width_ratio
=
getConfig
([
'bar'
,
'width'
,
'ratio'
],
0.6
),
__bar_zerobased
=
getConfig
([
'bar'
,
'zerobased'
],
true
);
// area
var
__area_zerobased
=
getConfig
([
'area'
,
'zerobased'
],
true
);
// pie
var
__pie_label_show
=
getConfig
([
'pie'
,
'label'
,
'show'
],
true
),
__pie_label_format
=
getConfig
([
'pie'
,
'label'
,
'format'
]),
...
...
@@ -1261,7 +1264,7 @@
domainLength
,
padding
,
padding_top
,
padding_bottom
,
center
=
axisId
===
'y2'
?
__axis_y2_center
:
__axis_y_center
,
yDomainAbs
,
lengths
,
diff
,
ratio
,
isAllPositive
,
isAllNegative
,
isZeroBased
=
(
hasBarType
(
yTargets
)
&&
__bar_zerobased
)
||
hasAreaType
(
yTargets
),
isZeroBased
=
(
hasBarType
(
yTargets
)
&&
__bar_zerobased
)
||
(
hasAreaType
(
yTargets
)
&&
__area_zerobased
),
showHorizontalDataLabel
=
hasDataLabel
()
&&
__axis_rotated
,
showVerticalDataLabel
=
hasDataLabel
()
&&
!
__axis_rotated
;
if
(
yTargets
.
length
===
0
)
{
// use current domain if target of axisId is none
...
...
c3.min.js
View file @
5b6b5a26
This source diff could not be displayed because it is too large. You can
view the blob
instead.
htdocs/index.html
View file @
5b6b5a26
...
...
@@ -319,6 +319,12 @@
Disable zero-based y domain
</a>
</div>
<div
class=
"col-md-4"
>
<h3>
Area
</h3>
<a
href=
"./samples/area_zerobased.html"
>
Disable zero-based y domain
</a>
</div>
</div>
</div>
</div>
...
...
htdocs/samples/area_zerobased.html
0 → 100644
View file @
5b6b5a26
<html>
<head>
<link
href=
"/css/c3.css"
rel=
"stylesheet"
type=
"text/css"
>
</head>
<body>
<div
id=
"chart"
></div>
<script
src=
"http://d3js.org/d3.v3.min.js"
charset=
"utf-8"
></script>
<script
src=
"/js/c3.js"
></script>
<script>
var
chart
=
c3
.
generate
({
data
:
{
columns
:
[
[
'data1'
,
1030
,
1200
,
1100
,
1400
,
1150
,
1250
],
[
'data2'
,
2130
,
2100
,
2140
,
2200
,
2150
,
1850
]
],
type
:
'area'
,
},
area
:
{
zerobased
:
false
}
});
</script>
</body>
</html>
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