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
5d767241
Commit
5d767241
authored
Apr 29, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update samples
parent
0f3d7356
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
95 additions
and
5 deletions
+95
-5
c3_test2_ts.csv
htdocs/data/c3_test2_ts.csv
+7
-0
c3_test_ts.csv
htdocs/data/c3_test_ts.csv
+7
-0
custom_x_scale.html
htdocs/samples/custom_x_scale.html
+9
-0
custom_xs_scale.html
htdocs/samples/custom_xs_scale.html
+19
-5
data_load_timeseries.html
htdocs/samples/data_load_timeseries.html
+53
-0
No files found.
htdocs/data/c3_test2_ts.csv
0 → 100644
View file @
5d767241
x,data1,data2,data3
2013-04-01,20,180,400
2013-04-02,40,150,310
2013-04-03,70,120,470
2013-04-04,50,170,400
2013-04-05,80,200,380
\ No newline at end of file
htdocs/data/c3_test_ts.csv
0 → 100644
View file @
5d767241
x,data1,data2,data3
2012-12-31,120,80,200
2013-01-01,140,50,210
2013-01-02,170,100,250
2013-01-03,150,70,300
2013-01-04,180,120,280
\ No newline at end of file
htdocs/samples/custom_x_scale.html
View file @
5d767241
...
...
@@ -36,6 +36,15 @@
setTimeout
(
function
()
{
chart
.
x
([
200
,
210
,
350
,
400
,
550
,
750
]);
},
2000
);
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[
[
'data3'
,
300
,
410
,
350
,
400
,
500
,
350
],
]
});
},
3000
);
</script>
</body>
</html>
htdocs/samples/custom_xs_scale.html
View file @
5d767241
...
...
@@ -26,24 +26,38 @@
},
onenter
:
function
(
d
)
{
console
.
log
(
"onenter"
,
d
);
},
onleave
:
function
(
d
)
{
console
.
log
(
"onleave"
,
d
);
}
}
,
}
});
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[
[
'data1'
,
100
,
210
,
150
,
200
,
null
,
150
],
[
'data1'
,
100
,
210
,
150
,
null
,
200
,
150
],
[
'data2'
,
200
,
310
,
50
,
400
,
120
,
250
,
10
],
]
});
},
1000
);
setTimeout
(
function
()
{
chart
.
xs
({
'data1'
:
[
200
,
210
,
350
,
400
,
600
,
750
]
// 'data2': [200, 210, 350, 400, 550, 750, 900]
chart
.
load
({
columns
:
[
[
'x2'
,
150
,
220
,
230
,
400
,
540
,
600
,
800
],
[
'data2'
,
200
,
310
,
50
,
400
,
120
,
250
,
10
],
[
'data3'
,
300
,
410
,
350
,
600
,
420
,
550
,
310
],
],
xs
:
{
data3
:
'x2'
}
});
},
2000
);
setTimeout
(
function
()
{
chart
.
xs
({
'data1'
:
[
200
,
210
,
350
,
400
,
600
,
750
],
'data2'
:
[
200
,
210
,
350
,
400
,
550
,
750
,
900
]
});
},
3000
);
</script>
</body>
</html>
htdocs/samples/data_load_timeseries.html
0 → 100644
View file @
5d767241
<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
:
{
x
:
'x'
,
url
:
'/data/c3_test_ts.csv'
,
labels
:
true
},
axis
:
{
x
:
{
type
:
'timeseries'
}
},
subchart
:
{
show
:
true
},
zoom
:
{
enabled
:
true
},
});
setTimeout
(
function
()
{
chart
.
load
({
url
:
'/data/c3_test2_ts.csv'
});
},
1000
);
setTimeout
(
function
()
{
chart
.
unload
(
'data2'
);
},
2000
);
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[
[
'data1'
,
30
,
20
,
50
,
40
,
60
,
50
],
],
unload
:
true
,
// unload: ['data2', 'data3'],
// unload: ['data2']
});
},
3000
);
</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