]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Update bar sample file to use elements config. Fixes #1292 1986/head
authoretimberg <evert.timberg@gmail.com>
Mon, 8 Feb 2016 01:06:50 +0000 (20:06 -0500)
committeretimberg <evert.timberg@gmail.com>
Mon, 8 Feb 2016 01:06:50 +0000 (20:06 -0500)
samples/bar.html

index 44b02180901fa2b8bf00c821d736ac959b5ba65b..505c2600386497a87b5eb492fdf3deeb369ddebf 100644 (file)
                 type: 'bar',
                 data: barChartData,
                 options: {
+                    // Elements options apply to all of the options unless overridden in a dataset
+                    // In this case, we are setting the border of each bar to be 2px wide and green
+                    elements: {
+                        rectangle: {
+                            borderWidth: 2,
+                            borderColor: 'rgb(0, 255, 0)'
+                        }
+                    },
                     responsive: true,
                     legend: {
                         position: 'top',