Вход Регистрация
Файл: templates/backend/default/assets/plugins/jquery-ricksaw-chart/js/Rickshaw.Color.Palette.min.js
Строк: 55
<?php
Rickshaw
.namespace("Rickshaw.Color.Palette"),Rickshaw.Color.Palette=function(l){var e=new Rickshaw.Fixtures.Color;if(l=l||{},this.schemes={},this.scheme=e.schemes[l.scheme]||l.scheme||e.schemes.colorwheel,this.runningIndex=0,this.generatorIndex=0,l.interpolatedStopCount){var t,n,i=this.scheme.length-1,o=[];for(t=0;i>t;t++){o.push(this.scheme[t]);var a=d3.interpolateHsl(this.scheme[t],this.scheme[t+1]);for(n=1;n<l.interpolatedStopCount;n++)o.push(a(1/l.interpolatedStopCount*n))}o.push(this.scheme[this.scheme.length-1]),this.scheme=o}this.rotateCount=this.scheme.length,this.color=function(l){return this.scheme[l]||this.scheme[this.runningIndex++]||this.interpolateColor()||"#808080"},this.interpolateColor=function(){if(Array.isArray(this.scheme)){var l;return this.generatorIndex==2*this.rotateCount-1?(l=d3.interpolateHsl(this.scheme[this.generatorIndex],this.scheme[0])(.5),this.generatorIndex=0,this.rotateCount*=2):(l=d3.interpolateHsl(this.scheme[this.generatorIndex],this.scheme[this.generatorIndex+1])(.5),this.generatorIndex++),this.scheme.push(l),l}}};
?>
Онлайн: 0
Реклама