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
ee660649
Commit
ee660649
authored
Jun 06, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix grid/axis sample for timeseries as number - #311
parent
d7b7b064
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
137 additions
and
1 deletion
+137
-1
index.html
htdocs/index.html
+7
-1
axes_x_range_timeseries.html
htdocs/samples/axes_x_range_timeseries.html
+57
-0
grid_x_lines_timeseries.html
htdocs/samples/grid_x_lines_timeseries.html
+73
-0
No files found.
htdocs/index.html
View file @
ee660649
...
...
@@ -139,6 +139,9 @@
<a
href=
"./samples/axes_x_tick_rotate.html"
target=
"_blank"
>
Set rotation for x axis
</a>
<a
href=
"./samples/axes_x_range_timeseries.html"
target=
"_blank"
>
Set range in timeseries for x axis
</a>
</div>
</div>
<div
class=
"row"
>
...
...
@@ -226,11 +229,14 @@
Show x/y grids
</a>
<a
href=
"./samples/grids_timeseries.html"
target=
"_blank"
>
Show x/y grids with timeseries
»
Show x/y grids with timeseries
</a>
<a
href=
"./samples/grid_x_lines.html"
target=
"_blank"
>
Show optional x grids
</a>
<a
href=
"./samples/grid_x_lines_timeseries.html"
target=
"_blank"
>
Show optional x grids with timeseries
</a>
</div>
<div
class=
"col-md-4"
>
<h3>
Region
</h3>
...
...
htdocs/samples/axes_x_range_timeseries.html
0 → 100644
View file @
ee660649
<html>
<head>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/c3.css"
>
</head>
<body>
<div
id=
"chart1"
></div>
<div
id=
"chart2"
></div>
<script
src=
"http://d3js.org/d3.v3.min.js"
charset=
"utf-8"
></script>
<script
src=
"/js/c3.js"
></script>
<script>
var
chart1
=
c3
.
generate
({
"bindto"
:
"#chart1"
,
"axis"
:
{
"x"
:
{
"type"
:
"timeseries"
,
"min"
:
1401879600000
,
"max"
:
1401969600000
,
}
},
"data"
:
{
"type"
:
"line"
,
"columns"
:
[
[
"epoch"
,
1401879600000
,
1401883200000
,
1401886800000
],
[
"y"
,
1955
,
2419
,
2262
]
],
"xs"
:
{
"y"
:
"epoch"
}
}
});
var
chart2
=
c3
.
generate
({
"bindto"
:
"#chart2"
,
"axis"
:
{
"x"
:
{
"type"
:
"timeseries"
,
"min"
:
new
Date
(
1401879600000
),
"max"
:
new
Date
(
1401969600000
),
}
},
"data"
:
{
"type"
:
"line"
,
"columns"
:
[
[
"epoch"
,
1401879600000
,
1401883200000
,
1401886800000
],
[
"y"
,
1955
,
2419
,
2262
]
],
"xs"
:
{
"y"
:
"epoch"
}
}
});
</script>
</body>
</html>
htdocs/samples/grid_x_lines_timeseries.html
0 → 100644
View file @
ee660649
<html>
<head>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/c3.css"
>
</head>
<body>
<div
id=
"chart1"
></div>
<div
id=
"chart2"
></div>
<script
src=
"http://d3js.org/d3.v3.min.js"
charset=
"utf-8"
></script>
<script
src=
"/js/c3.js"
></script>
<script>
var
chart1
=
c3
.
generate
({
"bindto"
:
"#chart1"
,
"axis"
:
{
"x"
:
{
"type"
:
"timeseries"
,
"tick"
:
{
format
:
'%Y-%m-%d %H:%M:%S'
}
}
},
"grid"
:
{
"x"
:
{
"lines"
:
[
{
"value"
:
1401883200000
,
"text"
:
new
Date
(
1401883200000
),
"color"
:
"#f00"
},
]
}
},
"data"
:
{
"type"
:
"line"
,
"columns"
:
[
[
"epoch"
,
1401879600000
,
1401883200000
,
1401886800000
],
[
"y"
,
1955
,
2419
,
2262
]
],
"xs"
:
{
"y"
:
"epoch"
}
}
});
var
chart2
=
c3
.
generate
({
"bindto"
:
"#chart2"
,
"axis"
:
{
"x"
:
{
"type"
:
"timeseries"
,
"tick"
:
{
format
:
'%Y-%m-%d %H:%M:%S'
}
}
},
"grid"
:
{
"x"
:
{
"lines"
:
[
{
"value"
:
new
Date
(
1401883200000
),
"text"
:
new
Date
(
1401883200000
),
"color"
:
"#f00"
},
]
}
},
"data"
:
{
"type"
:
"line"
,
"columns"
:
[
[
"epoch"
,
1401879600000
,
1401883200000
,
1401886800000
],
[
"y"
,
1955
,
2419
,
2262
]
],
"xs"
:
{
"y"
:
"epoch"
}
}
});
</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