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
8ed588a3
Commit
8ed588a3
authored
May 23, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deviceWISE-master'
parents
e6919a01
9a61819b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
168 additions
and
2 deletions
+168
-2
c3.css
c3.css
+25
-1
c3.js
c3.js
+0
-0
c3.min.js
c3.min.js
+0
-0
index.html
htdocs/index.html
+6
-1
chart_arc_gauge.html
htdocs/samples/chart_arc_gauge.html
+137
-0
No files found.
c3.css
View file @
8ed588a3
...
...
@@ -84,6 +84,9 @@
/*-- Bar --*/
.c3-bar
{
stroke-width
:
0
;
}
.c3-bar._expanded_
{
fill-opacity
:
0.75
;
}
...
...
@@ -96,7 +99,7 @@
/*-- Focus --*/
.c3-target.c3-focused
path
.c3-line
{
.c3-target.c3-focused
path
.c3-line
,
.c3-target.c3-focused
path
.c3-step
{
stroke-width
:
2px
;
}
...
...
@@ -166,3 +169,23 @@
stroke-width
:
0
;
opacity
:
0.2
;
}
.c3-chart-arcs
.c3-chart-arcs-background
{
fill
:
#e0e0e0
;
stroke
:
none
;
}
.c3-chart-arcs
.c3-chart-arcs-gauge-unit
{
fill
:
#000
;
font-size
:
16px
;
}
.c3-chart-arcs
.c3-chart-arcs-gauge-max
{
fill
:
#777
;
}
.c3-chart-arcs
.c3-chart-arcs-gauge-min
{
fill
:
#777
;
}
.c3-chart-arc
.c3-gauge-value
{
fill
:
#000
;
font-size
:
28px
;
}
\ No newline at end of file
c3.js
View file @
8ed588a3
This diff is collapsed.
Click to expand it.
c3.min.js
View file @
8ed588a3
This source diff could not be displayed because it is too large. You can
view the blob
instead.
htdocs/index.html
View file @
8ed588a3
...
...
@@ -44,7 +44,7 @@
<h3>
Specify Axis Min/Max Values
</h3>
<p>
You can specify your own min/max values for each axis.
</p>
<p><a
class=
"btn btn-default"
href=
"./samples/axes_minmax.html"
role=
"button"
>
View details
»
</a></p>
</div>
</div>
</div>
</div>
</div>
...
...
@@ -108,6 +108,11 @@
<p>
Display as Bar Chart
</p>
<p><a
class=
"btn btn-default"
href=
"./samples/chart_combination.html"
role=
"button"
>
View details
»
</a></p>
</div>
<div
class=
"col-md-4"
>
<h3>
Arc Gauge
</h3>
<p>
Display as Arc Gauge
</p>
<p><a
class=
"btn btn-default"
href=
"./samples/chart_arc_gauge.html"
role=
"button"
>
View details
»
</a></p>
</div>
</div>
</div>
</div>
...
...
htdocs/samples/chart_arc_gauge.html
0 → 100644
View file @
8ed588a3
<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
:
{
columns
:
[
[
'data'
,
91.4
]
],
type
:
'gauge'
},
gauge
:
{
label
:
{
// format: function(value, ratio) {
// return value;
// },
// show: false // to turn off the min/max labels.
},
// min: 0, // 0 is default, //can handle negative min e.g. vacuum / voltage / current flow / rate of change
// max: 100, // 100 is default
// units: ' %',
// width: 39 // for adjusting arc thickness
},
color
:
{
pattern
:
[
'#FF0000'
,
'#F6C600'
,
'#60B044'
],
// the three color levels for the percentage values.
threshold
:
{
// unit: 'value', // percentage is default
// max: 200, // 100 is default
values
:
[
30
,
60
,
90
]
// alternate first value is 'value'
}
}
});
var
cycleDemo
=
function
()
{
setTimeout
(
function
()
{
chart
=
chart
.
update
([
'gauge'
,
'color'
],
''
);
},
1000
);
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[[
'data'
,
10
]]
});
},
2000
);
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[[
'%'
,
50
]]
});
},
3000
);
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[[
'%'
,
91.4
]]
});
},
4000
);
// setTimeout(function () {
// chart = chart.update(['gauge', 'color'], '#e0e0e0');
// }, 5000);
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[[
'%'
,
0
]]
});
},
6000
);
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[[
'%'
,
50
]]
});
},
7000
);
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[[
'%'
,
91.4
]]
});
},
8000
);
// setTimeout(function () {
// chart = chart.update(['gauge', 'width'], 10);
// }, 9000);
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[[
'%'
,
0
]]
});
},
10000
);
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[[
'%'
,
50
]]
});
},
11000
);
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[[
'%'
,
91.4
]]
});
},
12000
);
// setTimeout(function () {
// chart = chart.update(['gauge', 'width'], 39);
// }, 13000);
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[[
'%'
,
0
]]
});
},
14000
);
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[[
'%'
,
50
]]
});
},
15000
);
setTimeout
(
function
()
{
chart
.
load
({
columns
:
[[
'%'
,
91.4
]]
});
},
16000
);
}
cycleDemo
();
// setInterval(cycleDemo, 30000);
</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