| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
global $graph_settings; |
|---|
| 3 |
|
|---|
| 4 |
$fill = 30; |
|---|
| 5 |
$colors[] = '#33aa33'; |
|---|
| 6 |
$colors[] = '#4a00dc'; |
|---|
| 7 |
$colors[] = '#fadc00'; |
|---|
| 8 |
$colors[] = '#3333cc'; |
|---|
| 9 |
$colors[] = '#00acfa'; |
|---|
| 10 |
$colors[] = '#cc3333'; |
|---|
| 11 |
|
|---|
| 12 |
function fake_fill($color, $fill) { |
|---|
| 13 |
if(preg_match('/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/', |
|---|
| 14 |
$color, $octets)) { |
|---|
| 15 |
$o0 = (255 - hexdec($octets[1])) * $fill / 100; |
|---|
| 16 |
$o1 = (255 - hexdec($octets[2])) * $fill / 100; |
|---|
| 17 |
$o2 = (255 - hexdec($octets[3])) * $fill / 100; |
|---|
| 18 |
return sprintf("#%02x%02x%02x", 255 - $o0, 255 - $o1, 255 - $o2); |
|---|
| 19 |
} |
|---|
| 20 |
return $color; |
|---|
| 21 |
} |
|---|
| 22 |
|
|---|
| 23 |
for($i=0; $i<100; $i++) { |
|---|
| 24 |
$settings = array(); |
|---|
| 25 |
$settings['color_hover'] = fake_fill($colors[$i % count($colors)], 90); |
|---|
| 26 |
$settings['color'] = fake_fill($colors[$i % count($colors)], 80); |
|---|
| 27 |
$settings['fill_color'] = $colors[$i % count($colors)]; |
|---|
| 28 |
$settings['fill_alpha'] = $fill; |
|---|
| 29 |
$graph_settings[] = $settings; |
|---|
| 30 |
} |
|---|
| 31 |
|
|---|