Skip to content

Commit d58886f

Browse files
committed
1.0.0-alpha7
1 parent 132102d commit d58886f

File tree

7 files changed

+18
-17
lines changed

7 files changed

+18
-17
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-chart.js",
3-
"version": "1.0.0-alpha6",
3+
"version": "1.0.0-alpha7",
44
"main": [
55
"./dist/angular-chart.js"
66
],

dist/angular-chart.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
'use strict';
1919

2020
Chart.defaults.global.multiTooltipTemplate = '<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>';
21+
Chart.defaults.global.tooltips.mode = 'label';
2122
Chart.defaults.global.elements.line.borderWidth = 2;
2223
Chart.defaults.global.elements.rectangle.borderWidth = 2;
2324
Chart.defaults.global.legend.display = false;
@@ -31,11 +32,11 @@
3132
'#4D5360' // dark grey
3233
];
3334

34-
var usingExcanvas = typeof window.G_vmlCanvasManager === 'object' &&
35+
var useExcanvas = typeof window.G_vmlCanvasManager === 'object' &&
3536
window.G_vmlCanvasManager !== null &&
3637
typeof window.G_vmlCanvasManager.initElement === 'function';
3738

38-
if (usingExcanvas) Chart.defaults.global.animation = false;
39+
if (useExcanvas) Chart.defaults.global.animation = false;
3940

4041
return angular.module('chart.js', [])
4142
.provider('ChartJs', ChartJsProvider)
@@ -106,7 +107,7 @@
106107
link: function (scope, elem/*, attrs */) {
107108
var chart;
108109

109-
if (usingExcanvas) window.G_vmlCanvasManager.initElement(elem[0]);
110+
if (useExcanvas) window.G_vmlCanvasManager.initElement(elem[0]);
110111

111112
// Order of setting "watch" matter
112113

@@ -139,6 +140,10 @@
139140
destroyChart(chart, scope);
140141
});
141142

143+
scope.$on('$resize', function () {
144+
if (chart) chart.resize();
145+
});
146+
142147
function resetChart (newVal, oldVal) {
143148
if (isEmpty(newVal)) return;
144149
if (angular.equals(newVal, oldVal)) return;
@@ -242,11 +247,11 @@
242247
function getColor (color) {
243248
return {
244249
backgroundColor: rgba(color, 0.2),
245-
borderColor: rgba(color, 1),
246250
pointBackgroundColor: rgba(color, 1),
251+
pointHoverBackgroundColor: rgba(color, 0.8),
252+
borderColor: rgba(color, 1),
247253
pointBorderColor: '#fff',
248-
pointHoverBackgroundColor: '#fff',
249-
pointHoverBorderColor: rgba(color, 0.8)
254+
pointHoverBorderColor: rgba(color, 1)
250255
};
251256
}
252257

@@ -255,12 +260,8 @@
255260
}
256261

257262
function rgba (color, alpha) {
258-
if (usingExcanvas) {
259-
// rgba not supported by IE8
260-
return 'rgb(' + color.join(',') + ')';
261-
} else {
262-
return 'rgba(' + color.concat(alpha).join(',') + ')';
263-
}
263+
// rgba not supported by IE8
264+
return useExcanvas ? 'rgb(' + color.join(',') + ')' : 'rgba(' + color.concat(alpha).join(',') + ')';
264265
}
265266

266267
// Credit: http://stackoverflow.com/a/11508164/1190235

dist/angular-chart.js.tar.gz

136 Bytes
Binary file not shown.

dist/angular-chart.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-chart.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/charts.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ <h1>
9494
<p>
9595
<a class="btn btn-default btn-lg" href="https://github.com/jtblin/angular-chart"><i class="icon-github"></i>Code on Github</a>
9696
<a class="btn btn-success btn-lg" href="../dist/angular-chart.js.tar.gz" download="angular-chart.js.tar.gz">
97-
<i class="fa fa-download"></i> Download <small>(1.0.0-alpha6)</small>
97+
<i class="fa fa-download"></i> Download <small>(1.0.0-alpha7)</small>
9898
</a>
9999
</p>
100100
</div>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-chart.js",
3-
"version": "1.0.0-alpha6",
3+
"version": "1.0.0-alpha7",
44
"description": "An angular.js wrapper for Chart.js",
55
"main": "dist/angular-chart.js",
66
"directories": {

0 commit comments

Comments
 (0)