From eb3fb4965b4068760de0fd62b996258a80192ab4 Mon Sep 17 00:00:00 2001 From: Masayuki Tanaka Date: Fri, 6 Jun 2014 09:57:18 +0900 Subject: [PATCH] Add sample for area chart --- htdocs/index.html | 13 ++++- htdocs/samples/chart_area.html | 22 +++++--- htdocs/samples/chart_area_spline.html | 49 +++++++++++++++++ htdocs/samples/chart_area_spline_stacked.html | 52 +++++++++++++++++++ htdocs/samples/chart_area_stacked.html | 52 +++++++++++++++++++ htdocs/samples/chart_area_step.html | 49 +++++++++++++++++ htdocs/samples/chart_area_step_stacked.html | 52 +++++++++++++++++++ 7 files changed, 279 insertions(+), 10 deletions(-) create mode 100644 htdocs/samples/chart_area_spline.html create mode 100644 htdocs/samples/chart_area_spline_stacked.html create mode 100644 htdocs/samples/chart_area_stacked.html create mode 100644 htdocs/samples/chart_area_step.html create mode 100644 htdocs/samples/chart_area_step_stacked.html diff --git a/htdocs/index.html b/htdocs/index.html index f5fec45..c540401 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -26,12 +26,21 @@ Area chart with ordinary data - + Area-spline chart with ordinary data - + Area-step chart with ordinary data + + Stacked Area chart with ordinary data + + + Stacked Area-spline chart with ordinary data + + + Stacked Area-step chart with ordinary data +

Bar Chart

diff --git a/htdocs/samples/chart_area.html b/htdocs/samples/chart_area.html index e74a28d..6e06c01 100644 --- a/htdocs/samples/chart_area.html +++ b/htdocs/samples/chart_area.html @@ -5,6 +5,7 @@
+
@@ -17,10 +18,7 @@ ['data1', 300, 350, 300, 0, 0, 0], ['data2', 130, 100, 140, 200, 150, 50] ], - types: { - data1: 'area', - data2: 'area-spline' - } + type: 'area' } }); @@ -31,10 +29,18 @@ ['data1', -300, -350, -300, 0, 0, 0], ['data2', -130, -100, -140, -200, -150, -50] ], - types: { - data1: 'area', - data2: 'area-spline' - } + type: 'area' + } + }); + + var chart3 = c3.generate({ + bindto: '#chart3', + data: { + columns: [ + ['data1', -300, 350, -300, 0, 0, 0], + ['data2', -130, -100, 140, -200, 150, -50] + ], + type: 'area' } }); diff --git a/htdocs/samples/chart_area_spline.html b/htdocs/samples/chart_area_spline.html new file mode 100644 index 0000000..836474a --- /dev/null +++ b/htdocs/samples/chart_area_spline.html @@ -0,0 +1,49 @@ + + + + + +
+
+
+ + + + + + diff --git a/htdocs/samples/chart_area_spline_stacked.html b/htdocs/samples/chart_area_spline_stacked.html new file mode 100644 index 0000000..e01b0bd --- /dev/null +++ b/htdocs/samples/chart_area_spline_stacked.html @@ -0,0 +1,52 @@ + + + + + +
+
+
+ + + + + + diff --git a/htdocs/samples/chart_area_stacked.html b/htdocs/samples/chart_area_stacked.html new file mode 100644 index 0000000..3545e53 --- /dev/null +++ b/htdocs/samples/chart_area_stacked.html @@ -0,0 +1,52 @@ + + + + + +
+
+
+ + + + + + diff --git a/htdocs/samples/chart_area_step.html b/htdocs/samples/chart_area_step.html new file mode 100644 index 0000000..2ba7a27 --- /dev/null +++ b/htdocs/samples/chart_area_step.html @@ -0,0 +1,49 @@ + + + + + +
+
+
+ + + + + + diff --git a/htdocs/samples/chart_area_step_stacked.html b/htdocs/samples/chart_area_step_stacked.html new file mode 100644 index 0000000..ce470e4 --- /dev/null +++ b/htdocs/samples/chart_area_step_stacked.html @@ -0,0 +1,52 @@ + + + + + +
+
+
+ + + + + +