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
31f15e0b
Commit
31f15e0b
authored
May 19, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #246 from edwardvk/master
Added an example on how to set the min/max values for an axis.
parents
11fff91e
30a04b32
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
index.html
htdocs/index.html
+5
-0
axes_minmax.html
htdocs/samples/axes_minmax.html
+29
-0
No files found.
htdocs/index.html
View file @
31f15e0b
...
@@ -40,6 +40,11 @@
...
@@ -40,6 +40,11 @@
<p>
Additional y axis can be added.
</p>
<p>
Additional y axis can be added.
</p>
<p><a
class=
"btn btn-default"
href=
"./samples/axes_y2.html"
role=
"button"
>
View details
»
</a></p>
<p><a
class=
"btn btn-default"
href=
"./samples/axes_y2.html"
role=
"button"
>
View details
»
</a></p>
</div>
</div>
<div
class=
"col-md-4"
>
<h3>
Specify Axis Min/Max Values
</h3>
<p>
You can specify your own min/max values for each axis.
</p>
<p><a
class=
"btn btn-default"
href=
"./samples/axes_minmax.html"
role=
"button"
>
View details
»
</a></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
htdocs/samples/axes_minmax.html
0 → 100644
View file @
31f15e0b
<html>
<head>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/c3.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
({
bindto
:
'#chart'
,
data
:
{
columns
:
[
[
'sample'
,
100
,
200
,
100
,
400
,
150
,
250
]
],
onclick
:
function
(
d
,
element
)
{
console
.
log
(
"onclick"
,
d
,
element
);
},
onenter
:
function
(
d
)
{
console
.
log
(
"onenter"
,
d
);
},
onleave
:
function
(
d
)
{
console
.
log
(
"onleave"
,
d
);
},
},
axis
:
{
y
:
{
min
:
0
}
},
});
</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