I'm using angular to create dynamic charts. I use css 'transition' in order to give it an effect, that the charts are going up. But when I initialize the charts with a value, the charts are indeed go up very nicely, but for some reason the chart with the lowest value sometimes gets smeared. I noticed that it doesn't happen with every computer. Any ideas why? Maybe it has something to do with the graphic card? or the browser?
Example: http://jsfiddle.net/Lvc0u55v/8846/ re-run it a few times to see the problem occurs
Angular:
var app = angular.module("myApp", []);
app.controller("MyCtrl", function ($scope, $timeout) {
$scope.charts = [{height:0, x:10, width:80, color:"red"},
{height:0, x:110, width:80, color:"blue" },
{height:0, x:210, width:80, color:"purple"},
{height:0, x:310, width:80, color:"green"}];
$timeout(function(){
for(var i = 0;i<4;i++){
$scope.charts[i].height = 200 + Math.random() * 100;
}
}, 1);
});
Html:
<div ng-app="myApp" ng-controller="MyCtrl">
<svg width=400 height=300>
<rect ng-repeat="chart in charts" ng-attr-height="{{chart.height}}" ng-attr-width={{chart.width}} ng-attr-x="{{chart.x}}" fill={{chart.color}} stroke=black stroke-width:1px></rect>
</svg>
</div>
CSS:
rect{
transition: 0.5s;
}
svg{
transform:rotateX(180deg)
}