Skip to content

Instantly share code, notes, and snippets.

@jtomaszon
Created April 12, 2016 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtomaszon/21dce94d957707e294be7db352f51cbb to your computer and use it in GitHub Desktop.
Save jtomaszon/21dce94d957707e294be7db352f51cbb to your computer and use it in GitHub Desktop.
(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