Skip to content

Commit 4abf0d3

Browse files
author
Keith Walsh
committed
Updated chart.js from origin project to fix radar rotation.
1 parent 72b4de4 commit 4abf0d3

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

lib/chart-js-rails/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Chart
22
module Js
33
module Rails
4-
VERSION = "0.0.2"
4+
VERSION = "0.0.3"
55
end
66
end
77
end

vendor/assets/javascripts/chart.js

100644100755
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/*!
2+
* Chart.js
3+
* http://chartjs.org/
4+
*
5+
* Copyright 2013 Nick Downie
6+
* Released under the MIT license
7+
* https://github.com/nnnick/Chart.js/blob/master/LICENSE.md
8+
*/
9+
110
//Define the global Chart Variable as a class.
211
var Chart = function(context){
312

@@ -525,7 +534,7 @@ var Chart = function(context){
525534
ctx.save();
526535
//translate to the centre of the canvas.
527536
ctx.translate(width/2,height/2);
528-
ctx.rotate(rotationDegree);
537+
529538
//We accept multiple data sets for radar charts, so show loop through each set
530539
for (var i=0; i<data.datasets.length; i++){
531540
ctx.beginPath();
@@ -559,6 +568,7 @@ var Chart = function(context){
559568
}
560569

561570
}
571+
ctx.rotate(rotationDegree);
562572

563573
}
564574
ctx.restore();

0 commit comments

Comments
 (0)