'use strict';angular.module('angular-rickshaw',[]).directive('rickshaw',function($compile){return{restrict:'EA',scope:{options:'=rickshawOptions',series:'=rickshawSeries',features:'=rickshawFeatures'},link:function(scope,element,attrs){function getSettings(el){var settings=angular.copy(scope.options);settings.element=el;settings.series=scope.series;return settings}var graph;function update(){var mainEl=angular.element(element);mainEl.append(graphEl);mainEl.empty();var graphEl=$compile('
')(scope);mainEl.append(graphEl);var settings=getSettings(graphEl[0]);graph=new Rickshaw.Graph(settings);if(scope.features&&scope.features.hover){var hoverConfig={graph:graph};hoverConfig.xFormatter=scope.features.hover.xFormatter;hoverConfig.yFormatter=scope.features.hover.yFormatter;hoverConfig.formatter=scope.features.hover.formatter;var hoverDetail=new Rickshaw.Graph.HoverDetail(hoverConfig)}if(scope.features&&scope.features.palette){var palette=new Rickshaw.Color.Palette({scheme:scope.features.palette});for(var i=0;i