Skip to content

Commit c3dfc0a

Browse files
author
scarroll
committed
better attribute syntax
1 parent 7775479 commit c3dfc0a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ $scope.dotchart = {
5959
In the view, you just pass the appropriate attributes.
6060

6161
```
62-
<dotchart size="dotchart.data" valuesx="dotchart.valX" valuesy="dotchart.valY" options="dotchart.options"></dotchart>
62+
<dotchart size="dotchart.data" values-x="dotchart.valX" values-y="dotchart.valY" options="dotchart.options"></dotchart>
6363
```
6464

6565
That's it, you have a dot chart!

src/directives/dotchartDirective.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ angular.module('angular-graphael').directive('dotchart', function ($window, mapD
1212
return {
1313
restrict: 'E',
1414
scope: {
15-
valuesx: '=',
16-
valuesy: '=',
15+
valuesX: '=',
16+
valuesY: '=',
1717
size: '=',
1818
options: '=',
1919
x: '=',
@@ -34,7 +34,7 @@ angular.module('angular-graphael').directive('dotchart', function ($window, mapD
3434
// Set up the canvas
3535
r = $window.Raphael(element[0]);
3636
// Add the chart to the canvas with all of our options and data.
37-
r.dotchart(x, y, width, height, scope.valuesx, scope.valuesy, mapData(scope.size), scope.options);
37+
r.dotchart(x, y, width, height, scope.valuesX, scope.valuesY, mapData(scope.size), scope.options);
3838
});
3939
}
4040
};

src/directives/linechartDirective.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ angular.module('angular-graphael').directive('linechart', function ($window, map
1717
x: '=',
1818
y: '=',
1919
options: '=',
20-
valuesx: '=',
21-
valuesy: '='
20+
valuesX: '=',
21+
valuesY: '='
2222
},
2323
template: '<div></div>',
2424
link: function (scope, element) {
@@ -39,7 +39,7 @@ angular.module('angular-graphael').directive('linechart', function ($window, map
3939
// Set up the canvas
4040
r = $window.Raphael(element[0]);
4141
// Add the chart to the canvas with all of our options and data.
42-
r.barchart(x, y, width, height, mapData(scope.valuesx), mapData(scope.valuesy), scope.options);
42+
r.barchart(x, y, width, height, mapData(scope.valuesX), mapData(scope.valuesY), scope.options);
4343
});
4444
}
4545
};

0 commit comments

Comments
 (0)