Add plot random button

This commit is contained in:
2017-03-18 20:56:56 +05:30
parent 0530eb60dd
commit 3ff22d7809
4 changed files with 36 additions and 12 deletions
+4 -4
View File
@@ -8,7 +8,7 @@ app.directive("dynamicChart", function (d3Tip) {
$scope.chartTypeChosen = $scope.chartTypes[0];
$scope.$watch("[chartData,chartAxisLabel,chartTypeChosen]",function(){
console.log([$scope.chartData,$scope.chartAxisLabel]);
// console.log([$scope.chartData,$scope.chartAxisLabel]);
if ($scope.chartTypeChosen && $scope.chartData){
drawChart($scope.chartTypeChosen,$scope.chartData,$scope.chartAxisLabel);
}
@@ -300,7 +300,7 @@ app.directive("dynamicChart", function (d3Tip) {
var indexDirection = Math.floor(midAngle/360 *8);
var direction = availableDirection[indexDirection];
console.log(direction);
// console.log(direction);
return direction;
})
.offset(function (d) {
@@ -312,8 +312,8 @@ app.directive("dynamicChart", function (d3Tip) {
var extraRadius = 15;
var posCentre = [-extraRadius*Math.sin(midAngle),-extraRadius*Math.cos(midAngle)];
console.log(midAngle*180/Math.PI);
console.log(posCentre);
// console.log(midAngle*180/Math.PI);
// console.log(posCentre);
return posCentre;
});