]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fix broken helper test
authorEvert Timberg <evert.timberg@gmail.com>
Sun, 27 Sep 2015 23:40:38 +0000 (19:40 -0400)
committerEvert Timberg <evert.timberg@gmail.com>
Sun, 27 Sep 2015 23:40:38 +0000 (19:40 -0400)
test/core.helpers.tests.js

index d832f0e2557e73d2b6c8fb780b4ef4d8ebae6f68..4ceb1b2d090d06e5daa5cef95242d9f095b8ba31 100644 (file)
@@ -210,18 +210,19 @@ describe('Core helper tests', function() {
                                        type: 'linear',
                                        axisProp: 456
                                }, {
-                                       type: 'linear',
                                        display: true,
-                                       position: "right",
+
                                        gridLines: {
-                                               show: true,
                                                color: "rgba(0, 0, 0, 0.1)",
-                                               lineWidth: 1,
                                                drawOnChartArea: true,
-                                               drawTicks: true,
-                                               zeroLineWidth: 1,
+                                               drawTicks: true, // draw ticks extending towards the label
+                                               lineWidth: 1,
+                                               offsetGridLines: false,
+                                               show: true,
                                                zeroLineColor: "rgba(0,0,0,0.25)",
+                                               zeroLineWidth: 1,
                                        },
+                                       position: "right",
                                        scaleLabel: {
                                                fontColor: '#666',
                                                fontFamily: 'Helvetica Neue',
@@ -230,32 +231,35 @@ describe('Core helper tests', function() {
                                                labelString: '',
                                                show: false,
                                        },
-                                       reverse: false,
-                                       beginAtZero: false,
-                                       override: null,
-                                       labels: {
-                                               show: true,
-                                               mirror: false,
-                                               padding: 10,
-                                               template: "<%=value.toLocaleString()%>",
+                                       ticks: {
+                                               beginAtZero: false,
+                                               fontColor: "#666",
+                                               fontFamily: "Helvetica Neue",
                                                fontSize: 12,
                                                fontStyle: "normal",
-                                               fontColor: "#666",
-                                               fontFamily: "Helvetica Neue"
-                                       }
+                                               maxRotation: 90,
+                                               minRotation: 20,
+                                               mirror: false,
+                                               padding: 10,
+                                               reverse: false,
+                                               show: true,
+                                               template: "<%=value%>"
+                                       },
+                                       type: 'linear'
                                }, {
-                                       type: 'linear',
                                        display: true,
-                                       position: "left",
+
                                        gridLines: {
-                                               show: true,
                                                color: "rgba(0, 0, 0, 0.1)",
-                                               lineWidth: 1,
                                                drawOnChartArea: true,
-                                               drawTicks: true,
-                                               zeroLineWidth: 1,
+                                               drawTicks: true, // draw ticks extending towards the label
+                                               lineWidth: 1,
+                                               offsetGridLines: false,
+                                               show: true,
                                                zeroLineColor: "rgba(0,0,0,0.25)",
+                                               zeroLineWidth: 1,
                                        },
+                                       position: "left",
                                        scaleLabel: {
                                                fontColor: '#666',
                                                fontFamily: 'Helvetica Neue',
@@ -264,19 +268,21 @@ describe('Core helper tests', function() {
                                                labelString: '',
                                                show: false,
                                        },
-                                       reverse: false,
-                                       beginAtZero: false,
-                                       override: null,
-                                       labels: {
-                                               show: true,
-                                               mirror: false,
-                                               padding: 10,
-                                               template: "<%=value.toLocaleString()%>",
+                                       ticks: {
+                                               beginAtZero: false,
+                                               fontColor: "#666",
+                                               fontFamily: "Helvetica Neue",
                                                fontSize: 12,
                                                fontStyle: "normal",
-                                               fontColor: "#666",
-                                               fontFamily: "Helvetica Neue"
-                                       }
+                                               maxRotation: 90,
+                                               minRotation: 20,
+                                               mirror: false,
+                                               padding: 10,
+                                               reverse: false,
+                                               show: true,
+                                               template: "<%=value%>"
+                                       },
+                                       type: 'linear'
                                }]
                        }
                });