]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Update initializer documentation for Bar.
authorwcatron <wcatron@catrondevelopment.com>
Thu, 19 Nov 2015 16:35:38 +0000 (11:35 -0500)
committerwcatron <wcatron@catrondevelopment.com>
Thu, 19 Nov 2015 16:35:38 +0000 (11:35 -0500)
docs/03-Bar-Chart.md

index 1254588614756ea00044771ad3d761d2fa6f9dab..74f99e7b1a3051a39e81eded1cc8f31a66f7b9d6 100644 (file)
@@ -14,8 +14,9 @@ It is sometimes used to show trend data, and the comparison of multiple data set
 
 ### Example usage
 ```javascript
-var myBarChart = new Chart(ctx).Bar({
-       data: data, 
+var myBarChart = new Chart(ctx,{
+       type: 'bar',
+       data: data,
        options: options
 });
 ```
@@ -83,7 +84,7 @@ These are the customisation options specific to Bar charts. These options are me
        },
 
        scales: {
-               // The bar chart officially supports only 1 x-axis but uses an array to keep the API consistent. Use a scatter chart if you need multiple x axes. 
+               // The bar chart officially supports only 1 x-axis but uses an array to keep the API consistent. Use a scatter chart if you need multiple x axes.
                xAxes: [{
                        // String - type of axis to use. Should not be changed from 'dataset'.
                        scaleType: "dataset", // scatter should not use a dataset axis
@@ -226,7 +227,7 @@ For example, we could have a bar chart without a stroke on each bar by doing the
 
 ```javascript
 new Chart(ctx).Bar({
-       data: data, 
+       data: data,
        options: {
                barShowStroke: false
        }