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
bd02e0f1
Commit
bd02e0f1
authored
Mar 31, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update sample for custom x
parent
437f1b34
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
1 deletion
+66
-1
custom_x_scale.html
htdocs/samples/custom_x_scale.html
+17
-1
custom_xs_scale.html
htdocs/samples/custom_xs_scale.html
+49
-0
No files found.
htdocs/samples/custom_x_scale.html
View file @
bd02e0f1
...
...
@@ -14,12 +14,28 @@
x
:
'x'
,
columns
:
[
[
'x'
,
100
,
120
,
130
,
200
,
240
,
500
],
[
'sample'
,
30
,
200
,
100
,
400
,
150
,
250
]
[
'data1'
,
30
,
200
,
100
,
400
,
150
,
250
],
[
'data2'
,
130
,
100
,
300
,
200
,
250
,
350
],
],
selection
:
{
enabled
:
true
},
onenter
:
function
(
d
)
{
console
.
log
(
"onenter"
,
d
);
},
onleave
:
function
(
d
)
{
console
.
log
(
"onleave"
,
d
);
}
},
});
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[
[
'data1'
,
100
,
210
,
150
,
200
,
100
,
150
],
]
});
},
1000
);
setTimeout
(
function
()
{
chart
.
x
([
200
,
210
,
350
,
400
,
550
,
750
]);
},
2000
);
</script>
</body>
</html>
htdocs/samples/custom_xs_scale.html
0 → 100644
View file @
bd02e0f1
<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
:
{
xs
:
{
'data1'
:
'x1'
,
'data2'
:
'x2'
,
},
columns
:
[
[
'x1'
,
100
,
120
,
130
,
200
,
240
,
500
],
[
'x2'
,
150
,
220
,
230
,
400
,
540
,
600
,
800
],
[
'data1'
,
30
,
200
,
100
,
400
,
150
,
250
],
[
'data2'
,
130
,
100
,
300
,
200
,
250
,
350
,
100
],
],
selection
:
{
enabled
:
true
},
onenter
:
function
(
d
)
{
console
.
log
(
"onenter"
,
d
);
},
onleave
:
function
(
d
)
{
console
.
log
(
"onleave"
,
d
);
}
},
});
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[
[
'data1'
,
100
,
210
,
150
,
200
,
100
,
150
],
[
'data2'
,
200
,
310
,
50
,
400
,
120
,
250
,
10
],
]
});
},
1000
);
setTimeout
(
function
()
{
chart
.
xs
({
// 'data1': [200, 210, 350, 400, 550, 750]
'data2'
:
[
200
,
210
,
350
,
400
,
550
,
750
,
900
]
});
},
2000
);
</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