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
deda98d3
Commit
deda98d3
authored
May 30, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sample for zoom
parent
97ae8242
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
zoom.html
htdocs/samples/zoom.html
+42
-0
No files found.
htdocs/samples/zoom.html
0 → 100644
View file @
deda98d3
<html>
<head>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/c3.css"
>
</head>
<body>
<div
id=
"chart"
></div>
<button
onclick=
"load()"
>
Load
</button>
<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
:
[
generateData
(
100
)
],
},
zoom
:
{
enabled
:
true
},
subchart
:
{
show
:
true
}
});
function
load
()
{
chart
.
load
({
columns
:
[
generateData
(
Math
.
random
()
*
1000
)
],
});
}
function
generateData
(
n
)
{
var
column
=
[
'sample'
];
for
(
var
i
=
0
;
i
<
n
;
i
++
)
{
column
.
push
(
Math
.
random
()
*
500
);
}
return
column
;
}
</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