]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Reorganize samples and list them in index.html (#4043)
authorSimon Brunel <simonbrunel@users.noreply.github.com>
Tue, 21 Mar 2017 00:40:44 +0000 (01:40 +0100)
committerEvert Timberg <evert.timberg+github@gmail.com>
Tue, 21 Mar 2017 00:40:44 +0000 (20:40 -0400)
54 files changed:
.codeclimate.yml
samples/advanced/data-labelling.html [moved from samples/data_labelling.html with 98% similarity]
samples/advanced/progress-bar.html [moved from samples/animation/progress-bar.html with 100% similarity]
samples/charts/area/analyser.js [moved from samples/area/analyser.js with 100% similarity]
samples/charts/area/line-boundaries.html [moved from samples/area/line-boundaries.html with 94% similarity]
samples/charts/area/line-datasets.html [moved from samples/area/line-datasets.html with 95% similarity]
samples/charts/area/line-stacked.html [moved from samples/line/line-stacked-area.html with 76% similarity]
samples/charts/area/radar.html [moved from samples/area/radar.html with 95% similarity]
samples/charts/bar/horizontal.html [moved from samples/bar/bar-horizontal.html with 88% similarity]
samples/charts/bar/multi-axis.html [moved from samples/bar/bar-multi-axis.html with 82% similarity]
samples/charts/bar/stacked-group.html [moved from samples/bar/bar-stacked-group.html with 73% similarity]
samples/charts/bar/stacked.html [moved from samples/bar/bar-stacked.html with 72% similarity]
samples/charts/bar/vertical.html [moved from samples/bar/bar.html with 87% similarity]
samples/charts/bubble.html [moved from samples/bubble.html with 98% similarity]
samples/charts/combo-bar-line.html [moved from samples/combo-bar-line.html with 72% similarity]
samples/charts/doughnut.html [moved from samples/doughnut.html with 97% similarity]
samples/charts/line/basic.html [moved from samples/line/line.html with 87% similarity]
samples/charts/line/interpolation-modes.html [moved from samples/line/interpolation-modes.html with 96% similarity]
samples/charts/line/line-styles.html [moved from samples/line/line-styles.html with 73% similarity]
samples/charts/line/multi-axis.html [moved from samples/line/line-multi-axis.html with 82% similarity]
samples/charts/line/point-sizes.html [moved from samples/line/different-point-sizes.html with 73% similarity]
samples/charts/line/point-styles.html [moved from samples/line/point-styles.html with 96% similarity]
samples/charts/line/skip-points.html [moved from samples/line/line-skip-points.html with 77% similarity]
samples/charts/line/stepped.html [moved from samples/line/line-stepped.html with 77% similarity]
samples/charts/pie.html [moved from samples/pie.html with 96% similarity]
samples/charts/polar-area.html [moved from samples/polar-area.html with 97% similarity]
samples/charts/radar-skip-points.html [moved from samples/radar/radar-skip-points.html with 100% similarity]
samples/charts/radar.html [moved from samples/radar/radar.html with 88% similarity]
samples/charts/scatter/basic.html [moved from samples/scatter/scatter.html with 97% similarity]
samples/charts/scatter/multi-axis.html [moved from samples/scatter/scatter-multi-axis.html with 97% similarity]
samples/favicon.ico [new file with mode: 0644]
samples/index.html [new file with mode: 0644]
samples/legend/point-style.html [moved from samples/legend/pointstyle.html with 100% similarity]
samples/legend/positioning.html [moved from samples/legend/positions.html with 100% similarity]
samples/logo.svg [new file with mode: 0644]
samples/samples.js [new file with mode: 0644]
samples/scales/gridlines-display.html [moved from samples/scales/display-settings.html with 100% similarity]
samples/scales/gridlines-style.html [moved from samples/scales/gridlines.html with 100% similarity]
samples/scales/linear/min-max-suggested.html [moved from samples/scales/linear/suggested-min-max-settings.html with 100% similarity]
samples/scales/linear/min-max.html [moved from samples/scales/linear/min-max-settings.html with 100% similarity]
samples/scales/logarithmic/line.html [moved from samples/scales/logarithmic/line-logarithmic.html with 100% similarity]
samples/scales/logarithmic/scatter.html [moved from samples/scales/logarithmic/scatter-logX.html with 100% similarity]
samples/scales/non-numeric-y.html [moved from samples/scales/line-non-numeric-y.html with 100% similarity]
samples/scales/time/combo.html [moved from samples/scales/time/combo-time-scale.html with 100% similarity]
samples/scales/time/line-point-data.html [moved from samples/scales/time/line-time-point-data.html with 100% similarity]
samples/scales/time/line.html [moved from samples/scales/time/line-time-scale.html with 100% similarity]
samples/style.css
samples/tooltips/border.html [moved from samples/tooltips/tooltip-border.html with 100% similarity]
samples/tooltips/callbacks.html [moved from samples/tooltips/tooltip-callbacks.html with 100% similarity]
samples/tooltips/custom-line.html [moved from samples/tooltips/line-customTooltips.html with 100% similarity]
samples/tooltips/custom-pie.html [moved from samples/tooltips/pie-customTooltips.html with 100% similarity]
samples/tooltips/custom-points.html [moved from samples/tooltips/dataPoints-customTooltips.html with 100% similarity]
samples/tooltips/interactions.html [moved from samples/tooltips/interaction-modes.html with 100% similarity]
samples/tooltips/positioning.html [moved from samples/tooltips/position-modes.html with 100% similarity]

index ee3a5fdacb74fb0318175f33513f41b2f5d44e90..99e66913cb2ddad1af546a82fa930ec1c06be33a 100644 (file)
@@ -4,6 +4,8 @@ engines:
     config:
       languages:
       - javascript
+    exclude_paths:
+    - "samples/samples.js"
   eslint:
     enabled: true
     channel: "eslint-3"
similarity index 98%
rename from samples/data_labelling.html
rename to samples/advanced/data-labelling.html
index 8c64bcf09204b3298ca304e74b3afdd3c20b0c30..17fc47c8f99d2aa7d50ad889c12b182078c48777 100644 (file)
@@ -4,8 +4,8 @@
 
 <head>
     <title>Labelling Data Points</title>
-    <script src="../dist/Chart.bundle.js"></script>
-    <script src="utils.js"></script>
+    <script src="../../dist/Chart.bundle.js"></script>
+    <script src="../utils.js"></script>
     <style>
     canvas {
         -moz-user-select: none;
similarity index 94%
rename from samples/area/line-boundaries.html
rename to samples/charts/area/line-boundaries.html
index ca0aab3a79e1de2a6559a885c241a634a2f6eb40..6f1f927a920ac22a08c0a762a12834c1e070c15f 100644 (file)
@@ -5,9 +5,9 @@
        <meta http-equiv="X-UA-Compatible" content="IE=Edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>area > boundaries | Chart.js sample</title>
-       <link rel="stylesheet" type="text/css" href="../style.css">
-       <script src="../../dist/Chart.bundle.js"></script>
-       <script src="../utils.js"></script>
+       <link rel="stylesheet" type="text/css" href="../../style.css">
+       <script src="../../../dist/Chart.bundle.js"></script>
+       <script src="../../utils.js"></script>
        <script src="analyser.js"></script>
 </head>
 <body>
similarity index 95%
rename from samples/area/line-datasets.html
rename to samples/charts/area/line-datasets.html
index 37719df26b38a8adadf9f2fea4c010e2f14d7c01..7bc54e3138ac958ac653fc3ce0fc8719ce685ce3 100644 (file)
@@ -5,9 +5,9 @@
        <meta http-equiv="X-UA-Compatible" content="IE=Edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>area > datasets | Chart.js sample</title>
-       <link rel="stylesheet" type="text/css" href="../style.css">
-       <script src="../../dist/Chart.bundle.js"></script>
-       <script src="../utils.js"></script>
+       <link rel="stylesheet" type="text/css" href="../../style.css">
+       <script src="../../../dist/Chart.bundle.js"></script>
+       <script src="../../utils.js"></script>
        <script src="analyser.js"></script>
 </head>
 <body>
similarity index 76%
rename from samples/line/line-stacked-area.html
rename to samples/charts/area/line-stacked.html
index 041c9a84b728eca33199fe127a34b05460b077fb..26ee6b18f8f1edc2dcef09121caeae51a28fd0cc 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
        <title>Line Chart</title>
-       <script src="../../dist/Chart.bundle.js"></script>
-       <script src="../utils.js"></script>
+       <script src="../../../dist/Chart.bundle.js"></script>
+       <script src="../../utils.js"></script>
        <style>
                canvas {
                                -moz-user-select: none;
                                        borderColor: window.chartColors.red,
                                        backgroundColor: window.chartColors.red,
                                        data: [
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
                         randomScalingFactor()
                     ],
                                }, {
                                        borderColor: window.chartColors.blue,
                                        backgroundColor: window.chartColors.blue,
                                        data: [
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
                         randomScalingFactor()
                     ],
                                }, {
                                        borderColor: window.chartColors.green,
                                        backgroundColor: window.chartColors.green,
                                        data: [
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
                         randomScalingFactor()
                     ],
                                }, {
                                        borderColor: window.chartColors.yellow,
                                        backgroundColor: window.chartColors.yellow,
                                        data: [
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
                         randomScalingFactor()
                     ],
                                }]
similarity index 95%
rename from samples/area/radar.html
rename to samples/charts/area/radar.html
index 23f2bdd36277f0f910557c3fcae6813be84e2744..1c5a0df9ecd2de99bd35b0f25c8167b16fe98cd2 100644 (file)
@@ -5,9 +5,9 @@
        <meta http-equiv="X-UA-Compatible" content="IE=Edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>area > radar | Chart.js sample</title>
-       <link rel="stylesheet" type="text/css" href="../style.css">
-       <script src="../../dist/Chart.bundle.js"></script>
-       <script src="../utils.js"></script>
+       <link rel="stylesheet" type="text/css" href="../../style.css">
+       <script src="../../../dist/Chart.bundle.js"></script>
+       <script src="../../utils.js"></script>
        <script src="analyser.js"></script>
 </head>
 <body>
similarity index 88%
rename from samples/bar/bar-horizontal.html
rename to samples/charts/bar/horizontal.html
index affcc334927d6eb8a71576ca62ef3b7e15bf33a0..0cfb78e84d04e4cdd2c3315d47a209fc07b146f0 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
     <title>Horizontal Bar Chart</title>
-    <script src="../../dist/Chart.bundle.js"></script>
-    <script src="../utils.js"></script>
+    <script src="../../../dist/Chart.bundle.js"></script>
+    <script src="../../utils.js"></script>
     <style>
     canvas {
         -moz-user-select: none;
                 borderColor: window.chartColors.red,
                 borderWidth: 1,
                 data: [
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
                     randomScalingFactor()
                 ]
             }, {
                 backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
                 borderColor: window.chartColors.blue,
                 data: [
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
                     randomScalingFactor()
                 ]
             }]
similarity index 82%
rename from samples/bar/bar-multi-axis.html
rename to samples/charts/bar/multi-axis.html
index b35e89055ea77257bd9087c55f8da099072b9448..28755a701a5fd1c8597cf5d6d0daa72edb5a2bf8 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
     <title>Bar Chart Multi Axis</title>
-    <script src="../../dist/Chart.bundle.js"></script>
-    <script src="../utils.js"></script>
+    <script src="../../../dist/Chart.bundle.js"></script>
+    <script src="../../utils.js"></script>
     <style>
     canvas {
         -moz-user-select: none;
             ],
             yAxisID: "y-axis-1",
             data: [
-                randomScalingFactor(), 
-                randomScalingFactor(), 
-                randomScalingFactor(), 
-                randomScalingFactor(), 
-                randomScalingFactor(), 
-                randomScalingFactor(), 
+                randomScalingFactor(),
+                randomScalingFactor(),
+                randomScalingFactor(),
+                randomScalingFactor(),
+                randomScalingFactor(),
+                randomScalingFactor(),
                 randomScalingFactor()
             ]
         }, {
             backgroundColor: window.chartColors.grey,
             yAxisID: "y-axis-2",
             data: [
-                randomScalingFactor(), 
-                randomScalingFactor(), 
-                randomScalingFactor(), 
-                randomScalingFactor(), 
-                randomScalingFactor(), 
-                randomScalingFactor(), 
+                randomScalingFactor(),
+                randomScalingFactor(),
+                randomScalingFactor(),
+                randomScalingFactor(),
+                randomScalingFactor(),
+                randomScalingFactor(),
                 randomScalingFactor()
             ]
         }]
@@ -63,7 +63,7 @@
         var ctx = document.getElementById("canvas").getContext("2d");
         window.myBar = new Chart(ctx, {
             type: 'bar',
-            data: barChartData, 
+            data: barChartData,
             options: {
                 responsive: true,
                 title:{
similarity index 73%
rename from samples/bar/bar-stacked-group.html
rename to samples/charts/bar/stacked-group.html
index 074e3eac08c12482620878ee5b4ee278b4aebad0..624992cfb4ac836150fe8a4547311b2c40b1164d 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
     <title>Stacked Bar Chart with Groups</title>
-    <script src="../../dist/Chart.bundle.js"></script>
-    <script src="../utils.js"></script>
+    <script src="../../../dist/Chart.bundle.js"></script>
+    <script src="../../utils.js"></script>
     <style>
     canvas {
         -moz-user-select: none;
                 backgroundColor: window.chartColors.red,
                 stack: 'Stack 0',
                 data: [
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
                     randomScalingFactor()
                 ]
             }, {
                 backgroundColor: window.chartColors.blue,
                 stack: 'Stack 0',
                 data: [
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
                     randomScalingFactor()
                 ]
             }, {
                 backgroundColor: window.chartColors.green,
                 stack: 'Stack 1',
                 data: [
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
                     randomScalingFactor()
                 ]
             }]
similarity index 72%
rename from samples/bar/bar-stacked.html
rename to samples/charts/bar/stacked.html
index f80b1b6ed9039401b229a73dcddc7ba4a8ff84a5..46d1c4051f3bbcad768f155cd2125743f5d5e206 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
     <title>Stacked Bar Chart</title>
-    <script src="../../dist/Chart.bundle.js"></script>
-    <script src="../utils.js"></script>
+    <script src="../../../dist/Chart.bundle.js"></script>
+    <script src="../../utils.js"></script>
     <style>
     canvas {
         -moz-user-select: none;
                 label: 'Dataset 1',
                 backgroundColor: window.chartColors.red,
                 data: [
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
                     randomScalingFactor()
                 ]
             }, {
                 label: 'Dataset 2',
                 backgroundColor: window.chartColors.blue,
                 data: [
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
                     randomScalingFactor()
                 ]
             }, {
                 label: 'Dataset 3',
                 backgroundColor: window.chartColors.green,
                 data: [
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
                     randomScalingFactor()
                 ]
             }]
similarity index 87%
rename from samples/bar/bar.html
rename to samples/charts/bar/vertical.html
index d2fc4acacedf94f803d85883d81103372c65de5c..906b4624c39cfc918b3797bb917b028c39cd74dd 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
     <title>Bar Chart</title>
-    <script src="../../dist/Chart.bundle.js"></script>
-    <script src="../utils.js"></script>
+    <script src="../../../dist/Chart.bundle.js"></script>
+    <script src="../../utils.js"></script>
     <style>
     canvas {
         -moz-user-select: none;
                 borderColor: window.chartColors.red,
                 borderWidth: 1,
                 data: [
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
                     randomScalingFactor()
                 ]
             }, {
                 borderColor: window.chartColors.blue,
                 borderWidth: 1,
                 data: [
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
                     randomScalingFactor()
                 ]
             }]
similarity index 98%
rename from samples/bubble.html
rename to samples/charts/bubble.html
index d62d6375970c70632dec29b9c423b5a4a199d02b..0df09477f5c0bf93dd22dcf758544214f51bc9f7 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
     <title>Bubble Chart</title>
-    <script src="../dist/Chart.bundle.js"></script>
-    <script src="utils.js"></script>
+    <script src="../../dist/Chart.bundle.js"></script>
+    <script src="../utils.js"></script>
     <style type="text/css">
     canvas{
         -moz-user-select: none;
similarity index 72%
rename from samples/combo-bar-line.html
rename to samples/charts/combo-bar-line.html
index c8b5a08f865210979335ec9bcfeaad7ebedd9220..0906029c41de485dbf082f26666b4183557d839c 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
     <title>Combo Bar-Line Chart</title>
-    <script src="../dist/Chart.bundle.js"></script>
-    <script src="utils.js"></script>
+    <script src="../../dist/Chart.bundle.js"></script>
+    <script src="../utils.js"></script>
     <style>
     canvas {
         -moz-user-select: none;
                 borderWidth: 2,
                 fill: false,
                 data: [
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
                     randomScalingFactor()
                 ]
             }, {
                 label: 'Dataset 2',
                 backgroundColor: window.chartColors.red,
                 data: [
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
                     randomScalingFactor()
                 ],
                 borderColor: 'white',
                 label: 'Dataset 3',
                 backgroundColor: window.chartColors.green,
                 data: [
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
                     randomScalingFactor()
                 ]
             }]
similarity index 97%
rename from samples/doughnut.html
rename to samples/charts/doughnut.html
index 51b98a82a4d527eb1eceb8009baba5bbc2919947..b288fe1293f03adc150cc80d136f072ad5d8c278 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
     <title>Doughnut Chart</title>
-    <script src="../dist/Chart.bundle.js"></script>
-    <script src="utils.js"></script>
+    <script src="../../dist/Chart.bundle.js"></script>
+    <script src="../utils.js"></script>
     <style>
     canvas {
         -moz-user-select: none;
similarity index 87%
rename from samples/line/line.html
rename to samples/charts/line/basic.html
index 68ae7e5f60cd11d7a59fb2bc8b2a0fdc27893719..db01ccf743d83bb14d644f83cd3518c9b9b21bcf 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
     <title>Line Chart</title>
-    <script src="../../dist/Chart.bundle.js"></script>
-    <script src="../utils.js"></script>
+    <script src="../../../dist/Chart.bundle.js"></script>
+    <script src="../../utils.js"></script>
     <style>
     canvas{
         -moz-user-select: none;
                     backgroundColor: window.chartColors.red,
                     borderColor: window.chartColors.red,
                     data: [
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
                         randomScalingFactor()
                     ],
                     fill: false,
                     backgroundColor: window.chartColors.blue,
                     borderColor: window.chartColors.blue,
                     data: [
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
                         randomScalingFactor()
                     ],
                 }]
similarity index 96%
rename from samples/line/interpolation-modes.html
rename to samples/charts/line/interpolation-modes.html
index ff75210a60263f7fe942b1359e44da6add3aedd2..374da49c0838ec53338182db6299e0c38f2ffc42 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
     <title>Line Chart - Cubic interpolation mode</title>
-    <script src="../../dist/Chart.bundle.js"></script>
-    <script src="../utils.js"></script>
+    <script src="../../../dist/Chart.bundle.js"></script>
+    <script src="../../utils.js"></script>
     <style>
     canvas{
         -moz-user-select: none;
     </script>
 </body>
 
-</html>
\ No newline at end of file
+</html>
similarity index 73%
rename from samples/line/line-styles.html
rename to samples/charts/line/line-styles.html
index 0ac3aabdb4b7d1a17c9ee146cfbd9c282d14dd22..ed268e1fdb4a23046013d3f2846920490da0309e 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
     <title>Line Styles</title>
-    <script src="../../dist/Chart.bundle.js"></script>
-    <script src="../utils.js"></script>
+    <script src="../../../dist/Chart.bundle.js"></script>
+    <script src="../../utils.js"></script>
     <style>
     canvas{
         -moz-user-select: none;
                     backgroundColor: window.chartColors.blue,
                     borderColor: window.chartColors.blue,
                     data: [
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
                         randomScalingFactor()
                     ],
                 }, {
                     borderColor: window.chartColors.green,
                     borderDash: [5, 5],
                     data: [
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
                         randomScalingFactor()
                     ],
                 }, {
                     backgroundColor: window.chartColors.red,
                     borderColor: window.chartColors.red,
                     data: [
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
                         randomScalingFactor()
                     ],
                     fill: true,
similarity index 82%
rename from samples/line/line-multi-axis.html
rename to samples/charts/line/multi-axis.html
index debdf369f8820a9b383e7b273319b5261bbe4bff..2ede74446ae3cb6cebfe468c2015ca24aed5be05 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
     <title>Line Chart Multiple Axes</title>
-    <script src="../../dist/Chart.bundle.js"></script>
-    <script src="../utils.js"></script>
+    <script src="../../../dist/Chart.bundle.js"></script>
+    <script src="../../utils.js"></script>
     <style>
     canvas {
         -moz-user-select: none;
             backgroundColor: window.chartColors.red,
             fill: false,
             data: [
-                randomScalingFactor(), 
-                randomScalingFactor(), 
-                randomScalingFactor(), 
-                randomScalingFactor(), 
-                randomScalingFactor(), 
-                randomScalingFactor(), 
+                randomScalingFactor(),
+                randomScalingFactor(),
+                randomScalingFactor(),
+                randomScalingFactor(),
+                randomScalingFactor(),
+                randomScalingFactor(),
                 randomScalingFactor()
             ],
             yAxisID: "y-axis-1",
             backgroundColor: window.chartColors.blue,
             fill: false,
             data: [
-                randomScalingFactor(), 
-                randomScalingFactor(), 
-                randomScalingFactor(), 
-                randomScalingFactor(), 
-                randomScalingFactor(), 
-                randomScalingFactor(), 
+                randomScalingFactor(),
+                randomScalingFactor(),
+                randomScalingFactor(),
+                randomScalingFactor(),
+                randomScalingFactor(),
+                randomScalingFactor(),
                 randomScalingFactor()
             ],
             yAxisID: "y-axis-2"
similarity index 73%
rename from samples/line/different-point-sizes.html
rename to samples/charts/line/point-sizes.html
index ed52cf0ae6db5a68da4554d4be391d0e9bfbb54f..823c6d3e41c8cc1e0d548cdcbc1fc64242296b8e 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
     <title>Different Point Sizes</title>
-    <script src="../../dist/Chart.bundle.js"></script>
-    <script src="../utils.js"></script>
+    <script src="../../../dist/Chart.bundle.js"></script>
+    <script src="../../utils.js"></script>
     <style>
         canvas {
             -moz-user-select: none;
                 datasets: [{
                     label: "dataset - big points",
                     data: [
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
                         randomScalingFactor()
                     ],
                     backgroundColor: window.chartColors.red,
                 }, {
                     label: "dataset - individual point sizes",
                     data: [
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
                         randomScalingFactor()
                     ],
                     backgroundColor: window.chartColors.blue,
                 }, {
                     label: "dataset - large pointHoverRadius",
                     data: [
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
                         randomScalingFactor()
                     ],
                     backgroundColor: window.chartColors.green,
                 }, {
                     label: "dataset - large pointHitRadius",
                     data: [
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
                         randomScalingFactor()
                     ],
                     backgroundColor: window.chartColors.yellow,
similarity index 96%
rename from samples/line/point-styles.html
rename to samples/charts/line/point-styles.html
index 0056e74997636f3994f4810061f92faa791d32af..1985d394d236b20a5a4affa3633a9191ccbdf688 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
     <title>Line Chart</title>
-    <script src="../../dist/Chart.bundle.js"></script>
-    <script src="../utils.js"></script>
+    <script src="../../../dist/Chart.bundle.js"></script>
+    <script src="../../utils.js"></script>
     <style>
     canvas{
         -moz-user-select: none;
similarity index 77%
rename from samples/line/line-skip-points.html
rename to samples/charts/line/skip-points.html
index bb8c8c4c83f427515f6db802afeea94c9695259b..00aa81fe045137ae77d7cb3a30032ff02f140ef7 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
     <title>Line Chart</title>
-    <script src="../../dist/Chart.bundle.js"></script>
-    <script src="../utils.js"></script>
+    <script src="../../../dist/Chart.bundle.js"></script>
+    <script src="../../utils.js"></script>
     <style>
     canvas {
         -moz-user-select: none;
                     fill: false,
                     // Skip a point in the middle
                     data: [
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        NaN, 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        NaN,
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
                         randomScalingFactor()
                     ],
 
                     fill: false,
                     // Skip first and last points
                     data: [
-                        NaN, 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
+                        NaN,
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
                         NaN
                     ],
                 }]
similarity index 77%
rename from samples/line/line-stepped.html
rename to samples/charts/line/stepped.html
index ff1bf2a6e2d8a913af15bbc6f5a2dd52b5491a71..8650f55da15190ccb2470007c04911a5915f03f6 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
     <title>Stepped Line Chart</title>
-    <script src="../../dist/Chart.bundle.js"></script>
-    <script src="../utils.js"></script>
+    <script src="../../../dist/Chart.bundle.js"></script>
+    <script src="../../utils.js"></script>
     <style>
     canvas{
         -moz-user-select: none;
                     borderColor: window.chartColors.red,
                     backgroundColor: window.chartColors.red,
                     data: [
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
                         randomScalingFactor()
                     ],
                     fill: false,
                     borderColor: window.chartColors.blue,
                     backgroundColor: window.chartColors.blue,
                     data: [
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
-                        randomScalingFactor(), 
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
+                        randomScalingFactor(),
                         randomScalingFactor()
                     ],
                     fill: false,
similarity index 96%
rename from samples/pie.html
rename to samples/charts/pie.html
index c299af961901935c4e95bf850a29dec1b3b9dbf9..e931cee3fdeb8602d2ba18367a47bdd3e88d7774 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
     <title>Pie Chart</title>
-    <script src="../dist/Chart.bundle.js"></script>
-    <script src="utils.js"></script>
+    <script src="../../dist/Chart.bundle.js"></script>
+    <script src="../utils.js"></script>
 </head>
 
 <body>
similarity index 97%
rename from samples/polar-area.html
rename to samples/charts/polar-area.html
index 48fe984afab314688a2387e230bfefd7bb169779..3981651de74432c467d96267a79390053b682ea8 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
     <title>Polar Area Chart</title>
-    <script src="../dist/Chart.bundle.js"></script>
-    <script src="utils.js"></script>
+    <script src="../../dist/Chart.bundle.js"></script>
+    <script src="../utils.js"></script>
     <style>
     canvas {
         -moz-user-select: none;
similarity index 88%
rename from samples/radar/radar.html
rename to samples/charts/radar.html
index 586e2df7aecbe8ddc368bfd86fe5fde28f909662..fbbb9d972bc1cb8f474ed1fd06ca24f7b0b62a6f 100644 (file)
                 borderColor: window.chartColors.red,
                 pointBackgroundColor: window.chartColors.red,
                 data: [
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
                     randomScalingFactor()
                 ]
             }, {
                 borderColor: window.chartColors.blue,
                 pointBackgroundColor: window.chartColors.blue,
                 data: [
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
-                    randomScalingFactor(), 
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
+                    randomScalingFactor(),
                     randomScalingFactor()
                 ]
             },]
similarity index 97%
rename from samples/scatter/scatter.html
rename to samples/charts/scatter/basic.html
index b8ac32b8f1eee40aa6de0fe316af638e859eca10..c5e36e9d99cf9eca9864880b07e4aad970f7177b 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
     <title>Scatter Chart</title>
-    <script src="../../dist/Chart.bundle.js"></script>
-    <script src="../utils.js"></script>
+    <script src="../../../dist/Chart.bundle.js"></script>
+    <script src="../../utils.js"></script>
     <style>
     canvas {
         -moz-user-select: none;
similarity index 97%
rename from samples/scatter/scatter-multi-axis.html
rename to samples/charts/scatter/multi-axis.html
index aedcd3daa0b4b2ac3df2e2985de014ba0156966b..cbf3bf73a8affd8e96f3f95833bf0938d3fe947d 100644 (file)
@@ -3,8 +3,8 @@
 
 <head>
        <title>Scatter Chart Multi Axis</title>
-       <script src="../../dist/Chart.bundle.js"></script>
-       <script src="../utils.js"></script>
+       <script src="../../../dist/Chart.bundle.js"></script>
+       <script src="../../utils.js"></script>
        <style>
        canvas {
                -moz-user-select: none;
                                                position: "right",
                                                reverse: true,
                                                id: "y-axis-2",
-                               
+
                                                // grid line settings
                                                gridLines: {
                                                        drawOnChartArea: false, // only want the grid lines for one axis to show up
diff --git a/samples/favicon.ico b/samples/favicon.ico
new file mode 100644 (file)
index 0000000..5192a32
Binary files /dev/null and b/samples/favicon.ico differ
diff --git a/samples/index.html b/samples/index.html
new file mode 100644 (file)
index 0000000..d7c6793
--- /dev/null
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html lang="en-US">
+<head>
+       <meta charset="utf-8">
+       <meta http-equiv="X-UA-Compatible" content="IE=Edge">
+       <meta name="viewport" content="width=device-width, initial-scale=1">
+       <link rel="stylesheet" type="text/css" href="style.css">
+       <link rel="icon" href="favicon.ico">
+       <script src="samples.js"></script>
+       <title>Chart.js samples</title>
+</head>
+<body>
+       <div class="content">
+               <div class="header">
+                       <div class="chartjs-title">Samples</div>
+                       <div class="chartjs-caption">Simple yet flexible JavaScript charting for designers &amp; developers</div>
+                       <div class="chartjs-links">
+                               <a class="btn btn-chartjs" href="http://www.chartjs.org">Website</a>
+                               <a class="btn btn-docs" href="http://www.chartjs.org/docs">Documentation</a>
+                               <a class="btn btn-gh" href="https://github.com/chartjs/Chart.js">GitHub</a>
+                       </div>
+               </div>
+
+               <div id="categories" class="samples-categories"></div>
+       </div>
+
+       <script>
+               function createCategory(item) {
+                       var el = document.createElement('div');
+                       el.className = 'samples-category';
+                       el.innerHTML =
+                               '<div class="title">' + item.title + '</div>' +
+                               '<div class="items"></div>';
+                       return el;
+               }
+
+               function createEntry(item) {
+                       var el = document.createElement('div');
+                       el.className = 'samples-entry';
+                       el.innerHTML = '<a class="title" href="' + item.path + '">' + item.title + '</a>';
+                       return el;
+               }
+
+               var categories = document.getElementById('categories');
+               Samples.items.forEach(function(item) {
+                       var category = createCategory(item);
+                       var children = category.getElementsByClassName('items')[0];
+
+                       (item.items || []).forEach(function(item) {
+                               children.appendChild(createEntry(item));
+                       });
+
+                       categories.appendChild(category);
+               });
+       </script>
+</body>
+</html>
diff --git a/samples/logo.svg b/samples/logo.svg
new file mode 100644 (file)
index 0000000..24f5a2b
--- /dev/null
@@ -0,0 +1 @@
+<svg width="160" height="160" viewBox="0 0 160 160" xmlns="http://www.w3.org/2000/svg"><title>Artboard 6</title><g fill="none" fill-rule="evenodd"><path d="M144.086 80.568c-21.978.43-17.402 14.346-32.89 17.866C95.46 102.01 92.975 60 77.243 60c-15.733 0-19.216 40.806-38.918 68.823l-.56.794L80 154l64.086-37V80.568z" fill="#36A2EB"/><path d="M144.086 79.3C136.726 69.856 131.736 59 121 59c-19 0-14 31-35 31s-23.207-33.346-47-2c-7.58 9.988-13.682 21.124-18.475 31.662L80 154l64.086-37V79.3z" fill="#FFCE56"/><path d="M15.914 92.143C23.124 72.173 26.237 56 40 56c21 0 26 59 44 53s16-38 44-38c5.33 0 10.772 3.263 16.086 8.546V117L80 154l-64.086-37V92.143z" fill-opacity=".8" fill="#FE6184"/><path stroke="#E7E9ED" stroke-width="8" d="M80 6l64.086 37v74L80 154l-64.086-37V43z"/></g></svg>
\ No newline at end of file
diff --git a/samples/samples.js b/samples/samples.js
new file mode 100644 (file)
index 0000000..c3d489c
--- /dev/null
@@ -0,0 +1,181 @@
+(function(global) {
+
+       var Samples = global.Samples || (global.Samples = {});
+
+       Samples.items = [{
+               title: 'Bar charts',
+               items: [{
+                       title: 'Vertical',
+                       path: 'charts/bar/vertical.html'
+               }, {
+                       title: 'Horizontal',
+                       path: 'charts/bar/horizontal.html'
+               }, {
+                       title: 'Multi axis',
+                       path: 'charts/bar/multi-axis.html'
+               }, {
+                       title: 'Stacked',
+                       path: 'charts/bar/stacked.html'
+               }, {
+                       title: 'Stacked groups',
+                       path: 'charts/bar/stacked-group.html'
+               }]
+       }, {
+               title: 'Line charts',
+               items: [{
+                       title: 'Basic',
+                       path: 'charts/line/basic.html'
+               }, {
+                       title: 'Multi axis',
+                       path: 'charts/line/multi-axis.html'
+               }, {
+                       title: 'Stepped',
+                       path: 'charts/line/stepped.html'
+               }, {
+                       title: 'Interpolation',
+                       path: 'charts/line/interpolation-modes.html'
+               }, {
+                       title: 'Line styles',
+                       path: 'charts/line/line-styles.html'
+               }, {
+                       title: 'Point styles',
+                       path: 'charts/line/point-styles.html'
+               }, {
+                       title: 'Point sizes',
+                       path: 'charts/line/point-sizes.html'
+               }]
+       }, {
+               title: 'Area charts',
+               items: [{
+                       title: 'Boundaries (line)',
+                       path: 'charts/area/line-boundaries.html'
+               }, {
+                       title: 'Datasets (line)',
+                       path: 'charts/area/line-datasets.html'
+               }, {
+                       title: 'Stacked (line)',
+                       path: 'charts/area/line-stacked.html'
+               }, {
+                       title: 'Radar',
+                       path: 'charts/area/radar.html'
+               }]
+       }, {
+               title: 'Other charts',
+               items: [{
+                       title: 'Scatter',
+                       path: 'charts/scatter/basic.html'
+               }, {
+                       title: 'Scatter - Multi axis',
+                       path: 'charts/scatter/multi-axis.html'
+               }, {
+                       title: 'Doughnut',
+                       path: 'charts/doughnut.html'
+               }, {
+                       title: 'Pie',
+                       path: 'charts/pie.html'
+               }, {
+                       title: 'Polar area',
+                       path: 'charts/polar-area.html'
+               }, {
+                       title: 'Radar',
+                       path: 'charts/radar.html'
+               }, {
+                       title: 'Combo bar/line',
+                       path: 'charts/combo-bar-line.html'
+               }]
+       }, {
+               title: 'Linear scale',
+               items: [{
+                       title: 'Step size',
+                       path: 'scales/linear/step-size.html'
+               }, {
+                       title: 'Min & max',
+                       path: 'scales/linear/min-max.html'
+               }, {
+                       title: 'Min & max (suggested)',
+                       path: 'scales/linear/min-max-suggested.html'
+               }]
+       }, {
+               title: 'Logarithmic scale',
+               items: [{
+                       title: 'Line',
+                       path: 'scales/logarithmic/line.html'
+               }, {
+                       title: 'Scatter',
+                       path: 'scales/logarithmic/scatter.html'
+               }]
+       }, {
+               title: 'Time scale',
+               items: [{
+                       title: 'Line',
+                       path: 'scales/time/line.html'
+               }, {
+                       title: 'Line (point data)',
+                       path: 'scales/time/line.html'
+               }, {
+                       title: 'Combo',
+                       path: 'scales/time/combo.html'
+               }]
+       }, {
+               title: 'Scale options',
+               items: [{
+                       title: 'Grid lines display',
+                       path: 'scales/gridlines-display.html'
+               }, {
+                       title: 'Grid lines style',
+                       path: 'scales/gridlines-style.html'
+               }, {
+                       title: 'Multiline labels',
+                       path: 'scales/multiline-labels.html'
+               }, {
+                       title: 'Filtering Labels',
+                       path: 'scales/filtering-labels.html'
+               }, {
+                       title: 'Non numeric Y Axis',
+                       path: 'scales/non-numeric-y.html'
+               }]
+       }, {
+               title: 'Legend',
+               items: [{
+                       title: 'Positioning',
+                       path: 'legend/positioning.html'
+               }, {
+                       title: 'Point style',
+                       path: 'legend/point-style.html'
+               }]
+       }, {
+               title: 'Tooltip',
+               items: [{
+                       title: 'Positioning',
+                       path: 'tooltips/positioning.html'
+               }, {
+                       title: 'Interactions',
+                       path: 'tooltips/interactions.html'
+               }, {
+                       title: 'Callbacks',
+                       path: 'tooltips/callbacks.html'
+               }, {
+                       title: 'Border',
+                       path: 'tooltips/border.html'
+               }, {
+                       title: 'HTML tooltips (line)',
+                       path: 'tooltips/custom-line.html'
+               }, {
+                       title: 'HTML tooltips (pie)',
+                       path: 'tooltips/custom-pie.html'
+               }, {
+                       title: 'HTML tooltips (points)',
+                       path: 'tooltips/custom-points.html'
+               }]
+       }, {
+               title: 'Advanced',
+               items: [{
+                       title: 'Progress bar',
+                       path: 'advanced/progress-bar.html'
+               }, {
+                       title: 'Data labelling (plugin)',
+                       path: 'advanced/data-labelling.html'
+               }]
+       }];
+
+}(this));
index 5b5865064183490af19dc3e1e5434ddd9aab65ac..8224e2c3fdb586ad4798865e6c64dd01a393e833 100644 (file)
@@ -1,13 +1,33 @@
+@import url('https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
+@import url('https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900');
+
 body, html {
-       font-family: sans-serif;
+       color: #333538;
+       font-family: 'Lato', sans-serif;
+       line-height: 1.6;
        padding: 0;
        margin: 0;
 }
 
+a {
+       color: #f27173;
+       text-decoration: none;
+}
+
+a:hover {
+       color: #e25f5f;
+       text-decoration: underline;
+}
+
 .content {
        max-width: 800px;
        margin: auto;
-       padding: 16px;
+       padding: 16px 32px;
+}
+
+.header {
+       text-align: center;
+       padding: 32px 0;
 }
 
 .wrapper {
@@ -42,10 +62,118 @@ body, html {
        margin: 0 8px 0 0;
 }
 
+.btn {
+       background-color: #aaa;
+       border-radius: 4px;
+       color: white;
+       padding: 0.25rem 0.75rem;
+}
+
+.btn .fa {
+       font-size: 1rem;
+}
+
+.btn:hover {
+       background-color: #888;
+       color: white;
+       text-decoration: none;
+}
+
+.btn-chartjs { background-color: #f27173; }
+.btn-chartjs:hover { background-color: #e25f5f; }
+.btn-docs:hover { background-color: #2793db; }
+.btn-docs { background-color: #36A2EB; }
+.btn-docs:hover { background-color: #2793db; }
+.btn-gh { background-color: #444; }
+.btn-gh:hover { background-color: #333; }
+
 .btn-on {
        border-style: inset;
 }
 
+.chartjs-title {
+       font-size: 2rem;
+       font-weight: 600;
+       white-space: nowrap;
+}
+
+.chartjs-title::before {
+       background-image: url(logo.svg);
+       background-position: left center;
+       background-repeat: no-repeat;
+       background-size: 40px;
+       content: 'Chart.js | ';
+       color: #f27173;
+       font-weight: 600;
+       padding-left: 48px;
+}
+
+.chartjs-caption {
+       font-size: 1.2rem;
+}
+
+.chartjs-links {
+       display: flex;
+       justify-content: center;
+       padding: 8px 0;
+}
+
+.chartjs-links a {
+       align-items: center;
+       display: flex;
+       font-size: 0.9rem;
+       margin: 0.2rem;
+}
+
+.chartjs-links .fa:before {
+       margin-right: 0.5em;
+}
+
+.samples-category {
+       display: inline-block;
+       margin-bottom: 32px;
+       vertical-align: top;
+       width: 25%;
+}
+
+.samples-category > .title {
+       color: #aaa;
+       font-weight: 300;
+       font-size: 1.5rem;
+}
+
+.samples-category:hover > .title {
+       color: black;
+}
+
+.samples-category > .items {
+       padding: 8px 0;
+}
+
+.samples-entry {
+       padding: 0 0 4px 0;
+}
+
+.samples-entry > .title {
+       font-weight: 700;
+}
+
+@media (max-width: 640px) {
+       .samples-category { width: 33%; }
+}
+
+@media (max-width: 512px) {
+       .samples-category { width: 50%; }
+}
+
+@media (max-width: 420px) {
+       .chartjs-caption { font-size: 1.05rem; }
+       .chartjs-title::before { content: ''; }
+       .chartjs-links a { flex-direction: column; }
+       .chartjs-links .fa { margin: 0 }
+       .samples-category { width: 100%; }
+}
+
 .analyser table {
        color: #333;
        font-size: 0.9rem;