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
473ae53b
Commit
473ae53b
authored
Mar 31, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sample for custom x on categorized axis
parent
f7b9bfca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
0 deletions
+90
-0
c3_test3.csv
htdocs/data/c3_test3.csv
+4
-0
custom_x_categorized.html
htdocs/samples/custom_x_categorized.html
+86
-0
No files found.
htdocs/data/c3_test3.csv
0 → 100644
View file @
473ae53b
x,download,loading
www.hogehoge.com,30,19
www.aaaa.com,30,13
www.bb.com,20,24
htdocs/samples/custom_x_categorized.html
0 → 100644
View file @
473ae53b
<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
:
{
x
:
'x'
,
columns
:
[
[
'x'
,
'www.google.com'
,
'www.amazon.com'
,
'www.facebook.com'
,
'www.apple.com'
],
[
'download'
,
30
,
200
,
100
,
400
],
[
'loading'
,
90
,
100
,
140
,
200
],
],
groups
:
[
[
'download'
,
'loading'
]
],
type
:
'bar'
},
axis
:
{
x
:
{
type
:
'categorized'
,
label
:
'X Label'
},
y
:
{
label
:
{
text
:
'Y Label'
,
position
:
'outer-middle'
}
}
}
});
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[
[
'x'
,
'www.yahoo.com'
,
'www.rakuten.com'
,
'www.mixi.com'
,
'www.sony.com'
],
[
'download'
,
130
,
300
,
200
,
470
],
[
'loading'
,
190
,
130
,
240
,
340
],
],
});
},
1000
);
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[
[
'x'
,
'www.hogehoge.com'
,
'www.aaaa.com'
,
'www.aaaa.com'
],
[
'download'
,
130
,
300
,
200
],
[
'loading'
,
190
,
130
,
240
],
],
});
},
2000
);
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[
[
'x'
,
'www.yahoo.com'
,
'www.rakuten.com'
,
'www.mixi.com'
,
'www.sony.com'
],
[
'download'
,
130
,
300
,
200
,
470
],
[
'loading'
,
190
,
130
,
240
,
340
],
],
});
},
3000
);
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[
[
'download'
,
30
,
30
,
20
,
170
],
[
'loading'
,
90
,
30
,
40
,
40
],
],
});
},
4000
);
setTimeout
(
function
()
{
chart
.
load
({
url
:
'/data/c3_test3.csv'
});
},
5000
);
</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