Created
April 12, 2016 17:53
-
-
Save jtomaszon/21dce94d957707e294be7db352f51cbb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
'use strict'; | |
angular.module('app.chart') | |
.controller('flotChartCtrl', ['$scope', '$http', flotChartCtrl]); | |
function flotChartCtrl($scope, $http) { | |
var areaChart, lineChart1; | |
lineChart1 = {}; | |
lineChart1.data1 = [[2, 445], [3, 500], [4, 554], [5, 471], [6, 437], [7, 507], [8, 524], [9, 448], [10, 536], [11, 529], [12, 447], [13, 466], [14, 345]]; | |
$scope.line1 = {}; | |
$scope.line1.data = [ | |
{ | |
data: lineChart1.data1, | |
label: 'Incidents' | |
} | |
]; | |
$scope.line1.options = { | |
series: { | |
lines: { | |
show: true, | |
fill: true, | |
fillColor: { | |
colors: [ | |
{ | |
opacity: 0 | |
}, { | |
opacity: 0.3 | |
} | |
] | |
} | |
}, | |
points: { | |
show: true, | |
lineWidth: 2, | |
fill: true, | |
fillColor: "#ffffff", | |
symbol: "circle", | |
radius: 5 | |
} | |
}, | |
colors: [$scope.color.primary, $scope.color.infoAlt], | |
tooltip: true, | |
tooltipOpts: { | |
defaultTheme: false | |
}, | |
grid: { | |
hoverable: true, | |
clickable: true, | |
tickColor: "#f9f9f9", | |
borderWidth: 1, | |
borderColor: "#eeeeee" | |
}, | |
}; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment