重构数据统计前后端,修改ip归属地显示逻辑,升级前端组件 (#59)

* 重构数据统计与ip归属地查询部分

* update README and SQL
This commit is contained in:
社会易姐QwQ 2022-11-08 12:55:42 +08:00 committed by GitHub
parent 772cea79c5
commit bbd8016675
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
310 changed files with 42832 additions and 35626 deletions

View File

@ -40,12 +40,12 @@ class Access_Core
throw new Typecho_Plugin_Exception(_t('请先设置插件!'));
}
$this->ua = new Access_UA($this->request->getAgent());
$ipdbPath = dirname(__file__).'/lib/ipipfree.ipdb';
$this->ipdb = new Access_Ip($ipdbPath);
switch ($this->request->get('action')) {
case 'overview':
$this->action = 'overview';
$this->title = _t('访问概览');
$this->parseOverview();
$this->parseReferer();
break;
case 'logs':
default:
@ -119,6 +119,11 @@ class Access_Core
} else {
$row['display_name'] = $name . ' / ' . $version;
}
if($row['ip_country'] == '中国') {
$row['ip_loc'] = "{$row['ip_province']} {$row['ip_city']}";
} else {
$row['ip_loc'] = $row['ip_country'];
}
}
$this->logs['list'] = $this->htmlEncode($this->urlDecode($list));
@ -147,156 +152,6 @@ class Access_Core
->order('count', Typecho_Db::SORT_DESC));
}
/**
* 生成来源统计数据,提供给页面渲染使用
*
* @access public
* @return void
*/
protected function parseReferer()
{
$this->referer['url'] = $this->db->fetchAll($this->db->select('DISTINCT entrypoint AS value, COUNT(1) as count')
->from('table.access_log')->where("entrypoint <> ''")->group('entrypoint')
->order('count', Typecho_Db::SORT_DESC)->limit($this->config->pageSize));
$this->referer['domain'] = $this->db->fetchAll($this->db->select('DISTINCT entrypoint_domain AS value, COUNT(1) as count')
->from('table.access_log')->where("entrypoint_domain <> ''")->group('entrypoint_domain')
->order('count', Typecho_Db::SORT_DESC)->limit($this->config->pageSize));
$this->referer = $this->htmlEncode($this->urlDecode($this->referer));
}
/**
* 生成用于图表的JSON数据
*
* @access protected
* @return string
*/
protected function makeChartJson(): string
{
$chart = [];
foreach($this->overview as $type => $val) {
$val['sub_title'] = 'Generate By AccessPlugin';
if($type == 'today' || $type == 'yesterday') {
$val['xAxis'] = range(0, count($val['ip']['detail']));
$val['title'] = _t('%s 统计', $val['time']);
} elseif($type == 'month') {
$val['xAxis'] = range(1, count($val['ip']['detail']));
$val['title'] = _t('%s 月统计', $val['time']);
}
$chart[$type] = $val;
}
return json_encode($chart, JSON_UNESCAPED_UNICODE);
}
/**
* 生成总览数据,提供给页面渲染使用
*
* @access protected
* @return void
*/
protected function parseOverview()
{
$types = ['today', 'yesterday', 'month'];
# 分类分时段统计数据
foreach($types as $type) {
if($type == 'today' || $type == 'yesterday') {
if($type == 'today')
$time = date("Y-m-d");
else
$time = date("Y-m-d", strtotime('-1 day'));
$this->overview[$type]['time'] = $time;
# 按小时统计数据
for($hour = 0; $hour < 24; $hour++) {
$start = strtotime(date("{$time} {$hour}:00:00"));
$end = strtotime(date("{$time} {$hour}:59:59"));
// "SELECT DISTINCT ip FROM {$this->table} {$where} AND `time` BETWEEN {$start} AND {$end}"));
$subQuery = $this->db->select('DISTINCT ip')->from('table.access_log')
->where("time >= ? AND time <= ?", $start, $end);
if (method_exists($subQuery, 'prepare')) {
$subQuery = $subQuery->prepare($subQuery);
}
$this->overview[$type]['ip']['detail'][$hour] = intval($this->db->fetchAll($this->db->select('COUNT(1) AS count')
->from('(' . $subQuery . ') AS tmp'))[0]['count']);
// "SELECT DISTINCT ip,ua FROM {$this->table} {$where} AND `time` BETWEEN {$start} AND {$end}"));
$subQuery = $this->db->select('DISTINCT ip,ua')->from('table.access_log')
->where("time >= ? AND time <= ?", $start, $end);
if (method_exists($subQuery, 'prepare')) {
$subQuery = $subQuery->prepare($subQuery);
}
$this->overview[$type]['uv']['detail'][$hour] = intval($this->db->fetchAll($this->db->select('COUNT(1) AS count')
->from('(' . $subQuery . ') AS tmp'))[0]['count']);
// "SELECT ip FROM {$this->table} {$where} AND `time` BETWEEN {$start} AND {$end}"));
$this->overview[$type]['pv']['detail'][$hour] = intval($this->db->fetchAll($this->db->select('COUNT(1) AS count')
->from('table.access_log')->where('time >= ? AND time <= ?', $start, $end))[0]['count']);
}
# 统计当天总数据
$start = strtotime(date("{$time} 00:00:00"));
$end = strtotime(date("{$time} 23:59:59"));
$subQuery = $this->db->select('DISTINCT ip')->from('table.access_log')->where("time >= ? AND time <= ?", $start, $end);
if (method_exists($subQuery, 'prepare')) {
$subQuery = $subQuery->prepare($subQuery);
}
$this->overview[$type]['ip']['count'] = intval($this->db->fetchAll($this->db->select('COUNT(1) AS count')->from('(' . $subQuery . ') AS tmp'))[0]['count']);
$subQuery = $this->db->select('DISTINCT ip,ua')->from('table.access_log')->where("time >= ? AND time <= ?", $start, $end);
if (method_exists($subQuery, 'prepare')) {
$subQuery = $subQuery->prepare($subQuery);
}
$this->overview[$type]['uv']['count'] = intval($this->db->fetchAll($this->db->select('COUNT(1) AS count')->from('(' . $subQuery . ') AS tmp'))[0]['count']);
$this->overview[$type]['pv']['count'] = intval($this->db->fetchAll($this->db->select('COUNT(1) AS count')
->from('table.access_log')
->where("time >= ? AND time <= ?", $start, $end)
)[0]['count']);
} elseif($type == 'month') {
$year = date('Y');
$month = date("m");
$monthDays = cal_days_in_month(CAL_GREGORIAN, intval($month), intval($year)); # 计算当月天数
$this->overview[$type]['time'] = $month;
# 按天统计数据
for($day = 1; $day <= $monthDays; $day++) {
$start = strtotime(date("{$year}-{$month}-{$day} 00:00:00"));
$end = strtotime(date("{$year}-{$month}-{$day} 23:59:59"));
$subQuery = $this->db->select('DISTINCT ip')->from('table.access_log')
->where('time >= ? AND time <= ?', $start, $end);
if (method_exists($subQuery, 'prepare')) {
$subQuery = $subQuery->prepare($subQuery);
}
$this->overview[$type]['ip']['detail'][$day-1] = intval($this->db->fetchAll($this->db->select('COUNT(1) AS count')
->from('(' . $subQuery . ') AS tmp'))[0]['count']);
$subQuery = $this->db->select('DISTINCT ip,ua')->from('table.access_log')
->where('time >= ? AND time <= ?', $start, $end);
if (method_exists($subQuery, 'prepare')) {
$subQuery = $subQuery->prepare($subQuery);
}
$this->overview[$type]['uv']['detail'][$day-1] = intval($this->db->fetchAll($this->db->select('COUNT(1) AS count')
->from('(' . $subQuery . ') AS tmp'))[0]['count']);
$this->overview[$type]['pv']['detail'][$day-1] = intval($this->db->fetchAll($this->db->select('COUNT(1) AS count')
->from('table.access_log')->where('time >= ? AND time <= ?', $start, $end))[0]['count']);
}
}
}
# 统计总计数据
// "SELECT DISTINCT ip FROM {$this->table} {$where}"));
$this->overview['total']['ip'] = intval($this->db->fetchAll($this->db->select('COUNT(1) AS count')
->from('(' . $this->db->select('DISTINCT ip')->from('table.access_log') . ') AS tmp'))[0]['count']);
// "SELECT DISTINCT ip,ua FROM {$this->table} {$where}"));
$this->overview['total']['uv'] = intval($this->db->fetchAll($this->db->select('COUNT(1) AS count')
->from('(' . $this->db->select('DISTINCT ip,ua')->from('table.access_log') . ') AS tmp'))[0]['count']);
// "SELECT ip FROM {$this->table} {$where}"));
$this->overview['total']['pv'] = intval($this->db->fetchAll($this->db->select('COUNT(1) AS count')
->from('table.access_log'))[0]['count']);
# 输出用于图表的Json
$this->overview['chart_data'] = $this->makeChartJson();
}
/**
* 编码数组中的字符串为 HTML 实体
* 默认只有数组的值被编码,下标不被编码
@ -419,10 +274,26 @@ class Access_Core
$url = $this->request->getServer('REQUEST_URI');
}
$ip = $this->request->getIp();
if ($ip == null) {
$ip = '0.0.0.0';
if(!empty($ip)) {
# 解析ip归属地
try {
$city = $this->ipdb->findInfo($ip, 'CN');
$ip_country = $city->country_name;
if($ip_country == '中国') {
$ip_province = $city->region_name;
$ip_city = $city->city_name;
} else {
$ip_province = $ip_city = NULL;
}
} catch(Excpetion $e) {
$ip_country = $ip_province = $ip_city = '未知';
}
# ip转int
$ip = bindec(decbin(ip2long($ip)));
} else {
$ip = 0;
}
$ip = bindec(decbin(ip2long($ip)));
$entrypoint = $this->getEntryPoint();
$referer = $this->request->getReferer();
@ -450,6 +321,9 @@ class Access_Core
'path' => parse_url($url, PHP_URL_PATH),
'query_string' => parse_url($url, PHP_URL_QUERY),
'ip' => $ip,
'ip_country' => $ip_country,
'ip_province' => $ip_province,
'ip_city' => $ip_city,
'referer' => $referer,
'referer_domain' => parse_url($referer, PHP_URL_HOST),
'entrypoint' => $entrypoint,

View File

@ -1,107 +1,267 @@
<?php
/*
本代码仅用于 DATX 格式,请注意及时更新 IP 数据库版本
Code for PHP 5.3+ only!
本代码拷贝自ipdb-php (https://github.com/ipipdotnet/ipdb-php)
ipdb文件需要及时更新
*/
if (!defined('__ACCESS_PLUGIN_ROOT__')) {
throw new Exception('Boostrap file not found');
}
class Access_Ip
{
private static $ip = NULL;
class Access_Ip {
public $reader = NULL;
private static $fp = NULL;
private static $offset = NULL;
private static $index = NULL;
private static $cached = array();
public static function find($ip)
{
if (empty($ip) === TRUE)
{
return 'N/A';
}
$nip = gethostbyname($ip);
$ipdot = explode('.', $nip);
if ($ipdot[0] < 0 || $ipdot[0] > 255 || count($ipdot) !== 4)
{
return 'N/A';
}
if (isset(self::$cached[$nip]) === true) {
return self::$cached[$nip];
}
if (self::$fp === NULL)
{
self::init();
}
$nip2 = pack('N', ip2long($nip));
$tmp_offset = ((int)$ipdot[0] * 256 + (int)$ipdot[1]) * 4;
$start = unpack('Vlen', self::$index[$tmp_offset] . self::$index[$tmp_offset + 1] . self::$index[$tmp_offset + 2] . self::$index[$tmp_offset + 3]);
$index_offset = $index_length = NULL;
$max_comp_len = self::$offset['len'] - 262144 - 4;
for ($start = $start['len'] * 9 + 262144; $start < $max_comp_len; $start += 9)
{
if (self::$index[$start] . self::$index[$start + 1] . self::$index[$start + 2] . self::$index[$start + 3] >= $nip2)
{
$index_offset = unpack('Vlen', self::$index[$start + 4] . self::$index[$start + 5] . self::$index[$start + 6] . "\x0");
$index_length = unpack('nlen', self::$index[$start + 7] . self::$index[$start + 8]);
break;
}
}
if ($index_offset === NULL)
{
return 'N/A';
}
fseek(self::$fp, self::$offset['len'] + $index_offset['len'] - 262144);
self::$cached[$nip] = explode("\t", fread(self::$fp, $index_length['len']));
return self::$cached[$nip];
public function __construct($db) {
$this->reader = new Reader($db);
}
private static function init()
{
if (self::$fp === NULL)
{
self::$ip = new self();
self::$fp = fopen(__ACCESS_PLUGIN_ROOT__ . '/lib/17monipdb.datx', 'rb');
if (self::$fp === FALSE)
{
throw new Exception('Invalid 17monipdb.datx file!');
}
self::$offset = unpack('Nlen', fread(self::$fp, 4));
if (self::$offset['len'] < 4)
{
throw new Exception('Invalid 17monipdb.datx file!');
}
self::$index = fread(self::$fp, self::$offset['len'] - 4);
}
public function find($ip, $language) {
return $this->reader->find($ip, $language);
}
public function __destruct()
{
if (self::$fp !== NULL)
{
fclose(self::$fp);
public function findMap($ip, $language) {
return $this->reader->findMap($ip, $language);
}
self::$fp = NULL;
}
public function findInfo($ip, $language) {
$map = $this->findMap($ip, $language);
if (NULL === $map)
return NULL;
return new CityInfo($map);
}
}
?>
class CityInfo {
public $country_name = '';
public $region_name = '';
public $city_name = '';
public $owner_domain = '';
public $isp_domain = '';
public $latitude = '';
public $longitude = '';
public $timezone = '';
public $utc_offset = '';
public $china_admin_code = '';
public $idd_code = '';
public $country_code = '';
public $continent_code = '';
public $idc = '';
public $base_station = '';
public $country_code3 = '';
public $european_union = '';
public $currency_code = '';
public $currency_name = '';
public $anycast = '';
public function __construct(array $data) {
foreach ($data AS $field => $value)
$this->{$field} = $value;
}
public function __get($name) {
return $this->{$name};
}
}
class Reader {
const IPV4 = 1;
const IPV6 = 2;
private $file = NULL;
private $fileSize = 0;
private $nodeCount = 0;
private $nodeOffset = 0;
private $meta = [];
private $database = '';
/**
* Reader constructor.
* @param $database
* @throws \Exception
*/
public function __construct($database) {
$this->database = $database;
if (is_readable($this->database) === FALSE)
throw new \InvalidArgumentException("The IP Database file \"{$this->database}\" does not exist or is not readable.");
$this->file = @fopen($this->database, 'rb');
if ($this->file === FALSE)
throw new \InvalidArgumentException("IP Database File opening \"{$this->database}\".");
$this->fileSize = @filesize($this->database);
if ($this->fileSize === FALSE)
throw new \UnexpectedValueException("Error determining the size of \"{$this->database}\".");
$metaLength = unpack('N', fread($this->file, 4))[1];
$text = fread($this->file, $metaLength);
$this->meta = json_decode($text, 1);
if (isset($this->meta['fields']) === FALSE || isset($this->meta['languages']) === FALSE)
throw new \Exception('IP Database metadata error.');
$fileSize = 4 + $metaLength + $this->meta['total_size'];
if ($fileSize != $this->fileSize)
throw new \Exception('IP Database size error.');
$this->nodeCount = $this->meta['node_count'];
$this->nodeOffset = 4 + $metaLength;
}
/**
* @param $ip
* @param string $language
* @return array|NULL
*/
public function find($ip, $language) {
if (is_resource($this->file) === FALSE)
throw new \BadMethodCallException('IPIP DB closed.');
if (isset($this->meta['languages'][$language]) === FALSE)
throw new \InvalidArgumentException("language : {$language} not support.");
if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6) === FALSE)
throw new \InvalidArgumentException("The value \"$ip\" is not a valid IP address.");
if (strpos($ip, '.') !== FALSE && !$this->supportV4())
throw new \InvalidArgumentException("The Database not support IPv4 address.");
elseif (strpos($ip, ':') !== FALSE && !$this->supportV6())
throw new \InvalidArgumentException("The Database not support IPv6 address.");
try{
$node = $this->findNode($ip);
if ($node > 0) {
$data = $this->resolve($node);
$values = explode("\t", $data);
return array_slice($values, $this->meta['languages'][$language], count($this->meta['fields']));
}
}catch (\Exception $e){
return NULL;
}
return NULL;
}
public function findMap($ip, $language) {
$array = $this->find($ip, $language);
if (NULL === $array)
return NULL;
return array_combine($this->meta['fields'], $array);
}
private $v4offset = 0;
private $v6offsetCache = [];
/**
* @param $ip
* @return int
* @throws \Exception
*/
private function findNode($ip) {
$binary = inet_pton($ip);
$bitCount = strlen($binary) * 8; // 32 | 128
$key = substr($binary, 0, 2);
$node = 0;
$index = 0;
if ($bitCount === 32) {
if ($this->v4offset === 0) {
for ($i = 0; $i < 96 && $node < $this->nodeCount; $i++) {
if ($i >= 80)
$idx = 1;
else
$idx = 0;
$node = $this->readNode($node, $idx);
if ($node > $this->nodeCount)
return 0;
}
$this->v4offset = $node;
} else {
$node = $this->v4offset;
}
} else {
if (isset($this->v6offsetCache[$key])) {
$index = 16;
$node = $this->v6offsetCache[$key];
}
}
for($i = $index; $i < $bitCount; $i++) {
if ($node >= $this->nodeCount)
break;
$node = $this->readNode($node, 1 & ((0xFF & ord($binary[$i >> 3])) >> 7 - ($i % 8)));
if ($i == 15)
$this->v6offsetCache[$key] = $node;
}
if ($node === $this->nodeCount)
return 0;
elseif ($node > $this->nodeCount)
return $node;
throw new \Exception("find node failed.");
}
/**
* @param $node
* @param $index
* @return mixed
* @throws \Exception
*/
private function readNode($node, $index) {
return unpack('N', $this->read($this->file, $node * 8 + $index * 4, 4))[1];
}
/**
* @param $node
* @return mixed
* @throws \Exception
*/
private function resolve($node) {
$resolved = $node - $this->nodeCount + $this->nodeCount * 8;
if ($resolved >= $this->fileSize)
return NULL;
$bytes = $this->read($this->file, $resolved, 2);
$size = unpack('N', str_pad($bytes, 4, "\x00", STR_PAD_LEFT))[1];
$resolved += 2;
return $this->read($this->file, $resolved, $size);
}
public function close() {
if (is_resource($this->file) === TRUE)
fclose($this->file);
}
/**
* @param $stream
* @param $offset
* @param $length
* @return bool|string
* @throws \Exception
*/
private function read($stream, $offset, $length) {
if ($length > 0) {
if (fseek($stream, $offset + $this->nodeOffset) === 0) {
$value = fread($stream, $length);
if (strlen($value) === $length)
return $value;
}
throw new \Exception("The Database file read bad data.");
}
return '';
}
public function supportV6() {
return ($this->meta['ip_version'] & self::IPV6) === self::IPV6;
}
public function supportV4() {
return ($this->meta['ip_version'] & self::IPV4) === self::IPV4;
}
public function getMeta() {
return $this->meta;
}
/**
* @return int UTC Timestamp
*/
public function getBuildTime() {
return $this->meta['build'];
}
}

322
Access_Statistic.php Normal file
View File

@ -0,0 +1,322 @@
<?php
if (!defined('__ACCESS_PLUGIN_ROOT__')) {
throw new Exception('Boostrap file not found');
}
class Access_Statistic {
private $db;
private $request;
public function __construct($request) {
$this->db = Typecho_Db::get();
$this->request = $request;
}
/**
* 获取计数分析
*
* @access private
* @return ?array
* @throws Exception
*/
private function count(): ?array {
$resp = [];
$type = $this->request->get('type', 'total'); # 统计类型
$dstTime = $this->request->get('time'); # 目标时间
switch($type) {
# 总计数据
case 'total':
$startTime = 0;
$endTime = time();
break;
# 按天统计
case 'day':
if(!preg_match('/^\d{4}-\d{2}-\d{2}$/', $dstTime))
throw new Exception('Bad Request', 400);
$startTime = strtotime(date("{$dstTime} 00:00:00"));
$endTime = strtotime(date("{$dstTime} 23:59:59"));
break;
# 按月统计
case 'month':
if(!preg_match('/^\d{4}-\d{2}$/', $dstTime))
throw new Exception('Bad Request', 400);
[$year, $month] = explode('-', $dstTime);
$monthDays = cal_days_in_month(CAL_GREGORIAN, intval($month), intval($year)); # 计算当月天数
$startTime = strtotime(date("{$dstTime}-01 00:00:00"));
$endTime = strtotime(date("{$dstTime}-{$monthDays} 23:59:59"));
break;
default:
throw new Exception('Bad Request', 400);
}
$resp['type'] = $type;
$resp['dst'] = $dstTime;
# ip数
$subQuery = $this->db
->select('DISTINCT ip')
->from('table.access_log')
->where("time >= ? AND time <= ?", $startTime, $endTime);
if(method_exists($subQuery, 'prepare'))
$subQuery = $subQuery->prepare($subQuery);
$resp['count']['ip'] = intval($this->db->fetchRow(
$this->db
->select('COUNT(1) AS cnt')
->from('(' . $subQuery . ') AS tmp')
)['cnt']);
# 访客数
$subQuery = $this->db
->select('DISTINCT ip, ua')
->from('table.access_log')
->where("time >= ? AND time <= ?", $startTime, $endTime);
if(method_exists($subQuery, 'prepare'))
$subQuery = $subQuery->prepare($subQuery);
$resp['count']['uv'] = intval($this->db->fetchRow(
$this->db
->select('COUNT(1) AS cnt')
->from('(' . $subQuery . ') AS tmp')
)['cnt']);
# 浏览数
$resp['count']['pv'] = intval($this->db->fetchRow(
$this->db
->select('COUNT(1) AS cnt')
->from('table.access_log')
->where("time >= ? AND time <= ?", $startTime, $endTime)
)['cnt']);
return $resp;
}
/**
* 获取文章访问统计
*
* @access private
* @return ?array
* @throws Exception
*/
private function article(): ?array {
$resp = [];
$ps = $this->request->get('ps', 10); # 页大小
# 统计文章浏览比例
foreach(
$this->db->fetchAll(
$this->db
->select('content_id AS cid, table.contents.title AS title, COUNT(1) AS cnt')
->from('table.access_log')
->join('table.contents', 'content_id = table.contents.cid', Typecho_Db::INNER_JOIN)
->where('IFNULL(content_id, 0)')
->group('content_id')
->order('cnt', Typecho_Db::SORT_DESC)
->limit($ps)
) as $i
) {
$resp[] = [
'cid' => intval($i['cid']),
'title' => $i['title'],
'count' => intval($i['cnt'])
];
}
return $resp;
}
/**
* 获取访问地域统计
*
* @access private
* @return ?array
* @throws Exception
*/
private function location(): ?array {
$resp = [];
$ps = $this->request->get('ps', 10); # 页大小
$cate = $this->request->get('cate'); # 类型
switch($cate) {
case 'china':
# 国内
$fetchData = $this->db->fetchAll(
$this->db
->select("IF(ip_province = '中国', '国内未明确', ip_province) AS area, COUNT(1) AS cnt")
->from('table.access_log')
->where("ip_country = '中国'")
->group('area')
->order('cnt', Typecho_Db::SORT_DESC)
->limit($ps)
);
break;
case 'inter':
# 国际
$fetchData = $this->db->fetchAll(
$this->db
->select("ip_country AS area, COUNT(1) AS cnt")
->from('table.access_log')
->group('area')
->order('cnt', Typecho_Db::SORT_DESC)
->limit(15)
);
break;
default:
throw new Exception('Bad Request', 400);
}
foreach($fetchData as $row) {
$resp[] = [
'area' => $row['area'],
'count' => intval($row['cnt'])
];
}
return $resp;
}
/**
* 获取访问量图表数据
*
* @access private
* @return ?array
* @throws Exception
*/
private function chart(): ?array {
$resp = [];
$type = $this->request->get('type'); # 统计类型
$dstTime = $this->request->get('time'); # 目标时间
switch($type) {
# 按天统计
case 'day':
if(!preg_match('/^\d{4}-\d{2}-\d{2}$/', $dstTime))
throw new Exception('Bad Request', 400);
$loopStart = 0;
$loopEnd = 23;
break;
# 按月统计
case 'month':
if(!preg_match('/^\d{4}-\d{2}$/', $dstTime))
throw new Exception('Bad Request', 400);
[$year, $month] = explode('-', $dstTime);
$loopStart = 1;
$loopEnd = cal_days_in_month(CAL_GREGORIAN, intval($month), intval($year)); # 计算当月天数
break;
default:
throw new Exception('Bad Request', 400);
}
$resp['type'] = $type;
$resp['dst'] = $dstTime;
foreach(range($loopStart, $loopEnd) as $i) {
$chart = [];
switch($type) {
case 'day':
$startTime = strtotime(date("{$dstTime} {$i}:00:00"));
$endTime = strtotime(date("{$dstTime} {$i}:59:59"));
break;
case 'month':
$startTime = strtotime(date("{$dstTime}-{$i} 00:00:00"));
$endTime = strtotime(date("{$dstTime}-{$i} 23:59:59"));
break;
}
$chart['time'] = $i;
# ip数
$subQuery = $this->db
->select('DISTINCT ip')
->from('table.access_log')
->where('time >= ? AND time <= ?', $startTime, $endTime);
if(method_exists($subQuery, 'prepare'))
$subQuery = $subQuery->prepare($subQuery);
$chart['ip'] = intval($this->db->fetchRow(
$this->db
->select('COUNT(1) AS count')
->from('(' . $subQuery . ') AS tmp')
)['count']);
# 访客数
$subQuery = $this->db
->select('DISTINCT ip,ua')
->from('table.access_log')
->where('time >= ? AND time <= ?', $startTime, $endTime);
if(method_exists($subQuery, 'prepare'))
$subQuery = $subQuery->prepare($subQuery);
$chart['uv'] = intval($this->db->fetchRow(
$this->db
->select('COUNT(1) AS count')
->from('(' . $subQuery . ') AS tmp')
)['count']);
# 浏览数
$chart['pv'] = intval($this->db->fetchRow(
$this->db
->select('COUNT(1) AS count')
->from('table.access_log')
->where('time >= ? AND time <= ?', $startTime, $endTime)
)['count']);
$resp['chart'][] = $chart;
}
# 计算各平均值
$pvSum = 0;
$uvSum = 0;
$ipSum = 0;
$cnt = count($resp['chart']);
foreach($resp['chart'] as $i) {
$pvSum += $i['pv'];
$uvSum += $i['uv'];
$ipSum += $i['ip'];
}
$resp['avg']['pv'] = round($pvSum / $cnt, 2);
$resp['avg']['uv'] = round($uvSum / $cnt, 2);
$resp['avg']['ip'] = round($ipSum / $cnt, 2);
return $resp;
}
/**
* 获取来源统计
*
* @access private
* @return ?array
* @throws Exception
*/
private function referer(): ?array {
$resp = [];
$type = $this->request->get('type', 'url'); # 统计类型
$ps = $this->request->get('ps', 10);
$pn = $this->request->get('pn', 1);
switch($type) {
case 'url':
$fetchData = $this->db->fetchAll(
$this->db
->select('DISTINCT entrypoint AS value, COUNT(1) as cnt')
->from('table.access_log')
->where("entrypoint != ''")
->group('entrypoint')
->order('cnt', Typecho_Db::SORT_DESC)
->page($pn, $ps)
);
break;
case 'domain':
$fetchData = $this->db->fetchAll($this->db
->select('DISTINCT entrypoint_domain AS value, COUNT(1) as cnt')
->from('table.access_log')
->where("entrypoint_domain != ''")
->group('entrypoint_domain')
->order('cnt', Typecho_Db::SORT_DESC)
->page($pn, $ps)
);
break;
default:
throw new Exception('Bad Request', 400);
}
foreach($fetchData as $i) {
$resp[] = [
'value' => ($type == 'url') ? urldecode($i['value']) : $i['value'],
'count' => $i['cnt']
];
}
return $resp;
}
/**
* 业务调度入口
*
* @access public
* @param string rpcType 调用过程类型
* @return ?array
* @throws Exception
*/
public function invoke(string $rpcType): ?array {
if(!method_exists($this, $rpcType) || in_array($rpcType, ['__construct', 'invoke']))
throw new Exception('Bad Request', 400);
return $this->$rpcType(); # 方法指针
}
}

View File

@ -28,41 +28,6 @@ class Access_Action extends Typecho_Widget implements Widget_Interface_Do
echo $image;
}
public function ip()
{
$ip = $this->request->get('ip');
try {
$this->checkAuth();
$response = Access_Ip::find($ip);
if (is_array($response)) {
$response = array(
'code' => 0,
'data' => implode(' ', $response),
);
} else {
throw new Exception('解析ip失败');
}
} catch (Exception $e) {
try {
$http = Typecho_Http_Client::get();
$result = $http->send('https://tools.keycdn.com/geo.json?host=' . $ip);
$result = Json::decode($result, true);
if ($result['status'] == 'success') {
$response = array(
'code' => 0,
'data' => $result['data']['geo']['country_name'] . ' ' . $result['data']['geo']['city'],
);
}
} catch (Exception $e) {
$response = array(
'code' => 100,
'data' => '很抱歉ipip.net查询无结果同时你的服务器无法连接fallback接口(tools.keycdn.com)',
);
}
}
$this->response->throwJson($response);
}
public function deleteLogs()
{
try {
@ -90,8 +55,30 @@ class Access_Action extends Typecho_Widget implements Widget_Interface_Do
protected function checkAuth()
{
if (!$this->access->isAdmin()) {
throw new Exception('Access Denied');
throw new Exception('Access Denied', 401);
}
}
public function statistic() {
try {
$this->checkAuth(); # 鉴权
if(!$this->request->isGet())
throw new Exception('Method Not Allowed', 405);
$rpcType = $this->request->get('rpc'); # 业务类型
$statistic = new Access_Statistic($this->request);
$data = $statistic->invoke($rpcType); # 进行业务分发并调取数据
$errCode = 0;
$errMsg = 'ok';
} catch (Exception $e) {
$errCode = $e->getCode();
$errMsg = $e->getMessage();
}
$this->response->throwJson([
'code' => $errCode,
'message' => $errMsg,
'data' => $data
]);
}
}

View File

@ -24,8 +24,8 @@ class Access_Plugin implements Typecho_Plugin_Interface
$msg = Access_Plugin::install();
Helper::addPanel(1, self::$panel, _t('Access控制台'), _t('Access插件控制台'), 'subscriber');
Helper::addRoute("access_track_gif", "/access/log/track.gif", "Access_Action", 'writeLogs');
Helper::addRoute("access_ip", "/access/ip.json", "Access_Action", 'ip');
Helper::addRoute("access_delete_logs", "/access/log/delete.json", "Access_Action", 'deleteLogs');
Helper::addRoute("access_delete_logs", "/access/log/delete", "Access_Action", 'deleteLogs');
Helper::addRoute('access_statistic_view', '/access/statistic/view', 'Access_Action', 'statistic');
Typecho_Plugin::factory('Widget_Archive')->beforeRender = array('Access_Plugin', 'backend');
Typecho_Plugin::factory('Widget_Archive')->footer = array('Access_Plugin', 'frontend');
Typecho_Plugin::factory('admin/footer.php')->end = array('Access_Plugin', 'adminFooter');
@ -49,8 +49,8 @@ class Access_Plugin implements Typecho_Plugin_Interface
}
Helper::removePanel(1, self::$panel);
Helper::removeRoute("access_track_gif");
Helper::removeRoute("access_ip");
Helper::removeRoute("access_delete_logs");
Helper::removeRoute("access_statistic_view");
}
/**

View File

@ -4,23 +4,33 @@
### 功能简介/更新说明
* 查看IP/UV/PV
#### 数据分析与统计
* IP / UV / PV总量统计
* 来源页 / 域名排名
* 最受欢迎的文章
* 国内 / 国际访问地域分析
* 每日IP / UV / PV统计图表(带均线)
* 前后端分离使用CSR方式展示数据
#### 访问日志
* ~~ip归属地使用淘宝API~~
* 管理员登录时不记录日志
* 查看来源页和来源域名排名
* 修复Referer记录错误的bug
* 添加删除日志的功能
* 修复旧版本升级错误的提示,自动更新数据表结构
* 使用ipip.net离线数据库
* 日志写入支持前端写入或后端写入
* 日志筛选支持按ip、文章标题、路由进行过滤
* ip归属地使用SSR方式解析并加入日志显示
### 使用须知
* 插件更新升级时,请先禁用插件后再上传
* 插件目录名请修改为Access
* PHP需拥有Calendar扩展
* PHP>=7
* PHP --version >= 7
### 作者/贡献者
<a href="https://github.com/kokororin/typecho-plugin-Access/graphs/contributors">

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

View File

@ -1,47 +0,0 @@
/*
Highcharts JS v4.1.9 (2015-10-07)
(c) 2009-2013 Torstein H?nsi
License: www.highcharts.com/license
*/
(function(d){function p(c,b,a){var e,g,f=b.options.chart.options3d,h=!1;a?(h=b.inverted,a=b.plotWidth/2,b=b.plotHeight/2,e=f.depth/2,g=z(f.depth,1)*z(f.viewDistance,0)):(a=b.plotLeft+b.plotWidth/2,b=b.plotTop+b.plotHeight/2,e=f.depth/2,g=z(f.depth,1)*z(f.viewDistance,0));var j=[],i=a,k=b,l=e,q=g,a=A*(h?f.beta:-f.beta),f=A*(h?-f.alpha:f.alpha),o=m(a),x=n(a),r=m(f),v=n(f),t,u,y,w,s,p;d.each(c,function(a){t=(h?a.y:a.x)-i;u=(h?a.x:a.y)-k;y=(a.z||0)-l;w=x*t-o*y;s=-o*r*t-x*r*y+v*u;p=o*v*t+x*v*y+r*u;q>0&&
q<Number.POSITIVE_INFINITY&&(w*=q/(p+l+q),s*=q/(p+l+q));w+=i;s+=k;p+=l;j.push({x:h?s:w,y:h?w:s,z:p})});return j}function B(c){return c!==void 0&&c!==null}function F(c){var b=0,a,e;for(a=0;a<c.length;a++)e=(a+1)%c.length,b+=c[a].x*c[e].y-c[e].x*c[a].y;return b/2}function D(c){var b=0,a;for(a=0;a<c.length;a++)b+=c[a].z;return c.length?b/c.length:0}function s(c,b,a,e,g,f,d,j){var i=[];return f>g&&f-g>o/2+1.0E-4?(i=i.concat(s(c,b,a,e,g,g+o/2,d,j)),i=i.concat(s(c,b,a,e,g+o/2,f,d,j))):f<g&&g-f>o/2+1.0E-4?
(i=i.concat(s(c,b,a,e,g,g-o/2,d,j)),i=i.concat(s(c,b,a,e,g-o/2,f,d,j))):(i=f-g,["C",c+a*n(g)-a*C*i*m(g)+d,b+e*m(g)+e*C*i*n(g)+j,c+a*n(f)+a*C*i*m(f)+d,b+e*m(f)-e*C*i*n(f)+j,c+a*n(f)+d,b+e*m(f)+j])}function G(c){if(this.chart.is3d()){var b=this.chart.options.plotOptions.column.grouping;if(b!==void 0&&!b&&this.group.zIndex!==void 0&&!this.zIndexSet)this.group.attr({zIndex:this.group.zIndex*10}),this.zIndexSet=!0;var a=this.options,e=this.options.states;this.borderWidth=a.borderWidth=B(a.edgeWidth)?a.edgeWidth:
1;d.each(this.data,function(b){if(b.y!==null)b=b.pointAttr,this.borderColor=d.pick(a.edgeColor,b[""].fill),b[""].stroke=this.borderColor,b.hover.stroke=d.pick(e.hover.edgeColor,this.borderColor),b.select.stroke=d.pick(e.select.edgeColor,this.borderColor)})}c.apply(this,[].slice.call(arguments,1))}var o=Math.PI,A=o/180,m=Math.sin,n=Math.cos,z=d.pick,H=Math.round;d.perspective=p;var C=4*(Math.sqrt(2)-1)/3/(o/2);d.SVGRenderer.prototype.toLinePath=function(c,b){var a=[];d.each(c,function(b){a.push("L",
b.x,b.y)});c.length&&(a[0]="M",b&&a.push("Z"));return a};d.SVGRenderer.prototype.cuboid=function(c){var b=this.g(),c=this.cuboidPath(c);b.front=this.path(c[0]).attr({zIndex:c[3],"stroke-linejoin":"round"}).add(b);b.top=this.path(c[1]).attr({zIndex:c[4],"stroke-linejoin":"round"}).add(b);b.side=this.path(c[2]).attr({zIndex:c[5],"stroke-linejoin":"round"}).add(b);b.fillSetter=function(a){var b=d.Color(a).brighten(0.1).get(),c=d.Color(a).brighten(-0.1).get();this.front.attr({fill:a});this.top.attr({fill:b});
this.side.attr({fill:c});this.color=a;return this};b.opacitySetter=function(a){this.front.attr({opacity:a});this.top.attr({opacity:a});this.side.attr({opacity:a});return this};b.attr=function(a){a.shapeArgs||B(a.x)?(a=this.renderer.cuboidPath(a.shapeArgs||a),this.front.attr({d:a[0],zIndex:a[3]}),this.top.attr({d:a[1],zIndex:a[4]}),this.side.attr({d:a[2],zIndex:a[5]})):d.SVGElement.prototype.attr.call(this,a);return this};b.animate=function(a,b,c){B(a.x)&&B(a.y)?(a=this.renderer.cuboidPath(a),this.front.attr({zIndex:a[3]}).animate({d:a[0]},
b,c),this.top.attr({zIndex:a[4]}).animate({d:a[1]},b,c),this.side.attr({zIndex:a[5]}).animate({d:a[2]},b,c)):a.opacity?(this.front.animate(a,b,c),this.top.animate(a,b,c),this.side.animate(a,b,c)):d.SVGElement.prototype.animate.call(this,a,b,c);return this};b.destroy=function(){this.front.destroy();this.top.destroy();this.side.destroy();return null};b.attr({zIndex:-c[3]});return b};d.SVGRenderer.prototype.cuboidPath=function(c){var b=c.x,a=c.y,e=c.z,g=c.height,f=c.width,h=c.depth,j=d.map,i=[{x:b,y:a,
z:e},{x:b+f,y:a,z:e},{x:b+f,y:a+g,z:e},{x:b,y:a+g,z:e},{x:b,y:a+g,z:e+h},{x:b+f,y:a+g,z:e+h},{x:b+f,y:a,z:e+h},{x:b,y:a,z:e+h}],i=p(i,d.charts[this.chartIndex],c.insidePlotArea),a=function(a,b){a=j(a,function(a){return i[a]});b=j(b,function(a){return i[a]});return F(a)<0?a:F(b)<0?b:[]},c=a([3,2,1,0],[7,6,5,4]),b=a([1,6,7,0],[4,5,2,3]),a=a([1,2,5,6],[0,7,4,3]);return[this.toLinePath(c,!0),this.toLinePath(b,!0),this.toLinePath(a,!0),D(c),D(b),D(a)]};d.SVGRenderer.prototype.arc3d=function(c){c.alpha*=
A;c.beta*=A;var b=this.g(),a=this.arc3dPath(c),e=b.renderer,g=a.zTop*100;b.shapeArgs=c;b.top=e.path(a.top).setRadialReference(c.center).attr({zIndex:a.zTop}).add(b);b.side1=e.path(a.side2).attr({zIndex:a.zSide1});b.side2=e.path(a.side1).attr({zIndex:a.zSide2});b.inn=e.path(a.inn).attr({zIndex:a.zInn});b.out=e.path(a.out).attr({zIndex:a.zOut});b.fillSetter=function(a){this.color=a;var b=d.Color(a).brighten(-0.1).get();this.side1.attr({fill:b});this.side2.attr({fill:b});this.inn.attr({fill:b});this.out.attr({fill:b});
this.top.attr({fill:a});return this};b.translateXSetter=function(a){this.out.attr({translateX:a});this.inn.attr({translateX:a});this.side1.attr({translateX:a});this.side2.attr({translateX:a});this.top.attr({translateX:a})};b.translateYSetter=function(a){this.out.attr({translateY:a});this.inn.attr({translateY:a});this.side1.attr({translateY:a});this.side2.attr({translateY:a});this.top.attr({translateY:a})};b.animate=function(a,b,c){B(a.end)||B(a.start)?(this._shapeArgs=this.shapeArgs,d.SVGElement.prototype.animate.call(this,
{_args:a},{duration:b,start:function(){var a=arguments[0].elem,b=a._shapeArgs;b.fill!==a.color&&a.attr({fill:b.fill})},step:function(){var a=arguments[1],b=a.elem,c=b._shapeArgs,e=a.end,a=a.pos,c=d.merge(c,{x:c.x+(e.x-c.x)*a,y:c.y+(e.y-c.y)*a,r:c.r+(e.r-c.r)*a,innerR:c.innerR+(e.innerR-c.innerR)*a,start:c.start+(e.start-c.start)*a,end:c.end+(e.end-c.end)*a}),e=b.renderer.arc3dPath(c);b.shapeArgs=c;b.top.attr({d:e.top,zIndex:e.zTop});b.inn.attr({d:e.inn,zIndex:e.zInn});b.out.attr({d:e.out,zIndex:e.zOut});
b.side1.attr({d:e.side1,zIndex:e.zSide1});b.side2.attr({d:e.side2,zIndex:e.zSide2})}},c)):d.SVGElement.prototype.animate.call(this,a,b,c);return this};b.destroy=function(){this.top.destroy();this.out.destroy();this.inn.destroy();this.side1.destroy();this.side2.destroy();d.SVGElement.prototype.destroy.call(this)};b.hide=function(){this.top.hide();this.out.hide();this.inn.hide();this.side1.hide();this.side2.hide()};b.show=function(){this.top.show();this.out.show();this.inn.show();this.side1.show();
this.side2.show()};b.zIndex=g;b.attr({zIndex:g});return b};d.SVGRenderer.prototype.arc3dPath=function(c){function b(a){a%=2*o;a>o&&(a=2*o-a);return a}var a=c.x,e=c.y,d=c.start,f=c.end-1.0E-5,h=c.r,j=c.innerR,i=c.depth,k=c.alpha,l=c.beta,q=n(d),p=m(d),c=n(f),x=m(f),r=h*n(l);h*=n(k);var v=j*n(l),t=j*n(k),j=i*m(l),u=i*m(k),i=["M",a+r*q,e+h*p],i=i.concat(s(a,e,r,h,d,f,0,0)),i=i.concat(["L",a+v*c,e+t*x]),i=i.concat(s(a,e,v,t,f,d,0,0)),i=i.concat(["Z"]),y=l>0?o/2:0,l=k>0?0:o/2,y=d>-y?d:f>-y?-y:d,w=f<o-
l?f:d<o-l?o-l:f,k=["M",a+r*n(y),e+h*m(y)],k=k.concat(s(a,e,r,h,y,w,0,0));f>o-l&&d<o-l&&(k=k.concat(["L",a+r*n(w)+j,e+h*m(w)+u]),k=k.concat(s(a,e,r,h,w,f,j,u)),k=k.concat(["L",a+r*n(f),e+h*m(f)]),k=k.concat(s(a,e,r,h,f,w,0,0)));k=k.concat(["L",a+r*n(w)+j,e+h*m(w)+u]);k=k.concat(s(a,e,r,h,w,y,j,u));k=k.concat(["Z"]);l=["M",a+v*q,e+t*p];l=l.concat(s(a,e,v,t,d,f,0,0));l=l.concat(["L",a+v*n(f)+j,e+t*m(f)+u]);l=l.concat(s(a,e,v,t,f,d,j,u));l=l.concat(["Z"]);q=["M",a+r*q,e+h*p,"L",a+r*q+j,e+h*p+u,"L",a+
v*q+j,e+t*p+u,"L",a+v*q,e+t*p,"Z"];a=["M",a+r*c,e+h*x,"L",a+r*c+j,e+h*x+u,"L",a+v*c+j,e+t*x+u,"L",a+v*c,e+t*x,"Z"];x=Math.atan2(u,-j);e=Math.abs(f+x);c=Math.abs(d+x);d=Math.abs((d+f)/2+x);e=b(e);c=b(c);d=b(d);d*=1E5;f=c*1E5;e*=1E5;return{top:i,zTop:o*1E5+1,out:k,zOut:Math.max(d,f,e),inn:l,zInn:Math.max(d,f,e),side1:q,zSide1:e*0.99,side2:a,zSide2:f*0.99}};d.Chart.prototype.is3d=function(){return this.options.chart.options3d&&this.options.chart.options3d.enabled};d.wrap(d.Chart.prototype,"isInsidePlot",
function(c){return this.is3d()?!0:c.apply(this,[].slice.call(arguments,1))});d.getOptions().chart.options3d={enabled:!1,alpha:0,beta:0,depth:100,viewDistance:25,frame:{bottom:{size:1,color:"rgba(255,255,255,0)"},side:{size:1,color:"rgba(255,255,255,0)"},back:{size:1,color:"rgba(255,255,255,0)"}}};d.wrap(d.Chart.prototype,"init",function(c){var b=[].slice.call(arguments,1),a;if(b[0].chart.options3d&&b[0].chart.options3d.enabled)b[0].chart.options3d.alpha=(b[0].chart.options3d.alpha||0)%360,b[0].chart.options3d.beta=
(b[0].chart.options3d.beta||0)%360,a=b[0].plotOptions||{},a=a.pie||{},a.borderColor=d.pick(a.borderColor,void 0);c.apply(this,b)});d.wrap(d.Chart.prototype,"setChartSize",function(c){c.apply(this,[].slice.call(arguments,1));if(this.is3d()){var b=this.inverted,a=this.clipBox,e=this.margin;a[b?"y":"x"]=-(e[3]||0);a[b?"x":"y"]=-(e[0]||0);a[b?"height":"width"]=this.chartWidth+(e[3]||0)+(e[1]||0);a[b?"width":"height"]=this.chartHeight+(e[0]||0)+(e[2]||0)}});d.wrap(d.Chart.prototype,"redraw",function(c){if(this.is3d())this.isDirtyBox=
!0;c.apply(this,[].slice.call(arguments,1))});d.wrap(d.Chart.prototype,"renderSeries",function(c){var b=this.series.length;if(this.is3d())for(;b--;)c=this.series[b],c.translate(),c.render();else c.call(this)});d.Chart.prototype.retrieveStacks=function(c){var b=this.series,a={},e,g=1;d.each(this.series,function(d){e=z(d.options.stack,c?0:b.length-1-d.index);a[e]?a[e].series.push(d):(a[e]={series:[d],position:g},g++)});a.totalStacks=g+1;return a};d.wrap(d.Axis.prototype,"setOptions",function(c,b){var a;
c.call(this,b);if(this.chart.is3d())a=this.options,a.tickWidth=d.pick(a.tickWidth,0),a.gridLineWidth=d.pick(a.gridLineWidth,1)});d.wrap(d.Axis.prototype,"render",function(c){c.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var b=this.chart,a=b.renderer,e=b.options.chart.options3d,d=e.frame,f=d.bottom,h=d.back,d=d.side,j=e.depth,i=this.height,k=this.width,l=this.left,q=this.top;if(!this.isZAxis)this.horiz?(h={x:l,y:q+(b.xAxis[0].opposite?-f.size:i),z:0,width:k,height:f.size,depth:j,insidePlotArea:!1},
this.bottomFrame?this.bottomFrame.animate(h):this.bottomFrame=a.cuboid(h).attr({fill:f.color,zIndex:b.yAxis[0].reversed&&e.alpha>0?4:-1}).css({stroke:f.color}).add()):(e={x:l+(b.yAxis[0].opposite?0:-d.size),y:q+(b.xAxis[0].opposite?-f.size:0),z:j,width:k+d.size,height:i+f.size,depth:h.size,insidePlotArea:!1},this.backFrame?this.backFrame.animate(e):this.backFrame=a.cuboid(e).attr({fill:h.color,zIndex:-3}).css({stroke:h.color}).add(),b={x:l+(b.yAxis[0].opposite?k:-d.size),y:q+(b.xAxis[0].opposite?
-f.size:0),z:0,width:d.size,height:i+f.size,depth:j,insidePlotArea:!1},this.sideFrame?this.sideFrame.animate(b):this.sideFrame=a.cuboid(b).attr({fill:d.color,zIndex:-2}).css({stroke:d.color}).add())}});d.wrap(d.Axis.prototype,"getPlotLinePath",function(c){var b=c.apply(this,[].slice.call(arguments,1));if(!this.chart.is3d())return b;if(b===null)return b;var a=this.chart.options.chart.options3d,a=this.isZAxis?this.chart.plotWidth:a.depth,d=this.opposite;this.horiz&&(d=!d);b=[this.swapZ({x:b[1],y:b[2],
z:d?a:0}),this.swapZ({x:b[1],y:b[2],z:a}),this.swapZ({x:b[4],y:b[5],z:a}),this.swapZ({x:b[4],y:b[5],z:d?0:a})];b=p(b,this.chart,!1);return b=this.chart.renderer.toLinePath(b,!1)});d.wrap(d.Axis.prototype,"getLinePath",function(c){return this.chart.is3d()?[]:c.apply(this,[].slice.call(arguments,1))});d.wrap(d.Axis.prototype,"getPlotBandPath",function(c){if(this.chart.is3d()){var b=arguments,a=b[1],b=this.getPlotLinePath(b[2]);(a=this.getPlotLinePath(a))&&b?a.push("L",b[10],b[11],"L",b[7],b[8],"L",
b[4],b[5],"L",b[1],b[2]):a=null;return a}else return c.apply(this,[].slice.call(arguments,1))});d.wrap(d.Tick.prototype,"getMarkPath",function(c){var b=c.apply(this,[].slice.call(arguments,1));if(!this.axis.chart.is3d())return b;b=[this.axis.swapZ({x:b[1],y:b[2],z:0}),this.axis.swapZ({x:b[4],y:b[5],z:0})];b=p(b,this.axis.chart,!1);return b=["M",b[0].x,b[0].y,"L",b[1].x,b[1].y]});d.wrap(d.Tick.prototype,"getLabelPosition",function(c){var b=c.apply(this,[].slice.call(arguments,1));if(!this.axis.chart.is3d())return b;
var a=p([this.axis.swapZ({x:b.x,y:b.y,z:0})],this.axis.chart,!1)[0];a.x-=!this.axis.horiz&&this.axis.opposite?this.axis.transA:0;a.old=b;return a});d.wrap(d.Tick.prototype,"handleOverflow",function(c,b){if(this.axis.chart.is3d())b=b.old;return c.call(this,b)});d.wrap(d.Axis.prototype,"getTitlePosition",function(c){var b=c.apply(this,[].slice.call(arguments,1));return!this.chart.is3d()?b:b=p([this.swapZ({x:b.x,y:b.y,z:0})],this.chart,!1)[0]});d.wrap(d.Axis.prototype,"drawCrosshair",function(c){var b=
arguments;this.chart.is3d()&&b[2]&&(b[2]={plotX:b[2].plotXold||b[2].plotX,plotY:b[2].plotYold||b[2].plotY});c.apply(this,[].slice.call(b,1))});d.Axis.prototype.swapZ=function(c,b){if(this.isZAxis){var a=b?0:this.chart.plotLeft,d=this.chart;return{x:a+(d.yAxis[0].opposite?c.z:d.xAxis[0].width-c.z),y:c.y,z:c.x-a}}else return c};var E=d.ZAxis=function(){this.isZAxis=!0;this.init.apply(this,arguments)};d.extend(E.prototype,d.Axis.prototype);d.extend(E.prototype,{setOptions:function(c){c=d.merge({offset:0,
lineWidth:0},c);d.Axis.prototype.setOptions.call(this,c);this.coll="zAxis"},setAxisSize:function(){d.Axis.prototype.setAxisSize.call(this);this.width=this.len=this.chart.options.chart.options3d.depth;this.right=this.chart.chartWidth-this.width-this.left},getSeriesExtremes:function(){var c=this,b=c.chart;c.hasVisibleSeries=!1;c.dataMin=c.dataMax=c.ignoreMinPadding=c.ignoreMaxPadding=null;c.buildStacks&&c.buildStacks();d.each(c.series,function(a){if(a.visible||!b.options.chart.ignoreHiddenSeries)if(c.hasVisibleSeries=
!0,a=a.zData,a.length)c.dataMin=Math.min(z(c.dataMin,a[0]),Math.min.apply(null,a)),c.dataMax=Math.max(z(c.dataMax,a[0]),Math.max.apply(null,a))})}});d.wrap(d.Chart.prototype,"getAxes",function(c){var b=this,a=this.options,a=a.zAxis=d.splat(a.zAxis||{});c.call(this);if(b.is3d())this.zAxis=[],d.each(a,function(a,c){a.index=c;a.isX=!0;(new E(b,a)).setScale()})});d.wrap(d.seriesTypes.column.prototype,"translate",function(c){c.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var b=this.chart,
a=this.options,e=a.depth||25,g=(a.stacking?a.stack||0:this._i)*(e+(a.groupZPadding||1));a.grouping!==!1&&(g=0);g+=a.groupZPadding||1;d.each(this.data,function(a){if(a.y!==null){var c=a.shapeArgs,d=a.tooltipPos;a.shapeType="cuboid";c.z=g;c.depth=e;c.insidePlotArea=!0;d=p([{x:d[0],y:d[1],z:g}],b,!1)[0];a.tooltipPos=[d.x,d.y]}});this.z=g}});d.wrap(d.seriesTypes.column.prototype,"animate",function(c){if(this.chart.is3d()){var b=arguments[1],a=this.yAxis,e=this,g=this.yAxis.reversed;if(d.svg)b?d.each(e.data,
function(b){if(b.y!==null&&(b.height=b.shapeArgs.height,b.shapey=b.shapeArgs.y,b.shapeArgs.height=1,!g))b.shapeArgs.y=b.stackY?b.plotY+a.translate(b.stackY):b.plotY+(b.negative?-b.height:b.height)}):(d.each(e.data,function(a){if(a.y!==null)a.shapeArgs.height=a.height,a.shapeArgs.y=a.shapey,a.graphic&&a.graphic.animate(a.shapeArgs,e.options.animation)}),this.drawDataLabels(),e.animate=null)}else c.apply(this,[].slice.call(arguments,1))});d.wrap(d.seriesTypes.column.prototype,"init",function(c){c.apply(this,
[].slice.call(arguments,1));if(this.chart.is3d()){var b=this.options,a=b.grouping,d=b.stacking,g=0;if(a===void 0||a){a=this.chart.retrieveStacks(d);d=b.stack||0;for(g=0;g<a[d].series.length;g++)if(a[d].series[g]===this)break;g=a.totalStacks*10-10*(a.totalStacks-a[d].position)-g}b.zIndex=g}});d.wrap(d.Series.prototype,"alignDataLabel",function(c){if(this.chart.is3d()&&(this.type==="column"||this.type==="columnrange")){var b=arguments[4],a={x:b.x,y:b.y,z:this.z},a=p([a],this.chart,!0)[0];b.x=a.x;b.y=
a.y}c.apply(this,[].slice.call(arguments,1))});d.seriesTypes.columnrange&&d.wrap(d.seriesTypes.columnrange.prototype,"drawPoints",G);d.wrap(d.seriesTypes.column.prototype,"drawPoints",G);d.wrap(d.seriesTypes.pie.prototype,"translate",function(c){c.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var b=this,a=b.chart,e=b.options,g=e.depth||0,f=a.options.chart.options3d,h={x:a.plotWidth/2,y:a.plotHeight/2,z:f.depth},j=f.alpha,i=f.beta,k=e.stacking?(e.stack||0)*g:b._i*g;k+=g/2;e.grouping!==
!1&&(k=0);d.each(b.data,function(a){var c=a.shapeArgs;a.shapeType="arc3d";c.z=k;c.depth=g*0.75;c.origin=h;c.alpha=j;c.beta=i;c.center=b.center;c=(c.end+c.start)/2;a.slicedTranslation={translateX:H(n(c)*e.slicedOffset*n(j*A)),translateY:H(m(c)*e.slicedOffset*n(j*A))}})}});d.wrap(d.seriesTypes.pie.prototype.pointClass.prototype,"haloPath",function(c){var b=arguments;return this.series.chart.is3d()?[]:c.call(this,b[1])});d.wrap(d.seriesTypes.pie.prototype,"drawPoints",function(c){var b=this.group,a=
this.options,e=a.states;if(this.chart.is3d())this.borderWidth=a.borderWidth=a.edgeWidth||1,this.borderColor=a.edgeColor=d.pick(a.edgeColor,a.borderColor,void 0),e.hover.borderColor=d.pick(e.hover.edgeColor,this.borderColor),e.hover.borderWidth=d.pick(e.hover.edgeWidth,this.borderWidth),e.select.borderColor=d.pick(e.select.edgeColor,this.borderColor),e.select.borderWidth=d.pick(e.select.edgeWidth,this.borderWidth),d.each(this.data,function(a){var b=a.pointAttr;b[""].stroke=a.series.borderColor||a.color;
b[""]["stroke-width"]=a.series.borderWidth;b.hover.stroke=e.hover.borderColor;b.hover["stroke-width"]=e.hover.borderWidth;b.select.stroke=e.select.borderColor;b.select["stroke-width"]=e.select.borderWidth});c.apply(this,[].slice.call(arguments,1));this.chart.is3d()&&d.each(this.points,function(a){var c=a.graphic;c.out.add(b);c.inn.add(b);c.side1.add(b);c.side2.add(b);c[a.y?"show":"hide"]()})});d.wrap(d.seriesTypes.pie.prototype,"drawDataLabels",function(c){if(this.chart.is3d()){var b=this;d.each(b.data,
function(a){var c=a.shapeArgs,d=c.r,f=c.depth,h=(c.alpha||b.chart.options.chart.options3d.alpha)*A,c=(c.start+c.end)/2,a=a.labelPos;a[1]+=-d*(1-n(h))*m(c)+(m(c)>0?m(h)*f:0);a[3]+=-d*(1-n(h))*m(c)+(m(c)>0?m(h)*f:0);a[5]+=-d*(1-n(h))*m(c)+(m(c)>0?m(h)*f:0)})}c.apply(this,[].slice.call(arguments,1))});d.wrap(d.seriesTypes.pie.prototype,"addPoint",function(c){c.apply(this,[].slice.call(arguments,1));this.chart.is3d()&&this.update(this.userOptions,!0)});d.wrap(d.seriesTypes.pie.prototype,"animate",function(c){if(this.chart.is3d()){var b=
arguments[1],a=this.options.animation,e=this.center,g=this.group,f=this.markerGroup;if(d.svg)if(a===!0&&(a={}),b){if(g.oldtranslateX=g.translateX,g.oldtranslateY=g.translateY,b={translateX:e[0],translateY:e[1],scaleX:0.001,scaleY:0.001},g.attr(b),f)f.attrSetters=g.attrSetters,f.attr(b)}else b={translateX:g.oldtranslateX,translateY:g.oldtranslateY,scaleX:1,scaleY:1},g.animate(b,a),f&&f.animate(b,a),this.animate=null}else c.apply(this,[].slice.call(arguments,1))});d.wrap(d.seriesTypes.scatter.prototype,
"translate",function(c){c.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var b=this.chart,a=d.pick(this.zAxis,b.options.zAxis[0]),e=[],g,f,h;for(h=0;h<this.data.length;h++)g=this.data[h],f=a.isLog&&a.val2lin?a.val2lin(g.z):g.z,g.plotZ=a.translate(f),g.isInside=g.isInside?f>=a.min&&f<=a.max:!1,e.push({x:g.plotX,y:g.plotY,z:g.plotZ});b=p(e,b,!0);for(h=0;h<this.data.length;h++)g=this.data[h],a=b[h],g.plotXold=g.plotX,g.plotYold=g.plotY,g.plotX=a.x,g.plotY=a.y,g.plotZ=a.z}});d.wrap(d.seriesTypes.scatter.prototype,
"init",function(c,b,a){if(b.is3d())this.axisTypes=["xAxis","yAxis","zAxis"],this.pointArrayMap=["x","y","z"],this.parallelArrays=["x","y","z"];c=c.apply(this,[b,a]);if(this.chart.is3d())this.tooltipOptions.pointFormat=this.userOptions.tooltip?this.userOptions.tooltip.pointFormat||"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>z: <b>{point.z}</b><br/>":"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>z: <b>{point.z}</b><br/>";return c});if(d.VMLRenderer)d.setOptions({animate:!1}),d.VMLRenderer.prototype.cuboid=
d.SVGRenderer.prototype.cuboid,d.VMLRenderer.prototype.cuboidPath=d.SVGRenderer.prototype.cuboidPath,d.VMLRenderer.prototype.toLinePath=d.SVGRenderer.prototype.toLinePath,d.VMLRenderer.prototype.createElement3D=d.SVGRenderer.prototype.createElement3D,d.VMLRenderer.prototype.arc3d=function(c){c=d.SVGRenderer.prototype.arc3d.call(this,c);c.css({zIndex:c.zIndex});return c},d.VMLRenderer.prototype.arc3dPath=d.SVGRenderer.prototype.arc3dPath,d.wrap(d.Axis.prototype,"render",function(c){c.apply(this,[].slice.call(arguments,
1));this.sideFrame&&(this.sideFrame.css({zIndex:0}),this.sideFrame.front.attr({fill:this.sideFrame.color}));this.bottomFrame&&(this.bottomFrame.css({zIndex:1}),this.bottomFrame.front.attr({fill:this.bottomFrame.color}));this.backFrame&&(this.backFrame.css({zIndex:0}),this.backFrame.front.attr({fill:this.backFrame.color}))})})(Highcharts);

File diff suppressed because it is too large Load Diff

View File

@ -1,55 +0,0 @@
/*
Highcharts JS v4.1.9 (2015-10-07)
(c) 2009-2014 Torstein Honsi
License: www.highcharts.com/license
*/
(function(n,G){function L(a,b,c){this.init.call(this,a,b,c)}var Q=n.arrayMin,R=n.arrayMax,s=n.each,I=n.extend,t=n.merge,S=n.map,o=n.pick,B=n.pInt,p=n.getOptions().plotOptions,i=n.seriesTypes,u=n.extendClass,M=n.splat,r=n.wrap,N=n.Axis,z=n.Tick,J=n.Point,T=n.Pointer,U=n.CenteredSeriesMixin,A=n.TrackerMixin,w=n.Series,y=Math,E=y.round,C=y.floor,O=y.max,V=n.Color,v=function(){};I(L.prototype,{init:function(a,b,c){var d=this,e=d.defaultOptions;d.chart=b;d.options=a=t(e,b.angular?{background:{}}:void 0,
a);(a=a.background)&&s([].concat(M(a)).reverse(),function(a){var b=a.backgroundColor,k=c.userOptions,a=t(d.defaultBackgroundOptions,a);if(b)a.backgroundColor=b;a.color=a.backgroundColor;c.options.plotBands.unshift(a);k.plotBands=k.plotBands||[];k.plotBands!==c.options.plotBands&&k.plotBands.unshift(a)})},defaultOptions:{center:["50%","50%"],size:"85%",startAngle:0},defaultBackgroundOptions:{shape:"circle",borderWidth:1,borderColor:"silver",backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,
"#FFF"],[1,"#DDD"]]},from:-Number.MAX_VALUE,innerRadius:0,to:Number.MAX_VALUE,outerRadius:"105%"}});var H=N.prototype,z=z.prototype,W={getOffset:v,redraw:function(){this.isDirty=!1},render:function(){this.isDirty=!1},setScale:v,setCategories:v,setTitle:v},P={isRadial:!0,defaultRadialGaugeOptions:{labels:{align:"center",x:0,y:null},minorGridLineWidth:0,minorTickInterval:"auto",minorTickLength:10,minorTickPosition:"inside",minorTickWidth:1,tickLength:10,tickPosition:"inside",tickWidth:2,title:{rotation:0},
zIndex:2},defaultRadialXOptions:{gridLineWidth:1,labels:{align:null,distance:15,x:0,y:null},maxPadding:0,minPadding:0,showLastLabel:!1,tickLength:0},defaultRadialYOptions:{gridLineInterpolation:"circle",labels:{align:"right",x:-3,y:-2},showLastLabel:!1,title:{x:4,text:null,rotation:90}},setOptions:function(a){a=this.options=t(this.defaultOptions,this.defaultRadialOptions,a);if(!a.plotBands)a.plotBands=[]},getOffset:function(){H.getOffset.call(this);this.chart.axisOffset[this.side]=0;this.center=this.pane.center=
U.getCenter.call(this.pane)},getLinePath:function(a,b){var c=this.center,b=o(b,c[2]/2-this.offset);return this.chart.renderer.symbols.arc(this.left+c[0],this.top+c[1],b,b,{start:this.startAngleRad,end:this.endAngleRad,open:!0,innerR:0})},setAxisTranslation:function(){H.setAxisTranslation.call(this);if(this.center)this.transA=this.isCircular?(this.endAngleRad-this.startAngleRad)/(this.max-this.min||1):this.center[2]/2/(this.max-this.min||1),this.minPixelPadding=this.isXAxis?this.transA*this.minPointOffset:
0},beforeSetTickPositions:function(){this.autoConnect&&(this.max+=this.categories&&1||this.pointRange||this.closestPointRange||0)},setAxisSize:function(){H.setAxisSize.call(this);if(this.isRadial){this.center=this.pane.center=n.CenteredSeriesMixin.getCenter.call(this.pane);if(this.isCircular)this.sector=this.endAngleRad-this.startAngleRad;this.len=this.width=this.height=this.center[2]*o(this.sector,1)/2}},getPosition:function(a,b){return this.postTranslate(this.isCircular?this.translate(a):0,o(this.isCircular?
b:this.translate(a),this.center[2]/2)-this.offset)},postTranslate:function(a,b){var c=this.chart,d=this.center,a=this.startAngleRad+a;return{x:c.plotLeft+d[0]+Math.cos(a)*b,y:c.plotTop+d[1]+Math.sin(a)*b}},getPlotBandPath:function(a,b,c){var d=this.center,e=this.startAngleRad,f=d[2]/2,h=[o(c.outerRadius,"100%"),c.innerRadius,o(c.thickness,10)],k=/%$/,g,j=this.isCircular;this.options.gridLineInterpolation==="polygon"?d=this.getPlotLinePath(a).concat(this.getPlotLinePath(b,!0)):(a=Math.max(a,this.min),
b=Math.min(b,this.max),j||(h[0]=this.translate(a),h[1]=this.translate(b)),h=S(h,function(a){k.test(a)&&(a=B(a,10)*f/100);return a}),c.shape==="circle"||!j?(a=-Math.PI/2,b=Math.PI*1.5,g=!0):(a=e+this.translate(a),b=e+this.translate(b)),d=this.chart.renderer.symbols.arc(this.left+d[0],this.top+d[1],h[0],h[0],{start:Math.min(a,b),end:Math.max(a,b),innerR:o(h[1],h[0]-h[2]),open:g}));return d},getPlotLinePath:function(a,b){var c=this,d=c.center,e=c.chart,f=c.getPosition(a),h,k,g;c.isCircular?g=["M",d[0]+
e.plotLeft,d[1]+e.plotTop,"L",f.x,f.y]:c.options.gridLineInterpolation==="circle"?(a=c.translate(a))&&(g=c.getLinePath(0,a)):(s(e.xAxis,function(a){a.pane===c.pane&&(h=a)}),g=[],a=c.translate(a),d=h.tickPositions,h.autoConnect&&(d=d.concat([d[0]])),b&&(d=[].concat(d).reverse()),s(d,function(f,b){k=h.getPosition(f,a);g.push(b?"L":"M",k.x,k.y)}));return g},getTitlePosition:function(){var a=this.center,b=this.chart,c=this.options.title;return{x:b.plotLeft+a[0]+(c.x||0),y:b.plotTop+a[1]-{high:0.5,middle:0.25,
low:0}[c.align]*a[2]+(c.y||0)}}};r(H,"init",function(a,b,c){var l;var d=b.angular,e=b.polar,f=c.isX,h=d&&f,k,g;g=b.options;var j=c.pane||0;if(d){if(I(this,h?W:P),k=!f)this.defaultRadialOptions=this.defaultRadialGaugeOptions}else if(e)I(this,P),this.defaultRadialOptions=(k=f)?this.defaultRadialXOptions:t(this.defaultYAxisOptions,this.defaultRadialYOptions);a.call(this,b,c);if(!h&&(d||e)){a=this.options;if(!b.panes)b.panes=[];this.pane=(l=b.panes[j]=b.panes[j]||new L(M(g.pane)[j],b,this),j=l);j=j.options;
b.inverted=!1;g.chart.zoomType=null;this.startAngleRad=b=(j.startAngle-90)*Math.PI/180;this.endAngleRad=g=(o(j.endAngle,j.startAngle+360)-90)*Math.PI/180;this.offset=a.offset||0;if((this.isCircular=k)&&c.max===G&&g-b===2*Math.PI)this.autoConnect=!0}});r(z,"getPosition",function(a,b,c,d,e){var f=this.axis;return f.getPosition?f.getPosition(c):a.call(this,b,c,d,e)});r(z,"getLabelPosition",function(a,b,c,d,e,f,h,k,g){var j=this.axis,m=f.y,l=20,i=f.align,x=(j.translate(this.pos)+j.startAngleRad+Math.PI/
2)/Math.PI*180%360;j.isRadial?(a=j.getPosition(this.pos,j.center[2]/2+o(f.distance,-25)),f.rotation==="auto"?d.attr({rotation:x}):m===null&&(m=j.chart.renderer.fontMetrics(d.styles.fontSize).b-d.getBBox().height/2),i===null&&(j.isCircular?(this.label.getBBox().width>j.len*j.tickInterval/(j.max-j.min)&&(l=0),i=x>l&&x<180-l?"left":x>180+l&&x<360-l?"right":"center"):i="center",d.attr({align:i})),a.x+=f.x,a.y+=m):a=a.call(this,b,c,d,e,f,h,k,g);return a});r(z,"getMarkPath",function(a,b,c,d,e,f,h){var k=
this.axis;k.isRadial?(a=k.getPosition(this.pos,k.center[2]/2+d),b=["M",b,c,"L",a.x,a.y]):b=a.call(this,b,c,d,e,f,h);return b});p.arearange=t(p.area,{lineWidth:1,marker:null,threshold:null,tooltip:{pointFormat:'<span style="color:{series.color}">\u25cf</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>'},trackByArea:!0,dataLabels:{align:null,verticalAlign:null,xLow:0,xHigh:0,yLow:0,yHigh:0},states:{hover:{halo:!1}}});i.arearange=u(i.area,{type:"arearange",pointArrayMap:["low","high"],
dataLabelCollections:["dataLabel","dataLabelUpper"],toYData:function(a){return[a.low,a.high]},pointValKey:"low",deferTranslatePolar:!0,highToXY:function(a){var b=this.chart,c=this.xAxis.postTranslate(a.rectPlotX,this.yAxis.len-a.plotHigh);a.plotHighX=c.x-b.plotLeft;a.plotHigh=c.y-b.plotTop},getSegments:function(){var a=this;s(a.points,function(b){if(!a.options.connectNulls&&(b.low===null||b.high===null))b.y=null;else if(b.low===null&&b.high!==null)b.y=b.high});w.prototype.getSegments.call(this)},
translate:function(){var a=this,b=a.yAxis;i.area.prototype.translate.apply(a);s(a.points,function(a){var d=a.low,e=a.high,f=a.plotY;e===null&&d===null?a.y=null:d===null?(a.plotLow=a.plotY=null,a.plotHigh=b.translate(e,0,1,0,1)):e===null?(a.plotLow=f,a.plotHigh=null):(a.plotLow=f,a.plotHigh=b.translate(e,0,1,0,1))});this.chart.polar&&s(this.points,function(b){a.highToXY(b)})},getSegmentPath:function(a){var b,c=[],d=a.length,e=w.prototype.getSegmentPath,f,h;h=this.options;var k=h.step;for(b=HighchartsAdapter.grep(a,
function(a){return a.plotLow!==null});d--;)f=a[d],f.plotHigh!==null&&c.push({plotX:f.plotHighX||f.plotX,plotY:f.plotHigh});a=e.call(this,b);if(k)k===!0&&(k="left"),h.step={left:"right",center:"center",right:"left"}[k];c=e.call(this,c);h.step=k;h=[].concat(a,c);this.chart.polar||(c[0]="L");this.areaPath=this.areaPath.concat(a,c);return h},drawDataLabels:function(){var a=this.data,b=a.length,c,d=[],e=w.prototype,f=this.options.dataLabels,h=f.align,k=f.inside,g,j,m=this.chart.inverted;if(f.enabled||
this._hasPointLabels){for(c=b;c--;)if(g=a[c])if(j=k?g.plotHigh<g.plotLow:g.plotHigh>g.plotLow,g.y=g.high,g._plotY=g.plotY,g.plotY=g.plotHigh,d[c]=g.dataLabel,g.dataLabel=g.dataLabelUpper,g.below=j,m){if(!h)f.align=j?"right":"left";f.x=f.xHigh}else f.y=f.yHigh;e.drawDataLabels&&e.drawDataLabels.apply(this,arguments);for(c=b;c--;)if(g=a[c])if(j=k?g.plotHigh<g.plotLow:g.plotHigh>g.plotLow,g.dataLabelUpper=g.dataLabel,g.dataLabel=d[c],g.y=g.low,g.plotY=g._plotY,g.below=!j,m){if(!h)f.align=j?"left":"right";
f.x=f.xLow}else f.y=f.yLow;e.drawDataLabels&&e.drawDataLabels.apply(this,arguments)}f.align=h},alignDataLabel:function(){i.column.prototype.alignDataLabel.apply(this,arguments)},setStackedPoints:v,getSymbol:v,drawPoints:v});p.areasplinerange=t(p.arearange);i.areasplinerange=u(i.arearange,{type:"areasplinerange",getPointSpline:i.spline.prototype.getPointSpline});(function(){var a=i.column.prototype;p.columnrange=t(p.column,p.arearange,{lineWidth:1,pointRange:null});i.columnrange=u(i.arearange,{type:"columnrange",
translate:function(){var b=this,c=b.yAxis,d;a.translate.apply(b);s(b.points,function(a){var f=a.shapeArgs,h=b.options.minPointLength,k;a.tooltipPos=null;a.plotHigh=d=c.translate(a.high,0,1,0,1);a.plotLow=a.plotY;k=d;a=a.plotY-d;Math.abs(a)<h?(h-=a,a+=h,k-=h/2):a<0&&(a*=-1,k-=a);f.height=a;f.y=k})},directTouch:!0,trackerGroups:["group","dataLabelsGroup"],drawGraph:v,crispCol:a.crispCol,pointAttrToOptions:a.pointAttrToOptions,drawPoints:a.drawPoints,drawTracker:a.drawTracker,animate:a.animate,getColumnMetrics:a.getColumnMetrics})})();
p.gauge=t(p.line,{dataLabels:{enabled:!0,defer:!1,y:15,borderWidth:1,borderColor:"silver",borderRadius:3,crop:!1,verticalAlign:"top",zIndex:2},dial:{},pivot:{},tooltip:{headerFormat:""},showInLegend:!1});A={type:"gauge",pointClass:u(J,{setState:function(a){this.state=a}}),angular:!0,drawGraph:v,fixedBox:!0,forceDL:!0,trackerGroups:["group","dataLabelsGroup"],translate:function(){var a=this.yAxis,b=this.options,c=a.center;this.generatePoints();s(this.points,function(d){var e=t(b.dial,d.dial),f=B(o(e.radius,
80))*c[2]/200,h=B(o(e.baseLength,70))*f/100,k=B(o(e.rearLength,10))*f/100,g=e.baseWidth||3,j=e.topWidth||1,m=b.overshoot,l=a.startAngleRad+a.translate(d.y,null,null,null,!0);m&&typeof m==="number"?(m=m/180*Math.PI,l=Math.max(a.startAngleRad-m,Math.min(a.endAngleRad+m,l))):b.wrap===!1&&(l=Math.max(a.startAngleRad,Math.min(a.endAngleRad,l)));l=l*180/Math.PI;d.shapeType="path";d.shapeArgs={d:e.path||["M",-k,-g/2,"L",h,-g/2,f,-j/2,f,j/2,h,g/2,-k,g/2,"z"],translateX:c[0],translateY:c[1],rotation:l};d.plotX=
c[0];d.plotY=c[1]})},drawPoints:function(){var a=this,b=a.yAxis.center,c=a.pivot,d=a.options,e=d.pivot,f=a.chart.renderer;s(a.points,function(b){var c=b.graphic,g=b.shapeArgs,e=g.d,m=t(d.dial,b.dial);c?(c.animate(g),g.d=e):b.graphic=f[b.shapeType](g).attr({stroke:m.borderColor||"none","stroke-width":m.borderWidth||0,fill:m.backgroundColor||"black",rotation:g.rotation}).add(a.group)});c?c.animate({translateX:b[0],translateY:b[1]}):a.pivot=f.circle(0,0,o(e.radius,5)).attr({"stroke-width":e.borderWidth||
0,stroke:e.borderColor||"silver",fill:e.backgroundColor||"black"}).translate(b[0],b[1]).add(a.group)},animate:function(a){var b=this;if(!a)s(b.points,function(a){var d=a.graphic;d&&(d.attr({rotation:b.yAxis.startAngleRad*180/Math.PI}),d.animate({rotation:a.shapeArgs.rotation},b.options.animation))}),b.animate=null},render:function(){this.group=this.plotGroup("group","series",this.visible?"visible":"hidden",this.options.zIndex,this.chart.seriesGroup);w.prototype.render.call(this);this.group.clip(this.chart.clipRect)},
setData:function(a,b){w.prototype.setData.call(this,a,!1);this.processData();this.generatePoints();o(b,!0)&&this.chart.redraw()},drawTracker:A&&A.drawTrackerPoint};i.gauge=u(i.line,A);p.boxplot=t(p.column,{fillColor:"#FFFFFF",lineWidth:1,medianWidth:2,states:{hover:{brightness:-0.3}},threshold:null,tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span> <b> {series.name}</b><br/>Maximum: {point.high}<br/>Upper quartile: {point.q3}<br/>Median: {point.median}<br/>Lower quartile: {point.q1}<br/>Minimum: {point.low}<br/>'},
whiskerLength:"50%",whiskerWidth:2});i.boxplot=u(i.column,{type:"boxplot",pointArrayMap:["low","q1","median","q3","high"],toYData:function(a){return[a.low,a.q1,a.median,a.q3,a.high]},pointValKey:"high",pointAttrToOptions:{fill:"fillColor",stroke:"color","stroke-width":"lineWidth"},drawDataLabels:v,translate:function(){var a=this.yAxis,b=this.pointArrayMap;i.column.prototype.translate.apply(this);s(this.points,function(c){s(b,function(b){c[b]!==null&&(c[b+"Plot"]=a.translate(c[b],0,1,0,1))})})},drawPoints:function(){var a=
this,b=a.options,c=a.chart.renderer,d,e,f,h,k,g,j,m,l,i,x,n,K,p,t,r,v,u,w,y,B,A,z=a.doQuartiles!==!1,F,D=a.options.whiskerLength;s(a.points,function(q){l=q.graphic;B=q.shapeArgs;x={};p={};r={};A=q.color||a.color;if(q.plotY!==G)if(d=q.pointAttr[q.selected?"selected":""],v=B.width,u=C(B.x),w=u+v,y=E(v/2),e=C(z?q.q1Plot:q.lowPlot),f=C(z?q.q3Plot:q.lowPlot),h=C(q.highPlot),k=C(q.lowPlot),x.stroke=q.stemColor||b.stemColor||A,x["stroke-width"]=o(q.stemWidth,b.stemWidth,b.lineWidth),x.dashstyle=q.stemDashStyle||
b.stemDashStyle,p.stroke=q.whiskerColor||b.whiskerColor||A,p["stroke-width"]=o(q.whiskerWidth,b.whiskerWidth,b.lineWidth),r.stroke=q.medianColor||b.medianColor||A,r["stroke-width"]=o(q.medianWidth,b.medianWidth,b.lineWidth),j=x["stroke-width"]%2/2,m=u+y+j,i=["M",m,f,"L",m,h,"M",m,e,"L",m,k],z&&(j=d["stroke-width"]%2/2,m=C(m)+j,e=C(e)+j,f=C(f)+j,u+=j,w+=j,n=["M",u,f,"L",u,e,"L",w,e,"L",w,f,"L",u,f,"z"]),D&&(j=p["stroke-width"]%2/2,h+=j,k+=j,F=/%$/.test(D)?y*parseFloat(D)/100:D/2,K=["M",m-F,h,"L",m+
F,h,"M",m-F,k,"L",m+F,k]),j=r["stroke-width"]%2/2,g=E(q.medianPlot)+j,t=["M",u,g,"L",w,g],l)q.stem.animate({d:i}),D&&q.whiskers.animate({d:K}),z&&q.box.animate({d:n}),q.medianShape.animate({d:t});else{q.graphic=l=c.g().add(a.group);q.stem=c.path(i).attr(x).add(l);if(D)q.whiskers=c.path(K).attr(p).add(l);if(z)q.box=c.path(n).attr(d).add(l);q.medianShape=c.path(t).attr(r).add(l)}})},setStackedPoints:v});p.errorbar=t(p.boxplot,{color:"#000000",grouping:!1,linkedTo:":previous",tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>'},
whiskerWidth:null});i.errorbar=u(i.boxplot,{type:"errorbar",pointArrayMap:["low","high"],toYData:function(a){return[a.low,a.high]},pointValKey:"high",doQuartiles:!1,drawDataLabels:i.arearange?i.arearange.prototype.drawDataLabels:v,getColumnMetrics:function(){return this.linkedParent&&this.linkedParent.columnMetrics||i.column.prototype.getColumnMetrics.call(this)}});p.waterfall=t(p.column,{lineWidth:1,lineColor:"#333",dashStyle:"dot",borderColor:"#333",dataLabels:{inside:!0},states:{hover:{lineWidthPlus:0}}});
i.waterfall=u(i.column,{type:"waterfall",upColorProp:"fill",pointValKey:"y",translate:function(){var a=this.options,b=this.yAxis,c,d,e,f,h,k,g,j,m,l=a.threshold,X=a.stacking;i.column.prototype.translate.apply(this);g=j=l;d=this.points;for(c=0,a=d.length;c<a;c++){e=d[c];k=this.processedYData[c];f=e.shapeArgs;m=(h=X&&b.stacks[(this.negStacks&&k<l?"-":"")+this.stackKey])?h[e.x].points[this.index+","+c]:[0,k];if(e.isSum)e.y=k;else if(e.isIntermediateSum)e.y=k-j;h=O(g,g+e.y)+m[0];f.y=b.translate(h,0,1);
if(e.isSum)f.y=b.translate(m[1],0,1),f.height=Math.min(b.translate(m[0],0,1),b.len)-f.y;else if(e.isIntermediateSum)f.y=b.translate(m[1],0,1),f.height=Math.min(b.translate(j,0,1),b.len)-f.y,j=m[1];else{if(g!==0)f.height=k>0?b.translate(g,0,1)-f.y:b.translate(g,0,1)-b.translate(g-k,0,1);g+=k}f.height<0&&(f.y+=f.height,f.height*=-1);e.plotY=f.y=E(f.y)-this.borderWidth%2/2;f.height=O(E(f.height),0.001);e.yBottom=f.y+f.height;f=e.plotY+(e.negative?f.height:0);this.chart.inverted?e.tooltipPos[0]=b.len-
f:e.tooltipPos[1]=f}},processData:function(a){var b=this.yData,c=this.options.data,d,e=b.length,f,h,k,g,j,m;h=f=k=g=this.options.threshold||0;for(m=0;m<e;m++)j=b[m],d=c&&c[m]?c[m]:{},j==="sum"||d.isSum?b[m]=h:j==="intermediateSum"||d.isIntermediateSum?b[m]=f:(h+=j,f+=j),k=Math.min(h,k),g=Math.max(h,g);w.prototype.processData.call(this,a);this.dataMin=k;this.dataMax=g},toYData:function(a){if(a.isSum)return a.x===0?null:"sum";else if(a.isIntermediateSum)return a.x===0?null:"intermediateSum";return a.y},
getAttribs:function(){i.column.prototype.getAttribs.apply(this,arguments);var a=this,b=a.options,c=b.states,d=b.upColor||a.color,b=n.Color(d).brighten(0.1).get(),e=t(a.pointAttr),f=a.upColorProp;e[""][f]=d;e.hover[f]=c.hover.upColor||b;e.select[f]=c.select.upColor||d;s(a.points,function(f){if(!f.options.color)f.y>0?(f.pointAttr=e,f.color=d):f.pointAttr=a.pointAttr})},getGraphPath:function(){var a=this.data,b=a.length,c=E(this.options.lineWidth+this.borderWidth)%2/2,d=[],e,f,h;for(h=1;h<b;h++)f=a[h].shapeArgs,
e=a[h-1].shapeArgs,f=["M",e.x+e.width,e.y+c,"L",f.x,e.y+c],a[h-1].y<0&&(f[2]+=e.height,f[5]+=e.height),d=d.concat(f);return d},getExtremes:v,drawGraph:w.prototype.drawGraph});p.polygon=t(p.scatter,{marker:{enabled:!1}});i.polygon=u(i.scatter,{type:"polygon",fillGraph:!0,getSegmentPath:function(a){return w.prototype.getSegmentPath.call(this,a).concat("z")},drawGraph:w.prototype.drawGraph,drawLegendSymbol:n.LegendSymbolMixin.drawRectangle});p.bubble=t(p.scatter,{dataLabels:{formatter:function(){return this.point.z},
inside:!0,verticalAlign:"middle"},marker:{lineColor:null,lineWidth:1},minSize:8,maxSize:"20%",softThreshold:!1,states:{hover:{halo:{size:5}}},tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},turboThreshold:0,zThreshold:0,zoneAxis:"z"});A=u(J,{haloPath:function(){return J.prototype.haloPath.call(this,this.shapeArgs.r+this.series.options.states.hover.halo.size)},ttBelow:!1});i.bubble=u(i.scatter,{type:"bubble",pointClass:A,pointArrayMap:["y","z"],parallelArrays:["x","y","z"],trackerGroups:["group",
"dataLabelsGroup"],bubblePadding:!0,zoneAxis:"z",pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor"},applyOpacity:function(a){var b=this.options.marker,c=o(b.fillOpacity,0.5),a=a||b.fillColor||this.color;c!==1&&(a=V(a).setOpacity(c).get("rgba"));return a},convertAttribs:function(){var a=w.prototype.convertAttribs.apply(this,arguments);a.fill=this.applyOpacity(a.fill);return a},getRadii:function(a,b,c,d){var e,f,h,k=this.zData,g=[],j=this.options,m=j.sizeBy!=="width",
l=j.zThreshold,i=b-a;for(f=0,e=k.length;f<e;f++)h=k[f],j.sizeByAbsoluteValue&&(h=Math.abs(h-l),b=Math.max(b-l,Math.abs(a-l)),a=0),h===null?h=null:h<a?h=c/2-1:(h=i>0?(h-a)/i:0.5,m&&h>=0&&(h=Math.sqrt(h)),h=y.ceil(c+h*(d-c))/2),g.push(h);this.radii=g},animate:function(a){var b=this.options.animation;if(!a)s(this.points,function(a){var d=a.graphic,a=a.shapeArgs;d&&a&&(d.attr("r",1),d.animate({r:a.r},b))}),this.animate=null},translate:function(){var a,b=this.data,c,d,e=this.radii;i.scatter.prototype.translate.call(this);
for(a=b.length;a--;)c=b[a],d=e?e[a]:0,typeof d==="number"&&d>=this.minPxSize/2?(c.shapeType="circle",c.shapeArgs={x:c.plotX,y:c.plotY,r:d},c.dlBox={x:c.plotX-d,y:c.plotY-d,width:2*d,height:2*d}):c.shapeArgs=c.plotY=c.dlBox=G},drawLegendSymbol:function(a,b){var c=B(a.itemStyle.fontSize)/2;b.legendSymbol=this.chart.renderer.circle(c,a.baseline-c,c).attr({zIndex:3}).add(b.legendGroup);b.legendSymbol.isMarker=!0},drawPoints:i.column.prototype.drawPoints,alignDataLabel:i.column.prototype.alignDataLabel,
buildKDTree:v,applyZones:v});N.prototype.beforePadding=function(){var a=this,b=this.len,c=this.chart,d=0,e=b,f=this.isXAxis,h=f?"xData":"yData",k=this.min,g={},j=y.min(c.plotWidth,c.plotHeight),m=Number.MAX_VALUE,l=-Number.MAX_VALUE,i=this.max-k,x=b/i,n=[];s(this.series,function(b){var h=b.options;if(b.bubblePadding&&(b.visible||!c.options.chart.ignoreHiddenSeries))if(a.allowZoomOutside=!0,n.push(b),f)s(["minSize","maxSize"],function(a){var b=h[a],f=/%$/.test(b),b=B(b);g[a]=f?j*b/100:b}),b.minPxSize=
g.minSize,b.maxPxSize=g.maxSize,b=b.zData,b.length&&(m=o(h.zMin,y.min(m,y.max(Q(b),h.displayNegative===!1?h.zThreshold:-Number.MAX_VALUE))),l=o(h.zMax,y.max(l,R(b))))});s(n,function(a){var b=a[h],c=b.length,g;f&&a.getRadii(m,l,a.minPxSize,a.maxPxSize);if(i>0)for(;c--;)typeof b[c]==="number"&&(g=a.radii[c],d=Math.min((b[c]-k)*x-g,d),e=Math.max((b[c]-k)*x+g,e))});n.length&&i>0&&!this.isLog&&(e-=b,x*=(b+d-e)/b,s([["min","userMin",d],["max","userMax",e]],function(b){o(a.options[b[0]],a[b[1]])===G&&(a[b[0]]+=
b[2]/x)}))};(function(){function a(a,b,c){a.call(this,b,c);if(this.chart.polar)this.closeSegment=function(a){var b=this.xAxis.center;a.push("L",b[0],b[1])},this.closedStacks=!0}function b(a,b){var c=this.chart,g=this.options.animation,d=this.group,e=this.markerGroup,l=this.xAxis.center,i=c.plotLeft,n=c.plotTop;if(c.polar){if(c.renderer.isSVG)g===!0&&(g={}),b?(c={translateX:l[0]+i,translateY:l[1]+n,scaleX:0.001,scaleY:0.001},d.attr(c),e&&e.attr(c)):(c={translateX:i,translateY:n,scaleX:1,scaleY:1},
d.animate(c,g),e&&e.animate(c,g),this.animate=null)}else a.call(this,b)}var c=w.prototype,d=T.prototype,e;c.searchPointByAngle=function(a){var b=this.chart,c=this.xAxis.pane.center;return this.searchKDTree({clientX:180+Math.atan2(a.chartX-c[0]-b.plotLeft,a.chartY-c[1]-b.plotTop)*(-180/Math.PI)})};r(c,"buildKDTree",function(a){if(this.chart.polar)this.kdByAngle?this.searchPoint=this.searchPointByAngle:this.kdDimensions=2;a.apply(this)});c.toXY=function(a){var b,c=this.chart,g=a.plotX;b=a.plotY;a.rectPlotX=
g;a.rectPlotY=b;b=this.xAxis.postTranslate(a.plotX,this.yAxis.len-b);a.plotX=a.polarPlotX=b.x-c.plotLeft;a.plotY=a.polarPlotY=b.y-c.plotTop;this.kdByAngle?(c=(g/Math.PI*180+this.xAxis.pane.options.startAngle)%360,c<0&&(c+=360),a.clientX=c):a.clientX=a.plotX};i.area&&r(i.area.prototype,"init",a);i.areaspline&&r(i.areaspline.prototype,"init",a);i.spline&&r(i.spline.prototype,"getPointSpline",function(a,b,c,g){var d,e,l,i,n,p,o;if(this.chart.polar){d=c.plotX;e=c.plotY;a=b[g-1];l=b[g+1];this.connectEnds&&
(a||(a=b[b.length-2]),l||(l=b[1]));if(a&&l)i=a.plotX,n=a.plotY,b=l.plotX,p=l.plotY,i=(1.5*d+i)/2.5,n=(1.5*e+n)/2.5,l=(1.5*d+b)/2.5,o=(1.5*e+p)/2.5,b=Math.sqrt(Math.pow(i-d,2)+Math.pow(n-e,2)),p=Math.sqrt(Math.pow(l-d,2)+Math.pow(o-e,2)),i=Math.atan2(n-e,i-d),n=Math.atan2(o-e,l-d),o=Math.PI/2+(i+n)/2,Math.abs(i-o)>Math.PI/2&&(o-=Math.PI),i=d+Math.cos(o)*b,n=e+Math.sin(o)*b,l=d+Math.cos(Math.PI+o)*p,o=e+Math.sin(Math.PI+o)*p,c.rightContX=l,c.rightContY=o;g?(c=["C",a.rightContX||a.plotX,a.rightContY||
a.plotY,i||d,n||e,d,e],a.rightContX=a.rightContY=null):c=["M",d,e]}else c=a.call(this,b,c,g);return c});r(c,"translate",function(a){var b=this.chart;a.call(this);if(b.polar&&(this.kdByAngle=b.tooltip&&b.tooltip.shared,!this.preventPostTranslate)){a=this.points;for(b=a.length;b--;)this.toXY(a[b])}});r(c,"getSegmentPath",function(a,b){var c=this.points;if(this.chart.polar&&this.options.connectEnds!==!1&&b[b.length-1]===c[c.length-1]&&c[0].y!==null)this.connectEnds=!0,b=[].concat(b,[c[0]]);return a.call(this,
b)});r(c,"animate",b);if(i.column)e=i.column.prototype,r(e,"animate",b),r(e,"translate",function(a){var b=this.xAxis,c=this.yAxis.len,d=b.center,e=b.startAngleRad,i=this.chart.renderer,l,n;this.preventPostTranslate=!0;a.call(this);if(b.isRadial){b=this.points;for(n=b.length;n--;)l=b[n],a=l.barX+e,l.shapeType="path",l.shapeArgs={d:i.symbols.arc(d[0],d[1],c-l.plotY,null,{start:a,end:a+l.pointWidth,innerR:c-o(l.yBottom,c)})},this.toXY(l),l.tooltipPos=[l.plotX,l.plotY],l.ttBelow=l.plotY>d[1]}}),r(e,"alignDataLabel",
function(a,b,d,e,j,i){if(this.chart.polar){a=b.rectPlotX/Math.PI*180;if(e.align===null)e.align=a>20&&a<160?"left":a>200&&a<340?"right":"center";if(e.verticalAlign===null)e.verticalAlign=a<45||a>315?"bottom":a>135&&a<225?"top":"middle";c.alignDataLabel.call(this,b,d,e,j,i)}else a.call(this,b,d,e,j,i)});r(d,"getCoordinates",function(a,b){var c=this.chart,d={xAxis:[],yAxis:[]};c.polar?s(c.axes,function(a){var e=a.isXAxis,f=a.center,i=b.chartX-f[0]-c.plotLeft,f=b.chartY-f[1]-c.plotTop;d[e?"xAxis":"yAxis"].push({axis:a,
value:a.translate(e?Math.PI-Math.atan2(i,f):Math.sqrt(Math.pow(i,2)+Math.pow(f,2)),!0)})}):d=a.call(this,b);return d})})()})(Highcharts);

File diff suppressed because it is too large Load Diff

View File

@ -1,331 +0,0 @@
/*
Highcharts JS v4.1.9 (2015-10-07)
(c) 2009-2014 Torstein Honsi
License: www.highcharts.com/license
*/
(function(){function D(){var a,b=arguments,c,d={},e=function(a,b){var c,d;typeof a!=="object"&&(a={});for(d in b)b.hasOwnProperty(d)&&(c=b[d],a[d]=c&&typeof c==="object"&&Object.prototype.toString.call(c)!=="[object Array]"&&d!=="renderTo"&&typeof c.nodeType!=="number"?e(a[d]||{},c):b[d]);return a};b[0]===!0&&(d=b[1],b=Array.prototype.slice.call(b,2));c=b.length;for(a=0;a<c;a++)d=e(d,b[a]);return d}function G(a,b){return parseInt(a,b||10)}function Ba(a){return typeof a==="string"}function da(a){return a&&
typeof a==="object"}function Ga(a){return Object.prototype.toString.call(a)==="[object Array]"}function qa(a){return typeof a==="number"}function Ca(a){return V.log(a)/V.LN10}function ia(a){return V.pow(10,a)}function ja(a,b){for(var c=a.length;c--;)if(a[c]===b){a.splice(c,1);break}}function q(a){return a!==x&&a!==null}function K(a,b,c){var d,e;if(Ba(b))q(c)?a.setAttribute(b,c):a&&a.getAttribute&&(e=a.getAttribute(b));else if(q(b)&&da(b))for(d in b)a.setAttribute(d,b[d]);return e}function ra(a){return Ga(a)?
a:[a]}function M(a,b){if(sa&&!ca&&b&&b.opacity!==x)b.filter="alpha(opacity="+b.opacity*100+")";t(a.style,b)}function $(a,b,c,d,e){a=C.createElement(a);b&&t(a,b);e&&M(a,{padding:0,border:P,margin:0});c&&M(a,c);d&&d.appendChild(a);return a}function ka(a,b){var c=function(){return x};c.prototype=new a;t(c.prototype,b);return c}function Ha(a,b){return Array((b||2)+1-String(a).length).join(0)+a}function Wa(a){return(db&&db(a)||nb||0)*6E4}function Ia(a,b){for(var c="{",d=!1,e,f,g,h,i,j=[];(c=a.indexOf(c))!==
-1;){e=a.slice(0,c);if(d){f=e.split(":");g=f.shift().split(".");i=g.length;e=b;for(h=0;h<i;h++)e=e[g[h]];if(f.length)f=f.join(":"),g=/\.([0-9])/,h=S.lang,i=void 0,/f$/.test(f)?(i=(i=f.match(g))?i[1]:-1,e!==null&&(e=B.numberFormat(e,i,h.decimalPoint,f.indexOf(",")>-1?h.thousandsSep:""))):e=Na(f,e)}j.push(e);a=a.slice(c+1);c=(d=!d)?"}":"{"}j.push(a);return j.join("")}function ob(a){return V.pow(10,T(V.log(a)/V.LN10))}function pb(a,b,c,d,e){var f,g=a,c=p(c,1);f=a/c;b||(b=[1,2,2.5,5,10],d===!1&&(c===
1?b=[1,2,5,10]:c<=0.1&&(b=[1/c])));for(d=0;d<b.length;d++)if(g=b[d],e&&g*c>=a||!e&&f<=(b[d]+(b[d+1]||b[d]))/2)break;g*=c;return g}function qb(a,b){var c=a.length,d,e;for(e=0;e<c;e++)a[e].ss_i=e;a.sort(function(a,c){d=b(a,c);return d===0?a.ss_i-c.ss_i:d});for(e=0;e<c;e++)delete a[e].ss_i}function Oa(a){for(var b=a.length,c=a[0];b--;)a[b]<c&&(c=a[b]);return c}function Da(a){for(var b=a.length,c=a[0];b--;)a[b]>c&&(c=a[b]);return c}function Pa(a,b){for(var c in a)a[c]&&a[c]!==b&&a[c].destroy&&a[c].destroy(),
delete a[c]}function Qa(a){eb||(eb=$(Ja));a&&eb.appendChild(a);eb.innerHTML=""}function la(a,b){var c="Highcharts error #"+a+": www.highcharts.com/errors/"+a;if(b)throw c;L.console&&console.log(c)}function ea(a,b){return parseFloat(a.toPrecision(b||14))}function Ra(a,b){b.renderer.globalAnimation=p(a,b.animation)}function Cb(){var a=S.global,b=a.useUTC,c=b?"getUTC":"get",d=b?"setUTC":"set";ya=a.Date||window.Date;nb=b&&a.timezoneOffset;db=b&&a.getTimezoneOffset;fb=function(a,c,d,h,i,j){var k;b?(k=
ya.UTC.apply(0,arguments),k+=Wa(k)):k=(new ya(a,c,p(d,1),p(h,0),p(i,0),p(j,0))).getTime();return k};rb=c+"Minutes";sb=c+"Hours";tb=c+"Day";Xa=c+"Date";Ya=c+"Month";Za=c+"FullYear";Db=d+"Milliseconds";Eb=d+"Seconds";Fb=d+"Minutes";Gb=d+"Hours";ub=d+"Date";vb=d+"Month";wb=d+"FullYear"}function Q(){}function Sa(a,b,c,d){this.axis=a;this.pos=b;this.type=c||"";this.isNew=!0;!c&&!d&&this.addLabel()}function Hb(a,b,c,d,e){var f=a.chart.inverted;this.axis=a;this.isNegative=c;this.options=b;this.x=d;this.total=
null;this.points={};this.stack=e;this.alignOptions={align:b.align||(f?c?"left":"right":"center"),verticalAlign:b.verticalAlign||(f?"middle":c?"bottom":"top"),y:p(b.y,f?4:c?14:-6),x:p(b.x,f?c?-6:6:0)};this.textAlign=b.textAlign||(f?c?"right":"left":"center")}var x,C=document,L=window,V=Math,w=V.round,T=V.floor,ta=V.ceil,s=V.max,z=V.min,O=V.abs,W=V.cos,aa=V.sin,ma=V.PI,ga=ma*2/360,za=navigator.userAgent,Ib=L.opera,sa=/(msie|trident|edge)/i.test(za)&&!Ib,gb=C.documentMode===8,hb=!sa&&/AppleWebKit/.test(za),
Ka=/Firefox/.test(za),Jb=/(Mobile|Android|Windows Phone)/.test(za),Ea="http://www.w3.org/2000/svg",ca=!!C.createElementNS&&!!C.createElementNS(Ea,"svg").createSVGRect,Nb=Ka&&parseInt(za.split("Firefox/")[1],10)<4,fa=!ca&&!sa&&!!C.createElement("canvas").getContext,$a,ab,Kb={},xb=0,eb,S,Na,yb,F,ua=function(){return x},X=[],bb=0,Ja="div",P="none",Ob=/^[0-9]+$/,ib=["plotTop","marginRight","marginBottom","plotLeft"],Pb="stroke-width",ya,fb,nb,db,rb,sb,tb,Xa,Ya,Za,Db,Eb,Fb,Gb,ub,vb,wb,N={},B;B=L.Highcharts=
L.Highcharts?la(16,!0):{};B.seriesTypes=N;var t=B.extend=function(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a},p=B.pick=function(){var a=arguments,b,c,d=a.length;for(b=0;b<d;b++)if(c=a[b],c!==x&&c!==null)return c},Ta=B.wrap=function(a,b,c){var d=a[b];a[b]=function(){var a=Array.prototype.slice.call(arguments);a.unshift(d);return c.apply(this,a)}};Na=function(a,b,c){if(!q(b)||isNaN(b))return S.lang.invalidDate||"";var a=p(a,"%Y-%m-%d %H:%M:%S"),d=new ya(b-Wa(b)),e,f=d[sb](),g=d[tb](),h=d[Xa](),
i=d[Ya](),j=d[Za](),k=S.lang,m=k.weekdays,d=t({a:m[g].substr(0,3),A:m[g],d:Ha(h),e:h,w:g,b:k.shortMonths[i],B:k.months[i],m:Ha(i+1),y:j.toString().substr(2,2),Y:j,H:Ha(f),k:f,I:Ha(f%12||12),l:f%12||12,M:Ha(d[rb]()),p:f<12?"AM":"PM",P:f<12?"am":"pm",S:Ha(d.getSeconds()),L:Ha(w(b%1E3),3)},B.dateFormats);for(e in d)for(;a.indexOf("%"+e)!==-1;)a=a.replace("%"+e,typeof d[e]==="function"?d[e](b):d[e]);return c?a.substr(0,1).toUpperCase()+a.substr(1):a};F={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,
week:6048E5,month:24192E5,year:314496E5};B.numberFormat=function(a,b,c,d){var e=S.lang,a=+a||0,f=b===-1?z((a.toString().split(".")[1]||"").length,20):isNaN(b=O(b))?2:b,b=c===void 0?e.decimalPoint:c,d=d===void 0?e.thousandsSep:d,e=a<0?"-":"",c=String(G(a=O(a).toFixed(f))),g=c.length>3?c.length%3:0;return e+(g?c.substr(0,g)+d:"")+c.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(f?b+O(a-c).toFixed(f).slice(2):"")};yb={init:function(a,b,c){var b=b||"",d=a.shift,e=b.indexOf("C")>-1,f=e?7:3,g,b=b.split(" "),
c=[].concat(c),h,i,j=function(a){for(g=a.length;g--;)a[g]==="M"&&a.splice(g+1,0,a[g+1],a[g+2],a[g+1],a[g+2])};e&&(j(b),j(c));a.isArea&&(h=b.splice(b.length-6,6),i=c.splice(c.length-6,6));if(d<=c.length/f&&b.length===c.length)for(;d--;)c=[].concat(c).splice(0,f).concat(c);a.shift=0;if(b.length)for(a=c.length;b.length<a;)d=[].concat(b).splice(b.length-f,f),e&&(d[f-6]=d[f-2],d[f-5]=d[f-1]),b=b.concat(d);h&&(b=b.concat(h),c=c.concat(i));return[b,c]},step:function(a,b,c,d){var e=[],f=a.length;if(c===1)e=
d;else if(f===b.length&&c<1)for(;f--;)d=parseFloat(a[f]),e[f]=isNaN(d)?a[f]:c*parseFloat(b[f]-d)+d;else e=b;return e}};(function(a){L.HighchartsAdapter=L.HighchartsAdapter||a&&{init:function(b){var c=a.fx;a.extend(a.easing,{easeOutQuad:function(a,b,c,g,h){return-g*(b/=h)*(b-2)+c}});a.each(["cur","_default","width","height","opacity"],function(b,e){var f=c.step,g;e==="cur"?f=c.prototype:e==="_default"&&a.Tween&&(f=a.Tween.propHooks[e],e="set");(g=f[e])&&(f[e]=function(a){var c,a=b?a:this;if(a.prop!==
"align")return c=a.elem,c.attr?c.attr(a.prop,e==="cur"?x:a.now):g.apply(this,arguments)})});Ta(a.cssHooks.opacity,"get",function(a,b,c){return b.attr?b.opacity||0:a.call(this,b,c)});this.addAnimSetter("d",function(a){var c=a.elem,f;if(!a.started)f=b.init(c,c.d,c.toD),a.start=f[0],a.end=f[1],a.started=!0;c.attr("d",b.step(a.start,a.end,a.pos,c.toD))});this.each=Array.prototype.forEach?function(a,b){return Array.prototype.forEach.call(a,b)}:function(a,b){var c,g=a.length;for(c=0;c<g;c++)if(b.call(a[c],
a[c],c,a)===!1)return c};a.fn.highcharts=function(){var a="Chart",b=arguments,c,g;if(this[0]){Ba(b[0])&&(a=b[0],b=Array.prototype.slice.call(b,1));c=b[0];if(c!==x)c.chart=c.chart||{},c.chart.renderTo=this[0],new B[a](c,b[1]),g=this;c===x&&(g=X[K(this[0],"data-highcharts-chart")])}return g}},addAnimSetter:function(b,c){a.Tween?a.Tween.propHooks[b]={set:c}:a.fx.step[b]=c},getScript:a.getScript,inArray:a.inArray,adapterRun:function(b,c){return a(b)[c]()},grep:a.grep,map:function(a,c){for(var d=[],e=
0,f=a.length;e<f;e++)d[e]=c.call(a[e],a[e],e,a);return d},offset:function(b){return a(b).offset()},addEvent:function(b,c,d){a(b).bind(c,d)},removeEvent:function(b,c,d){var e=C.removeEventListener?"removeEventListener":"detachEvent";C[e]&&b&&!b[e]&&(b[e]=function(){});a(b).unbind(c,d)},fireEvent:function(b,c,d,e){var f=a.Event(c),g="detached"+c,h;!sa&&d&&(delete d.layerX,delete d.layerY,delete d.returnValue);t(f,d);b[c]&&(b[g]=b[c],b[c]=null);a.each(["preventDefault","stopPropagation"],function(a,
b){var c=f[b];f[b]=function(){try{c.call(f)}catch(a){b==="preventDefault"&&(h=!0)}}});a(b).trigger(f);b[g]&&(b[c]=b[g],b[g]=null);e&&!f.isDefaultPrevented()&&!h&&e(f)},washMouseEvent:function(a){var c=a.originalEvent||a;if(c.pageX===x)c.pageX=a.pageX,c.pageY=a.pageY;return c},animate:function(b,c,d){var e=a(b);if(!b.style)b.style={};if(c.d)b.toD=c.d,c.d=1;e.stop();c.opacity!==x&&b.attr&&(c.opacity+="px");b.hasAnim=1;e.animate(c,d)},stop:function(b){b.hasAnim&&a(b).stop()}}})(L.jQuery);var U=L.HighchartsAdapter,
E=U||{};U&&U.init.call(U,yb);var jb=E.adapterRun,Qb=E.getScript,La=E.inArray,o=B.each=E.each,kb=E.grep,Rb=E.offset,Ua=E.map,I=E.addEvent,Y=E.removeEvent,J=E.fireEvent,Sb=E.washMouseEvent,lb=E.animate,cb=E.stop;S={colors:"#7cb5ec,#434348,#90ed7d,#f7a35c,#8085e9,#f15c80,#e4d354,#2b908f,#f45b5b,#91e8e1".split(","),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),
shortMonths:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),decimalPoint:".",numericSymbols:"k,M,G,T,P,E".split(","),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{useUTC:!0,canvasToolsURL:"http://code.highcharts.com/4.1.9/modules/canvas-tools.js",VMLRadialGradientURL:"http://code.highcharts.com/4.1.9/gfx/vml-radial-gradient.png"},chart:{borderColor:"#4572A7",borderRadius:0,
defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0",resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}}},title:{text:"Chart title",align:"center",margin:15,style:{color:"#333333",fontSize:"18px"}},subtitle:{text:"",align:"center",style:{color:"#555555"}},plotOptions:{line:{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},lineWidth:2,marker:{lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{enabled:!0,
lineWidthPlus:1,radiusPlus:2},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return this.y===null?"":B.numberFormat(this.y,-1)},style:{color:"contrast",fontSize:"11px",fontWeight:"bold",textShadow:"0 0 6px contrast, 0 0 3px contrast"},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{hover:{lineWidthPlus:1,marker:{},halo:{size:10,opacity:0.25}},select:{marker:{}}},stickyTracking:!0,
turboThreshold:1E3}},labels:{style:{position:"absolute",color:"#3E576F"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#909090",borderRadius:0,navigation:{activeColor:"#274b6d",inactiveColor:"#CCC"},shadow:!1,itemStyle:{color:"#333333",fontSize:"12px",fontWeight:"bold"},itemHoverStyle:{color:"#000"},itemHiddenStyle:{color:"#CCC"},itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},symbolPadding:5,verticalAlign:"bottom",
x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"white",opacity:0.5,textAlign:"center"}},tooltip:{enabled:!0,animation:ca,backgroundColor:"rgba(249, 249, 249, .85)",borderWidth:1,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",
year:"%Y"},footerFormat:"",headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">\u25cf</span> {series.name}: <b>{point.y}</b><br/>',shadow:!0,snap:Jb?25:10,style:{color:"#333333",cursor:"default",fontSize:"12px",padding:"8px",pointerEvents:"none",whiteSpace:"nowrap"}},credits:{enabled:!0,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",
fontSize:"9px"}}};var ba=S.plotOptions,U=ba.line;Cb();var Tb=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,Ub=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,Vb=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,na=function(a){var b=[],c,d;(function(a){a&&a.stops?d=Ua(a.stops,function(a){return na(a[1])}):(c=Tb.exec(a))?b=[G(c[1]),G(c[2]),G(c[3]),parseFloat(c[4],10)]:(c=Ub.exec(a))?b=[G(c[1],16),G(c[2],16),G(c[3],16),1]:(c=Vb.exec(a))&&
(b=[G(c[1]),G(c[2]),G(c[3]),1])})(a);return{get:function(c){var f;d?(f=D(a),f.stops=[].concat(f.stops),o(d,function(a,b){f.stops[b]=[f.stops[b][0],a.get(c)]})):f=b&&!isNaN(b[0])?c==="rgb"?"rgb("+b[0]+","+b[1]+","+b[2]+")":c==="a"?b[3]:"rgba("+b.join(",")+")":a;return f},brighten:function(a){if(d)o(d,function(b){b.brighten(a)});else if(qa(a)&&a!==0){var c;for(c=0;c<3;c++)b[c]+=G(a*255),b[c]<0&&(b[c]=0),b[c]>255&&(b[c]=255)}return this},rgba:b,setOpacity:function(a){b[3]=a;return this},raw:a}};Q.prototype=
{opacity:1,textProps:"fontSize,fontWeight,fontFamily,fontStyle,color,lineHeight,width,textDecoration,textOverflow,textShadow".split(","),init:function(a,b){this.element=b==="span"?$(b):C.createElementNS(Ea,b);this.renderer=a},animate:function(a,b,c){b=p(b,this.renderer.globalAnimation,!0);cb(this);if(b){b=D(b,{});if(c)b.complete=c;lb(this,a,b)}else this.attr(a,null,c);return this},colorGradient:function(a,b,c){var d=this.renderer,e,f,g,h,i,j,k,m,n,l,u,r=[];a.linearGradient?f="linearGradient":a.radialGradient&&
(f="radialGradient");if(f){g=a[f];i=d.gradients;k=a.stops;l=c.radialReference;Ga(g)&&(a[f]=g={x1:g[0],y1:g[1],x2:g[2],y2:g[3],gradientUnits:"userSpaceOnUse"});f==="radialGradient"&&l&&!q(g.gradientUnits)&&(h=g,g=D(g,d.getRadialAttr(l,h),{gradientUnits:"userSpaceOnUse"}));for(u in g)u!=="id"&&r.push(u,g[u]);for(u in k)r.push(k[u]);r=r.join(",");i[r]?a=i[r].attr("id"):(g.id=a="highcharts-"+xb++,i[r]=j=d.createElement(f).attr(g).add(d.defs),j.radAttr=h,j.stops=[],o(k,function(a){a[1].indexOf("rgba")===
0?(e=na(a[1]),m=e.get("rgb"),n=e.get("a")):(m=a[1],n=1);a=d.createElement("stop").attr({offset:a[0],"stop-color":m,"stop-opacity":n}).add(j);j.stops.push(a)}));c.setAttribute(b,"url("+d.url+"#"+a+")");c.gradient=r}},applyTextShadow:function(a){var b=this.element,c,d=a.indexOf("contrast")!==-1,e={},f=this.renderer.forExport,g=f||b.style.textShadow!==x&&!sa;if(d)e.textShadow=a=a.replace(/contrast/g,this.renderer.getContrast(b.style.fill));if(hb||f)e.textRendering="geometricPrecision";g?this.css(e):
(this.fakeTS=!0,this.ySetter=this.xSetter,c=[].slice.call(b.getElementsByTagName("tspan")),o(a.split(/\s?,\s?/g),function(a){var d=b.firstChild,e,f,a=a.split(" ");e=a[a.length-1];(f=a[a.length-2])&&o(c,function(a,c){var g;c===0&&(a.setAttribute("x",b.getAttribute("x")),c=b.getAttribute("y"),a.setAttribute("y",c||0),c===null&&b.setAttribute("y",0));g=a.cloneNode(1);K(g,{"class":"highcharts-text-shadow",fill:e,stroke:e,"stroke-opacity":1/s(G(f),3),"stroke-width":f,"stroke-linejoin":"round"});b.insertBefore(g,
d)})}))},attr:function(a,b,c){var d,e=this.element,f,g=this,h;typeof a==="string"&&b!==x&&(d=a,a={},a[d]=b);if(typeof a==="string")g=(this[a+"Getter"]||this._defaultGetter).call(this,a,e);else{for(d in a){b=a[d];h=!1;this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(d)&&(f||(this.symbolAttr(a),f=!0),h=!0);if(this.rotation&&(d==="x"||d==="y"))this.doTransform=!0;h||(this[d+"Setter"]||this._defaultSetter).call(this,b,d,e);this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(d)&&
this.updateShadows(d,b)}if(this.doTransform)this.updateTransform(),this.doTransform=!1}c&&c();return g},updateShadows:function(a,b){for(var c=this.shadows,d=c.length;d--;)c[d].setAttribute(a,a==="height"?s(b-(c[d].cutHeight||0),0):a==="d"?this.d:b)},addClass:function(a){var b=this.element,c=K(b,"class")||"";c.indexOf(a)===-1&&K(b,"class",c+" "+a);return this},symbolAttr:function(a){var b=this;o("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","),function(c){b[c]=p(a[c],b[c])});b.attr({d:b.renderer.symbols[b.symbolName](b.x,
b.y,b.width,b.height,b)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":P)},crisp:function(a){var b,c={},d,e=a.strokeWidth||this.strokeWidth||0;d=w(e)%2/2;a.x=T(a.x||this.x||0)+d;a.y=T(a.y||this.y||0)+d;a.width=T((a.width||this.width||0)-2*d);a.height=T((a.height||this.height||0)-2*d);a.strokeWidth=e;for(b in a)this[b]!==a[b]&&(this[b]=c[b]=a[b]);return c},css:function(a){var b=this.styles,c={},d=this.element,e,f,g="";e=!b;if(a&&a.color)a.fill=a.color;if(b)for(f in a)a[f]!==
b[f]&&(c[f]=a[f],e=!0);if(e){e=this.textWidth=a&&a.width&&d.nodeName.toLowerCase()==="text"&&G(a.width)||this.textWidth;b&&(a=t(b,c));this.styles=a;e&&(fa||!ca&&this.renderer.forExport)&&delete a.width;if(sa&&!ca)M(this.element,a);else{b=function(a,b){return"-"+b.toLowerCase()};for(f in a)g+=f.replace(/([A-Z])/g,b)+":"+a[f]+";";K(d,"style",g)}e&&this.added&&this.renderer.buildText(this)}return this},on:function(a,b){var c=this,d=c.element;ab&&a==="click"?(d.ontouchstart=function(a){c.touchEventFired=
ya.now();a.preventDefault();b.call(d,a)},d.onclick=function(a){(za.indexOf("Android")===-1||ya.now()-(c.touchEventFired||0)>1100)&&b.call(d,a)}):d["on"+a]=b;return this},setRadialReference:function(a){var b=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;b&&b.radAttr&&b.animate(this.renderer.getRadialAttr(a,b.radAttr));return this},translate:function(a,b){return this.attr({translateX:a,translateY:b})},invert:function(){this.inverted=!0;this.updateTransform();return this},
updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,c=this.scaleX,d=this.scaleY,e=this.inverted,f=this.rotation,g=this.element;e&&(a+=this.attr("width"),b+=this.attr("height"));a=["translate("+a+","+b+")"];e?a.push("rotate(90) scale(-1,1)"):f&&a.push("rotate("+f+" "+(g.getAttribute("x")||0)+" "+(g.getAttribute("y")||0)+")");(q(c)||q(d))&&a.push("scale("+p(c,1)+" "+p(d,1)+")");a.length&&g.setAttribute("transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);
return this},align:function(a,b,c){var d,e,f,g,h={};e=this.renderer;f=e.alignedObjects;if(a){if(this.alignOptions=a,this.alignByTranslate=b,!c||Ba(c))this.alignTo=d=c||"renderer",ja(f,this),f.push(this),c=null}else a=this.alignOptions,b=this.alignByTranslate,d=this.alignTo;c=p(c,e[d],e);d=a.align;e=a.verticalAlign;f=(c.x||0)+(a.x||0);g=(c.y||0)+(a.y||0);if(d==="right"||d==="center")f+=(c.width-(a.width||0))/{right:1,center:2}[d];h[b?"translateX":"x"]=w(f);if(e==="bottom"||e==="middle")g+=(c.height-
(a.height||0))/({bottom:1,middle:2}[e]||1);h[b?"translateY":"y"]=w(g);this[this.placed?"animate":"attr"](h);this.placed=!0;this.alignAttr=h;return this},getBBox:function(a){var b,c=this.renderer,d,e=this.rotation,f=this.element,g=this.styles,h=e*ga;d=this.textStr;var i,j=f.style,k,m;d!==x&&(m=["",e||0,g&&g.fontSize,f.style.width].join(","),m=d===""||Ob.test(d)?"num:"+d.toString().length+m:d+m);m&&!a&&(b=c.cache[m]);if(!b){if(f.namespaceURI===Ea||c.forExport){try{k=this.fakeTS&&function(a){o(f.querySelectorAll(".highcharts-text-shadow"),
function(b){b.style.display=a})},Ka&&j.textShadow?(i=j.textShadow,j.textShadow=""):k&&k(P),b=f.getBBox?t({},f.getBBox()):{width:f.offsetWidth,height:f.offsetHeight},i?j.textShadow=i:k&&k("")}catch(n){}if(!b||b.width<0)b={width:0,height:0}}else b=this.htmlGetBBox();if(c.isSVG){a=b.width;d=b.height;if(sa&&g&&g.fontSize==="11px"&&d.toPrecision(3)==="16.9")b.height=d=14;if(e)b.width=O(d*aa(h))+O(a*W(h)),b.height=O(d*W(h))+O(a*aa(h))}m&&(c.cache[m]=b)}return b},show:function(a){return this.attr({visibility:a?
"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var b=this;b.animate({opacity:0},{duration:a||150,complete:function(){b.attr({y:-9999})}})},add:function(a){var b=this.renderer,c=this.element,d;if(a)this.parentGroup=a;this.parentInverted=a&&a.inverted;this.textStr!==void 0&&b.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)d=this.zIndexSetter();d||(a?a.element:b.box).appendChild(c);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var b=
a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,b=a.element||{},c=a.shadows,d=a.renderer.isSVG&&b.nodeName==="SPAN"&&a.parentGroup,e,f;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=b.point=null;cb(a);if(a.clipPath)a.clipPath=a.clipPath.destroy();if(a.stops){for(f=0;f<a.stops.length;f++)a.stops[f]=a.stops[f].destroy();a.stops=null}a.safeRemoveChild(b);for(c&&o(c,function(b){a.safeRemoveChild(b)});d&&d.div&&d.div.childNodes.length===0;)b=d.parentGroup,a.safeRemoveChild(d.div),delete d.div,
d=b;a.alignTo&&ja(a.renderer.alignedObjects,a);for(e in a)delete a[e];return null},shadow:function(a,b,c){var d=[],e,f,g=this.element,h,i,j,k;if(a){i=p(a.width,3);j=(a.opacity||0.15)/i;k=this.parentInverted?"(-1,-1)":"("+p(a.offsetX,1)+", "+p(a.offsetY,1)+")";for(e=1;e<=i;e++){f=g.cloneNode(0);h=i*2+1-2*e;K(f,{isShadow:"true",stroke:a.color||"black","stroke-opacity":j*e,"stroke-width":h,transform:"translate"+k,fill:P});if(c)K(f,"height",s(K(f,"height")-h,0)),f.cutHeight=h;b?b.element.appendChild(f):
g.parentNode.insertBefore(f,g);d.push(f)}this.shadows=d}return this},xGetter:function(a){this.element.nodeName==="circle"&&(a={x:"cx",y:"cy"}[a]||a);return this._defaultGetter(a)},_defaultGetter:function(a){a=p(this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&(a=parseFloat(a));return a},dSetter:function(a,b,c){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");c.setAttribute(b,a);this[b]=a},dashstyleSetter:function(a){var b;if(a=a&&a.toLowerCase()){a=
a.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(b=a.length;b--;)a[b]=G(a[b])*this["stroke-width"];a=a.join(",").replace("NaN","none");this.element.setAttribute("stroke-dasharray",a)}},alignSetter:function(a){this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[a])},opacitySetter:function(a,
b,c){this[b]=a;c.setAttribute(b,a)},titleSetter:function(a){var b=this.element.getElementsByTagName("title")[0];b||(b=C.createElementNS(Ea,"title"),this.element.appendChild(b));b.appendChild(C.createTextNode(String(p(a),"").replace(/<[^>]*>/g,"")))},textSetter:function(a){if(a!==this.textStr)delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this)},fillSetter:function(a,b,c){typeof a==="string"?c.setAttribute(b,a):a&&this.colorGradient(a,b,c)},visibilitySetter:function(a,b,c){a===
"inherit"?c.removeAttribute(b):c.setAttribute(b,a)},zIndexSetter:function(a,b){var c=this.renderer,d=this.parentGroup,c=(d||c).element||c.box,e,f,g=this.element,h;e=this.added;var i;q(a)&&(g.setAttribute(b,a),a=+a,this[b]===a&&(e=!1),this[b]=a);if(e){if((a=this.zIndex)&&d)d.handleZ=!0;d=c.childNodes;for(i=0;i<d.length&&!h;i++)if(e=d[i],f=K(e,"zIndex"),e!==g&&(G(f)>a||!q(a)&&q(f)))c.insertBefore(g,e),h=!0;h||c.appendChild(g)}return h},_defaultSetter:function(a,b,c){c.setAttribute(b,a)}};Q.prototype.yGetter=
Q.prototype.xGetter;Q.prototype.translateXSetter=Q.prototype.translateYSetter=Q.prototype.rotationSetter=Q.prototype.verticalAlignSetter=Q.prototype.scaleXSetter=Q.prototype.scaleYSetter=function(a,b){this[b]=a;this.doTransform=!0};Q.prototype["stroke-widthSetter"]=Q.prototype.strokeSetter=function(a,b,c){this[b]=a;if(this.stroke&&this["stroke-width"])this.strokeWidth=this["stroke-width"],Q.prototype.fillSetter.call(this,this.stroke,"stroke",c),c.setAttribute("stroke-width",this["stroke-width"]),
this.hasStroke=!0;else if(b==="stroke-width"&&a===0&&this.hasStroke)c.removeAttribute("stroke"),this.hasStroke=!1};var Aa=function(){this.init.apply(this,arguments)};Aa.prototype={Element:Q,init:function(a,b,c,d,e,f){var g=location,h,d=this.createElement("svg").attr({version:"1.1"}).css(this.getStyle(d));h=d.element;a.appendChild(h);a.innerHTML.indexOf("xmlns")===-1&&K(h,"xmlns",Ea);this.isSVG=!0;this.box=h;this.boxWrapper=d;this.alignedObjects=[];this.url=(Ka||hb)&&C.getElementsByTagName("base").length?
g.href.replace(/#.*?$/,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(C.createTextNode("Created with Highcharts 4.1.9"));this.defs=this.createElement("defs").add();this.allowHTML=f;this.forExport=e;this.gradients={};this.cache={};this.setSize(b,c,!1);var i;if(Ka&&a.getBoundingClientRect)this.subPixelFix=b=function(){M(a,{left:0,top:0});i=a.getBoundingClientRect();M(a,{left:ta(i.left)-i.left+"px",top:ta(i.top)-i.top+"px"})},b(),I(L,"resize",
b)},getStyle:function(a){return this.style=t({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},a)},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();Pa(this.gradients||{});this.gradients=null;if(a)this.defs=a.destroy();this.subPixelFix&&Y(L,"resize",this.subPixelFix);return this.alignedObjects=null},createElement:function(a){var b=new this.Element;
b.init(this,a);return b},draw:function(){},getRadialAttr:function(a,b){return{cx:a[0]-a[2]/2+b.cx*a[2],cy:a[1]-a[2]/2+b.cy*a[2],r:b.r*a[2]}},buildText:function(a){for(var b=a.element,c=this,d=c.forExport,e=p(a.textStr,"").toString(),f=e.indexOf("<")!==-1,g=b.childNodes,h,i,j=K(b,"x"),k=a.styles,m=a.textWidth,n=k&&k.lineHeight,l=k&&k.textShadow,u=k&&k.textOverflow==="ellipsis",r=g.length,Z=m&&!a.added&&this.box,A=function(a){return n?G(n):c.fontMetrics(/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:
k&&k.fontSize||c.style.fontSize||12,a).h},v=function(a){return a.replace(/&lt;/g,"<").replace(/&gt;/g,">")};r--;)b.removeChild(g[r]);!f&&!l&&!u&&e.indexOf(" ")===-1?b.appendChild(C.createTextNode(v(e))):(h=/<.*style="([^"]+)".*>/,i=/<.*href="(http[^"]+)".*>/,Z&&Z.appendChild(b),e=f?e.replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g):[e],e[e.length-1]===
""&&e.pop(),o(e,function(e,f){var g,n=0,e=e.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");g=e.split("|||");o(g,function(e){if(e!==""||g.length===1){var l={},r=C.createElementNS(Ea,"tspan"),p;h.test(e)&&(p=e.match(h)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),K(r,"style",p));i.test(e)&&!d&&(K(r,"onclick",'location.href="'+e.match(i)[1]+'"'),M(r,{cursor:"pointer"}));e=v(e.replace(/<(.|\n)*?>/g,"")||" ");if(e!==" "){r.appendChild(C.createTextNode(e));if(n)l.dx=0;else if(f&&j!==null)l.x=
j;K(r,l);b.appendChild(r);!n&&f&&(!ca&&d&&M(r,{display:"block"}),K(r,"dy",A(r)));if(m){for(var l=e.replace(/([^\^])-/g,"$1- ").split(" "),Z=g.length>1||f||l.length>1&&k.whiteSpace!=="nowrap",o,y,q,s=[],x=A(r),t=1,w=a.rotation,z=e,D=z.length;(Z||u)&&(l.length||s.length);)a.rotation=0,o=a.getBBox(!0),q=o.width,!ca&&c.forExport&&(q=c.measureSpanWidth(r.firstChild.data,a.styles)),o=q>m,y===void 0&&(y=o),u&&y?(D/=2,z===""||!o&&D<0.5?l=[]:(o&&(y=!0),z=e.substring(0,z.length+(o?-1:1)*ta(D)),l=[z+(m>3?"\u2026":
"")],r.removeChild(r.firstChild))):!o||l.length===1?(l=s,s=[],l.length&&(t++,r=C.createElementNS(Ea,"tspan"),K(r,{dy:x,x:j}),p&&K(r,"style",p),b.appendChild(r)),q>m&&(m=q)):(r.removeChild(r.firstChild),s.unshift(l.pop())),l.length&&r.appendChild(C.createTextNode(l.join(" ").replace(/- /g,"-")));y&&a.attr("title",a.textStr);a.rotation=w}n++}}})}),Z&&Z.removeChild(b),l&&a.applyTextShadow&&a.applyTextShadow(l))},getContrast:function(a){a=na(a).rgba;return a[0]+a[1]+a[2]>384?"#000000":"#FFFFFF"},button:function(a,
b,c,d,e,f,g,h,i){var j=this.label(a,b,c,i,null,null,null,null,"button"),k=0,m,n,l,u,r,p,a={x1:0,y1:0,x2:0,y2:1},e=D({"stroke-width":1,stroke:"#CCCCCC",fill:{linearGradient:a,stops:[[0,"#FEFEFE"],[1,"#F6F6F6"]]},r:2,padding:5,style:{color:"black"}},e);l=e.style;delete e.style;f=D(e,{stroke:"#68A",fill:{linearGradient:a,stops:[[0,"#FFF"],[1,"#ACF"]]}},f);u=f.style;delete f.style;g=D(e,{stroke:"#68A",fill:{linearGradient:a,stops:[[0,"#9BD"],[1,"#CDF"]]}},g);r=g.style;delete g.style;h=D(e,{style:{color:"#CCC"}},
h);p=h.style;delete h.style;I(j.element,sa?"mouseover":"mouseenter",function(){k!==3&&j.attr(f).css(u)});I(j.element,sa?"mouseout":"mouseleave",function(){k!==3&&(m=[e,f,g][k],n=[l,u,r][k],j.attr(m).css(n))});j.setState=function(a){(j.state=k=a)?a===2?j.attr(g).css(r):a===3&&j.attr(h).css(p):j.attr(e).css(l)};return j.on("click",function(a){k!==3&&d.call(j,a)}).attr(e).css(t({cursor:"default"},l))},crispLine:function(a,b){a[1]===a[4]&&(a[1]=a[4]=w(a[1])-b%2/2);a[2]===a[5]&&(a[2]=a[5]=w(a[2])+b%2/
2);return a},path:function(a){var b={fill:P};Ga(a)?b.d=a:da(a)&&t(b,a);return this.createElement("path").attr(b)},circle:function(a,b,c){a=da(a)?a:{x:a,y:b,r:c};b=this.createElement("circle");b.xSetter=function(a){this.element.setAttribute("cx",a)};b.ySetter=function(a){this.element.setAttribute("cy",a)};return b.attr(a)},arc:function(a,b,c,d,e,f){if(da(a))b=a.y,c=a.r,d=a.innerR,e=a.start,f=a.end,a=a.x;a=this.symbol("arc",a||0,b||0,c||0,c||0,{innerR:d||0,start:e||0,end:f||0});a.r=c;return a},rect:function(a,
b,c,d,e,f){var e=da(a)?a.r:e,g=this.createElement("rect"),a=da(a)?a:a===x?{}:{x:a,y:b,width:s(c,0),height:s(d,0)};if(f!==x)a.strokeWidth=f,a=g.crisp(a);if(e)a.r=e;g.rSetter=function(a){K(this.element,{rx:a,ry:a})};return g.attr(a)},setSize:function(a,b,c){var d=this.alignedObjects,e=d.length;this.width=a;this.height=b;for(this.boxWrapper[p(c,!0)?"animate":"attr"]({width:a,height:b});e--;)d[e].align()},g:function(a){var b=this.createElement("g");return q(a)?b.attr({"class":"highcharts-"+a}):b},image:function(a,
b,c,d,e){var f={preserveAspectRatio:P};arguments.length>1&&t(f,{x:b,y:c,width:d,height:e});f=this.createElement("image").attr(f);f.element.setAttributeNS?f.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):f.element.setAttribute("hc-svg-href",a);return f},symbol:function(a,b,c,d,e,f){var g,h=this.symbols[a],h=h&&h(w(b),w(c),d,e,f),i=/^url\((.*?)\)$/,j,k;if(h)g=this.path(h),t(g,{symbolName:a,x:b,y:c,width:d,height:e}),f&&t(g,f);else if(i.test(a))k=function(a,b){a.element&&(a.attr({width:b[0],
height:b[1]}),a.alignByTranslate||a.translate(w((d-b[0])/2),w((e-b[1])/2)))},j=a.match(i)[1],a=Kb[j]||f&&f.width&&f.height&&[f.width,f.height],g=this.image(j).attr({x:b,y:c}),g.isImg=!0,a?k(g,a):(g.attr({width:0,height:0}),$("img",{onload:function(){this.width===0&&(M(this,{position:"absolute",top:"-999em"}),document.body.appendChild(this));k(g,Kb[j]=[this.width,this.height]);this.parentNode&&this.parentNode.removeChild(this)},src:j}));return g},symbols:{circle:function(a,b,c,d){var e=0.166*c;return["M",
a+c/2,b,"C",a+c+e,b,a+c+e,b+d,a+c/2,b+d,"C",a-e,b+d,a-e,b,a+c/2,b,"Z"]},square:function(a,b,c,d){return["M",a,b,"L",a+c,b,a+c,b+d,a,b+d,"Z"]},triangle:function(a,b,c,d){return["M",a+c/2,b,"L",a+c,b+d,a,b+d,"Z"]},"triangle-down":function(a,b,c,d){return["M",a,b,"L",a+c,b,a+c/2,b+d,"Z"]},diamond:function(a,b,c,d){return["M",a+c/2,b,"L",a+c,b+d/2,a+c/2,b+d,a,b+d/2,"Z"]},arc:function(a,b,c,d,e){var f=e.start,c=e.r||c||d,g=e.end-0.001,d=e.innerR,h=e.open,i=W(f),j=aa(f),k=W(g),g=aa(g),e=e.end-f<ma?0:1;
return["M",a+c*i,b+c*j,"A",c,c,0,e,1,a+c*k,b+c*g,h?"M":"L",a+d*k,b+d*g,"A",d,d,0,e,0,a+d*i,b+d*j,h?"":"Z"]},callout:function(a,b,c,d,e){var f=z(e&&e.r||0,c,d),g=f+6,h=e&&e.anchorX,e=e&&e.anchorY,i;i=["M",a+f,b,"L",a+c-f,b,"C",a+c,b,a+c,b,a+c,b+f,"L",a+c,b+d-f,"C",a+c,b+d,a+c,b+d,a+c-f,b+d,"L",a+f,b+d,"C",a,b+d,a,b+d,a,b+d-f,"L",a,b+f,"C",a,b,a,b,a+f,b];h&&h>c&&e>b+g&&e<b+d-g?i.splice(13,3,"L",a+c,e-6,a+c+6,e,a+c,e+6,a+c,b+d-f):h&&h<0&&e>b+g&&e<b+d-g?i.splice(33,3,"L",a,e+6,a-6,e,a,e-6,a,b+f):e&&e>
d&&h>a+g&&h<a+c-g?i.splice(23,3,"L",h+6,b+d,h,b+d+6,h-6,b+d,a+f,b+d):e&&e<0&&h>a+g&&h<a+c-g&&i.splice(3,3,"L",h-6,b,h,b-6,h+6,b,c-f,b);return i}},clipRect:function(a,b,c,d){var e="highcharts-"+xb++,f=this.createElement("clipPath").attr({id:e}).add(this.defs),a=this.rect(a,b,c,d,0).add(f);a.id=e;a.clipPath=f;a.count=0;return a},text:function(a,b,c,d){var e=fa||!ca&&this.forExport,f={};if(d&&(this.allowHTML||!this.forExport))return this.html(a,b,c);f.x=Math.round(b||0);if(c)f.y=Math.round(c);if(a||
a===0)f.text=a;a=this.createElement("text").attr(f);e&&a.css({position:"absolute"});if(!d)a.xSetter=function(a,b,c){var d=c.getElementsByTagName("tspan"),e,f=c.getAttribute(b),n;for(n=0;n<d.length;n++)e=d[n],e.getAttribute(b)===f&&e.setAttribute(b,a);c.setAttribute(b,a)};return a},fontMetrics:function(a,b){var c,d,a=a||this.style.fontSize;!a&&b&&L.getComputedStyle&&(b=b.element||b,a=(c=L.getComputedStyle(b,""))&&c.fontSize);a=/px/.test(a)?G(a):/em/.test(a)?parseFloat(a)*12:12;c=a<24?a+3:w(a*1.2);
d=w(c*0.8);return{h:c,b:d,f:a}},rotCorr:function(a,b,c){var d=a;b&&c&&(d=s(d*W(b*ga),4));return{x:-a/3*aa(b*ga),y:d}},label:function(a,b,c,d,e,f,g,h,i){function j(){var a,b;a=u.element.style;p=(s===void 0||va===void 0||l.styles.textAlign)&&q(u.textStr)&&u.getBBox();l.width=(s||p.width||0)+2*v+y;l.height=(va||p.height||0)+2*v;B=v+n.fontMetrics(a&&a.fontSize,u).b;if(E){if(!r)a=w(-A*v)+C,b=(h?-B:0)+C,l.box=r=d?n.symbol(d,a,b,l.width,l.height,H):n.rect(a,b,l.width,l.height,0,H[Pb]),r.isImg||r.attr("fill",
P),r.add(l);r.isImg||r.attr(t({width:w(l.width),height:w(l.height)},H));H=null}}function k(){var a=l.styles,a=a&&a.textAlign,b=y+v*(1-A),c;c=h?0:B;if(q(s)&&p&&(a==="center"||a==="right"))b+={center:0.5,right:1}[a]*(s-p.width);if(b!==u.x||c!==u.y)u.attr("x",b),c!==x&&u.attr("y",c);u.x=b;u.y=c}function m(a,b){r?r.attr(a,b):H[a]=b}var n=this,l=n.g(i),u=n.text("",0,0,g).attr({zIndex:1}),r,p,A=0,v=3,y=0,s,va,zb,z,C=0,H={},B,E;l.onAdd=function(){u.add(l);l.attr({text:a||a===0?a:"",x:b,y:c});r&&q(e)&&l.attr({anchorX:e,
anchorY:f})};l.widthSetter=function(a){s=a};l.heightSetter=function(a){va=a};l.paddingSetter=function(a){if(q(a)&&a!==v)v=l.padding=a,k()};l.paddingLeftSetter=function(a){q(a)&&a!==y&&(y=a,k())};l.alignSetter=function(a){A={left:0,center:0.5,right:1}[a]};l.textSetter=function(a){a!==x&&u.textSetter(a);j();k()};l["stroke-widthSetter"]=function(a,b){a&&(E=!0);C=a%2/2;m(b,a)};l.strokeSetter=l.fillSetter=l.rSetter=function(a,b){b==="fill"&&a&&(E=!0);m(b,a)};l.anchorXSetter=function(a,b){e=a;m(b,w(a)-
C-zb)};l.anchorYSetter=function(a,b){f=a;m(b,a-z)};l.xSetter=function(a){l.x=a;A&&(a-=A*((s||p.width)+v));zb=w(a);l.attr("translateX",zb)};l.ySetter=function(a){z=l.y=w(a);l.attr("translateY",z)};var G=l.css;return t(l,{css:function(a){if(a){var b={},a=D(a);o(l.textProps,function(c){a[c]!==x&&(b[c]=a[c],delete a[c])});u.css(b)}return G.call(l,a)},getBBox:function(){return{width:p.width+2*v,height:p.height+2*v,x:p.x-v,y:p.y-v}},shadow:function(a){r&&r.shadow(a);return l},destroy:function(){Y(l.element,
"mouseenter");Y(l.element,"mouseleave");u&&(u=u.destroy());r&&(r=r.destroy());Q.prototype.destroy.call(l);l=n=j=k=m=null}})}};$a=Aa;t(Q.prototype,{htmlCss:function(a){var b=this.element;if(b=a&&b.tagName==="SPAN"&&a.width)delete a.width,this.textWidth=b,this.updateTransform();if(a&&a.textOverflow==="ellipsis")a.whiteSpace="nowrap",a.overflow="hidden";this.styles=t(this.styles,a);M(this.element,a);return this},htmlGetBBox:function(){var a=this.element;if(a.nodeName==="text")a.style.position="absolute";
return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,b=this.element,c=this.translateX||0,d=this.translateY||0,e=this.x||0,f=this.y||0,g=this.textAlign||"left",h={left:0,center:0.5,right:1}[g],i=this.shadows,j=this.styles;M(b,{marginLeft:c,marginTop:d});i&&o(i,function(a){M(a,{marginLeft:c+1,marginTop:d+1})});this.inverted&&o(b.childNodes,function(c){a.invertChild(c,b)});if(b.tagName==="SPAN"){var k=this.rotation,
m,n=G(this.textWidth),l=[k,g,b.innerHTML,this.textWidth,this.textAlign].join(",");if(l!==this.cTT){m=a.fontMetrics(b.style.fontSize).b;q(k)&&this.setSpanRotation(k,h,m);i=p(this.elemWidth,b.offsetWidth);if(i>n&&/[ \-]/.test(b.textContent||b.innerText))M(b,{width:n+"px",display:"block",whiteSpace:j&&j.whiteSpace||"normal"}),i=n;this.getSpanCorrection(i,m,h,k,g)}M(b,{left:e+(this.xCorr||0)+"px",top:f+(this.yCorr||0)+"px"});if(hb)m=b.offsetHeight;this.cTT=l}}else this.alignOnAdd=!0},setSpanRotation:function(a,
b,c){var d={},e=sa?"-ms-transform":hb?"-webkit-transform":Ka?"MozTransform":Ib?"-o-transform":"";d[e]=d.transform="rotate("+a+"deg)";d[e+(Ka?"Origin":"-origin")]=d.transformOrigin=b*100+"% "+c+"px";M(this.element,d)},getSpanCorrection:function(a,b,c){this.xCorr=-a*c;this.yCorr=-b}});t(Aa.prototype,{html:function(a,b,c){var d=this.createElement("span"),e=d.element,f=d.renderer;d.textSetter=function(a){a!==e.innerHTML&&delete this.bBox;e.innerHTML=this.textStr=a;d.htmlUpdateTransform()};d.xSetter=d.ySetter=
d.alignSetter=d.rotationSetter=function(a,b){b==="align"&&(b="textAlign");d[b]=a;d.htmlUpdateTransform()};d.attr({text:a,x:w(b),y:w(c)}).css({position:"absolute",fontFamily:this.style.fontFamily,fontSize:this.style.fontSize});e.style.whiteSpace="nowrap";d.css=d.htmlCss;if(f.isSVG)d.add=function(a){var b,c=f.box.parentNode,j=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)j.push(a),a=a.parentGroup;o(j.reverse(),function(a){var d,e=K(a.element,"class");e&&(e={className:e});b=a.div=a.div||$(Ja,e,{position:"absolute",
left:(a.translateX||0)+"px",top:(a.translateY||0)+"px"},b||c);d=b.style;t(a,{translateXSetter:function(b,c){d.left=b+"px";a[c]=b;a.doTransform=!0},translateYSetter:function(b,c){d.top=b+"px";a[c]=b;a.doTransform=!0}});o(["opacity","visibility"],function(b){Ta(a,b+"Setter",function(a,b,c,e){a.call(this,b,c,e);d[c]=b})})})}}else b=c;b.appendChild(e);d.added=!0;d.alignOnAdd&&d.htmlUpdateTransform();return d};return d}});if(!ca&&!fa){E={init:function(a,b){var c=["<",b,' filled="f" stroked="f"'],d=["position: ",
"absolute",";"],e=b===Ja;(b==="shape"||e)&&d.push("left:0;top:0;width:1px;height:1px;");d.push("visibility: ",e?"hidden":"visible");c.push(' style="',d.join(""),'"/>');if(b)c=e||b==="span"||b==="img"?c.join(""):a.prepVML(c),this.element=$(c);this.renderer=a},add:function(a){var b=this.renderer,c=this.element,d=b.box,d=a?a.element||a:d;a&&a.inverted&&b.invertChild(c,d);d.appendChild(c);this.added=!0;this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform();if(this.onAdd)this.onAdd();return this},
updateTransform:Q.prototype.htmlUpdateTransform,setSpanRotation:function(){var a=this.rotation,b=W(a*ga),c=aa(a*ga);M(this.element,{filter:a?["progid:DXImageTransform.Microsoft.Matrix(M11=",b,", M12=",-c,", M21=",c,", M22=",b,", sizingMethod='auto expand')"].join(""):P})},getSpanCorrection:function(a,b,c,d,e){var f=d?W(d*ga):1,g=d?aa(d*ga):0,h=p(this.elemHeight,this.element.offsetHeight),i;this.xCorr=f<0&&-a;this.yCorr=g<0&&-h;i=f*g<0;this.xCorr+=g*b*(i?1-c:c);this.yCorr-=f*b*(d?i?c:1-c:1);e&&e!==
"left"&&(this.xCorr-=a*c*(f<0?-1:1),d&&(this.yCorr-=h*c*(g<0?-1:1)),M(this.element,{textAlign:e}))},pathToVML:function(a){for(var b=a.length,c=[];b--;)if(qa(a[b]))c[b]=w(a[b]*10)-5;else if(a[b]==="Z")c[b]="x";else if(c[b]=a[b],a.isArc&&(a[b]==="wa"||a[b]==="at"))c[b+5]===c[b+7]&&(c[b+7]+=a[b+7]>a[b+5]?1:-1),c[b+6]===c[b+8]&&(c[b+8]+=a[b+8]>a[b+6]?1:-1);return c.join(" ")||"x"},clip:function(a){var b=this,c;a?(c=a.members,ja(c,b),c.push(b),b.destroyClip=function(){ja(c,b)},a=a.getCSS(b)):(b.destroyClip&&
b.destroyClip(),a={clip:gb?"inherit":"rect(auto)"});return b.css(a)},css:Q.prototype.htmlCss,safeRemoveChild:function(a){a.parentNode&&Qa(a)},destroy:function(){this.destroyClip&&this.destroyClip();return Q.prototype.destroy.apply(this)},on:function(a,b){this.element["on"+a]=function(){var a=L.event;a.target=a.srcElement;b(a)};return this},cutOffPath:function(a,b){var c,a=a.split(/[ ,]/);c=a.length;if(c===9||c===11)a[c-4]=a[c-2]=G(a[c-2])-10*b;return a.join(" ")},shadow:function(a,b,c){var d=[],e,
f=this.element,g=this.renderer,h,i=f.style,j,k=f.path,m,n,l,u;k&&typeof k.value!=="string"&&(k="x");n=k;if(a){l=p(a.width,3);u=(a.opacity||0.15)/l;for(e=1;e<=3;e++){m=l*2+1-2*e;c&&(n=this.cutOffPath(k.value,m+0.5));j=['<shape isShadow="true" strokeweight="',m,'" filled="false" path="',n,'" coordsize="10 10" style="',f.style.cssText,'" />'];h=$(g.prepVML(j),null,{left:G(i.left)+p(a.offsetX,1),top:G(i.top)+p(a.offsetY,1)});if(c)h.cutOff=m+1;j=['<stroke color="',a.color||"black",'" opacity="',u*e,'"/>'];
$(g.prepVML(j),null,null,h);b?b.element.appendChild(h):f.parentNode.insertBefore(h,f);d.push(h)}this.shadows=d}return this},updateShadows:ua,setAttr:function(a,b){gb?this.element[a]=b:this.element.setAttribute(a,b)},classSetter:function(a){this.element.className=a},dashstyleSetter:function(a,b,c){(c.getElementsByTagName("stroke")[0]||$(this.renderer.prepVML(["<stroke/>"]),null,null,c))[b]=a||"solid";this[b]=a},dSetter:function(a,b,c){var d=this.shadows,a=a||[];this.d=a.join&&a.join(" ");c.path=a=
this.pathToVML(a);if(d)for(c=d.length;c--;)d[c].path=d[c].cutOff?this.cutOffPath(a,d[c].cutOff):a;this.setAttr(b,a)},fillSetter:function(a,b,c){var d=c.nodeName;if(d==="SPAN")c.style.color=a;else if(d!=="IMG")c.filled=a!==P,this.setAttr("fillcolor",this.renderer.color(a,c,b,this))},opacitySetter:ua,rotationSetter:function(a,b,c){c=c.style;this[b]=c[b]=a;c.left=-w(aa(a*ga)+1)+"px";c.top=w(W(a*ga))+"px"},strokeSetter:function(a,b,c){this.setAttr("strokecolor",this.renderer.color(a,c,b))},"stroke-widthSetter":function(a,
b,c){c.stroked=!!a;this[b]=a;qa(a)&&(a+="px");this.setAttr("strokeweight",a)},titleSetter:function(a,b){this.setAttr(b,a)},visibilitySetter:function(a,b,c){a==="inherit"&&(a="visible");this.shadows&&o(this.shadows,function(c){c.style[b]=a});c.nodeName==="DIV"&&(a=a==="hidden"?"-999em":0,gb||(c.style[b]=a?"visible":"hidden"),b="top");c.style[b]=a},xSetter:function(a,b,c){this[b]=a;b==="x"?b="left":b==="y"&&(b="top");this.updateClipping?(this[b]=a,this.updateClipping()):c.style[b]=a},zIndexSetter:function(a,
b,c){c.style[b]=a}};B.VMLElement=E=ka(Q,E);E.prototype.ySetter=E.prototype.widthSetter=E.prototype.heightSetter=E.prototype.xSetter;var Ma={Element:E,isIE8:za.indexOf("MSIE 8.0")>-1,init:function(a,b,c,d){var e;this.alignedObjects=[];d=this.createElement(Ja).css(t(this.getStyle(d),{position:"relative"}));e=d.element;a.appendChild(d.element);this.isVML=!0;this.box=e;this.boxWrapper=d;this.cache={};this.setSize(b,c,!1);if(!C.namespaces.hcv){C.namespaces.add("hcv","urn:schemas-microsoft-com:vml");try{C.createStyleSheet().cssText=
"hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}catch(f){C.styleSheets[0].cssText+="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}}},isHidden:function(){return!this.box.offsetWidth},clipRect:function(a,b,c,d){var e=this.createElement(),f=da(a);return t(e,{members:[],count:0,left:(f?a.x:a)+1,top:(f?a.y:b)+1,width:(f?a.width:c)-1,height:(f?a.height:d)-1,getCSS:function(a){var b=a.element,
c=b.nodeName,a=a.inverted,d=this.top-(c==="shape"?b.offsetTop:0),e=this.left,b=e+this.width,f=d+this.height,d={clip:"rect("+w(a?e:d)+"px,"+w(a?f:b)+"px,"+w(a?b:f)+"px,"+w(a?d:e)+"px)"};!a&&gb&&c==="DIV"&&t(d,{width:b+"px",height:f+"px"});return d},updateClipping:function(){o(e.members,function(a){a.element&&a.css(e.getCSS(a))})}})},color:function(a,b,c,d){var e=this,f,g=/^rgba/,h,i,j=P;a&&a.linearGradient?i="gradient":a&&a.radialGradient&&(i="pattern");if(i){var k,m,n=a.linearGradient||a.radialGradient,
l,u,r,p,A,v="",a=a.stops,y,q=[],va=function(){h=['<fill colors="'+q.join(",")+'" opacity="',r,'" o:opacity2="',u,'" type="',i,'" ',v,'focus="100%" method="any" />'];$(e.prepVML(h),null,null,b)};l=a[0];y=a[a.length-1];l[0]>0&&a.unshift([0,l[1]]);y[0]<1&&a.push([1,y[1]]);o(a,function(a,b){g.test(a[1])?(f=na(a[1]),k=f.get("rgb"),m=f.get("a")):(k=a[1],m=1);q.push(a[0]*100+"% "+k);b?(r=m,p=k):(u=m,A=k)});if(c==="fill")if(i==="gradient")c=n.x1||n[0]||0,a=n.y1||n[1]||0,l=n.x2||n[2]||0,n=n.y2||n[3]||0,v=
'angle="'+(90-V.atan((n-a)/(l-c))*180/ma)+'"',va();else{var j=n.r,s=j*2,x=j*2,t=n.cx,w=n.cy,z=b.radialReference,D,j=function(){z&&(D=d.getBBox(),t+=(z[0]-D.x)/D.width-0.5,w+=(z[1]-D.y)/D.height-0.5,s*=z[2]/D.width,x*=z[2]/D.height);v='src="'+S.global.VMLRadialGradientURL+'" size="'+s+","+x+'" origin="0.5,0.5" position="'+t+","+w+'" color2="'+A+'" ';va()};d.added?j():d.onAdd=j;j=p}else j=k}else if(g.test(a)&&b.tagName!=="IMG")f=na(a),h=["<",c,' opacity="',f.get("a"),'"/>'],$(this.prepVML(h),null,null,
b),j=f.get("rgb");else{j=b.getElementsByTagName(c);if(j.length)j[0].opacity=1,j[0].type="solid";j=a}return j},prepVML:function(a){var b=this.isIE8,a=a.join("");b?(a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),a=a.indexOf('style="')===-1?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):a=a.replace("<","<hcv:");return a},text:Aa.prototype.html,path:function(a){var b={coordsize:"10 10"};
Ga(a)?b.d=a:da(a)&&t(b,a);return this.createElement("shape").attr(b)},circle:function(a,b,c){var d=this.symbol("circle");if(da(a))c=a.r,b=a.y,a=a.x;d.isCircle=!0;d.r=c;return d.attr({x:a,y:b})},g:function(a){var b;a&&(b={className:"highcharts-"+a,"class":"highcharts-"+a});return this.createElement(Ja).attr(b)},image:function(a,b,c,d,e){var f=this.createElement("img").attr({src:a});arguments.length>1&&f.attr({x:b,y:c,width:d,height:e});return f},createElement:function(a){return a==="rect"?this.symbol(a):
Aa.prototype.createElement.call(this,a)},invertChild:function(a,b){var c=this,d=b.style,e=a.tagName==="IMG"&&a.style;M(a,{flip:"x",left:G(d.width)-(e?G(e.top):1),top:G(d.height)-(e?G(e.left):1),rotation:-90});o(a.childNodes,function(b){c.invertChild(b,a)})},symbols:{arc:function(a,b,c,d,e){var f=e.start,g=e.end,h=e.r||c||d,c=e.innerR,d=W(f),i=aa(f),j=W(g),k=aa(g);if(g-f===0)return["x"];f=["wa",a-h,b-h,a+h,b+h,a+h*d,b+h*i,a+h*j,b+h*k];e.open&&!c&&f.push("e","M",a,b);f.push("at",a-c,b-c,a+c,b+c,a+c*
j,b+c*k,a+c*d,b+c*i,"x","e");f.isArc=!0;return f},circle:function(a,b,c,d,e){e&&(c=d=2*e.r);e&&e.isCircle&&(a-=c/2,b-=d/2);return["wa",a,b,a+c,b+d,a+c,b+d/2,a+c,b+d/2,"e"]},rect:function(a,b,c,d,e){return Aa.prototype.symbols[!q(e)||!e.r?"square":"callout"].call(0,a,b,c,d,e)}}};B.VMLRenderer=E=function(){this.init.apply(this,arguments)};E.prototype=D(Aa.prototype,Ma);$a=E}Aa.prototype.measureSpanWidth=function(a,b){var c=C.createElement("span"),d;d=C.createTextNode(a);c.appendChild(d);M(c,b);this.box.appendChild(c);
d=c.offsetWidth;Qa(c);return d};var Lb;if(fa)B.CanVGRenderer=E=function(){Ea="http://www.w3.org/1999/xhtml"},E.prototype.symbols={},Lb=function(){function a(){var a=b.length,d;for(d=0;d<a;d++)b[d]();b=[]}var b=[];return{push:function(c,d){b.length===0&&Qb(d,a);b.push(c)}}}(),$a=E;Sa.prototype={addLabel:function(){var a=this.axis,b=a.options,c=a.chart,d=a.categories,e=a.names,f=this.pos,g=b.labels,h=a.tickPositions,i=f===h[0],j=f===h[h.length-1],e=d?p(d[f],e[f],f):f,d=this.label,h=h.info,k;a.isDatetimeAxis&&
h&&(k=b.dateTimeLabelFormats[h.higherRanks[f]||h.unitName]);this.isFirst=i;this.isLast=j;b=a.labelFormatter.call({axis:a,chart:c,isFirst:i,isLast:j,dateTimeLabelFormat:k,value:a.isLog?ea(ia(e)):e});q(d)?d&&d.attr({text:b}):(this.labelLength=(this.label=d=q(b)&&g.enabled?c.renderer.text(b,0,0,g.useHTML).css(D(g.style)).add(a.labelGroup):null)&&d.getBBox().width,this.rotation=0)},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(a){var b=
this.axis,c=a.x,d=b.chart.chartWidth,e=b.chart.spacing,f=p(b.labelLeft,z(b.pos,e[3])),e=p(b.labelRight,s(b.pos+b.len,d-e[1])),g=this.label,h=this.rotation,i={left:0,center:0.5,right:1}[b.labelAlign],j=g.getBBox().width,k=b.slotWidth,m=1,n,l={};if(h)h<0&&c-i*j<f?n=w(c/W(h*ga)-f):h>0&&c+i*j>e&&(n=w((d-c)/W(h*ga)));else if(d=c+(1-i)*j,c-i*j<f?k=a.x+k*(1-i)-f:d>e&&(k=e-a.x+k*i,m=-1),k=z(b.slotWidth,k),k<b.slotWidth&&b.labelAlign==="center"&&(a.x+=m*(b.slotWidth-k-i*(b.slotWidth-z(j,k)))),j>k||b.autoRotation&&
g.styles.width)n=k;if(n){l.width=n;if(!b.options.labels.style.textOverflow)l.textOverflow="ellipsis";g.css(l)}},getPosition:function(a,b,c,d){var e=this.axis,f=e.chart,g=d&&f.oldChartHeight||f.chartHeight;return{x:a?e.translate(b+c,null,null,d)+e.transB:e.left+e.offset+(e.opposite?(d&&f.oldChartWidth||f.chartWidth)-e.right-e.left:0),y:a?g-e.bottom+e.offset-(e.opposite?e.height:0):g-e.translate(b+c,null,null,d)-e.transB}},getLabelPosition:function(a,b,c,d,e,f,g,h){var i=this.axis,j=i.transA,k=i.reversed,
m=i.staggerLines,n=i.tickRotCorr||{x:0,y:0},c=p(e.y,n.y+(i.side===2?8:-(c.getBBox().height/2))),a=a+e.x+n.x-(f&&d?f*j*(k?-1:1):0),b=b+c-(f&&!d?f*j*(k?1:-1):0);m&&(b+=g/(h||1)%m*(i.labelOffset/m));return{x:a,y:w(b)}},getMarkPath:function(a,b,c,d,e,f){return f.crispLine(["M",a,b,"L",a+(e?0:-c),b+(e?c:0)],d)},render:function(a,b,c){var d=this.axis,e=d.options,f=d.chart.renderer,g=d.horiz,h=this.type,i=this.label,j=this.pos,k=e.labels,m=this.gridLine,n=h?h+"Grid":"grid",l=h?h+"Tick":"tick",u=e[n+"LineWidth"],
r=e[n+"LineColor"],o=e[n+"LineDashStyle"],A=e[l+"Length"],n=p(e[l+"Width"],!h&&d.isXAxis?1:0),v=e[l+"Color"],y=e[l+"Position"],l=this.mark,q=k.step,va=!0,s=d.tickmarkOffset,t=this.getPosition(g,j,s,b),w=t.x,t=t.y,z=g&&w===d.pos+d.len||!g&&t===d.pos?-1:1,c=p(c,1);this.isActive=!0;if(u){j=d.getPlotLinePath(j+s,u*z,b,!0);if(m===x){m={stroke:r,"stroke-width":u};if(o)m.dashstyle=o;if(!h)m.zIndex=1;if(b)m.opacity=0;this.gridLine=m=u?f.path(j).attr(m).add(d.gridGroup):null}if(!b&&m&&j)m[this.isNew?"attr":
"animate"]({d:j,opacity:c})}if(n&&A)y==="inside"&&(A=-A),d.opposite&&(A=-A),h=this.getMarkPath(w,t,A,n*z,g,f),l?l.animate({d:h,opacity:c}):this.mark=f.path(h).attr({stroke:v,"stroke-width":n,opacity:c}).add(d.axisGroup);if(i&&!isNaN(w))i.xy=t=this.getLabelPosition(w,t,i,g,k,s,a,q),this.isFirst&&!this.isLast&&!p(e.showFirstLabel,1)||this.isLast&&!this.isFirst&&!p(e.showLastLabel,1)?va=!1:g&&!d.isRadial&&!k.step&&!k.rotation&&!b&&c!==0&&this.handleOverflow(t),q&&a%q&&(va=!1),va&&!isNaN(t.y)?(t.opacity=
c,i[this.isNew?"attr":"animate"](t),this.isNew=!1):i.attr("y",-9999)},destroy:function(){Pa(this,this.axis)}};B.PlotLineOrBand=function(a,b){this.axis=a;if(b)this.options=b,this.id=b.id};B.PlotLineOrBand.prototype={render:function(){var a=this,b=a.axis,c=b.horiz,d=a.options,e=d.label,f=a.label,g=d.width,h=d.to,i=d.from,j=q(i)&&q(h),k=d.value,m=d.dashStyle,n=a.svgElem,l=[],u,r=d.color,p=d.zIndex,o=d.events,v={},y=b.chart.renderer;b.isLog&&(i=Ca(i),h=Ca(h),k=Ca(k));if(g){if(l=b.getPlotLinePath(k,g),
v={stroke:r,"stroke-width":g},m)v.dashstyle=m}else if(j){l=b.getPlotBandPath(i,h,d);if(r)v.fill=r;if(d.borderWidth)v.stroke=d.borderColor,v["stroke-width"]=d.borderWidth}else return;if(q(p))v.zIndex=p;if(n)if(l)n.animate({d:l},null,n.onGetPath);else{if(n.hide(),n.onGetPath=function(){n.show()},f)a.label=f=f.destroy()}else if(l&&l.length&&(a.svgElem=n=y.path(l).attr(v).add(),o))for(u in d=function(b){n.on(b,function(c){o[b].apply(a,[c])})},o)d(u);if(e&&q(e.text)&&l&&l.length&&b.width>0&&b.height>0){e=
D({align:c&&j&&"center",x:c?!j&&4:10,verticalAlign:!c&&j&&"middle",y:c?j?16:10:j?6:-4,rotation:c&&!j&&90},e);if(!f){v={align:e.textAlign||e.align,rotation:e.rotation};if(q(p))v.zIndex=p;a.label=f=y.text(e.text,0,0,e.useHTML).attr(v).css(e.style).add()}b=[l[1],l[4],j?l[6]:l[1]];j=[l[2],l[5],j?l[7]:l[2]];l=Oa(b);c=Oa(j);f.align(e,!1,{x:l,y:c,width:Da(b)-l,height:Da(j)-c});f.show()}else f&&f.hide();return a},destroy:function(){ja(this.axis.plotLinesAndBands,this);delete this.axis;Pa(this)}};var ha=B.Axis=
function(){this.init.apply(this,arguments)};ha.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#D8D8D8",labels:{enabled:!0,style:{color:"#606060",cursor:"default",fontSize:"11px"},x:0,y:15},lineColor:"#C0D0E0",lineWidth:1,minPadding:0.01,maxPadding:0.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,
minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",title:{align:"middle",style:{color:"#707070"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return B.numberFormat(this.total,
-1)},style:D(ba.line.dataLabels.style,{color:"#000000"})}},defaultLeftAxisOptions:{labels:{x:-15,y:null},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15,y:null},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0,y:null},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0,y:-15},title:{rotation:0}},init:function(a,b){var c=b.isX;this.chart=a;this.horiz=a.inverted?!c:c;this.coll=(this.isXAxis=c)?"xAxis":"yAxis";this.opposite=b.opposite;this.side=
b.side||(this.horiz?this.opposite?0:2:this.opposite?1:3);this.setOptions(b);var d=this.options,e=d.type;this.labelFormatter=d.labels.formatter||this.defaultLabelFormatter;this.userOptions=b;this.minPixelPadding=0;this.reversed=d.reversed;this.visible=d.visible!==!1;this.zoomEnabled=d.zoomEnabled!==!1;this.categories=d.categories||e==="category";this.names=this.names||[];this.isLog=e==="logarithmic";this.isDatetimeAxis=e==="datetime";this.isLinked=q(d.linkedTo);this.ticks={};this.labelEdge=[];this.minorTicks=
{};this.plotLinesAndBands=[];this.alternateBands={};this.len=0;this.minRange=this.userMinRange=d.minRange||d.maxZoom;this.range=d.range;this.offset=d.offset||0;this.stacks={};this.oldStacks={};this.stacksTouched=0;this.min=this.max=null;this.crosshair=p(d.crosshair,ra(a.options.tooltip.crosshairs)[c?0:1],!1);var f,d=this.options.events;La(this,a.axes)===-1&&(c&&!this.isColorAxis?a.axes.splice(a.xAxis.length,0,this):a.axes.push(this),a[this.coll].push(this));this.series=this.series||[];if(a.inverted&&
c&&this.reversed===x)this.reversed=!0;this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;for(f in d)I(this,f,d[f]);if(this.isLog)this.val2lin=Ca,this.lin2val=ia},setOptions:function(a){this.options=D(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],D(S[this.coll],a))},defaultLabelFormatter:function(){var a=this.axis,b=this.value,c=a.categories,d=
this.dateTimeLabelFormat,e=S.lang.numericSymbols,f=e&&e.length,g,h=a.options.labels.format,a=a.isLog?b:a.tickInterval;if(h)g=Ia(h,this);else if(c)g=b;else if(d)g=Na(d,b);else if(f&&a>=1E3)for(;f--&&g===x;)c=Math.pow(1E3,f+1),a>=c&&b*10%c===0&&e[f]!==null&&(g=B.numberFormat(b/c,-1)+e[f]);g===x&&(g=O(b)>=1E4?B.numberFormat(b,-1):B.numberFormat(b,-1,x,""));return g},getSeriesExtremes:function(){var a=this,b=a.chart;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;
a.buildStacks&&a.buildStacks();o(a.series,function(c){if(c.visible||!b.options.chart.ignoreHiddenSeries){var d=c.options,e=d.threshold,f;a.hasVisibleSeries=!0;a.isLog&&e<=0&&(e=null);if(a.isXAxis){if(d=c.xData,d.length)a.dataMin=z(p(a.dataMin,d[0]),Oa(d)),a.dataMax=s(p(a.dataMax,d[0]),Da(d))}else{c.getExtremes();f=c.dataMax;c=c.dataMin;if(q(c)&&q(f))a.dataMin=z(p(a.dataMin,c),c),a.dataMax=s(p(a.dataMax,f),f);if(q(e))a.threshold=e;if(!d.softThreshold||a.isLog)a.softThreshold=!1}}})},translate:function(a,
b,c,d,e,f){var g=this.linkedParent||this,h=1,i=0,j=d?g.oldTransA:g.transA,d=d?g.oldMin:g.min,k=g.minPixelPadding,e=(g.doPostTranslate||g.isLog&&e)&&g.lin2val;if(!j)j=g.transA;if(c)h*=-1,i=g.len;g.reversed&&(h*=-1,i-=h*(g.sector||g.len));b?(a=a*h+i,a-=k,a=a/j+d,e&&(a=g.lin2val(a))):(e&&(a=g.val2lin(a)),f==="between"&&(f=0.5),a=h*(a-d)*j+i+h*k+(qa(f)?j*f*g.pointRange:0));return a},toPixels:function(a,b){return this.translate(a,!1,!this.horiz,null,!0)+(b?0:this.pos)},toValue:function(a,b){return this.translate(a-
(b?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,b,c,d,e){var f=this.chart,g=this.left,h=this.top,i,j,k=c&&f.oldChartHeight||f.chartHeight,m=c&&f.oldChartWidth||f.chartWidth,n;i=this.transB;var l=function(a,b,c){if(a<b||a>c)d?a=z(s(b,a),c):n=!0;return a},e=p(e,this.translate(a,null,null,c)),a=c=w(e+i);i=j=w(k-e-i);isNaN(e)?n=!0:this.horiz?(i=h,j=k-this.bottom,a=c=l(a,g,g+this.width)):(a=g,c=m-this.right,i=j=l(i,h,h+this.height));return n&&!d?null:f.renderer.crispLine(["M",a,i,"L",
c,j],b||1)},getLinearTickPositions:function(a,b,c){var d,e=ea(T(b/a)*a),f=ea(ta(c/a)*a),g=[];if(b===c&&qa(b))return[b];for(b=e;b<=f;){g.push(b);b=ea(b+a);if(b===d)break;d=b}return g},getMinorTickPositions:function(){var a=this.options,b=this.tickPositions,c=this.minorTickInterval,d=[],e,f=this.pointRangePadding||0;e=this.min-f;var f=this.max+f,g=f-e;if(g&&g/c<this.len/3)if(this.isLog){f=b.length;for(e=1;e<f;e++)d=d.concat(this.getLogTickPositions(c,b[e-1],b[e],!0))}else if(this.isDatetimeAxis&&a.minorTickInterval===
"auto")d=d.concat(this.getTimeTicks(this.normalizeTimeTickInterval(c),e,f,a.startOfWeek));else for(b=e+(b[0]-e)%c;b<=f;b+=c)d.push(b);d.length!==0&&this.trimTicks(d,a.startOnTick,a.endOnTick);return d},adjustForMinRange:function(){var a=this.options,b=this.min,c=this.max,d,e=this.dataMax-this.dataMin>=this.minRange,f,g,h,i,j,k;if(this.isXAxis&&this.minRange===x&&!this.isLog)q(a.min)||q(a.max)?this.minRange=null:(o(this.series,function(a){i=a.xData;for(g=j=a.xIncrement?1:i.length-1;g>0;g--)if(h=i[g]-
i[g-1],f===x||h<f)f=h}),this.minRange=z(f*5,this.dataMax-this.dataMin));if(c-b<this.minRange){k=this.minRange;d=(k-c+b)/2;d=[b-d,p(a.min,b-d)];if(e)d[2]=this.dataMin;b=Da(d);c=[b+k,p(a.max,b+k)];if(e)c[2]=this.dataMax;c=Oa(c);c-b<k&&(d[0]=c-k,d[1]=p(a.min,c-k),b=Da(d))}this.min=b;this.max=c},setAxisTranslation:function(a){var b=this,c=b.max-b.min,d=b.axisPointRange||0,e,f=0,g=0,h=b.linkedParent,i=!!b.categories,j=b.transA,k=b.isXAxis;if(k||i||d)if(h?(f=h.minPointOffset,g=h.pointRangePadding):o(b.series,
function(a){var c=i?1:k?a.pointRange:b.axisPointRange||0,h=a.options.pointPlacement,j=a.closestPointRange;d=s(d,c);b.single||(f=s(f,Ba(h)?0:c/2),g=s(g,h==="on"?0:c));!a.noSharedTooltip&&q(j)&&(e=q(e)?z(e,j):j)}),h=b.ordinalSlope&&e?b.ordinalSlope/e:1,b.minPointOffset=f*=h,b.pointRangePadding=g*=h,b.pointRange=z(d,c),k)b.closestPointRange=e;if(a)b.oldTransA=j;b.translationSlope=b.transA=j=b.len/(c+g||1);b.transB=b.horiz?b.left:b.bottom;b.minPixelPadding=j*f},minFromRange:function(){return this.max-
this.range},setTickInterval:function(a){var b=this,c=b.chart,d=b.options,e=b.isLog,f=b.isDatetimeAxis,g=b.isXAxis,h=b.isLinked,i=d.maxPadding,j=d.minPadding,k=d.tickInterval,m=d.tickPixelInterval,n=b.categories,l=b.threshold,u=b.softThreshold,r,Z,A,v;!f&&!n&&!h&&this.getTickAmount();A=p(b.userMin,d.min);v=p(b.userMax,d.max);h?(b.linkedParent=c[b.coll][d.linkedTo],c=b.linkedParent.getExtremes(),b.min=p(c.min,c.dataMin),b.max=p(c.max,c.dataMax),d.type!==b.linkedParent.options.type&&la(11,1)):(!u&&q(l)&&
(b.dataMin>=l?(r=l,j=0):b.dataMax<=l&&(Z=l,i=0)),b.min=p(A,r,b.dataMin),b.max=p(v,Z,b.dataMax));if(e)!a&&z(b.min,p(b.dataMin,b.min))<=0&&la(10,1),b.min=ea(Ca(b.min),15),b.max=ea(Ca(b.max),15);if(b.range&&q(b.max))b.userMin=b.min=A=s(b.min,b.minFromRange()),b.userMax=v=b.max,b.range=null;b.beforePadding&&b.beforePadding();b.adjustForMinRange();if(!n&&!b.axisPointRange&&!b.usePercentage&&!h&&q(b.min)&&q(b.max)&&(c=b.max-b.min))!q(A)&&j&&(b.min-=c*j),!q(v)&&i&&(b.max+=c*i);if(qa(d.floor))b.min=s(b.min,
d.floor);if(qa(d.ceiling))b.max=z(b.max,d.ceiling);if(u&&q(b.dataMin))if(l=l||0,!q(A)&&b.min<l&&b.dataMin>=l)b.min=l;else if(!q(v)&&b.max>l&&b.dataMax<=l)b.max=l;b.tickInterval=b.min===b.max||b.min===void 0||b.max===void 0?1:h&&!k&&m===b.linkedParent.options.tickPixelInterval?k=b.linkedParent.tickInterval:p(k,this.tickAmount?(b.max-b.min)/s(this.tickAmount-1,1):void 0,n?1:(b.max-b.min)*m/s(b.len,m));g&&!a&&o(b.series,function(a){a.processData(b.min!==b.oldMin||b.max!==b.oldMax)});b.setAxisTranslation(!0);
b.beforeSetTickPositions&&b.beforeSetTickPositions();if(b.postProcessTickInterval)b.tickInterval=b.postProcessTickInterval(b.tickInterval);if(b.pointRange)b.tickInterval=s(b.pointRange,b.tickInterval);a=p(d.minTickInterval,b.isDatetimeAxis&&b.closestPointRange);if(!k&&b.tickInterval<a)b.tickInterval=a;if(!f&&!e&&!k)b.tickInterval=pb(b.tickInterval,null,ob(b.tickInterval),p(d.allowDecimals,!(b.tickInterval>0.5&&b.tickInterval<5&&b.max>1E3&&b.max<9999)),!!this.tickAmount);if(!this.tickAmount&&this.len)b.tickInterval=
b.unsquish();this.setTickPositions()},setTickPositions:function(){var a=this.options,b,c=a.tickPositions,d=a.tickPositioner,e=a.startOnTick,f=a.endOnTick,g;this.tickmarkOffset=this.categories&&a.tickmarkPlacement==="between"&&this.tickInterval===1?0.5:0;this.minorTickInterval=a.minorTickInterval==="auto"&&this.tickInterval?this.tickInterval/5:a.minorTickInterval;this.tickPositions=b=c&&c.slice();if(!b&&(b=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,a.units),
this.min,this.max,a.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),b.length>this.len&&(b=[b[0],b.pop()]),this.tickPositions=b,d&&(d=d.apply(this,[this.min,this.max]))))this.tickPositions=b=d;if(!this.isLinked)this.trimTicks(b,e,f),this.min===this.max&&q(this.min)&&!this.tickAmount&&(g=!0,this.min-=0.5,this.max+=0.5),this.single=g,!c&&!d&&this.adjustTickAmount()},
trimTicks:function(a,b,c){var d=a[0],e=a[a.length-1],f=this.minPointOffset||0;b?this.min=d:this.min-f>d&&a.shift();c?this.max=e:this.max+f<e&&a.pop();a.length===0&&q(d)&&a.push((e+d)/2)},getTickAmount:function(){var a={},b,c=this.options,d=c.tickAmount,e=c.tickPixelInterval;!q(c.tickInterval)&&this.len<e&&!this.isRadial&&!this.isLog&&c.startOnTick&&c.endOnTick&&(d=2);!d&&this.chart.options.chart.alignTicks!==!1&&c.alignTicks!==!1&&(o(this.chart[this.coll],function(c){var d=c.options,e=c.horiz,d=[e?
d.left:d.top,e?d.width:d.height,d.pane].join(",");c.series.length&&(a[d]?b=!0:a[d]=1)}),b&&(d=ta(this.len/e)+1));if(d<4)this.finalTickAmt=d,d=5;this.tickAmount=d},adjustTickAmount:function(){var a=this.tickInterval,b=this.tickPositions,c=this.tickAmount,d=this.finalTickAmt,e=b&&b.length;if(e<c){for(;b.length<c;)b.push(ea(b[b.length-1]+a));this.transA*=(e-1)/(c-1);this.max=b[b.length-1]}else e>c&&(this.tickInterval*=2,this.setTickPositions());if(q(d)){for(a=c=b.length;a--;)(d===3&&a%2===1||d<=2&&a>
0&&a<c-1)&&b.splice(a,1);this.finalTickAmt=x}},setScale:function(){var a,b;this.oldMin=this.min;this.oldMax=this.max;this.oldAxisLength=this.len;this.setAxisSize();b=this.len!==this.oldAxisLength;o(this.series,function(b){if(b.isDirtyData||b.isDirty||b.xAxis.isDirty)a=!0});if(b||a||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax){if(this.resetStacks&&this.resetStacks(),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.oldUserMin=
this.userMin,this.oldUserMax=this.userMax,!this.isDirty)this.isDirty=b||this.min!==this.oldMin||this.max!==this.oldMax}else this.cleanStacks&&this.cleanStacks()},setExtremes:function(a,b,c,d,e){var f=this,g=f.chart,c=p(c,!0);o(f.series,function(a){delete a.kdTree});e=t(e,{min:a,max:b});J(f,"setExtremes",e,function(){f.userMin=a;f.userMax=b;f.eventArgs=e;c&&g.redraw(d)})},zoom:function(a,b){var c=this.dataMin,d=this.dataMax,e=this.options,f=z(c,p(e.min,c)),e=s(d,p(e.max,d));this.allowZoomOutside||
(q(c)&&a<=f&&(a=f),q(d)&&b>=e&&(b=e));this.displayBtn=a!==x||b!==x;this.setExtremes(a,b,!1,x,{trigger:"zoom"});return!0},setAxisSize:function(){var a=this.chart,b=this.options,c=b.offsetLeft||0,d=this.horiz,e=p(b.width,a.plotWidth-c+(b.offsetRight||0)),f=p(b.height,a.plotHeight),g=p(b.top,a.plotTop),b=p(b.left,a.plotLeft+c),c=/%$/;c.test(f)&&(f=parseFloat(f)/100*a.plotHeight);c.test(g)&&(g=parseFloat(g)/100*a.plotHeight+a.plotTop);this.left=b;this.top=g;this.width=e;this.height=f;this.bottom=a.chartHeight-
f-g;this.right=a.chartWidth-e-b;this.len=s(d?e:f,0);this.pos=d?b:g},getExtremes:function(){var a=this.isLog;return{min:a?ea(ia(this.min)):this.min,max:a?ea(ia(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,c=b?ia(this.min):this.min,b=b?ia(this.max):this.max;a===null?a=b<0?b:c:c>a?a=c:b<a&&(a=b);return this.translate(a,0,1,0,1)},autoLabelAlign:function(a){a=(p(a,0)-this.side*90+720)%360;return a>15&&
a<165?"right":a>195&&a<345?"left":"center"},unsquish:function(){var a=this.ticks,b=this.options.labels,c=this.horiz,d=this.tickInterval,e=d,f=this.len/(((this.categories?1:0)+this.max-this.min)/d),g,h=b.rotation,i=this.chart.renderer.fontMetrics(b.style.fontSize,a[0]&&a[0].label),j,k=Number.MAX_VALUE,m,n=function(a){a/=f||1;a=a>1?ta(a):1;return a*d};c?(m=!b.staggerLines&&!b.step&&(q(h)?[h]:f<p(b.autoRotationLimit,80)&&b.autoRotation))&&o(m,function(a){var b;if(a===h||a&&a>=-90&&a<=90)j=n(O(i.h/aa(ga*
a))),b=j+O(a/360),b<k&&(k=b,g=a,e=j)}):b.step||(e=n(i.h));this.autoRotation=m;this.labelRotation=p(g,h);return e},renderUnsquish:function(){var a=this.chart,b=a.renderer,c=this.tickPositions,d=this.ticks,e=this.options.labels,f=this.horiz,g=a.margin,h=this.categories?c.length:c.length-1,i=this.slotWidth=f&&!e.step&&!e.rotation&&(this.staggerLines||1)*a.plotWidth/h||!f&&(g[3]&&g[3]-a.spacing[3]||a.chartWidth*0.33),j=s(1,w(i-2*(e.padding||5))),k={},g=b.fontMetrics(e.style.fontSize,d[0]&&d[0].label),
h=e.style.textOverflow,m,n=0;if(!Ba(e.rotation))k.rotation=e.rotation||0;if(this.autoRotation)o(c,function(a){if((a=d[a])&&a.labelLength>n)n=a.labelLength}),n>j&&n>g.h?k.rotation=this.labelRotation:this.labelRotation=0;else if(i&&(m={width:j+"px"},!h)){m.textOverflow="clip";for(i=c.length;!f&&i--;)if(j=c[i],j=d[j].label)if(j.styles.textOverflow==="ellipsis"&&j.css({textOverflow:"clip"}),j.getBBox().height>this.len/c.length-(g.h-g.f))j.specCss={textOverflow:"ellipsis"}}if(k.rotation&&(m={width:(n>
a.chartHeight*0.5?a.chartHeight*0.33:a.chartHeight)+"px"},!h))m.textOverflow="ellipsis";this.labelAlign=k.align=e.align||this.autoLabelAlign(this.labelRotation);o(c,function(a){var b=(a=d[a])&&a.label;if(b)b.attr(k),m&&b.css(D(m,b.specCss)),delete b.specCss,a.rotation=k.rotation});this.tickRotCorr=b.rotCorr(g.b,this.labelRotation||0,this.side===2)},hasData:function(){return this.hasVisibleSeries||q(this.min)&&q(this.max)&&!!this.tickPositions},getOffset:function(){var a=this,b=a.chart,c=b.renderer,
d=a.options,e=a.tickPositions,f=a.ticks,g=a.horiz,h=a.side,i=b.inverted?[1,0,3,2][h]:h,j,k,m=0,n,l=0,u=d.title,r=d.labels,Z=0,A=b.axisOffset,b=b.clipOffset,v=[-1,1,1,-1][h],y,t=a.axisParent;j=a.hasData();a.showAxis=k=j||p(d.showEmpty,!0);a.staggerLines=a.horiz&&r.staggerLines;if(!a.axisGroup)a.gridGroup=c.g("grid").attr({zIndex:d.gridZIndex||1}).add(t),a.axisGroup=c.g("axis").attr({zIndex:d.zIndex||2}).add(t),a.labelGroup=c.g("axis-labels").attr({zIndex:r.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+
"-labels").add(t);if(j||a.isLinked){if(o(e,function(b){f[b]?f[b].addLabel():f[b]=new Sa(a,b)}),a.renderUnsquish(),o(e,function(b){if(h===0||h===2||{1:"left",3:"right"}[h]===a.labelAlign)Z=s(f[b].getLabelSize(),Z)}),a.staggerLines)Z*=a.staggerLines,a.labelOffset=Z}else for(y in f)f[y].destroy(),delete f[y];if(u&&u.text&&u.enabled!==!1){if(!a.axisTitle)a.axisTitle=c.text(u.text,0,0,u.useHTML).attr({zIndex:7,rotation:u.rotation||0,align:u.textAlign||{low:"left",middle:"center",high:"right"}[u.align]}).addClass("highcharts-"+
this.coll.toLowerCase()+"-title").css(u.style).add(a.axisGroup),a.axisTitle.isNew=!0;if(k)m=a.axisTitle.getBBox()[g?"height":"width"],n=u.offset,l=q(n)?0:p(u.margin,g?5:10);a.axisTitle[k?"show":"hide"]()}a.offset=v*p(d.offset,A[h]);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};c=h===2?a.tickRotCorr.y:0;g=Z+l+(Z&&v*(g?p(r.y,a.tickRotCorr.y+8):r.x)-c);a.axisTitleMargin=p(n,g);A[h]=s(A[h],a.axisTitleMargin+m+v*a.offset,g);d=d.offset?0:T(d.lineWidth/2)*2;b[i]=s(b[i],d)},getLinePath:function(a){var b=this.chart,
c=this.opposite,d=this.offset,e=this.horiz,f=this.left+(c?this.width:0)+d,d=b.chartHeight-this.bottom-(c?this.height:0)+d;c&&(a*=-1);return b.renderer.crispLine(["M",e?this.left:f,e?d:this.top,"L",e?b.chartWidth-this.right:f,e?d:b.chartHeight-this.bottom],a)},getTitlePosition:function(){var a=this.horiz,b=this.left,c=this.top,d=this.len,e=this.options.title,f=a?b:c,g=this.opposite,h=this.offset,i=e.x||0,j=e.y||0,k=G(e.style.fontSize||12),d={low:f+(a?0:d),middle:f+d/2,high:f+(a?d:0)}[e.align],b=(a?
c+this.height:b)+(a?1:-1)*(g?-1:1)*this.axisTitleMargin+(this.side===2?k:0);return{x:a?d+i:b+(g?this.width:0)+h+i,y:a?b+j-(g?this.height:0)+h:d+j}},render:function(){var a=this,b=a.chart,c=b.renderer,d=a.options,e=a.isLog,f=a.isLinked,g=a.tickPositions,h=a.axisTitle,i=a.ticks,j=a.minorTicks,k=a.alternateBands,m=d.stackLabels,n=d.alternateGridColor,l=a.tickmarkOffset,u=d.lineWidth,r,p=b.hasRendered&&q(a.oldMin)&&!isNaN(a.oldMin),A=a.showAxis,v=c.globalAnimation,y,s;a.labelEdge.length=0;a.overlap=!1;
o([i,j,k],function(a){for(var b in a)a[b].isActive=!1});if(a.hasData()||f){a.minorTickInterval&&!a.categories&&o(a.getMinorTickPositions(),function(b){j[b]||(j[b]=new Sa(a,b,"minor"));p&&j[b].isNew&&j[b].render(null,!0);j[b].render(null,!1,1)});if(g.length&&(o(g,function(b,c){if(!f||b>=a.min&&b<=a.max)i[b]||(i[b]=new Sa(a,b)),p&&i[b].isNew&&i[b].render(c,!0,0.1),i[b].render(c)}),l&&(a.min===0||a.single)))i[-1]||(i[-1]=new Sa(a,-1,null,!0)),i[-1].render(-1);n&&o(g,function(b,c){s=g[c+1]!==x?g[c+1]+
l:a.max-l;if(c%2===0&&b<a.max&&s<=a.max-l)k[b]||(k[b]=new B.PlotLineOrBand(a)),y=b+l,k[b].options={from:e?ia(y):y,to:e?ia(s):s,color:n},k[b].render(),k[b].isActive=!0});if(!a._addedPlotLB)o((d.plotLines||[]).concat(d.plotBands||[]),function(b){a.addPlotBandOrLine(b)}),a._addedPlotLB=!0}o([i,j,k],function(a){var c,d,e=[],f=v?v.duration||500:0,g=function(){for(d=e.length;d--;)a[e[d]]&&!a[e[d]].isActive&&(a[e[d]].destroy(),delete a[e[d]])};for(c in a)if(!a[c].isActive)a[c].render(c,!1,0),a[c].isActive=
!1,e.push(c);a===k||!b.hasRendered||!f?g():f&&setTimeout(g,f)});if(u)r=a.getLinePath(u),a.axisLine?a.axisLine.animate({d:r}):a.axisLine=c.path(r).attr({stroke:d.lineColor,"stroke-width":u,zIndex:7}).add(a.axisGroup),a.axisLine[A?"show":"hide"]();if(h&&A)h[h.isNew?"attr":"animate"](a.getTitlePosition()),h.isNew=!1;m&&m.enabled&&a.renderStackTotals();a.isDirty=!1},redraw:function(){this.visible&&(this.render(),o(this.plotLinesAndBands,function(a){a.render()}));o(this.series,function(a){a.isDirty=!0})},
destroy:function(a){var b=this,c=b.stacks,d,e=b.plotLinesAndBands;a||Y(b);for(d in c)Pa(c[d]),c[d]=null;o([b.ticks,b.minorTicks,b.alternateBands],function(a){Pa(a)});for(a=e.length;a--;)e[a].destroy();o("stackTotalGroup,axisLine,axisTitle,axisGroup,cross,gridGroup,labelGroup".split(","),function(a){b[a]&&(b[a]=b[a].destroy())});this.cross&&this.cross.destroy()},drawCrosshair:function(a,b){var c,d=this.crosshair,e=d.animation;if(!this.crosshair||(q(b)||!p(this.crosshair.snap,!0))===!1||b&&b.series&&
b.series[this.coll]!==this)this.hideCrosshair();else if(p(d.snap,!0)?q(b)&&(c=this.isXAxis?b.plotX:this.len-b.plotY):c=this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos,c=this.isRadial?this.getPlotLinePath(this.isXAxis?b.x:p(b.stackY,b.y))||null:this.getPlotLinePath(null,null,null,null,c)||null,c===null)this.hideCrosshair();else if(this.cross)this.cross.attr({visibility:"visible"})[e?"animate":"attr"]({d:c},e);else{e=this.categories&&!this.isRadial;e={"stroke-width":d.width||(e?this.transA:
1),stroke:d.color||(e?"rgba(155,200,255,0.2)":"#C0C0C0"),zIndex:d.zIndex||2};if(d.dashStyle)e.dashstyle=d.dashStyle;this.cross=this.chart.renderer.path(c).attr(e).add()}},hideCrosshair:function(){this.cross&&this.cross.hide()}};t(ha.prototype,{getPlotBandPath:function(a,b){var c=this.getPlotLinePath(b,null,null,!0),d=this.getPlotLinePath(a,null,null,!0);d&&c&&d.toString()!==c.toString()?d.push(c[4],c[5],c[1],c[2]):d=null;return d},addPlotBand:function(a){return this.addPlotBandOrLine(a,"plotBands")},
addPlotLine:function(a){return this.addPlotBandOrLine(a,"plotLines")},addPlotBandOrLine:function(a,b){var c=(new B.PlotLineOrBand(this,a)).render(),d=this.userOptions;c&&(b&&(d[b]=d[b]||[],d[b].push(a)),this.plotLinesAndBands.push(c));return c},removePlotBandOrLine:function(a){for(var b=this.plotLinesAndBands,c=this.options,d=this.userOptions,e=b.length;e--;)b[e].id===a&&b[e].destroy();o([c.plotLines||[],d.plotLines||[],c.plotBands||[],d.plotBands||[]],function(b){for(e=b.length;e--;)b[e].id===a&&
ja(b,b[e])})}});ha.prototype.getTimeTicks=function(a,b,c,d){var e=[],f={},g=S.global.useUTC,h,i=new ya(b-Wa(b)),j=a.unitRange,k=a.count;if(q(b)){i[Db](j>=F.second?0:k*T(i.getMilliseconds()/k));if(j>=F.second)i[Eb](j>=F.minute?0:k*T(i.getSeconds()/k));if(j>=F.minute)i[Fb](j>=F.hour?0:k*T(i[rb]()/k));if(j>=F.hour)i[Gb](j>=F.day?0:k*T(i[sb]()/k));if(j>=F.day)i[ub](j>=F.month?1:k*T(i[Xa]()/k));j>=F.month&&(i[vb](j>=F.year?0:k*T(i[Ya]()/k)),h=i[Za]());j>=F.year&&(h-=h%k,i[wb](h));if(j===F.week)i[ub](i[Xa]()-
i[tb]()+p(d,1));b=1;if(nb||db)i=i.getTime(),i=new ya(i+Wa(i));h=i[Za]();for(var d=i.getTime(),m=i[Ya](),n=i[Xa](),l=(F.day+(g?Wa(i):i.getTimezoneOffset()*6E4))%F.day;d<c;)e.push(d),j===F.year?d=fb(h+b*k,0):j===F.month?d=fb(h,m+b*k):!g&&(j===F.day||j===F.week)?d=fb(h,m,n+b*k*(j===F.day?1:7)):d+=j*k,b++;e.push(d);o(kb(e,function(a){return j<=F.hour&&a%F.day===l}),function(a){f[a]="day"})}e.info=t(a,{higherRanks:f,totalRange:j*k});return e};ha.prototype.normalizeTimeTickInterval=function(a,b){var c=
b||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]],d=c[c.length-1],e=F[d[0]],f=d[1],g;for(g=0;g<c.length;g++)if(d=c[g],e=F[d[0]],f=d[1],c[g+1]&&a<=(e*f[f.length-1]+F[c[g+1][0]])/2)break;e===F.year&&a<5*e&&(f=[1,2,5]);c=pb(a/e,f,d[0]==="year"?s(ob(a/e),1):1);return{unitRange:e,count:c,unitName:d[0]}};ha.prototype.getLogTickPositions=function(a,b,c,d){var e=
this.options,f=this.len,g=[];if(!d)this._minorAutoInterval=null;if(a>=0.5)a=w(a),g=this.getLinearTickPositions(a,b,c);else if(a>=0.08)for(var f=T(b),h,i,j,k,m,e=a>0.3?[1,2,4]:a>0.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];f<c+1&&!m;f++){i=e.length;for(h=0;h<i&&!m;h++)j=Ca(ia(f)*e[h]),j>b&&(!d||k<=c)&&k!==x&&g.push(k),k>c&&(m=!0),k=j}else if(b=ia(b),c=ia(c),a=e[d?"minorTickInterval":"tickInterval"],a=p(a==="auto"?null:a,this._minorAutoInterval,(c-b)*(e.tickPixelInterval/(d?5:1))/((d?f/this.tickPositions.length:
f)||1)),a=pb(a,null,ob(a)),g=Ua(this.getLinearTickPositions(a,b,c),Ca),!d)this._minorAutoInterval=a/5;if(!d)this.tickInterval=a;return g};var Mb=B.Tooltip=function(){this.init.apply(this,arguments)};Mb.prototype={init:function(a,b){var c=b.borderWidth,d=b.style,e=G(d.padding);this.chart=a;this.options=b;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.label=a.renderer.label("",0,0,b.shape||"callout",null,null,b.useHTML,null,"tooltip").attr({padding:e,fill:b.backgroundColor,"stroke-width":c,
r:b.borderRadius,zIndex:8}).css(d).css({padding:0}).add().attr({y:-9999});fa||this.label.shadow(b.shadow);this.shared=b.shared},destroy:function(){if(this.label)this.label=this.label.destroy();clearTimeout(this.hideTimer);clearTimeout(this.tooltipTimeout)},move:function(a,b,c,d){var e=this,f=e.now,g=e.options.animation!==!1&&!e.isHidden&&(O(a-f.x)>1||O(b-f.y)>1),h=e.followPointer||e.len>1;t(f,{x:g?(2*f.x+a)/3:a,y:g?(f.y+b)/2:b,anchorX:h?x:g?(2*f.anchorX+c)/3:c,anchorY:h?x:g?(f.anchorY+d)/2:d});e.label.attr(f);
if(g)clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){e&&e.move(a,b,c,d)},32)},hide:function(a){var b=this;clearTimeout(this.hideTimer);if(!this.isHidden)this.hideTimer=setTimeout(function(){b.label.fadeOut();b.isHidden=!0},p(a,this.options.hideDelay,500))},getAnchor:function(a,b){var c,d=this.chart,e=d.inverted,f=d.plotTop,g=d.plotLeft,h=0,i=0,j,k,a=ra(a);c=a[0].tooltipPos;this.followPointer&&b&&(b.chartX===x&&(b=d.pointer.normalize(b)),c=[b.chartX-d.plotLeft,b.chartY-
f]);c||(o(a,function(a){j=a.series.yAxis;k=a.series.xAxis;h+=a.plotX+(!e&&k?k.left-g:0);i+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!e&&j?j.top-f:0)}),h/=a.length,i/=a.length,c=[e?d.plotWidth-i:h,this.shared&&!e&&a.length>1&&b?b.chartY-f:e?d.plotHeight-h:i]);return Ua(c,w)},getPosition:function(a,b,c){var d=this.chart,e=this.distance,f={},g=c.h||0,h,i=["y",d.chartHeight,b,c.plotY+d.plotTop,d.plotTop,d.plotTop+d.plotHeight],j=["x",d.chartWidth,a,c.plotX+d.plotLeft,d.plotLeft,d.plotLeft+d.plotWidth],
k=p(c.ttBelow,d.inverted&&!c.negative||!d.inverted&&c.negative),m=function(a,b,c,d,h,i){var j=c<d-e,n=d+e+c<b,m=d-e-c;d+=e;if(k&&n)f[a]=d;else if(!k&&j)f[a]=m;else if(j)f[a]=z(i-c,m-g<0?m:m-g);else if(n)f[a]=s(h,d+g+c>b?d:d+g);else return!1},n=function(a,b,c,d){if(d<e||d>b-e)return!1;else f[a]=d<c/2?1:d>b-c/2?b-c-2:d-c/2},l=function(a){var b=i;i=j;j=b;h=a},u=function(){m.apply(0,i)!==!1?n.apply(0,j)===!1&&!h&&(l(!0),u()):h?f.x=f.y=0:(l(!0),u())};(d.inverted||this.len>1)&&l();u();return f},defaultFormatter:function(a){var b=
this.points||ra(this),c;c=[a.tooltipFooterHeaderFormatter(b[0])];c=c.concat(a.bodyFormatter(b));c.push(a.tooltipFooterHeaderFormatter(b[0],!0));return c.join("")},refresh:function(a,b){var c=this.chart,d=this.label,e=this.options,f,g,h,i={},j,k=[];j=e.formatter||this.defaultFormatter;var i=c.hoverPoints,m,n=this.shared;clearTimeout(this.hideTimer);this.followPointer=ra(a)[0].series.tooltipOptions.followPointer;h=this.getAnchor(a,b);f=h[0];g=h[1];n&&(!a.series||!a.series.noSharedTooltip)?(c.hoverPoints=
a,i&&o(i,function(a){a.setState()}),o(a,function(a){a.setState("hover");k.push(a.getLabelConfig())}),i={x:a[0].category,y:a[0].y},i.points=k,this.len=k.length,a=a[0]):i=a.getLabelConfig();j=j.call(i,this);i=a.series;this.distance=p(i.tooltipOptions.distance,16);j===!1?this.hide():(this.isHidden&&(cb(d),d.attr("opacity",1).show()),d.attr({text:j}),m=e.borderColor||a.color||i.color||"#606060",d.attr({stroke:m}),this.updatePosition({plotX:f,plotY:g,negative:a.negative,ttBelow:a.ttBelow,h:h[2]||0}),this.isHidden=
!1);J(c,"tooltipRefresh",{text:j,x:f+c.plotLeft,y:g+c.plotTop,borderColor:m})},updatePosition:function(a){var b=this.chart,c=this.label,c=(this.options.positioner||this.getPosition).call(this,c.width,c.height,a);this.move(w(c.x),w(c.y||0),a.plotX+b.plotLeft,a.plotY+b.plotTop)},getXDateFormat:function(a,b,c){var d,b=b.dateTimeLabelFormats,e=c&&c.closestPointRange,f,g={millisecond:15,second:12,minute:9,hour:6,day:3},h,i="millisecond";if(e){h=Na("%m-%d %H:%M:%S.%L",a.x);for(f in F){if(e===F.week&&+Na("%w",
a.x)===c.options.startOfWeek&&h.substr(6)==="00:00:00.000"){f="week";break}else if(F[f]>e){f=i;break}else if(g[f]&&h.substr(g[f])!=="01-01 00:00:00.000".substr(g[f]))break;f!=="week"&&(i=f)}f&&(d=b[f])}else d=b.day;return d||b.year},tooltipFooterHeaderFormatter:function(a,b){var c=b?"footer":"header",d=a.series,e=d.tooltipOptions,f=e.xDateFormat,g=d.xAxis,h=g&&g.options.type==="datetime"&&qa(a.key),c=e[c+"Format"];h&&!f&&(f=this.getXDateFormat(a,e,g));h&&f&&(c=c.replace("{point.key}","{point.key:"+
f+"}"));return Ia(c,{point:a,series:d})},bodyFormatter:function(a){return Ua(a,function(a){var c=a.series.tooltipOptions;return(c.pointFormatter||a.point.tooltipFormatter).call(a.point,c.pointFormat)})}};var oa;ab=C.documentElement.ontouchstart!==x;var Va=B.Pointer=function(a,b){this.init(a,b)};Va.prototype={init:function(a,b){var c=b.chart,d=c.events,e=fa?"":c.zoomType,c=a.inverted,f;this.options=b;this.chart=a;this.zoomX=f=/x/.test(e);this.zoomY=e=/y/.test(e);this.zoomHor=f&&!c||e&&c;this.zoomVert=
e&&!c||f&&c;this.hasZoom=f||e;this.runChartClick=d&&!!d.click;this.pinchDown=[];this.lastValidTouch={};if(B.Tooltip&&b.tooltip.enabled)a.tooltip=new Mb(a,b.tooltip),this.followTouchMove=p(b.tooltip.followTouchMove,!0);this.setDOMEvents()},normalize:function(a,b){var c,d,a=a||window.event,a=Sb(a);if(!a.target)a.target=a.srcElement;d=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;if(!b)this.chartPosition=b=Rb(this.chart.container);d.pageX===x?(c=s(a.x,a.clientX-b.left),d=a.y):(c=
d.pageX-b.left,d=d.pageY-b.top);return t(a,{chartX:w(c),chartY:w(d)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};o(this.chart.axes,function(c){b[c.isXAxis?"xAxis":"yAxis"].push({axis:c,value:c.toValue(a[c.horiz?"chartX":"chartY"])})});return b},runPointActions:function(a){var b=this.chart,c=b.series,d=b.tooltip,e=d?d.shared:!1,f=b.hoverPoint,g=b.hoverSeries,h,i=Number.MAX_VALUE,j,k,m=[],n,l;if(!e&&!g)for(h=0;h<c.length;h++)if(c[h].directTouch||!c[h].options.stickyTracking)c=[];g&&(e?g.noSharedTooltip:
g.directTouch)&&f?n=f:(o(c,function(b){j=b.noSharedTooltip&&e;k=!e&&b.directTouch;b.visible&&!j&&!k&&p(b.options.enableMouseTracking,!0)&&(l=b.searchPoint(a,!j&&b.kdDimensions===1))&&m.push(l)}),o(m,function(a){if(a&&typeof a.dist==="number"&&a.dist<i)i=a.dist,n=a}));if(n&&(n!==this.prevKDPoint||d&&d.isHidden)){if(e&&!n.series.noSharedTooltip){for(h=m.length;h--;)(m[h].clientX!==n.clientX||m[h].series.noSharedTooltip)&&m.splice(h,1);m.length&&d&&d.refresh(m,a);o(m,function(b){b.onMouseOver(a,b!==
(g&&g.directTouch&&f||n))})}else if(d&&d.refresh(n,a),!g||!g.directTouch)n.onMouseOver(a);this.prevKDPoint=n}else c=g&&g.tooltipOptions.followPointer,d&&c&&!d.isHidden&&(c=d.getAnchor([{}],a),d.updatePosition({plotX:c[0],plotY:c[1]}));if(d&&!this._onDocumentMouseMove)this._onDocumentMouseMove=function(a){if(X[oa])X[oa].pointer.onDocumentMouseMove(a)},I(C,"mousemove",this._onDocumentMouseMove);o(b.axes,function(b){b.drawCrosshair(a,p(n,f))})},reset:function(a,b){var c=this.chart,d=c.hoverSeries,e=
c.hoverPoint,f=c.hoverPoints,g=c.tooltip,h=g&&g.shared?f:e;(a=a&&g&&h)&&ra(h)[0].plotX===x&&(a=!1);if(a)g.refresh(h),e&&(e.setState(e.state,!0),o(c.axes,function(a){p(a.options.crosshair&&a.options.crosshair.snap,!0)?a.drawCrosshair(null,e):a.hideCrosshair()}));else{if(e)e.onMouseOut();f&&o(f,function(a){a.setState()});if(d)d.onMouseOut();g&&g.hide(b);if(this._onDocumentMouseMove)Y(C,"mousemove",this._onDocumentMouseMove),this._onDocumentMouseMove=null;o(c.axes,function(a){a.hideCrosshair()});this.hoverX=
c.hoverPoints=c.hoverPoint=null}},scaleGroups:function(a,b){var c=this.chart,d;o(c.series,function(e){d=a||e.getPlotBox();e.xAxis&&e.xAxis.zoomEnabled&&(e.group.attr(d),e.markerGroup&&(e.markerGroup.attr(d),e.markerGroup.clip(b?c.clipRect:null)),e.dataLabelsGroup&&e.dataLabelsGroup.attr(d))});c.clipRect.attr(b||c.clipBox)},dragStart:function(a){var b=this.chart;b.mouseIsDown=a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;b.mouseDownY=this.mouseDownY=a.chartY},drag:function(a){var b=
this.chart,c=b.options.chart,d=a.chartX,e=a.chartY,f=this.zoomHor,g=this.zoomVert,h=b.plotLeft,i=b.plotTop,j=b.plotWidth,k=b.plotHeight,m,n=this.selectionMarker,l=this.mouseDownX,u=this.mouseDownY,r=c.panKey&&a[c.panKey+"Key"];if(!n||!n.touch)if(d<h?d=h:d>h+j&&(d=h+j),e<i?e=i:e>i+k&&(e=i+k),this.hasDragged=Math.sqrt(Math.pow(l-d,2)+Math.pow(u-e,2)),this.hasDragged>10){m=b.isInsidePlot(l-h,u-i);if(b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&m&&!r&&!n)this.selectionMarker=n=b.renderer.rect(h,i,
f?1:j,g?1:k,0).attr({fill:c.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add();n&&f&&(d-=l,n.attr({width:O(d),x:(d>0?0:d)+l}));n&&g&&(d=e-u,n.attr({height:O(d),y:(d>0?0:d)+u}));m&&!n&&c.panning&&b.pan(a,c.panning)}},drop:function(a){var b=this,c=this.chart,d=this.hasPinched;if(this.selectionMarker){var e={xAxis:[],yAxis:[],originalEvent:a.originalEvent||a},f=this.selectionMarker,g=f.attr?f.attr("x"):f.x,h=f.attr?f.attr("y"):f.y,i=f.attr?f.attr("width"):f.width,j=f.attr?f.attr("height"):
f.height,k;if(this.hasDragged||d)o(c.axes,function(c){if(c.zoomEnabled&&q(c.min)&&(d||b[{xAxis:"zoomX",yAxis:"zoomY"}[c.coll]])){var f=c.horiz,l=a.type==="touchend"?c.minPixelPadding:0,u=c.toValue((f?g:h)+l),f=c.toValue((f?g+i:h+j)-l);e[c.coll].push({axis:c,min:z(u,f),max:s(u,f)});k=!0}}),k&&J(c,"selection",e,function(a){c.zoom(t(a,d?{animation:!1}:null))});this.selectionMarker=this.selectionMarker.destroy();d&&this.scaleGroups()}if(c)M(c.container,{cursor:c._cursor}),c.cancelClick=this.hasDragged>
10,c.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[]},onContainerMouseDown:function(a){a=this.normalize(a);a.preventDefault&&a.preventDefault();this.dragStart(a)},onDocumentMouseUp:function(a){X[oa]&&X[oa].pointer.drop(a)},onDocumentMouseMove:function(a){var b=this.chart,c=this.chartPosition,a=this.normalize(a,c);c&&!this.inClass(a.target,"highcharts-tracker")&&!b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)&&this.reset()},onContainerMouseLeave:function(){var a=X[oa];if(a)a.pointer.reset(),
a.pointer.chartPosition=null},onContainerMouseMove:function(a){var b=this.chart;oa=b.index;a=this.normalize(a);a.returnValue=!1;b.mouseIsDown==="mousedown"&&this.drag(a);(this.inClass(a.target,"highcharts-tracker")||b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop))&&!b.openMenu&&this.runPointActions(a)},inClass:function(a,b){for(var c;a;){if(c=K(a,"class"))if(c.indexOf(b)!==-1)return!0;else if(c.indexOf("highcharts-container")!==-1)return!1;a=a.parentNode}},onTrackerMouseOut:function(a){var b=
this.chart.hoverSeries,a=a.relatedTarget||a.toElement;if(b&&!b.options.stickyTracking&&!this.inClass(a,"highcharts-tooltip")&&!this.inClass(a,"highcharts-series-"+b.index))b.onMouseOut()},onContainerClick:function(a){var b=this.chart,c=b.hoverPoint,d=b.plotLeft,e=b.plotTop,a=this.normalize(a);a.originalEvent=a;b.cancelClick||(c&&this.inClass(a.target,"highcharts-tracker")?(J(c.series,"click",t(a,{point:c})),b.hoverPoint&&c.firePointEvent("click",a)):(t(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-
d,a.chartY-e)&&J(b,"click",a)))},setDOMEvents:function(){var a=this,b=a.chart.container;b.onmousedown=function(b){a.onContainerMouseDown(b)};b.onmousemove=function(b){a.onContainerMouseMove(b)};b.onclick=function(b){a.onContainerClick(b)};I(b,"mouseleave",a.onContainerMouseLeave);bb===1&&I(C,"mouseup",a.onDocumentMouseUp);if(ab)b.ontouchstart=function(b){a.onContainerTouchStart(b)},b.ontouchmove=function(b){a.onContainerTouchMove(b)},bb===1&&I(C,"touchend",a.onDocumentTouchEnd)},destroy:function(){var a;
Y(this.chart.container,"mouseleave",this.onContainerMouseLeave);bb||(Y(C,"mouseup",this.onDocumentMouseUp),Y(C,"touchend",this.onDocumentTouchEnd));clearInterval(this.tooltipTimeout);for(a in this)this[a]=null}};t(B.Pointer.prototype,{pinchTranslate:function(a,b,c,d,e,f){(this.zoomHor||this.pinchHor)&&this.pinchTranslateDirection(!0,a,b,c,d,e,f);(this.zoomVert||this.pinchVert)&&this.pinchTranslateDirection(!1,a,b,c,d,e,f)},pinchTranslateDirection:function(a,b,c,d,e,f,g,h){var i=this.chart,j=a?"x":
"y",k=a?"X":"Y",m="chart"+k,n=a?"width":"height",l=i["plot"+(a?"Left":"Top")],u,r,p=h||1,o=i.inverted,v=i.bounds[a?"h":"v"],s=b.length===1,q=b[0][m],t=c[0][m],x=!s&&b[1][m],w=!s&&c[1][m],z,c=function(){!s&&O(q-x)>20&&(p=h||O(t-w)/O(q-x));r=(l-t)/p+q;u=i["plot"+(a?"Width":"Height")]/p};c();b=r;b<v.min?(b=v.min,z=!0):b+u>v.max&&(b=v.max-u,z=!0);z?(t-=0.8*(t-g[j][0]),s||(w-=0.8*(w-g[j][1])),c()):g[j]=[t,w];o||(f[j]=r-l,f[n]=u);f=o?1/p:p;e[n]=u;e[j]=b;d[o?a?"scaleY":"scaleX":"scale"+k]=p;d["translate"+
k]=f*l+(t-f*q)},pinch:function(a){var b=this,c=b.chart,d=b.pinchDown,e=a.touches,f=e.length,g=b.lastValidTouch,h=b.hasZoom,i=b.selectionMarker,j={},k=f===1&&(b.inClass(a.target,"highcharts-tracker")&&c.runTrackerClick||b.runChartClick),m={};if(f>1)b.initiated=!0;h&&b.initiated&&!k&&a.preventDefault();Ua(e,function(a){return b.normalize(a)});if(a.type==="touchstart")o(e,function(a,b){d[b]={chartX:a.chartX,chartY:a.chartY}}),g.x=[d[0].chartX,d[1]&&d[1].chartX],g.y=[d[0].chartY,d[1]&&d[1].chartY],o(c.axes,
function(a){if(a.zoomEnabled){var b=c.bounds[a.horiz?"h":"v"],d=a.minPixelPadding,e=a.toPixels(p(a.options.min,a.dataMin)),f=a.toPixels(p(a.options.max,a.dataMax)),g=z(e,f),e=s(e,f);b.min=z(a.pos,g-d);b.max=s(a.pos+a.len,e+d)}}),b.res=!0;else if(d.length){if(!i)b.selectionMarker=i=t({destroy:ua,touch:!0},c.plotBox);b.pinchTranslate(d,e,j,i,m,g);b.hasPinched=h;b.scaleGroups(j,m);if(!h&&b.followTouchMove&&f===1)this.runPointActions(b.normalize(a));else if(b.res)b.res=!1,this.reset(!1,0)}},touch:function(a,
b){var c=this.chart;oa=c.index;a.touches.length===1?(a=this.normalize(a),c.isInsidePlot(a.chartX-c.plotLeft,a.chartY-c.plotTop)&&!c.openMenu?(b&&this.runPointActions(a),this.pinch(a)):b&&this.reset()):a.touches.length===2&&this.pinch(a)},onContainerTouchStart:function(a){this.touch(a,!0)},onContainerTouchMove:function(a){this.touch(a)},onDocumentTouchEnd:function(a){X[oa]&&X[oa].pointer.drop(a)}});if(L.PointerEvent||L.MSPointerEvent){var wa={},Ab=!!L.PointerEvent,Wb=function(){var a,b=[];b.item=function(a){return this[a]};
for(a in wa)wa.hasOwnProperty(a)&&b.push({pageX:wa[a].pageX,pageY:wa[a].pageY,target:wa[a].target});return b},Bb=function(a,b,c,d){a=a.originalEvent||a;if((a.pointerType==="touch"||a.pointerType===a.MSPOINTER_TYPE_TOUCH)&&X[oa])d(a),d=X[oa].pointer,d[b]({type:c,target:a.currentTarget,preventDefault:ua,touches:Wb()})};t(Va.prototype,{onContainerPointerDown:function(a){Bb(a,"onContainerTouchStart","touchstart",function(a){wa[a.pointerId]={pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})},onContainerPointerMove:function(a){Bb(a,
"onContainerTouchMove","touchmove",function(a){wa[a.pointerId]={pageX:a.pageX,pageY:a.pageY};if(!wa[a.pointerId].target)wa[a.pointerId].target=a.currentTarget})},onDocumentPointerUp:function(a){Bb(a,"onDocumentTouchEnd","touchend",function(a){delete wa[a.pointerId]})},batchMSEvents:function(a){a(this.chart.container,Ab?"pointerdown":"MSPointerDown",this.onContainerPointerDown);a(this.chart.container,Ab?"pointermove":"MSPointerMove",this.onContainerPointerMove);a(C,Ab?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}});
Ta(Va.prototype,"init",function(a,b,c){a.call(this,b,c);this.hasZoom&&M(b.container,{"-ms-touch-action":P,"touch-action":P})});Ta(Va.prototype,"setDOMEvents",function(a){a.apply(this);(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(I)});Ta(Va.prototype,"destroy",function(a){this.batchMSEvents(Y);a.call(this)})}var mb=B.Legend=function(a,b){this.init(a,b)};mb.prototype={init:function(a,b){var c=this,d=b.itemStyle,e=b.itemMarginTop||0;this.options=b;if(b.enabled)c.itemStyle=d,c.itemHiddenStyle=
D(d,b.itemHiddenStyle),c.itemMarginTop=e,c.padding=d=p(b.padding,8),c.initialItemX=d,c.initialItemY=d-5,c.maxItemWidth=0,c.chart=a,c.itemHeight=0,c.symbolWidth=p(b.symbolWidth,16),c.pages=[],c.render(),I(c.chart,"endResize",function(){c.positionCheckboxes()})},colorizeItem:function(a,b){var c=this.options,d=a.legendItem,e=a.legendLine,f=a.legendSymbol,g=this.itemHiddenStyle.color,c=b?c.itemStyle.color:g,h=b?a.legendColor||a.color||"#CCC":g,g=a.options&&a.options.marker,i={fill:h},j;d&&d.css({fill:c,
color:c});e&&e.attr({stroke:h});if(f){if(g&&f.isMarker)for(j in i.stroke=h,g=a.convertAttribs(g),g)d=g[j],d!==x&&(i[j]=d);f.attr(i)}},positionItem:function(a){var b=this.options,c=b.symbolPadding,b=!b.rtl,d=a._legendItemPos,e=d[0],d=d[1],f=a.checkbox;(a=a.legendGroup)&&a.element&&a.translate(b?e:this.legendWidth-e-2*c-4,d);if(f)f.x=e,f.y=d},destroyItem:function(a){var b=a.checkbox;o(["legendItem","legendLine","legendSymbol","legendGroup"],function(b){a[b]&&(a[b]=a[b].destroy())});b&&Qa(a.checkbox)},
destroy:function(){var a=this.group,b=this.box;if(b)this.box=b.destroy();if(a)this.group=a.destroy()},positionCheckboxes:function(a){var b=this.group.alignAttr,c,d=this.clipHeight||this.legendHeight;if(b)c=b.translateY,o(this.allItems,function(e){var f=e.checkbox,g;f&&(g=c+f.y+(a||0)+3,M(f,{left:b.translateX+e.checkboxOffset+f.x-20+"px",top:g+"px",display:g>c-6&&g<c+d-6?"":P}))})},renderTitle:function(){var a=this.padding,b=this.options.title,c=0;if(b.text){if(!this.title)this.title=this.chart.renderer.label(b.text,
a-3,a-4,null,null,null,null,null,"legend-title").attr({zIndex:1}).css(b.style).add(this.group);a=this.title.getBBox();c=a.height;this.offsetWidth=a.width;this.contentGroup.attr({translateY:c})}this.titleHeight=c},setText:function(a){var b=this.options;a.legendItem.attr({text:b.labelFormat?Ia(b.labelFormat,a):b.labelFormatter.call(a)})},renderItem:function(a){var b=this.chart,c=b.renderer,d=this.options,e=d.layout==="horizontal",f=this.symbolWidth,g=d.symbolPadding,h=this.itemStyle,i=this.itemHiddenStyle,
j=this.padding,k=e?p(d.itemDistance,20):0,m=!d.rtl,n=d.width,l=d.itemMarginBottom||0,u=this.itemMarginTop,r=this.initialItemX,o=a.legendItem,A=a.series&&a.series.drawLegendSymbol?a.series:a,v=A.options,v=this.createCheckboxForItem&&v&&v.showCheckbox,q=d.useHTML;if(!o){a.legendGroup=c.g("legend-item").attr({zIndex:1}).add(this.scrollGroup);a.legendItem=o=c.text("",m?f+g:-g,this.baseline||0,q).css(D(a.visible?h:i)).attr({align:m?"left":"right",zIndex:2}).add(a.legendGroup);if(!this.baseline)this.fontMetrics=
c.fontMetrics(h.fontSize,o),this.baseline=this.fontMetrics.f+3+u,o.attr("y",this.baseline);A.drawLegendSymbol(this,a);this.setItemEvents&&this.setItemEvents(a,o,q,h,i);this.colorizeItem(a,a.visible);v&&this.createCheckboxForItem(a)}this.setText(a);c=o.getBBox();f=a.checkboxOffset=d.itemWidth||a.legendItemWidth||f+g+c.width+k+(v?20:0);this.itemHeight=g=w(a.legendItemHeight||c.height);if(e&&this.itemX-r+f>(n||b.chartWidth-2*j-r-d.x))this.itemX=r,this.itemY+=u+this.lastLineHeight+l,this.lastLineHeight=
0;this.maxItemWidth=s(this.maxItemWidth,f);this.lastItemY=u+this.itemY+l;this.lastLineHeight=s(g,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];e?this.itemX+=f:(this.itemY+=u+g+l,this.lastLineHeight=g);this.offsetWidth=n||s((e?this.itemX-r-k:f)+j,this.offsetWidth)},getAllItems:function(){var a=[];o(this.chart.series,function(b){var c=b.options;if(p(c.showInLegend,!q(c.linkedTo)?x:!1,!0))a=a.concat(b.legendItems||(c.legendType==="point"?b.data:b))});return a},adjustMargins:function(a,
b){var c=this.chart,d=this.options,e=d.align.charAt(0)+d.verticalAlign.charAt(0)+d.layout.charAt(0);this.display&&!d.floating&&o([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(f,g){f.test(e)&&!q(a[g])&&(c[ib[g]]=s(c[ib[g]],c.legend[(g+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][g]*d[g%2?"x":"y"]+p(d.margin,12)+b[g]))})},render:function(){var a=this,b=a.chart,c=b.renderer,d=a.group,e,f,g,h,i=a.box,j=a.options,k=a.padding,m=j.borderWidth,n=j.backgroundColor;a.itemX=a.initialItemX;
a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY=0;if(!d)a.group=d=c.g("legend").attr({zIndex:7}).add(),a.contentGroup=c.g().attr({zIndex:1}).add(d),a.scrollGroup=c.g().add(a.contentGroup);a.renderTitle();e=a.getAllItems();qb(e,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});j.reversed&&e.reverse();a.allItems=e;a.display=f=!!e.length;a.lastLineHeight=0;o(e,function(b){a.renderItem(b)});g=(j.width||a.offsetWidth)+k;h=a.lastItemY+a.lastLineHeight+
a.titleHeight;h=a.handleOverflow(h);h+=k;if(m||n){if(i){if(g>0&&h>0)i[i.isNew?"attr":"animate"](i.crisp({width:g,height:h})),i.isNew=!1}else a.box=i=c.rect(0,0,g,h,j.borderRadius,m||0).attr({stroke:j.borderColor,"stroke-width":m||0,fill:n||P}).add(d).shadow(j.shadow),i.isNew=!0;i[f?"show":"hide"]()}a.legendWidth=g;a.legendHeight=h;o(e,function(b){a.positionItem(b)});f&&d.align(t({width:g,height:h},j),!0,"spacingBox");b.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var b=this,c=
this.chart,d=c.renderer,e=this.options,f=e.y,f=c.spacingBox.height+(e.verticalAlign==="top"?-f:f)-this.padding,g=e.maxHeight,h,i=this.clipRect,j=e.navigation,k=p(j.animation,!0),m=j.arrowSize||12,n=this.nav,l=this.pages,u=this.padding,r,q=this.allItems,A=function(a){i.attr({height:a});if(b.contentGroup.div)b.contentGroup.div.style.clip="rect("+u+"px,9999px,"+(u+a)+"px,0)"};e.layout==="horizontal"&&(f/=2);g&&(f=z(f,g));l.length=0;if(a>f){this.clipHeight=h=s(f-20-this.titleHeight-u,0);this.currentPage=
p(this.currentPage,1);this.fullHeight=a;o(q,function(a,b){var c=a._legendItemPos[1],d=w(a.legendItem.getBBox().height),e=l.length;if(!e||c-l[e-1]>h&&(r||c)!==l[e-1])l.push(r||c),e++;b===q.length-1&&c+d-l[e-1]>h&&l.push(c);c!==r&&(r=c)});if(!i)i=b.clipRect=d.clipRect(0,u,9999,0),b.contentGroup.clip(i);A(h);if(!n)this.nav=n=d.g().attr({zIndex:1}).add(this.group),this.up=d.symbol("triangle",0,0,m,m).on("click",function(){b.scroll(-1,k)}).add(n),this.pager=d.text("",15,10).css(j.style).add(n),this.down=
d.symbol("triangle-down",0,0,m,m).on("click",function(){b.scroll(1,k)}).add(n);b.scroll(0);a=f}else if(n)A(c.chartHeight),n.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0;return a},scroll:function(a,b){var c=this.pages,d=c.length,e=this.currentPage+a,f=this.clipHeight,g=this.options.navigation,h=g.activeColor,g=g.inactiveColor,i=this.pager,j=this.padding;e>d&&(e=d);if(e>0)b!==x&&Ra(b,this.chart),this.nav.attr({translateX:j,translateY:f+this.padding+7+this.titleHeight,visibility:"visible"}),
this.up.attr({fill:e===1?g:h}).css({cursor:e===1?"default":"pointer"}),i.attr({text:e+"/"+d}),this.down.attr({x:18+this.pager.getBBox().width,fill:e===d?g:h}).css({cursor:e===d?"default":"pointer"}),c=-c[e-1]+this.initialItemY,this.scrollGroup.animate({translateY:c}),this.currentPage=e,this.positionCheckboxes(c)}};Ma=B.LegendSymbolMixin={drawRectangle:function(a,b){var c=a.options.symbolHeight||a.fontMetrics.f;b.legendSymbol=this.chart.renderer.rect(0,a.baseline-c+1,a.symbolWidth,c,a.options.symbolRadius||
0).attr({zIndex:3}).add(b.legendGroup)},drawLineMarker:function(a){var b=this.options,c=b.marker,d;d=a.symbolWidth;var e=this.chart.renderer,f=this.legendGroup,a=a.baseline-w(a.fontMetrics.b*0.3),g;if(b.lineWidth){g={"stroke-width":b.lineWidth};if(b.dashStyle)g.dashstyle=b.dashStyle;this.legendLine=e.path(["M",0,a,"L",d,a]).attr(g).add(f)}if(c&&c.enabled!==!1)b=c.radius,this.legendSymbol=d=e.symbol(this.symbol,d/2-b,a-b,2*b,2*b).add(f),d.isMarker=!0}};(/Trident\/7\.0/.test(za)||Ka)&&Ta(mb.prototype,
"positionItem",function(a,b){var c=this,d=function(){b._legendItemPos&&a.call(c,b)};d();setTimeout(d)});E=B.Chart=function(){this.init.apply(this,arguments)};E.prototype={callbacks:[],init:function(a,b){var c,d=a.series;a.series=null;c=D(S,a);c.series=a.series=d;this.userOptions=a;d=c.chart;this.margin=this.splashArray("margin",d);this.spacing=this.splashArray("spacing",d);var e=d.events;this.bounds={h:{},v:{}};this.callback=b;this.isResizing=0;this.options=c;this.axes=[];this.series=[];this.hasCartesianSeries=
d.showAxes;var f=this,g;f.index=X.length;X.push(f);bb++;d.reflow!==!1&&I(f,"load",function(){f.initReflow()});if(e)for(g in e)I(f,g,e[g]);f.xAxis=[];f.yAxis=[];f.animation=fa?!1:p(d.animation,!0);f.pointCount=f.colorCounter=f.symbolCounter=0;f.firstRender()},initSeries:function(a){var b=this.options.chart;(b=N[a.type||b.type||b.defaultSeriesType])||la(17,!0);b=new b;b.init(this,a);return b},isInsidePlot:function(a,b,c){var d=c?b:a,a=c?a:b;return d>=0&&d<=this.plotWidth&&a>=0&&a<=this.plotHeight},
redraw:function(a){var b=this.axes,c=this.series,d=this.pointer,e=this.legend,f=this.isDirtyLegend,g,h,i=this.hasCartesianSeries,j=this.isDirtyBox,k=c.length,m=k,n=this.renderer,l=n.isHidden(),p=[];Ra(a,this);l&&this.cloneRenderTo();for(this.layOutTitles();m--;)if(a=c[m],a.options.stacking&&(g=!0,a.isDirty)){h=!0;break}if(h)for(m=k;m--;)if(a=c[m],a.options.stacking)a.isDirty=!0;o(c,function(a){a.isDirty&&a.options.legendType==="point"&&(a.updateTotals&&a.updateTotals(),f=!0)});if(f&&e.options.enabled)e.render(),
this.isDirtyLegend=!1;g&&this.getStacks();if(i&&!this.isResizing)this.maxTicks=null,o(b,function(a){a.setScale()});this.getMargins();i&&(o(b,function(a){a.isDirty&&(j=!0)}),o(b,function(a){var b=a.min+","+a.max;if(a.extKey!==b)a.extKey=b,p.push(function(){J(a,"afterSetExtremes",t(a.eventArgs,a.getExtremes()));delete a.eventArgs});(j||g)&&a.redraw()}));j&&this.drawChartBox();o(c,function(a){a.isDirty&&a.visible&&(!a.isCartesian||a.xAxis)&&a.redraw()});d&&d.reset(!0);n.draw();J(this,"redraw");l&&this.cloneRenderTo(!0);
o(p,function(a){a.call()})},get:function(a){var b=this.axes,c=this.series,d,e;for(d=0;d<b.length;d++)if(b[d].options.id===a)return b[d];for(d=0;d<c.length;d++)if(c[d].options.id===a)return c[d];for(d=0;d<c.length;d++){e=c[d].points||[];for(b=0;b<e.length;b++)if(e[b].id===a)return e[b]}return null},getAxes:function(){var a=this,b=this.options,c=b.xAxis=ra(b.xAxis||{}),b=b.yAxis=ra(b.yAxis||{});o(c,function(a,b){a.index=b;a.isX=!0});o(b,function(a,b){a.index=b});c=c.concat(b);o(c,function(b){new ha(a,
b)})},getSelectedPoints:function(){var a=[];o(this.series,function(b){a=a.concat(kb(b.points||[],function(a){return a.selected}))});return a},getSelectedSeries:function(){return kb(this.series,function(a){return a.selected})},setTitle:function(a,b,c){var g;var d=this,e=d.options,f;f=e.title=D(e.title,a);g=e.subtitle=D(e.subtitle,b),e=g;o([["title",a,f],["subtitle",b,e]],function(a){var b=a[0],c=d[b],e=a[1],a=a[2];c&&e&&(d[b]=c=c.destroy());a&&a.text&&!c&&(d[b]=d.renderer.text(a.text,0,0,a.useHTML).attr({align:a.align,
"class":"highcharts-"+b,zIndex:a.zIndex||4}).css(a.style).add())});d.layOutTitles(c)},layOutTitles:function(a){var b=0,c=this.title,d=this.subtitle,e=this.options,f=e.title,e=e.subtitle,g=this.renderer,h=this.spacingBox.width-44;if(c&&(c.css({width:(f.width||h)+"px"}).align(t({y:g.fontMetrics(f.style.fontSize,c).b-3},f),!1,"spacingBox"),!f.floating&&!f.verticalAlign))b=c.getBBox().height;d&&(d.css({width:(e.width||h)+"px"}).align(t({y:b+(f.margin-13)+g.fontMetrics(e.style.fontSize,c).b},e),!1,"spacingBox"),
!e.floating&&!e.verticalAlign&&(b=ta(b+d.getBBox().height)));c=this.titleOffset!==b;this.titleOffset=b;if(!this.isDirtyBox&&c)this.isDirtyBox=c,this.hasRendered&&p(a,!0)&&this.isDirtyBox&&this.redraw()},getChartSize:function(){var a=this.options.chart,b=a.width,a=a.height,c=this.renderToClone||this.renderTo;if(!q(b))this.containerWidth=jb(c,"width");if(!q(a))this.containerHeight=jb(c,"height");this.chartWidth=s(0,b||this.containerWidth||600);this.chartHeight=s(0,p(a,this.containerHeight>19?this.containerHeight:
400))},cloneRenderTo:function(a){var b=this.renderToClone,c=this.container;a?b&&(this.renderTo.appendChild(c),Qa(b),delete this.renderToClone):(c&&c.parentNode===this.renderTo&&this.renderTo.removeChild(c),this.renderToClone=b=this.renderTo.cloneNode(0),M(b,{position:"absolute",top:"-9999px",display:"block"}),b.style.setProperty&&b.style.setProperty("display","block","important"),C.body.appendChild(b),c&&b.appendChild(c))},getContainer:function(){var a,b=this.options,c=b.chart,d,e,f;this.renderTo=
a=c.renderTo;f="highcharts-"+xb++;if(Ba(a))this.renderTo=a=C.getElementById(a);a||la(13,!0);d=G(K(a,"data-highcharts-chart"));!isNaN(d)&&X[d]&&X[d].hasRendered&&X[d].destroy();K(a,"data-highcharts-chart",this.index);a.innerHTML="";!c.skipClone&&!a.offsetWidth&&this.cloneRenderTo();this.getChartSize();d=this.chartWidth;e=this.chartHeight;this.container=a=$(Ja,{className:"highcharts-container"+(c.className?" "+c.className:""),id:f},t({position:"relative",overflow:"hidden",width:d+"px",height:e+"px",
textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},c.style),this.renderToClone||a);this._cursor=a.style.cursor;this.renderer=new (B[c.renderer]||$a)(a,d,e,c.style,c.forExport,b.exporting&&b.exporting.allowHTML);fa&&this.renderer.create(this,a,d,e);this.renderer.chartIndex=this.index},getMargins:function(a){var b=this.spacing,c=this.margin,d=this.titleOffset;this.resetMargins();if(d&&!q(c[0]))this.plotTop=s(this.plotTop,d+this.options.title.margin+b[0]);this.legend.adjustMargins(c,
b);this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin);this.extraTopMargin&&(this.plotTop+=this.extraTopMargin);a||this.getAxisMargins()},getAxisMargins:function(){var a=this,b=a.axisOffset=[0,0,0,0],c=a.margin;a.hasCartesianSeries&&o(a.axes,function(a){a.visible&&a.getOffset()});o(ib,function(d,e){q(c[e])||(a[d]+=b[e])});a.setChartSize()},reflow:function(a){var b=this,c=b.options.chart,d=b.renderTo,e=c.width||jb(d,"width"),f=c.height||jb(d,"height"),c=a?a.target:L,d=function(){if(b.container)b.setSize(e,
f,!1),b.hasUserSize=null};if(!b.hasUserSize&&!b.isPrinting&&e&&f&&(c===L||c===C)){if(e!==b.containerWidth||f!==b.containerHeight)clearTimeout(b.reflowTimeout),a?b.reflowTimeout=setTimeout(d,100):d();b.containerWidth=e;b.containerHeight=f}},initReflow:function(){var a=this,b=function(b){a.reflow(b)};I(L,"resize",b);I(a,"destroy",function(){Y(L,"resize",b)})},setSize:function(a,b,c){var d=this,e,f,g,h=d.renderer;d.isResizing+=1;g=function(){d&&J(d,"endResize",null,function(){d.isResizing-=1})};Ra(c,
d);d.oldChartHeight=d.chartHeight;d.oldChartWidth=d.chartWidth;if(q(a))d.chartWidth=e=s(0,w(a)),d.hasUserSize=!!e;if(q(b))d.chartHeight=f=s(0,w(b));a=h.globalAnimation;(a?lb:M)(d.container,{width:e+"px",height:f+"px"},a);d.setChartSize(!0);h.setSize(e,f,c);d.maxTicks=null;o(d.axes,function(a){a.isDirty=!0;a.setScale()});o(d.series,function(a){a.isDirty=!0});d.isDirtyLegend=!0;d.isDirtyBox=!0;d.layOutTitles();d.getMargins();d.redraw(c);d.oldChartHeight=null;J(d,"resize");a=h.globalAnimation;a===!1?
g():setTimeout(g,a&&a.duration||500)},setChartSize:function(a){var b=this.inverted,c=this.renderer,d=this.chartWidth,e=this.chartHeight,f=this.options.chart,g=this.spacing,h=this.clipOffset,i,j,k,m;this.plotLeft=i=w(this.plotLeft);this.plotTop=j=w(this.plotTop);this.plotWidth=k=s(0,w(d-i-this.marginRight));this.plotHeight=m=s(0,w(e-j-this.marginBottom));this.plotSizeX=b?m:k;this.plotSizeY=b?k:m;this.plotBorderWidth=f.plotBorderWidth||0;this.spacingBox=c.spacingBox={x:g[3],y:g[0],width:d-g[3]-g[1],
height:e-g[0]-g[2]};this.plotBox=c.plotBox={x:i,y:j,width:k,height:m};d=2*T(this.plotBorderWidth/2);b=ta(s(d,h[3])/2);c=ta(s(d,h[0])/2);this.clipBox={x:b,y:c,width:T(this.plotSizeX-s(d,h[1])/2-b),height:s(0,T(this.plotSizeY-s(d,h[2])/2-c))};a||o(this.axes,function(a){a.setAxisSize();a.setAxisTranslation()})},resetMargins:function(){var a=this;o(ib,function(b,c){a[b]=p(a.margin[c],a.spacing[c])});a.axisOffset=[0,0,0,0];a.clipOffset=[0,0,0,0]},drawChartBox:function(){var a=this.options.chart,b=this.renderer,
c=this.chartWidth,d=this.chartHeight,e=this.chartBackground,f=this.plotBackground,g=this.plotBorder,h=this.plotBGImage,i=a.borderWidth||0,j=a.backgroundColor,k=a.plotBackgroundColor,m=a.plotBackgroundImage,n=a.plotBorderWidth||0,l,p=this.plotLeft,o=this.plotTop,q=this.plotWidth,s=this.plotHeight,v=this.plotBox,t=this.clipRect,x=this.clipBox;l=i+(a.shadow?8:0);if(i||j)if(e)e.animate(e.crisp({width:c-l,height:d-l}));else{e={fill:j||P};if(i)e.stroke=a.borderColor,e["stroke-width"]=i;this.chartBackground=
b.rect(l/2,l/2,c-l,d-l,a.borderRadius,i).attr(e).addClass("highcharts-background").add().shadow(a.shadow)}if(k)f?f.animate(v):this.plotBackground=b.rect(p,o,q,s,0).attr({fill:k}).add().shadow(a.plotShadow);if(m)h?h.animate(v):this.plotBGImage=b.image(m,p,o,q,s).add();t?t.animate({width:x.width,height:x.height}):this.clipRect=b.clipRect(x);if(n)g?g.animate(g.crisp({x:p,y:o,width:q,height:s,strokeWidth:-n})):this.plotBorder=b.rect(p,o,q,s,0,-n).attr({stroke:a.plotBorderColor,"stroke-width":n,fill:P,
zIndex:1}).add();this.isDirtyBox=!1},propFromSeries:function(){var a=this,b=a.options.chart,c,d=a.options.series,e,f;o(["inverted","angular","polar"],function(g){c=N[b.type||b.defaultSeriesType];f=a[g]||b[g]||c&&c.prototype[g];for(e=d&&d.length;!f&&e--;)(c=N[d[e].type])&&c.prototype[g]&&(f=!0);a[g]=f})},linkSeries:function(){var a=this,b=a.series;o(b,function(a){a.linkedSeries.length=0});o(b,function(b){var d=b.options.linkedTo;if(Ba(d)&&(d=d===":previous"?a.series[b.index-1]:a.get(d)))d.linkedSeries.push(b),
b.linkedParent=d,b.visible=p(b.options.visible,d.options.visible,b.visible)})},renderSeries:function(){o(this.series,function(a){a.translate();a.render()})},renderLabels:function(){var a=this,b=a.options.labels;b.items&&o(b.items,function(c){var d=t(b.style,c.style),e=G(d.left)+a.plotLeft,f=G(d.top)+a.plotTop+12;delete d.left;delete d.top;a.renderer.text(c.html,e,f).attr({zIndex:2}).css(d).add()})},render:function(){var a=this.axes,b=this.renderer,c=this.options,d,e,f,g;this.setTitle();this.legend=
new mb(this,c.legend);this.getStacks&&this.getStacks();this.getMargins(!0);this.setChartSize();d=this.plotWidth;e=this.plotHeight-=13;o(a,function(a){a.setScale()});this.getAxisMargins();f=d/this.plotWidth>1.1;g=e/this.plotHeight>1.1;if(f||g)this.maxTicks=null,o(a,function(a){(a.horiz&&f||!a.horiz&&g)&&a.setTickInterval(!0)}),this.getMargins();this.drawChartBox();this.hasCartesianSeries&&o(a,function(a){a.visible&&a.render()});if(!this.seriesGroup)this.seriesGroup=b.g("series-group").attr({zIndex:3}).add();
this.renderSeries();this.renderLabels();this.showCredits(c.credits);this.hasRendered=!0},showCredits:function(a){if(a.enabled&&!this.credits)this.credits=this.renderer.text(a.text,0,0).on("click",function(){if(a.href)location.href=a.href}).attr({align:a.position.align,zIndex:8}).css(a.style).add().align(a.position)},destroy:function(){var a=this,b=a.axes,c=a.series,d=a.container,e,f=d&&d.parentNode;J(a,"destroy");X[a.index]=x;bb--;a.renderTo.removeAttribute("data-highcharts-chart");Y(a);for(e=b.length;e--;)b[e]=
b[e].destroy();for(e=c.length;e--;)c[e]=c[e].destroy();o("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,pointer,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","),function(b){var c=a[b];c&&c.destroy&&(a[b]=c.destroy())});if(d)d.innerHTML="",Y(d),f&&Qa(d);for(e in a)delete a[e]},isReadyToRender:function(){var a=this;return!ca&&L==L.top&&C.readyState!=="complete"||fa&&!L.canvg?(fa?Lb.push(function(){a.firstRender()},a.options.global.canvasToolsURL):
C.attachEvent("onreadystatechange",function(){C.detachEvent("onreadystatechange",a.firstRender);C.readyState==="complete"&&a.firstRender()}),!1):!0},firstRender:function(){var a=this,b=a.options,c=a.callback;if(a.isReadyToRender()){a.getContainer();J(a,"init");a.resetMargins();a.setChartSize();a.propFromSeries();a.getAxes();o(b.series||[],function(b){a.initSeries(b)});a.linkSeries();J(a,"beforeRender");if(B.Pointer)a.pointer=new Va(a,b);a.render();a.renderer.draw();c&&c.apply(a,[a]);o(a.callbacks,
function(b){a.index!==x&&b.apply(a,[a])});J(a,"load");a.cloneRenderTo(!0)}},splashArray:function(a,b){var c=b[a],c=da(c)?c:[c,c,c,c];return[p(b[a+"Top"],c[0]),p(b[a+"Right"],c[1]),p(b[a+"Bottom"],c[2]),p(b[a+"Left"],c[3])]}};var Xb=B.CenteredSeriesMixin={getCenter:function(){var a=this.options,b=this.chart,c=2*(a.slicedOffset||0),d=b.plotWidth-2*c,b=b.plotHeight-2*c,e=a.center,e=[p(e[0],"50%"),p(e[1],"50%"),a.size||"100%",a.innerSize||0],f=z(d,b),g,h;for(g=0;g<4;++g)h=e[g],a=g<2||g===2&&/%$/.test(h),
e[g]=(/%$/.test(h)?[d,b,f,e[2]][g]*parseFloat(h)/100:parseFloat(h))+(a?c:0);e[3]>e[2]&&(e[3]=e[2]);return e}},Fa=function(){};Fa.prototype={init:function(a,b,c){this.series=a;this.color=a.color;this.applyOptions(b,c);this.pointAttr={};if(a.options.colorByPoint&&(b=a.options.colors||a.chart.options.colors,this.color=this.color||b[a.colorCounter++],a.colorCounter===b.length))a.colorCounter=0;a.chart.pointCount++;return this},applyOptions:function(a,b){var c=this.series,d=c.options.pointValKey||c.pointValKey,
a=Fa.prototype.optionsToObject.call(this,a);t(this,a);this.options=this.options?t(this.options,a):a;if(d)this.y=this[d];if(this.x===x&&c)this.x=b===x?c.autoIncrement():b;return this},optionsToObject:function(a){var b={},c=this.series,d=c.options.keys,e=d||c.pointArrayMap||["y"],f=e.length,g=0,h=0;if(typeof a==="number"||a===null)b[e[0]]=a;else if(Ga(a)){if(!d&&a.length>f){c=typeof a[0];if(c==="string")b.name=a[0];else if(c==="number")b.x=a[0];g++}for(;h<f;){if(!d||a[g]!==void 0)b[e[h]]=a[g];g++;h++}}else if(typeof a===
"object"){b=a;if(a.dataLabels)c._hasPointLabels=!0;if(a.marker)c._hasPointMarkers=!0}return b},destroy:function(){var a=this.series.chart,b=a.hoverPoints,c;a.pointCount--;if(b&&(this.setState(),ja(b,this),!b.length))a.hoverPoints=null;if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)Y(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this);for(c in this)this[c]=null},destroyElements:function(){for(var a=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],
b,c=6;c--;)b=a[c],this[b]&&(this[b]=this[b].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(a){var b=this.series,c=b.tooltipOptions,d=p(c.valueDecimals,""),e=c.valuePrefix||"",f=c.valueSuffix||"";o(b.pointArrayMap||["y"],function(b){b="{point."+b;if(e||f)a=a.replace(b+"}",e+b+"}"+f);a=a.replace(b+"}",b+":,."+d+"f}")});
return Ia(a,{point:this,series:this.series})},firePointEvent:function(a,b,c){var d=this,e=this.series.options;(e.point.events[a]||d.options&&d.options.events&&d.options.events[a])&&this.importEvents();a==="click"&&e.allowPointSelect&&(c=function(a){d.select&&d.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});J(this,a,b,c)},visible:!0};var R=B.Series=function(){};R.prototype={isCartesian:!0,type:"line",pointClass:Fa,sorted:!0,requireSorting:!0,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",
fill:"fillColor",r:"radius"},directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],init:function(a,b){var c=this,d,e,f=a.series,g=function(a,b){return p(a.options.index,a._i)-p(b.options.index,b._i)};c.chart=a;c.options=b=c.setOptions(b);c.linkedSeries=[];c.bindAxes();t(c,{name:b.name,state:"",pointAttr:{},visible:b.visible!==!1,selected:b.selected===!0});if(fa)b.animation=!1;e=b.events;for(d in e)I(c,d,e[d]);if(e&&e.click||b.point&&b.point.events&&b.point.events.click||
b.allowPointSelect)a.runTrackerClick=!0;c.getColor();c.getSymbol();o(c.parallelArrays,function(a){c[a+"Data"]=[]});c.setData(b.data,!1);if(c.isCartesian)a.hasCartesianSeries=!0;f.push(c);c._i=f.length-1;qb(f,g);this.yAxis&&qb(this.yAxis.series,g);o(f,function(a,b){a.index=b;a.name=a.name||"Series "+(b+1)})},bindAxes:function(){var a=this,b=a.options,c=a.chart,d;o(a.axisTypes||[],function(e){o(c[e],function(c){d=c.options;if(b[e]===d.index||b[e]!==x&&b[e]===d.id||b[e]===x&&d.index===0)c.series.push(a),
a[e]=c,c.isDirty=!0});!a[e]&&a.optionalAxis!==e&&la(18,!0)})},updateParallelArrays:function(a,b){var c=a.series,d=arguments;o(c.parallelArrays,typeof b==="number"?function(d){var f=d==="y"&&c.toYData?c.toYData(a):a[d];c[d+"Data"][b]=f}:function(a){Array.prototype[b].apply(c[a+"Data"],Array.prototype.slice.call(d,2))})},autoIncrement:function(){var a=this.options,b=this.xIncrement,c,d=a.pointIntervalUnit,b=p(b,a.pointStart,0);this.pointInterval=c=p(this.pointInterval,a.pointInterval,1);if(d==="month"||
d==="year")a=new ya(b),a=d==="month"?+a[vb](a[Ya]()+c):+a[wb](a[Za]()+c),c=a-b;this.xIncrement=b+c;return b},getSegments:function(){var a=-1,b=[],c,d=this.points,e=d.length;if(e)if(this.options.connectNulls){for(c=e;c--;)d[c].y===null&&d.splice(c,1);d.length&&(b=[d])}else o(d,function(c,g){c.y===null?(g>a+1&&b.push(d.slice(a+1,g)),a=g):g===e-1&&b.push(d.slice(a+1,g+1))});this.segments=b},setOptions:function(a){var b=this.chart,c=b.options.plotOptions,b=b.userOptions||{},d=b.plotOptions||{},e=c[this.type];
this.userOptions=a;c=D(e,c.series,a);this.tooltipOptions=D(S.tooltip,S.plotOptions[this.type].tooltip,b.tooltip,d.series&&d.series.tooltip,d[this.type]&&d[this.type].tooltip,a.tooltip);e.marker===null&&delete c.marker;this.zoneAxis=c.zoneAxis;a=this.zones=(c.zones||[]).slice();if((c.negativeColor||c.negativeFillColor)&&!c.zones)a.push({value:c[this.zoneAxis+"Threshold"]||c.threshold||0,color:c.negativeColor,fillColor:c.negativeFillColor});a.length&&q(a[a.length-1].value)&&a.push({color:this.color,
fillColor:this.fillColor});return c},getCyclic:function(a,b,c){var d=this.userOptions,e="_"+a+"Index",f=a+"Counter";b||(q(d[e])?b=d[e]:(d[e]=b=this.chart[f]%c.length,this.chart[f]+=1),b=c[b]);this[a]=b},getColor:function(){this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||ba[this.type].color,this.chart.options.colors)},getSymbol:function(){var a=this.options.marker;this.getCyclic("symbol",a.symbol,this.chart.options.symbols);if(/^url/.test(this.symbol))a.radius=
0},drawLegendSymbol:Ma.drawLineMarker,setData:function(a,b,c,d){var e=this,f=e.points,g=f&&f.length||0,h,i=e.options,j=e.chart,k=null,m=e.xAxis,n=m&&!!m.categories,l=i.turboThreshold,u=this.xData,r=this.yData,s=(h=e.pointArrayMap)&&h.length,a=a||[];h=a.length;b=p(b,!0);if(d!==!1&&h&&g===h&&!e.cropped&&!e.hasGroupedData&&e.visible)o(a,function(a,b){f[b].update&&f[b].update(a,!1,null,!1)});else{e.xIncrement=null;e.pointRange=n?1:i.pointRange;e.colorCounter=0;o(this.parallelArrays,function(a){e[a+"Data"].length=
0});if(l&&h>l){for(c=0;k===null&&c<h;)k=a[c],c++;if(qa(k)){n=p(i.pointStart,0);k=p(i.pointInterval,1);for(c=0;c<h;c++)u[c]=n,r[c]=a[c],n+=k;e.xIncrement=n}else if(Ga(k))if(s)for(c=0;c<h;c++)k=a[c],u[c]=k[0],r[c]=k.slice(1,s+1);else for(c=0;c<h;c++)k=a[c],u[c]=k[0],r[c]=k[1];else la(12)}else for(c=0;c<h;c++)if(a[c]!==x&&(k={series:e},e.pointClass.prototype.applyOptions.apply(k,[a[c]]),e.updateParallelArrays(k,c),n&&q(k.name)))m.names[k.x]=k.name;Ba(r[0])&&la(14,!0);e.data=[];e.options.data=a;for(c=
g;c--;)f[c]&&f[c].destroy&&f[c].destroy();if(m)m.minRange=m.userMinRange;e.isDirty=e.isDirtyData=j.isDirtyBox=!0;c=!1}i.legendType==="point"&&(this.processData(),this.generatePoints());b&&j.redraw(c)},processData:function(a){var b=this.xData,c=this.yData,d=b.length,e;e=0;var f,g,h=this.xAxis,i,j=this.options;i=j.cropThreshold;var k=this.getExtremesFromAll||j.getExtremesFromAll,m=this.isCartesian,n,l;if(m&&!this.isDirty&&!h.isDirty&&!this.yAxis.isDirty&&!a)return!1;if(h)a=h.getExtremes(),n=a.min,l=
a.max;if(m&&this.sorted&&!k&&(!i||d>i||this.forceCrop))if(b[d-1]<n||b[0]>l)b=[],c=[];else if(b[0]<n||b[d-1]>l)e=this.cropData(this.xData,this.yData,n,l),b=e.xData,c=e.yData,e=e.start,f=!0;for(i=b.length-1;i>=0;i--)d=b[i]-b[i-1],d>0&&(g===x||d<g)?g=d:d<0&&this.requireSorting&&la(15);this.cropped=f;this.cropStart=e;this.processedXData=b;this.processedYData=c;if(j.pointRange===null)this.pointRange=g||1;this.closestPointRange=g},cropData:function(a,b,c,d){var e=a.length,f=0,g=e,h=p(this.cropShoulder,
1),i;for(i=0;i<e;i++)if(a[i]>=c){f=s(0,i-h);break}for(;i<e;i++)if(a[i]>d){g=i+h;break}return{xData:a.slice(f,g),yData:b.slice(f,g),start:f,end:g}},generatePoints:function(){var a=this.options.data,b=this.data,c,d=this.processedXData,e=this.processedYData,f=this.pointClass,g=d.length,h=this.cropStart||0,i,j=this.hasGroupedData,k,m=[],n;if(!b&&!j)b=[],b.length=a.length,b=this.data=b;for(n=0;n<g;n++)i=h+n,j?m[n]=(new f).init(this,[d[n]].concat(ra(e[n]))):(b[i]?k=b[i]:a[i]!==x&&(b[i]=k=(new f).init(this,
a[i],d[n])),m[n]=k),m[n].index=i;if(b&&(g!==(c=b.length)||j))for(n=0;n<c;n++)if(n===h&&!j&&(n+=g),b[n])b[n].destroyElements(),b[n].plotX=x;this.data=b;this.points=m},getExtremes:function(a){var b=this.yAxis,c=this.processedXData,d,e=[],f=0;d=this.xAxis.getExtremes();var g=d.min,h=d.max,i,j,k,m,a=a||this.stackedYData||this.processedYData;d=a.length;for(m=0;m<d;m++)if(j=c[m],k=a[m],i=k!==null&&k!==x&&(!b.isLog||k.length||k>0),j=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||
(c[m+1]||j)>=g&&(c[m-1]||j)<=h,i&&j)if(i=k.length)for(;i--;)k[i]!==null&&(e[f++]=k[i]);else e[f++]=k;this.dataMin=Oa(e);this.dataMax=Da(e)},translate:function(){this.processedXData||this.processData();this.generatePoints();for(var a=this.options,b=a.stacking,c=this.xAxis,d=c.categories,e=this.yAxis,f=this.points,g=f.length,h=!!this.modifyValue,i=a.pointPlacement,j=i==="between"||qa(i),k=a.threshold,m=a.startFromThreshold?k:0,n,l,u,o,t=Number.MAX_VALUE,a=0;a<g;a++){var A=f[a],v=A.x,y=A.y;l=A.low;var w=
b&&e.stacks[(this.negStacks&&y<(m?0:k)?"-":"")+this.stackKey];if(e.isLog&&y!==null&&y<=0)A.y=y=null,la(10);A.plotX=n=z(s(-1E5,c.translate(v,0,0,0,1,i,this.type==="flags")),1E5);if(b&&this.visible&&w&&w[v])o=this.getStackIndicator(o,v,this.index),w=w[v],y=w.points[o.key],l=y[0],y=y[1],l===m&&(l=p(k,e.min)),e.isLog&&l<=0&&(l=null),A.total=A.stackTotal=w.total,A.percentage=w.total&&A.y/w.total*100,A.stackY=y,w.setOffset(this.pointXOffset||0,this.barW||0);A.yBottom=q(l)?e.translate(l,0,1,0,1):null;h&&
(y=this.modifyValue(y,A));A.plotY=l=typeof y==="number"&&y!==Infinity?z(s(-1E5,e.translate(y,0,1,0,1)),1E5):x;A.isInside=l!==x&&l>=0&&l<=e.len&&n>=0&&n<=c.len;A.clientX=j?c.translate(v,0,0,0,1):n;A.negative=A.y<(k||0);A.category=d&&d[A.x]!==x?d[A.x]:A.x;a&&(t=z(t,O(n-u)));u=n}this.closestPointRangePx=t;this.getSegments()},setClip:function(a){var b=this.chart,c=this.options,d=b.renderer,e=b.inverted,f=this.clipBox,g=f||b.clipBox,h=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,g.height,
c.xAxis,c.yAxis].join(","),i=b[h],j=b[h+"m"];if(!i){if(a)g.width=0,b[h+"m"]=j=d.clipRect(-99,e?-b.plotLeft:-b.plotTop,99,e?b.chartWidth:b.chartHeight);b[h]=i=d.clipRect(g)}a&&(i.count+=1);if(c.clip!==!1)this.group.clip(a||f?i:b.clipRect),this.markerGroup.clip(j),this.sharedClipKey=h;a||(i.count-=1,i.count<=0&&h&&b[h]&&(f||(b[h]=b[h].destroy()),b[h+"m"]&&(b[h+"m"]=b[h+"m"].destroy())))},animate:function(a){var b=this.chart,c=this.options.animation,d;if(c&&!da(c))c=ba[this.type].animation;a?this.setClip(c):
(d=this.sharedClipKey,(a=b[d])&&a.animate({width:b.plotSizeX},c),b[d+"m"]&&b[d+"m"].animate({width:b.plotSizeX+99},c),this.animate=null)},afterAnimate:function(){this.setClip();J(this,"afterAnimate")},drawPoints:function(){var a,b=this.points,c=this.chart,d,e,f,g,h,i,j,k,m=this.options.marker,n=this.pointAttr[""],l,o,r,s=this.markerGroup,q=p(m.enabled,this.xAxis.isRadial,this.closestPointRangePx>2*m.radius);if(m.enabled!==!1||this._hasPointMarkers)for(f=b.length;f--;)if(g=b[f],d=T(g.plotX),e=g.plotY,
k=g.graphic,l=g.marker||{},o=!!g.marker,a=q&&l.enabled===x||l.enabled,r=g.isInside,a&&e!==x&&!isNaN(e)&&g.y!==null)if(a=g.pointAttr[g.selected?"select":""]||n,h=a.r,i=p(l.symbol,this.symbol),j=i.indexOf("url")===0,k)k[r?"show":"hide"](!0).animate(t({x:d-h,y:e-h},k.symbolName?{width:2*h,height:2*h}:{}));else{if(r&&(h>0||j))g.graphic=c.renderer.symbol(i,d-h,e-h,2*h,2*h,o?l:m).attr(a).add(s)}else if(k)g.graphic=k.destroy()},convertAttribs:function(a,b,c,d){var e=this.pointAttrToOptions,f,g,h={},a=a||
{},b=b||{},c=c||{},d=d||{};for(f in e)g=e[f],h[f]=p(a[g],b[f],c[f],d[f]);return h},getAttribs:function(){var a=this,b=a.options,c=ba[a.type].marker?b.marker:b,d=c.states,e=d.hover,f,g=a.color,h=a.options.negativeColor;f={stroke:g,fill:g};var i=a.points||[],j,k,m=[],n=a.pointAttrToOptions;j=a.hasPointSpecificOptions;var l=c.lineColor,u=c.fillColor;k=b.turboThreshold;var r=a.zones,s=a.zoneAxis||"y",A;b.marker?(e.radius=e.radius||c.radius+e.radiusPlus,e.lineWidth=e.lineWidth||c.lineWidth+e.lineWidthPlus):
(e.color=e.color||na(e.color||g).brighten(e.brightness).get(),e.negativeColor=e.negativeColor||na(e.negativeColor||h).brighten(e.brightness).get());m[""]=a.convertAttribs(c,f);o(["hover","select"],function(b){m[b]=a.convertAttribs(d[b],m[""])});a.pointAttr=m;g=i.length;if(!k||g<k||j)for(;g--;){k=i[g];if((c=k.options&&k.options.marker||k.options)&&c.enabled===!1)c.radius=0;if(r.length){j=0;for(f=r[j];k[s]>=f.value;)f=r[++j];k.color=k.fillColor=p(f.color,a.color)}j=b.colorByPoint||k.color;if(k.options)for(A in n)q(c[n[A]])&&
(j=!0);if(j){c=c||{};j=[];d=c.states||{};f=d.hover=d.hover||{};if(!b.marker||k.negative&&!f.fillColor&&!e.fillColor)f[a.pointAttrToOptions.fill]=f.color||!k.options.color&&e[k.negative&&h?"negativeColor":"color"]||na(k.color).brighten(f.brightness||e.brightness).get();f={color:k.color};if(!u)f.fillColor=k.color;if(!l)f.lineColor=k.color;c.hasOwnProperty("color")&&!c.color&&delete c.color;j[""]=a.convertAttribs(t(f,c),m[""]);j.hover=a.convertAttribs(d.hover,m.hover,j[""]);j.select=a.convertAttribs(d.select,
m.select,j[""])}else j=m;k.pointAttr=j}},destroy:function(){var a=this,b=a.chart,c=/AppleWebKit\/533/.test(za),d,e=a.data||[],f,g,h;J(a,"destroy");Y(a);o(a.axisTypes||[],function(b){if(h=a[b])ja(h.series,a),h.isDirty=h.forceRedraw=!0});a.legendItem&&a.chart.legend.destroyItem(a);for(d=e.length;d--;)(f=e[d])&&f.destroy&&f.destroy();a.points=null;clearTimeout(a.animationTimeout);for(g in a)a[g]instanceof Q&&!a[g].survive&&(d=c&&g==="group"?"hide":"destroy",a[g][d]());if(b.hoverSeries===a)b.hoverSeries=
null;ja(b.series,a);for(g in a)delete a[g]},getSegmentPath:function(a){var b=this,c=[],d=b.options.step;o(a,function(e,f){var g=e.plotX,h=e.plotY,i;b.getPointSpline?c.push.apply(c,b.getPointSpline(a,e,f)):(c.push(f?"L":"M"),d&&f&&(i=a[f-1],d==="right"?c.push(i.plotX,h,"L"):d==="center"?c.push((i.plotX+g)/2,i.plotY,"L",(i.plotX+g)/2,h,"L"):c.push(g,i.plotY,"L")),c.push(e.plotX,e.plotY))});return c},getGraphPath:function(){var a=this,b=[],c,d=[];o(a.segments,function(e){c=a.getSegmentPath(e);e.length>
1?b=b.concat(c):d.push(e[0])});a.singlePoints=d;return a.graphPath=b},drawGraph:function(){var a=this,b=this.options,c=[["graph",b.lineColor||this.color,b.dashStyle]],d=b.lineWidth,e=b.linecap!=="square",f=this.getGraphPath(),g=this.fillGraph&&this.color||P;o(this.zones,function(d,e){c.push(["zoneGraph"+e,d.color||a.color,d.dashStyle||b.dashStyle])});o(c,function(c,i){var j=c[0],k=a[j];if(k)k.animate({d:f});else if((d||g)&&f.length)k={stroke:c[1],"stroke-width":d,fill:g,zIndex:1},c[2]?k.dashstyle=
c[2]:e&&(k["stroke-linecap"]=k["stroke-linejoin"]="round"),a[j]=a.chart.renderer.path(f).attr(k).add(a.group).shadow(i<2&&b.shadow)})},applyZones:function(){var a=this,b=this.chart,c=b.renderer,d=this.zones,e,f,g=this.clips||[],h,i=this.graph,j=this.area,k=s(b.chartWidth,b.chartHeight),m=this[(this.zoneAxis||"y")+"Axis"],n,l=m.reversed,u=b.inverted,r=m.horiz,q,t,v,y=!1;if(d.length&&(i||j)&&m.min!==x)i&&i.hide(),j&&j.hide(),n=m.getExtremes(),o(d,function(d,o){e=l?r?b.plotWidth:0:r?0:m.toPixels(n.min);
e=z(s(p(f,e),0),k);f=z(s(w(m.toPixels(p(d.value,n.max),!0)),0),k);y&&(e=f=m.toPixels(n.max));q=Math.abs(e-f);t=z(e,f);v=s(e,f);if(m.isXAxis){if(h={x:u?v:t,y:0,width:q,height:k},!r)h.x=b.plotHeight-h.x}else if(h={x:0,y:u?v:t,width:k,height:q},r)h.y=b.plotWidth-h.y;b.inverted&&c.isVML&&(h=m.isXAxis?{x:0,y:l?t:v,height:h.width,width:b.chartWidth}:{x:h.y-b.plotLeft-b.spacingBox.x,y:0,width:h.height,height:b.chartHeight});g[o]?g[o].animate(h):(g[o]=c.clipRect(h),i&&a["zoneGraph"+o].clip(g[o]),j&&a["zoneArea"+
o].clip(g[o]));y=d.value>n.max}),this.clips=g},invertGroups:function(){function a(){var a={width:b.yAxis.len,height:b.xAxis.len};o(["group","markerGroup"],function(c){b[c]&&b[c].attr(a).invert()})}var b=this,c=b.chart;if(b.xAxis)I(c,"resize",a),I(b,"destroy",function(){Y(c,"resize",a)}),a(),b.invertGroups=a},plotGroup:function(a,b,c,d,e){var f=this[a],g=!f;g&&(this[a]=f=this.chart.renderer.g(b).attr({visibility:c,zIndex:d||0.1}).add(e),f.addClass("highcharts-series-"+this.index));f[g?"attr":"animate"](this.getPlotBox());
return f},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis;if(a.inverted)b=c,c=this.xAxis;return{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,b=a.chart,c,d=a.options,e=(c=d.animation)&&!!a.animate&&b.renderer.isSVG&&p(c.duration,500)||0,f=a.visible?"visible":"hidden",g=d.zIndex,h=a.hasRendered,i=b.seriesGroup;c=a.plotGroup("group","series",f,g,i);a.markerGroup=a.plotGroup("markerGroup","markers",f,g,i);e&&a.animate(!0);
a.getAttribs();c.inverted=a.isCartesian?b.inverted:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());o(a.points,function(a){a.redraw&&a.redraw()});a.drawDataLabels&&a.drawDataLabels();a.visible&&a.drawPoints();a.drawTracker&&a.options.enableMouseTracking!==!1&&a.drawTracker();b.inverted&&a.invertGroups();d.clip!==!1&&!a.sharedClipKey&&!h&&c.clip(b.clipRect);e&&a.animate();if(!h)e?a.animationTimeout=setTimeout(function(){a.afterAnimate()},e):a.afterAnimate();a.isDirty=a.isDirtyData=!1;a.hasRendered=!0},
redraw:function(){var a=this.chart,b=this.isDirtyData,c=this.isDirty,d=this.group,e=this.xAxis,f=this.yAxis;d&&(a.inverted&&d.attr({width:a.plotWidth,height:a.plotHeight}),d.animate({translateX:p(e&&e.left,a.plotLeft),translateY:p(f&&f.top,a.plotTop)}));this.translate();this.render();b&&J(this,"updatedData");(c||b)&&delete this.kdTree},kdDimensions:1,kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var c=this.xAxis,d=this.yAxis,e=this.chart.inverted;return this.searchKDTree({clientX:e?c.len-
a.chartY+c.pos:a.chartX-c.pos,plotY:e?d.len-a.chartX+d.pos:a.chartY-d.pos},b)},buildKDTree:function(){function a(b,d,g){var h,i;if(i=b&&b.length)return h=c.kdAxisArray[d%g],b.sort(function(a,b){return a[h]-b[h]}),i=Math.floor(i/2),{point:b[i],left:a(b.slice(0,i),d+1,g),right:a(b.slice(i+1),d+1,g)}}function b(){var b=kb(c.points||[],function(a){return a.y!==null});c.kdTree=a(b,d,d)}var c=this,d=c.kdDimensions;delete c.kdTree;c.options.kdSync?b():setTimeout(b)},searchKDTree:function(a,b){function c(a,
b,j,k){var m=b.point,n=d.kdAxisArray[j%k],l,p,o=m;p=q(a[e])&&q(m[e])?Math.pow(a[e]-m[e],2):null;l=q(a[f])&&q(m[f])?Math.pow(a[f]-m[f],2):null;l=(p||0)+(l||0);m.dist=q(l)?Math.sqrt(l):Number.MAX_VALUE;m.distX=q(p)?Math.sqrt(p):Number.MAX_VALUE;n=a[n]-m[n];l=n<0?"left":"right";p=n<0?"right":"left";b[l]&&(l=c(a,b[l],j+1,k),o=l[g]<o[g]?l:m);b[p]&&Math.sqrt(n*n)<o[g]&&(a=c(a,b[p],j+1,k),o=a[g]<o[g]?a:o);return o}var d=this,e=this.kdAxisArray[0],f=this.kdAxisArray[1],g=b?"distX":"dist";this.kdTree||this.buildKDTree();
if(this.kdTree)return c(a,this.kdTree,this.kdDimensions,this.kdDimensions)}};Hb.prototype={destroy:function(){Pa(this,this.axis)},render:function(a){var b=this.options,c=b.format,c=c?Ia(c,this):b.formatter.call(this);this.label?this.label.attr({text:c,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(c,null,null,b.useHTML).css(b.style).attr({align:this.textAlign,rotation:b.rotation,visibility:"hidden"}).add(a)},setOffset:function(a,b){var c=this.axis,d=c.chart,e=d.inverted,f=c.reversed,
f=this.isNegative&&!f||!this.isNegative&&f,g=c.translate(c.usePercentage?100:this.total,0,0,0,1),c=c.translate(0),c=O(g-c),h=d.xAxis[0].translate(this.x)+a,i=d.plotHeight,f={x:e?f?g:g-c:h,y:e?i-h-b:f?i-g-c:i-g,width:e?c:b,height:e?b:c};if(e=this.label)e.align(this.alignOptions,null,f),f=e.alignAttr,e[this.options.crop===!1||d.isInsidePlot(f.x,f.y)?"show":"hide"](!0)}};E.prototype.getStacks=function(){var a=this;o(a.yAxis,function(a){if(a.stacks&&a.hasVisibleSeries)a.oldStacks=a.stacks});o(a.series,
function(b){if(b.options.stacking&&(b.visible===!0||a.options.chart.ignoreHiddenSeries===!1))b.stackKey=b.type+p(b.options.stack,"")})};ha.prototype.buildStacks=function(){var a=this.series,b=p(this.options.reversedStacks,!0),c=a.length;if(!this.isXAxis){for(this.usePercentage=!1;c--;)a[b?c:a.length-c-1].setStackedPoints();if(this.usePercentage)for(c=0;c<a.length;c++)a[c].setPercentStacks()}};ha.prototype.renderStackTotals=function(){var a=this.chart,b=a.renderer,c=this.stacks,d,e,f=this.stackTotalGroup;
if(!f)this.stackTotalGroup=f=b.g("stack-labels").attr({visibility:"visible",zIndex:6}).add();f.translate(a.plotLeft,a.plotTop);for(d in c)for(e in a=c[d],a)a[e].render(f)};ha.prototype.resetStacks=function(){var a=this.stacks,b,c;if(!this.isXAxis)for(b in a)for(c in a[b])a[b][c].touched<this.stacksTouched?(a[b][c].destroy(),delete a[b][c]):(a[b][c].total=null,a[b][c].cum=0)};ha.prototype.cleanStacks=function(){var a,b,c;if(!this.isXAxis){if(this.oldStacks)a=this.stacks=this.oldStacks;for(b in a)for(c in a[b])a[b][c].cum=
a[b][c].total}};R.prototype.setStackedPoints=function(){if(this.options.stacking&&!(this.visible!==!0&&this.chart.options.chart.ignoreHiddenSeries!==!1)){var a=this.processedXData,b=this.processedYData,c=[],d=b.length,e=this.options,f=e.threshold,g=e.startFromThreshold?f:0,h=e.stack,e=e.stacking,i=this.stackKey,j="-"+i,k=this.negStacks,m=this.yAxis,n=m.stacks,l=m.oldStacks,o,r,q,t,v,w,x;m.stacksTouched+=1;for(v=0;v<d;v++){w=a[v];x=b[v];o=this.getStackIndicator(o,w,this.index);t=o.key;q=(r=k&&x<(g?
0:f))?j:i;n[q]||(n[q]={});if(!n[q][w])l[q]&&l[q][w]?(n[q][w]=l[q][w],n[q][w].total=null):n[q][w]=new Hb(m,m.options.stackLabels,r,w,h);q=n[q][w];q.points[t]=[p(q.cum,g)];q.touched=m.stacksTouched;e==="percent"?(r=r?i:j,k&&n[r]&&n[r][w]?(r=n[r][w],q.total=r.total=s(r.total,q.total)+O(x)||0):q.total=ea(q.total+(O(x)||0))):q.total=ea(q.total+(x||0));q.cum=p(q.cum,g)+(x||0);q.points[t].push(q.cum);c[v]=q.cum}if(e==="percent")m.usePercentage=!0;this.stackedYData=c;m.oldStacks={}}};R.prototype.setPercentStacks=
function(){var a=this,b=a.stackKey,c=a.yAxis.stacks,d=a.processedXData,e;o([b,"-"+b],function(b){var f;for(var g=d.length,h,i;g--;)if(h=d[g],e=a.getStackIndicator(e,h,a.index),f=(i=c[b]&&c[b][h])&&i.points[e.key],h=f)i=i.total?100/i.total:0,h[0]=ea(h[0]*i),h[1]=ea(h[1]*i),a.stackedYData[g]=h[1]})};R.prototype.getStackIndicator=function(a,b,c){!q(a)||a.x!==b?a={x:b,index:0}:a.index++;a.key=[c,b,a.index].join(",");return a};t(E.prototype,{addSeries:function(a,b,c){var d,e=this;a&&(b=p(b,!0),J(e,"addSeries",
{options:a},function(){d=e.initSeries(a);e.isDirtyLegend=!0;e.linkSeries();b&&e.redraw(c)}));return d},addAxis:function(a,b,c,d){var e=b?"xAxis":"yAxis",f=this.options;new ha(this,D(a,{index:this[e].length,isX:b}));f[e]=ra(f[e]||{});f[e].push(a);p(c,!0)&&this.redraw(d)},showLoading:function(a){var b=this,c=b.options,d=b.loadingDiv,e=c.loading,f=function(){d&&M(d,{left:b.plotLeft+"px",top:b.plotTop+"px",width:b.plotWidth+"px",height:b.plotHeight+"px"})};if(!d)b.loadingDiv=d=$(Ja,{className:"highcharts-loading"},
t(e.style,{zIndex:10,display:P}),b.container),b.loadingSpan=$("span",null,e.labelStyle,d),I(b,"redraw",f);b.loadingSpan.innerHTML=a||c.lang.loading;if(!b.loadingShown)M(d,{opacity:0,display:""}),lb(d,{opacity:e.style.opacity},{duration:e.showDuration||0}),b.loadingShown=!0;f()},hideLoading:function(){var a=this.options,b=this.loadingDiv;b&&lb(b,{opacity:0},{duration:a.loading.hideDuration||100,complete:function(){M(b,{display:P})}});this.loadingShown=!1}});t(Fa.prototype,{update:function(a,b,c,d){function e(){f.applyOptions(a);
if(f.y===null&&h)f.graphic=h.destroy();if(da(a)&&!Ga(a))f.redraw=function(){if(h&&h.element&&a&&a.marker&&a.marker.symbol)f.graphic=h.destroy();if(a&&a.dataLabels&&f.dataLabel)f.dataLabel=f.dataLabel.destroy();f.redraw=null};i=f.index;g.updateParallelArrays(f,i);if(m&&f.name)m[f.x]=f.name;k.data[i]=f.options;g.isDirty=g.isDirtyData=!0;if(!g.fixedBox&&g.hasCartesianSeries)j.isDirtyBox=!0;if(k.legendType==="point")j.isDirtyLegend=!0;b&&j.redraw(c)}var f=this,g=f.series,h=f.graphic,i,j=g.chart,k=g.options,
m=g.xAxis&&g.xAxis.names,b=p(b,!0);d===!1?e():f.firePointEvent("update",{options:a},e)},remove:function(a,b){this.series.removePoint(La(this,this.series.data),a,b)}});t(R.prototype,{addPoint:function(a,b,c,d){var e=this,f=e.options,g=e.data,h=e.graph,i=e.area,j=e.chart,k=e.xAxis&&e.xAxis.names,m=h&&h.shift||0,n=["graph","area"],h=f.data,l,u=e.xData;Ra(d,j);if(c){for(d=e.zones.length;d--;)n.push("zoneGraph"+d,"zoneArea"+d);o(n,function(a){if(e[a])e[a].shift=m+(f.step?2:1)})}if(i)i.isArea=!0;b=p(b,
!0);i={series:e};e.pointClass.prototype.applyOptions.apply(i,[a]);n=i.x;d=u.length;if(e.requireSorting&&n<u[d-1])for(l=!0;d&&u[d-1]>n;)d--;e.updateParallelArrays(i,"splice",d,0,0);e.updateParallelArrays(i,d);if(k&&i.name)k[n]=i.name;h.splice(d,0,a);l&&(e.data.splice(d,0,null),e.processData());f.legendType==="point"&&e.generatePoints();c&&(g[0]&&g[0].remove?g[0].remove(!1):(g.shift(),e.updateParallelArrays(i,"shift"),h.shift()));e.isDirty=!0;e.isDirtyData=!0;b&&(e.getAttribs(),j.redraw())},removePoint:function(a,
b,c){var d=this,e=d.data,f=e[a],g=d.points,h=d.chart,i=function(){e.length===g.length&&g.splice(a,1);e.splice(a,1);d.options.data.splice(a,1);d.updateParallelArrays(f||{series:d},"splice",a,1);f&&f.destroy();d.isDirty=!0;d.isDirtyData=!0;b&&h.redraw()};Ra(c,h);b=p(b,!0);f?f.firePointEvent("remove",null,i):i()},remove:function(a,b){var c=this,d=c.chart,a=p(a,!0);if(!c.isRemoving)c.isRemoving=!0,J(c,"remove",null,function(){c.destroy();d.isDirtyLegend=d.isDirtyBox=!0;d.linkSeries();a&&d.redraw(b)});
c.isRemoving=!1},update:function(a,b){var c=this,d=this.chart,e=this.userOptions,f=this.type,g=N[f].prototype,h=["group","markerGroup","dataLabelsGroup"],i;if(a.type&&a.type!==f||a.zIndex!==void 0)h.length=0;o(h,function(a){h[a]=c[a];delete c[a]});a=D(e,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},a);this.remove(!1);for(i in g)this[i]=x;t(this,N[a.type||f].prototype);o(h,function(a){c[a]=h[a]});this.init(d,a);d.linkSeries();p(b,!0)&&d.redraw(!1)}});t(ha.prototype,
{update:function(a,b){var c=this.chart,a=c.options[this.coll][this.options.index]=D(this.userOptions,a);this.destroy(!0);this._addedPlotLB=this.chart._labelPanes=x;this.init(c,t(a,{events:x}));c.isDirtyBox=!0;p(b,!0)&&c.redraw()},remove:function(a){for(var b=this.chart,c=this.coll,d=this.series,e=d.length;e--;)d[e]&&d[e].remove(!1);ja(b.axes,this);ja(b[c],this);b.options[c].splice(this.options.index,1);o(b[c],function(a,b){a.options.index=b});this.destroy();b.isDirtyBox=!0;p(a,!0)&&b.redraw()},setTitle:function(a,
b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}});var xa=ka(R);N.line=xa;ba.area=D(U,{softThreshold:!1,threshold:0});var pa=ka(R,{type:"area",getSegments:function(){var a=this,b=[],c=[],d=[],e=this.xAxis,f=this.yAxis,g=f.stacks[this.stackKey],h={},i,j,k=this.points,m=this.options.connectNulls,n,l,p;if(this.options.stacking&&!this.cropped){for(l=0;l<k.length;l++)h[k[l].x]=k[l];for(p in g)g[p].total!==null&&d.push(+p);d.sort(function(a,b){return a-b});o(d,function(b){var d=
null,k;if(!m||h[b]&&h[b].y!==null)if(h[b])c.push(h[b]);else{for(l=a.index;l<=f.series.length;l++)if(n=a.getStackIndicator(null,b,l),k=g[b].points[n.key]){d=k[1];break}i=e.translate(b);j=f.getThreshold(d);c.push({y:null,plotX:i,clientX:i,plotY:j,yBottom:j,onMouseOver:ua})}});c.length&&b.push(c)}else R.prototype.getSegments.call(this),b=this.segments;this.segments=b},getSegmentPath:function(a){var b=R.prototype.getSegmentPath.call(this,a),c=[].concat(b),d,e=this.options;d=b.length;var f=this.yAxis.getThreshold(e.threshold),
g;d===3&&c.push("L",b[1],b[2]);if(e.stacking&&!this.closedStacks)for(d=a.length-1;d>=0;d--)g=p(a[d].yBottom,f),d<a.length-1&&e.step&&c.push(a[d+1].plotX,g),c.push(a[d].plotX,g);else this.closeSegment(c,a,f);this.areaPath=this.areaPath.concat(c);return b},closeSegment:function(a,b,c){a.push("L",b[b.length-1].plotX,c,"L",b[0].plotX,c)},drawGraph:function(){this.areaPath=[];R.prototype.drawGraph.apply(this);var a=this,b=this.areaPath,c=this.options,d=[["area",this.color,c.fillColor]];o(this.zones,function(b,
f){d.push(["zoneArea"+f,b.color||a.color,b.fillColor||c.fillColor])});o(d,function(d){var f=d[0],g=a[f];g?g.animate({d:b}):a[f]=a.chart.renderer.path(b).attr({fill:p(d[2],na(d[1]).setOpacity(p(c.fillOpacity,0.75)).get()),zIndex:0}).add(a.group)})},drawLegendSymbol:Ma.drawRectangle});N.area=pa;ba.spline=D(U);xa=ka(R,{type:"spline",getPointSpline:function(a,b,c){var d=b.plotX,e=b.plotY,f=a[c-1],g=a[c+1],h,i,j,k;if(f&&g){a=f.plotY;j=g.plotX;var g=g.plotY,m;h=(1.5*d+f.plotX)/2.5;i=(1.5*e+a)/2.5;j=(1.5*
d+j)/2.5;k=(1.5*e+g)/2.5;m=(k-i)*(j-d)/(j-h)+e-k;i+=m;k+=m;i>a&&i>e?(i=s(a,e),k=2*e-i):i<a&&i<e&&(i=z(a,e),k=2*e-i);k>g&&k>e?(k=s(g,e),i=2*e-k):k<g&&k<e&&(k=z(g,e),i=2*e-k);b.rightContX=j;b.rightContY=k}c?(b=["C",f.rightContX||f.plotX,f.rightContY||f.plotY,h||d,i||e,d,e],f.rightContX=f.rightContY=null):b=["M",d,e];return b}});N.spline=xa;ba.areaspline=D(ba.area);pa=pa.prototype;xa=ka(xa,{type:"areaspline",closedStacks:!0,getSegmentPath:pa.getSegmentPath,closeSegment:pa.closeSegment,drawGraph:pa.drawGraph,
drawLegendSymbol:Ma.drawRectangle});N.areaspline=xa;ba.column=D(U,{borderColor:"#FFFFFF",borderRadius:0,groupPadding:0.2,marker:null,pointPadding:0.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{brightness:0.1,shadow:!1,halo:!1},select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}},dataLabels:{align:null,verticalAlign:null,y:null},softThreshold:!1,startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0});xa=ka(R,{type:"column",pointAttrToOptions:{stroke:"borderColor",
fill:"color",r:"borderRadius"},cropShoulder:0,directTouch:!0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){R.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasRendered&&o(b.series,function(b){if(b.type===a.type)b.isDirty=!0})},getColumnMetrics:function(){var a=this,b=a.options,c=a.xAxis,d=a.yAxis,e=c.reversed,f,g={},h,i=0;b.grouping===!1?i=1:o(a.chart.series,function(b){var c=b.options,e=b.yAxis;if(b.type===a.type&&b.visible&&d.len===e.len&&d.pos===e.pos)c.stacking?
(f=b.stackKey,g[f]===x&&(g[f]=i++),h=g[f]):c.grouping!==!1&&(h=i++),b.columnIndex=h});var j=z(O(c.transA)*(c.ordinalSlope||b.pointRange||c.closestPointRange||c.tickInterval||1),c.len),k=j*b.groupPadding,m=(j-2*k)/i,b=z(b.maxPointWidth||c.len,p(b.pointWidth,m*(1-2*b.pointPadding)));return a.columnMetrics={width:b,offset:(m-b)/2+(k+((e?i-(a.columnIndex||0):a.columnIndex)||0)*m-j/2)*(e?-1:1)}},crispCol:function(a,b,c,d){var e=this.chart,f=this.borderWidth,g=-(f%2?0.5:0),f=f%2?0.5:1;e.inverted&&e.renderer.isVML&&
(f+=1);c=Math.round(a+c)+g;a=Math.round(a)+g;c-=a;g=O(b)<=0.5;d=Math.round(b+d)+f;b=Math.round(b)+f;d-=b;g&&(b-=1,d+=1);return{x:a,y:b,width:c,height:d}},translate:function(){var a=this,b=a.chart,c=a.options,d=a.borderWidth=p(c.borderWidth,a.closestPointRange*a.xAxis.transA<2?0:1),e=a.yAxis,f=a.translatedThreshold=e.getThreshold(c.threshold),g=p(c.minPointLength,5),h=a.getColumnMetrics(),i=h.width,j=a.barW=s(i,1+2*d),k=a.pointXOffset=h.offset;b.inverted&&(f-=0.5);c.pointPadding&&(j=ta(j));R.prototype.translate.apply(a);
o(a.points,function(c){var d=z(p(c.yBottom,f),9E4),h=999+O(d),h=z(s(-h,c.plotY),e.len+h),o=c.plotX+k,q=j,t=z(h,d),w,v=s(h,d)-t;O(v)<g&&g&&(v=g,w=!e.reversed&&!c.negative||e.reversed&&c.negative,t=O(t-f)>g?d-g:f-(w?g:0));c.barX=o;c.pointWidth=i;c.tooltipPos=b.inverted?[e.len+e.pos-b.plotLeft-h,a.xAxis.len-o-q/2,v]:[o+q/2,h+e.pos-b.plotTop,v];c.shapeType="rect";c.shapeArgs=a.crispCol(o,t,q,v)})},getSymbol:ua,drawLegendSymbol:Ma.drawRectangle,drawGraph:ua,drawPoints:function(){var a=this,b=this.chart,
c=a.options,d=b.renderer,e=c.animationLimit||250,f,g;o(a.points,function(h){var i=h.plotY,j=h.graphic;if(i!==x&&!isNaN(i)&&h.y!==null)f=h.shapeArgs,i=q(a.borderWidth)?{"stroke-width":a.borderWidth}:{},g=h.pointAttr[h.selected?"select":""]||a.pointAttr[""],j?(cb(j),j.attr(i)[b.pointCount<e?"animate":"attr"](D(f))):h.graphic=d[h.shapeType](f).attr(i).attr(g).add(h.group||a.group).shadow(c.shadow,null,c.stacking&&!c.borderRadius);else if(j)h.graphic=j.destroy()})},animate:function(a){var b=this.yAxis,
c=this.options,d=this.chart.inverted,e={};if(ca)a?(e.scaleY=0.001,a=z(b.pos+b.len,s(b.pos,b.toPixels(c.threshold))),d?e.translateX=a-b.len:e.translateY=a,this.group.attr(e)):(e.scaleY=1,e[d?"translateX":"translateY"]=b.pos,this.group.animate(e,this.options.animation),this.animate=null)},remove:function(){var a=this,b=a.chart;b.hasRendered&&o(b.series,function(b){if(b.type===a.type)b.isDirty=!0});R.prototype.remove.apply(a,arguments)}});N.column=xa;ba.bar=D(ba.column);pa=ka(xa,{type:"bar",inverted:!0});
N.bar=pa;ba.scatter=D(U,{lineWidth:0,marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">\u25cf</span> <span style="font-size: 10px;"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}});pa=ka(R,{type:"scatter",sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,kdDimensions:2,drawGraph:function(){this.options.lineWidth&&R.prototype.drawGraph.call(this)}});N.scatter=
pa;ba.pie=D(U,{borderColor:"#FFFFFF",borderWidth:1,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.y===null?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,states:{hover:{brightness:0.1,shadow:!1}},stickyTracking:!1,tooltip:{followPointer:!0}});U={type:"pie",isCartesian:!1,pointClass:ka(Fa,{init:function(){Fa.prototype.init.apply(this,arguments);var a=this,b;a.name=
p(a.name,"Slice");b=function(b){a.slice(b.type==="select")};I(a,"select",b);I(a,"unselect",b);return a},setVisible:function(a,b){var c=this,d=c.series,e=d.chart,f=d.options.ignoreHiddenPoint,b=p(b,f);if(a!==c.visible){c.visible=c.options.visible=a=a===x?!c.visible:a;d.options.data[La(c,d.data)]=c.options;o(["graphic","dataLabel","connector","shadowGroup"],function(b){if(c[b])c[b][a?"show":"hide"](!0)});c.legendItem&&e.legend.colorizeItem(c,a);!a&&c.state==="hover"&&c.setState("");if(f)d.isDirty=!0;
b&&e.redraw()}},slice:function(a,b,c){var d=this.series;Ra(c,d.chart);p(b,!0);this.sliced=this.options.sliced=a=q(a)?a:!this.sliced;d.options.data[La(this,d.data)]=this.options;a=a?this.slicedTranslation:{translateX:0,translateY:0};this.graphic.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)},haloPath:function(a){var b=this.shapeArgs,c=this.series.chart;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(c.plotLeft+b.x,c.plotTop+b.y,b.r+a,b.r+a,{innerR:this.shapeArgs.r,
start:b.start,end:b.end})}}),requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},animate:function(a){var b=this,c=b.points,d=b.startAngleRad;if(!a)o(c,function(a){var c=a.graphic,g=a.shapeArgs;c&&(c.attr({r:a.startR||b.center[3]/2,start:d,end:d}),c.animate({r:g.r,start:g.start,end:g.end},b.options.animation))}),b.animate=null},updateTotals:function(){var a,b=0,
c=this.points,d=c.length,e,f=this.options.ignoreHiddenPoint;for(a=0;a<d;a++)e=c[a],b+=f&&!e.visible?0:e.y;this.total=b;for(a=0;a<d;a++)e=c[a],e.percentage=b>0&&(e.visible||!f)?e.y/b*100:0,e.total=b},generatePoints:function(){R.prototype.generatePoints.call(this);this.updateTotals()},translate:function(a){this.generatePoints();var b=0,c=this.options,d=c.slicedOffset,e=d+c.borderWidth,f,g,h,i=c.startAngle||0,j=this.startAngleRad=ma/180*(i-90),i=(this.endAngleRad=ma/180*(p(c.endAngle,i+360)-90))-j,k=
this.points,m=c.dataLabels.distance,c=c.ignoreHiddenPoint,n,l=k.length,o;if(!a)this.center=a=this.getCenter();this.getX=function(b,c){h=V.asin(z((b-a[1])/(a[2]/2+m),1));return a[0]+(c?-1:1)*W(h)*(a[2]/2+m)};for(n=0;n<l;n++){o=k[n];f=j+b*i;if(!c||o.visible)b+=o.percentage/100;g=j+b*i;o.shapeType="arc";o.shapeArgs={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/2,start:w(f*1E3)/1E3,end:w(g*1E3)/1E3};h=(g+f)/2;h>1.5*ma?h-=2*ma:h<-ma/2&&(h+=2*ma);o.slicedTranslation={translateX:w(W(h)*d),translateY:w(aa(h)*d)};f=
W(h)*a[2]/2;g=aa(h)*a[2]/2;o.tooltipPos=[a[0]+f*0.7,a[1]+g*0.7];o.half=h<-ma/2||h>ma/2?1:0;o.angle=h;e=z(e,m/2);o.labelPos=[a[0]+f+W(h)*m,a[1]+g+aa(h)*m,a[0]+f+W(h)*e,a[1]+g+aa(h)*e,a[0]+f,a[1]+g,m<0?"center":o.half?"right":"left",h]}},drawGraph:null,drawPoints:function(){var a=this,b=a.chart.renderer,c,d,e=a.options.shadow,f,g,h;if(e&&!a.shadowGroup)a.shadowGroup=b.g("shadow").add(a.group);o(a.points,function(i){if(i.y!==null){d=i.graphic;g=i.shapeArgs;f=i.shadowGroup;if(e&&!f)f=i.shadowGroup=b.g("shadow").add(a.shadowGroup);
c=i.sliced?i.slicedTranslation:{translateX:0,translateY:0};f&&f.attr(c);if(d)d.setRadialReference(a.center).animate(t(g,c));else{h={"stroke-linejoin":"round"};if(!i.visible)h.visibility="hidden";i.graphic=d=b[i.shapeType](g).setRadialReference(a.center).attr(i.pointAttr[i.selected?"select":""]).attr(h).attr(c).add(a.group).shadow(e,f)}}})},searchPoint:ua,sortByAngle:function(a,b){a.sort(function(a,d){return a.angle!==void 0&&(d.angle-a.angle)*b})},drawLegendSymbol:Ma.drawRectangle,getCenter:Xb.getCenter,
getSymbol:ua};U=ka(R,U);N.pie=U;R.prototype.drawDataLabels=function(){var a=this,b=a.options,c=b.cursor,d=b.dataLabels,e=a.points,f,g,h=a.hasRendered||0,i,j,k=a.chart.renderer;if(d.enabled||a._hasPointLabels)a.dlProcessOptions&&a.dlProcessOptions(d),j=a.plotGroup("dataLabelsGroup","data-labels",d.defer?"hidden":"visible",d.zIndex||6),p(d.defer,!0)&&(j.attr({opacity:+h}),h||I(a,"afterAnimate",function(){a.visible&&j.show();j[b.animation?"animate":"attr"]({opacity:1},{duration:200})})),g=d,o(e,function(e){var h,
l=e.dataLabel,o,r,s=e.connector,w=!0,v,y={};f=e.dlOptions||e.options&&e.options.dataLabels;h=p(f&&f.enabled,g.enabled);if(l&&!h)e.dataLabel=l.destroy();else if(h){d=D(g,f);v=d.style;h=d.rotation;o=e.getLabelConfig();i=d.format?Ia(d.format,o):d.formatter.call(o,d);v.color=p(d.color,v.color,a.color,"black");if(l)if(q(i))l.attr({text:i}),w=!1;else{if(e.dataLabel=l=l.destroy(),s)e.connector=s.destroy()}else if(q(i)){l={fill:d.backgroundColor,stroke:d.borderColor,"stroke-width":d.borderWidth,r:d.borderRadius||
0,rotation:h,padding:d.padding,zIndex:1};if(v.color==="contrast")y.color=d.inside||d.distance<0||b.stacking?k.getContrast(e.color||a.color):"#000000";if(c)y.cursor=c;for(r in l)l[r]===x&&delete l[r];l=e.dataLabel=k[h?"text":"label"](i,0,-999,d.shape,null,null,d.useHTML).attr(l).css(t(v,y)).add(j).shadow(d.shadow)}l&&a.alignDataLabel(e,l,d,null,w)}})};R.prototype.alignDataLabel=function(a,b,c,d,e){var f=this.chart,g=f.inverted,h=p(a.plotX,-999),i=p(a.plotY,-999),j=b.getBBox(),k=f.renderer.fontMetrics(c.style.fontSize).b,
m=this.visible&&(a.series.forceDL||f.isInsidePlot(h,w(i),g)||d&&f.isInsidePlot(h,g?d.x+1:d.y+d.height-1,g));if(m)d=t({x:g?f.plotWidth-i:h,y:w(g?f.plotHeight-h:i),width:0,height:0},d),t(c,{width:j.width,height:j.height}),c.rotation?(a=f.renderer.rotCorr(k,c.rotation),b[e?"attr":"animate"]({x:d.x+c.x+d.width/2+a.x,y:d.y+c.y+d.height/2}).attr({align:c.align})):(b.align(c,null,d),g=b.alignAttr,p(c.overflow,"justify")==="justify"?this.justifyDataLabel(b,c,g,j,d,e):p(c.crop,!0)&&(m=f.isInsidePlot(g.x,g.y)&&
f.isInsidePlot(g.x+j.width,g.y+j.height)),c.shape&&b.attr({anchorX:a.plotX,anchorY:a.plotY}));if(!m)cb(b),b.attr({y:-999}),b.placed=!1};R.prototype.justifyDataLabel=function(a,b,c,d,e,f){var g=this.chart,h=b.align,i=b.verticalAlign,j,k,m=a.box?0:a.padding||0;j=c.x+m;if(j<0)h==="right"?b.align="left":b.x=-j,k=!0;j=c.x+d.width-m;if(j>g.plotWidth)h==="left"?b.align="right":b.x=g.plotWidth-j,k=!0;j=c.y+m;if(j<0)i==="bottom"?b.verticalAlign="top":b.y=-j,k=!0;j=c.y+d.height-m;if(j>g.plotHeight)i==="top"?
b.verticalAlign="bottom":b.y=g.plotHeight-j,k=!0;if(k)a.placed=!f,a.align(b,null,e)};if(N.pie)N.pie.prototype.drawDataLabels=function(){var a=this,b=a.data,c,d=a.chart,e=a.options.dataLabels,f=p(e.connectorPadding,10),g=p(e.connectorWidth,1),h=d.plotWidth,i=d.plotHeight,j,k,m=p(e.softConnector,!0),n=e.distance,l=a.center,q=l[2]/2,r=l[1],t=n>0,x,v,y,D=[[],[]],C,B,E,G,H,F=[0,0,0,0],M=function(a,b){return b.y-a.y};if(a.visible&&(e.enabled||a._hasPointLabels)){R.prototype.drawDataLabels.apply(a);o(b,
function(a){a.dataLabel&&a.visible&&D[a.half].push(a)});for(G=2;G--;){var J=[],N=[],I=D[G],L=I.length,K;if(L){a.sortByAngle(I,G-0.5);for(H=b=0;!b&&I[H];)b=I[H]&&I[H].dataLabel&&(I[H].dataLabel.getBBox().height||21),H++;if(n>0){v=z(r+q+n,d.plotHeight);for(H=s(0,r-q-n);H<=v;H+=b)J.push(H);v=J.length;if(L>v){c=[].concat(I);c.sort(M);for(H=L;H--;)c[H].rank=H;for(H=L;H--;)I[H].rank>=v&&I.splice(H,1);L=I.length}for(H=0;H<L;H++){c=I[H];y=c.labelPos;c=9999;var Q,P;for(P=0;P<v;P++)Q=O(J[P]-y[1]),Q<c&&(c=Q,
K=P);if(K<H&&J[H]!==null)K=H;else for(v<L-H+K&&J[H]!==null&&(K=v-L+H);J[K]===null;)K++;N.push({i:K,y:J[K]});J[K]=null}N.sort(M)}for(H=0;H<L;H++){c=I[H];y=c.labelPos;x=c.dataLabel;E=c.visible===!1?"hidden":"inherit";c=y[1];if(n>0){if(v=N.pop(),K=v.i,B=v.y,c>B&&J[K+1]!==null||c<B&&J[K-1]!==null)B=z(s(0,c),d.plotHeight)}else B=c;C=e.justify?l[0]+(G?-1:1)*(q+n):a.getX(B===r-q-n||B===r+q+n?c:B,G);x._attr={visibility:E,align:y[6]};x._pos={x:C+e.x+({left:f,right:-f}[y[6]]||0),y:B+e.y-10};x.connX=C;x.connY=
B;if(this.options.size===null)v=x.width,C-v<f?F[3]=s(w(v-C+f),F[3]):C+v>h-f&&(F[1]=s(w(C+v-h+f),F[1])),B-b/2<0?F[0]=s(w(-B+b/2),F[0]):B+b/2>i&&(F[2]=s(w(B+b/2-i),F[2]))}}}if(Da(F)===0||this.verifyDataLabelOverflow(F))this.placeDataLabels(),t&&g&&o(this.points,function(b){j=b.connector;y=b.labelPos;if((x=b.dataLabel)&&x._pos&&b.visible)E=x._attr.visibility,C=x.connX,B=x.connY,k=m?["M",C+(y[6]==="left"?5:-5),B,"C",C,B,2*y[2]-y[4],2*y[3]-y[5],y[2],y[3],"L",y[4],y[5]]:["M",C+(y[6]==="left"?5:-5),B,"L",
y[2],y[3],"L",y[4],y[5]],j?(j.animate({d:k}),j.attr("visibility",E)):b.connector=j=a.chart.renderer.path(k).attr({"stroke-width":g,stroke:e.connectorColor||b.color||"#606060",visibility:E}).add(a.dataLabelsGroup);else if(j)b.connector=j.destroy()})}},N.pie.prototype.placeDataLabels=function(){o(this.points,function(a){var b=a.dataLabel;if(b&&a.visible)(a=b._pos)?(b.attr(b._attr),b[b.moved?"animate":"attr"](a),b.moved=!0):b&&b.attr({y:-999})})},N.pie.prototype.alignDataLabel=ua,N.pie.prototype.verifyDataLabelOverflow=
function(a){var b=this.center,c=this.options,d=c.center,e=c.minSize||80,f=e,g;d[0]!==null?f=s(b[2]-s(a[1],a[3]),e):(f=s(b[2]-a[1]-a[3],e),b[0]+=(a[3]-a[1])/2);d[1]!==null?f=s(z(f,b[2]-s(a[0],a[2])),e):(f=s(z(f,b[2]-a[0]-a[2]),e),b[1]+=(a[0]-a[2])/2);f<b[2]?(b[2]=f,b[3]=Math.min(/%$/.test(c.innerSize||0)?f*parseFloat(c.innerSize||0)/100:parseFloat(c.innerSize||0),f),this.translate(b),o(this.points,function(a){if(a.dataLabel)a.dataLabel._pos=null}),this.drawDataLabels&&this.drawDataLabels()):g=!0;return g};
if(N.column)N.column.prototype.alignDataLabel=function(a,b,c,d,e){var f=this.chart.inverted,g=a.series,h=a.dlBox||a.shapeArgs,i=p(a.below,a.plotY>p(this.translatedThreshold,g.yAxis.len)),j=p(c.inside,!!this.options.stacking);if(h&&(d=D(h),f&&(d={x:g.yAxis.len-d.y-d.height,y:g.xAxis.len-d.x-d.width,width:d.height,height:d.width}),!j))f?(d.x+=i?0:d.width,d.width=0):(d.y+=i?d.height:0,d.height=0);c.align=p(c.align,!f||j?"center":i?"right":"left");c.verticalAlign=p(c.verticalAlign,f||j?"middle":i?"top":
"bottom");R.prototype.alignDataLabel.call(this,a,b,c,d,e)};(function(a){var b=a.Chart,c=a.each,d=a.pick,e=HighchartsAdapter.addEvent;b.prototype.callbacks.push(function(a){function b(){var e=[];c(a.series,function(a){var b=a.options.dataLabels,f=a.dataLabelCollections||["dataLabel"];(b.enabled||a._hasPointLabels)&&!b.allowOverlap&&a.visible&&c(f,function(b){c(a.points,function(a){if(a[b])a[b].labelrank=d(a.labelrank,a.shapeArgs&&a.shapeArgs.height),e.push(a[b])})})});a.hideOverlappingLabels(e)}b();
e(a,"redraw",b)});b.prototype.hideOverlappingLabels=function(a){var b=a.length,d,e,j,k,m,n,l;for(e=0;e<b;e++)if(d=a[e])d.oldOpacity=d.opacity,d.newOpacity=1;a.sort(function(a,b){return(b.labelrank||0)-(a.labelrank||0)});for(e=0;e<b;e++){j=a[e];for(d=e+1;d<b;++d)if(k=a[d],j&&k&&j.placed&&k.placed&&j.newOpacity!==0&&k.newOpacity!==0&&(m=j.alignAttr,n=k.alignAttr,l=2*(j.box?0:j.padding),m=!(n.x>m.x+(j.width-l)||n.x+(k.width-l)<m.x||n.y>m.y+(j.height-l)||n.y+(k.height-l)<m.y)))(j.labelrank<k.labelrank?
j:k).newOpacity=0}c(a,function(a){var b,c;if(a){c=a.newOpacity;if(a.oldOpacity!==c&&a.placed)c?a.show(!0):b=function(){a.hide()},a.alignAttr.opacity=c,a[a.isOld?"animate":"attr"](a.alignAttr,null,b);a.isOld=!0}})}})(B);U=B.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart,c=b.pointer,d=a.options.cursor,e=d&&{cursor:d},f=function(a){for(var c=a.target,d;c&&!d;)d=c.point,c=c.parentNode;if(d!==x&&d!==b.hoverPoint)d.onMouseOver(a)};o(a.points,function(a){if(a.graphic)a.graphic.element.point=
a;if(a.dataLabel)a.dataLabel.element.point=a});if(!a._hasTracking)o(a.trackerGroups,function(b){if(a[b]&&(a[b].addClass("highcharts-tracker").on("mouseover",f).on("mouseout",function(a){c.onTrackerMouseOut(a)}).css(e),ab))a[b].on("touchstart",f)}),a._hasTracking=!0},drawTrackerGraph:function(){var a=this,b=a.options,c=b.trackByArea,d=[].concat(c?a.areaPath:a.graphPath),e=d.length,f=a.chart,g=f.pointer,h=f.renderer,i=f.options.tooltip.snap,j=a.tracker,k=b.cursor,m=k&&{cursor:k},k=a.singlePoints,n,
l=function(){if(f.hoverSeries!==a)a.onMouseOver()},p="rgba(192,192,192,"+(ca?1.0E-4:0.002)+")";if(e&&!c)for(n=e+1;n--;)d[n]==="M"&&d.splice(n+1,0,d[n+1]-i,d[n+2],"L"),(n&&d[n]==="M"||n===e)&&d.splice(n,0,"L",d[n-2]+i,d[n-1]);for(n=0;n<k.length;n++)e=k[n],d.push("M",e.plotX-i,e.plotY,"L",e.plotX+i,e.plotY);j?j.attr({d:d}):(a.tracker=h.path(d).attr({"stroke-linejoin":"round",visibility:a.visible?"visible":"hidden",stroke:p,fill:c?p:P,"stroke-width":b.lineWidth+(c?0:2*i),zIndex:2}).add(a.group),o([a.tracker,
a.markerGroup],function(a){a.addClass("highcharts-tracker").on("mouseover",l).on("mouseout",function(a){g.onTrackerMouseOut(a)}).css(m);if(ab)a.on("touchstart",l)}))}};if(N.column)xa.prototype.drawTracker=U.drawTrackerPoint;if(N.pie)N.pie.prototype.drawTracker=U.drawTrackerPoint;if(N.scatter)pa.prototype.drawTracker=U.drawTrackerPoint;t(mb.prototype,{setItemEvents:function(a,b,c,d,e){var f=this;(c?b:a.legendGroup).on("mouseover",function(){a.setState("hover");b.css(f.options.itemHoverStyle)}).on("mouseout",
function(){b.css(a.visible?d:e);a.setState()}).on("click",function(b){var c=function(){a.setVisible&&a.setVisible()},b={browserEvent:b};a.firePointEvent?a.firePointEvent("legendItemClick",b,c):J(a,"legendItemClick",b,c)})},createCheckboxForItem:function(a){a.checkbox=$("input",{type:"checkbox",checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container);I(a.checkbox,"click",function(b){J(a.series||a,"checkboxClick",{checked:b.target.checked,item:a},function(){a.select()})})}});
S.legend.itemStyle.cursor="pointer";t(E.prototype,{showResetZoom:function(){var a=this,b=S.lang,c=a.options.chart.resetZoomButton,d=c.theme,e=d.states,f=c.relativeTo==="chart"?null:"plotBox";this.resetZoomButton=a.renderer.button(b.resetZoom,null,null,function(){a.zoomOut()},d,e&&e.hover).attr({align:c.position.align,title:b.resetZoomTitle}).add().align(c.position,!1,f)},zoomOut:function(){var a=this;J(a,"selection",{resetSelection:!0},function(){a.zoom()})},zoom:function(a){var b,c=this.pointer,
d=!1,e;!a||a.resetSelection?o(this.axes,function(a){b=a.zoom()}):o(a.xAxis.concat(a.yAxis),function(a){var e=a.axis,h=e.isXAxis;if(c[h?"zoomX":"zoomY"]||c[h?"pinchX":"pinchY"])b=e.zoom(a.min,a.max),e.displayBtn&&(d=!0)});e=this.resetZoomButton;if(d&&!e)this.showResetZoom();else if(!d&&da(e))this.resetZoomButton=e.destroy();b&&this.redraw(p(this.options.chart.animation,a&&a.animation,this.pointCount<100))},pan:function(a,b){var c=this,d=c.hoverPoints,e;d&&o(d,function(a){a.setState()});o(b==="xy"?
[1,0]:[1],function(b){var d=a[b?"chartX":"chartY"],h=c[b?"xAxis":"yAxis"][0],i=c[b?"mouseDownX":"mouseDownY"],j=(h.pointRange||0)/2,k=h.getExtremes(),m=h.toValue(i-d,!0)+j,j=h.toValue(i+c[b?"plotWidth":"plotHeight"]-d,!0)-j,i=i>d;if(h.series.length&&(i||m>z(k.dataMin,k.min))&&(!i||j<s(k.dataMax,k.max)))h.setExtremes(m,j,!1,!1,{trigger:"pan"}),e=!0;c[b?"mouseDownX":"mouseDownY"]=d});e&&c.redraw(!1);M(c.container,{cursor:"move"})}});t(Fa.prototype,{select:function(a,b){var c=this,d=c.series,e=d.chart,
a=p(a,!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b},function(){c.selected=c.options.selected=a;d.options.data[La(c,d.data)]=c.options;c.setState(a&&"select");b||o(e.getSelectedPoints(),function(a){if(a.selected&&a!==c)a.selected=a.options.selected=!1,d.options.data[La(a,d.data)]=a.options,a.setState(""),a.firePointEvent("unselect")})})},onMouseOver:function(a,b){var c=this.series,d=c.chart,e=d.tooltip,f=d.hoverPoint;if(d.hoverSeries!==c)c.onMouseOver();if(f&&f!==this)f.onMouseOut();
if(this.series&&(this.firePointEvent("mouseOver"),e&&(!e.shared||c.noSharedTooltip)&&e.refresh(this,a),this.setState("hover"),!b))d.hoverPoint=this},onMouseOut:function(){var a=this.series.chart,b=a.hoverPoints;this.firePointEvent("mouseOut");if(!b||La(this,b)===-1)this.setState(),a.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var a=D(this.series.options.point,this.options).events,b;this.events=a;for(b in a)I(this,b,a[b]);this.hasImportedEvents=!0}},setState:function(a,b){var c=
T(this.plotX),d=this.plotY,e=this.series,f=e.options.states,g=ba[e.type].marker&&e.options.marker,h=g&&!g.enabled,i=g&&g.states[a],j=i&&i.enabled===!1,k=e.stateMarkerGraphic,m=this.marker||{},n=e.chart,l=e.halo,o,a=a||"";o=this.pointAttr[a]||e.pointAttr[a];if(!(a===this.state&&!b||this.selected&&a!=="select"||f[a]&&f[a].enabled===!1||a&&(j||h&&i.enabled===!1)||a&&m.states&&m.states[a]&&m.states[a].enabled===!1)){if(this.graphic)g=g&&this.graphic.symbolName&&o.r,this.graphic.attr(D(o,g?{x:c-g,y:d-
g,width:2*g,height:2*g}:{})),k&&k.hide();else{if(a&&i)if(g=i.radius,m=m.symbol||e.symbol,k&&k.currentSymbol!==m&&(k=k.destroy()),k)k[b?"animate":"attr"]({x:c-g,y:d-g});else if(m)e.stateMarkerGraphic=k=n.renderer.symbol(m,c-g,d-g,2*g,2*g).attr(o).add(e.markerGroup),k.currentSymbol=m;if(k)k[a&&n.isInsidePlot(c,d,n.inverted)?"show":"hide"](),k.element.point=this}if((c=f[a]&&f[a].halo)&&c.size){if(!l)e.halo=l=n.renderer.path().add(n.seriesGroup);l.attr(t({fill:na(this.color||e.color).setOpacity(c.opacity).get()},
c.attributes))[b?"animate":"attr"]({d:this.haloPath(c.size)})}else l&&l.attr({d:[]});this.state=a}},haloPath:function(a){var b=this.series,c=b.chart,d=b.getPlotBox(),e=c.inverted;return c.renderer.symbols.circle(d.translateX+(e?b.yAxis.len-this.plotY:this.plotX)-a,d.translateY+(e?b.xAxis.len-this.plotX:this.plotY)-a,a*2,a*2)}});t(R.prototype,{onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&&J(this,"mouseOver");this.setState("hover");
a.hoverSeries=this},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;b.hoverSeries=null;if(d)d.onMouseOut();this&&a.events.mouseOut&&J(this,"mouseOut");c&&!a.stickyTracking&&(!c.shared||this.noSharedTooltip)&&c.hide();this.setState()},setState:function(a){var b=this.options,c=this.graph,d=b.states,e=b.lineWidth,b=0,a=a||"";if(this.state!==a&&(this.state=a,!(d[a]&&d[a].enabled===!1)&&(a&&(e=d[a].lineWidth||e+(d[a].lineWidthPlus||0)),c&&!c.dashstyle))){a={"stroke-width":e};
for(c.attr(a);this["zoneGraph"+b];)this["zoneGraph"+b].attr(a),b+=1}},setVisible:function(a,b){var c=this,d=c.chart,e=c.legendItem,f,g=d.options.chart.ignoreHiddenSeries,h=c.visible;f=(c.visible=a=c.userOptions.visible=a===x?!h:a)?"show":"hide";o(["group","dataLabelsGroup","markerGroup","tracker"],function(a){if(c[a])c[a][f]()});if(d.hoverSeries===c||(d.hoverPoint&&d.hoverPoint.series)===c)c.onMouseOut();e&&d.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&o(d.series,function(a){if(a.options.stacking&&
a.visible)a.isDirty=!0});o(c.linkedSeries,function(b){b.setVisible(a,!1)});if(g)d.isDirtyBox=!0;b!==!1&&d.redraw();J(c,f)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=a===x?!this.selected:a;if(this.checkbox)this.checkbox.checked=a;J(this,a?"select":"unselect")},drawTracker:U.drawTrackerGraph});t(B,{Color:na,Point:Fa,Tick:Sa,Renderer:$a,SVGElement:Q,SVGRenderer:Aa,arrayMin:Oa,arrayMax:Da,charts:X,dateFormat:Na,error:la,format:Ia,pathAnim:yb,
getOptions:function(){return S},hasBidiBug:Nb,isTouchDevice:Jb,setOptions:function(a){S=D(!0,S,a);Cb();return S},addEvent:I,removeEvent:Y,createElement:$,discardElement:Qa,css:M,each:o,map:Ua,merge:D,splat:ra,extendClass:ka,pInt:G,svg:ca,canvas:fa,vml:!ca&&!fa,product:"Highcharts",version:"4.1.9"})})();

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +0,0 @@
(function(g,p){function x(a,b,c,d,i){i=i||0;d=d||y;m(a.slice(i,i+d),b);i+d<a.length?setTimeout(function(){x(a,b,c,d,i+d)}):c&&c()}var O=function(){},P=g.Color,l=g.Series,e=g.seriesTypes,m=g.each,s=g.extend,Q=p.addEvent,R=p.fireEvent,S=g.merge,T=g.pick,k=g.wrap,q=g.getOptions().plotOptions,y=5E4;m(["area","arearange","column","line","scatter"],function(a){if(q[a])q[a].boostThreshold=5E3});m(["translate","generatePoints","drawTracker","drawPoints","render"],function(a){function b(b){var d=this.options.stacking&&
(a==="translate"||a==="generatePoints");if((this.processedXData||this.options.data).length<(this.options.boostThreshold||Number.MAX_VALUE)||d){if(a==="render"&&this.image)this.image.attr({href:""}),this.animate=null;b.call(this)}else if(this[a+"Canvas"])this[a+"Canvas"]()}k(l.prototype,a,b);a==="translate"&&(e.column&&k(e.column.prototype,a,b),e.arearange&&k(e.arearange.prototype,a,b))});k(l.prototype,"getExtremes",function(a){this.hasExtremes()||a.apply(this,Array.prototype.slice.call(arguments,
1))});k(l.prototype,"setData",function(a){this.hasExtremes(!0)||a.apply(this,Array.prototype.slice.call(arguments,1))});k(l.prototype,"processData",function(a){this.hasExtremes(!0)||a.apply(this,Array.prototype.slice.call(arguments,1))});g.extend(l.prototype,{pointRange:0,hasExtremes:function(a){var b=this.options,c=this.xAxis&&this.xAxis.options,d=this.yAxis&&this.yAxis.options;return b.data.length>(b.boostThreshold||Number.MAX_VALUE)&&typeof d.min==="number"&&typeof d.max==="number"&&(!a||typeof c.min===
"number"&&typeof c.max==="number")},destroyGraphics:function(){var a=this,b=this.points,c,d;for(d=0;d<b.length;d+=1)if((c=b[d])&&c.graphic)c.graphic=c.graphic.destroy();m(["graph","area"],function(b){a[b]&&(a[b]=a[b].destroy())})},getContext:function(){var a=this.chart.plotWidth,b=this.chart.plotHeight;this.canvas?this.ctx.clearRect(0,0,a,b):(this.canvas=document.createElement("canvas"),this.image=this.chart.renderer.image("",0,0,a,b).add(this.group),this.ctx=this.canvas.getContext("2d"));this.canvas.setAttribute("width",
a);this.canvas.setAttribute("height",b);this.image.attr({width:a,height:b});return this.ctx},canvasToSVG:function(){this.image.attr({href:this.canvas.toDataURL("image/png")})},cvsLineTo:function(a,b,c){a.lineTo(b,c)},renderCanvas:function(){var a=this,b=a.options,c=a.chart,d=this.xAxis,i=this.yAxis,h,g,e=0,k=a.processedXData,l=a.processedYData,m=b.data,j=d.getExtremes(),p=j.min,q=j.max,j=i.getExtremes(),U=j.min,V=j.max,z={},t,W=!!a.sampling,A,B=b.marker&&b.marker.radius,C=this.cvsDrawPoint,D=b.lineWidth?
this.cvsLineTo:!1,E=B<=1?this.cvsMarkerSquare:this.cvsMarkerCircle,X=b.enableMouseTracking!==!1,F,j=b.threshold,n=i.getThreshold(j),G=typeof j==="number",H=n,Y=this.fill,I=a.pointArrayMap&&a.pointArrayMap.join(",")==="low,high",J=!!b.stacking,Z=a.cropStart||0,j=c.options.loading,$=a.requireSorting,K,aa=b.connectNulls,L=!k,u,v,o,r,ba=a.fillOpacity?(new P(a.color)).setOpacity(T(b.fillOpacity,0.75)).get():a.color,M=function(){Y?(h.fillStyle=ba,h.fill()):(h.strokeStyle=a.color,h.lineWidth=b.lineWidth,
h.stroke())},N=function(a,b,c){e===0&&h.beginPath();K?h.moveTo(a,b):C?C(h,a,b,c,F):D?D(h,a,b):E&&E(h,a,b,B);e+=1;e===1E3&&(M(),e=0);F={clientX:a,plotY:b,yBottom:c}},w=function(a,b,c){X&&!z[a+","+b]&&(A.push({clientX:a,plotX:a,plotY:b,i:Z+c}),z[a+","+b]=!0)};this.points&&this.destroyGraphics();a.plotGroup("group","series",a.visible?"visible":"hidden",b.zIndex,c.seriesGroup);a.getAttribs();a.markerGroup=a.group;Q(a,"destroy",function(){a.markerGroup=null});A=this.points=[];h=this.getContext();a.buildKDTree=
O;if(m.length>99999)c.options.loading=S(j,{labelStyle:{backgroundColor:"rgba(255,255,255,0.75)",padding:"1em",borderRadius:"0.5em"},style:{backgroundColor:"none",opacity:1}}),c.showLoading("Drawing..."),c.options.loading=j,c.loadingShown===!0?c.loadingShown=1:c.loadingShown+=1;g=0;x(J?a.data:k||m,function(b){var c,f,e,h=!0;L?(c=b[0],f=b[1]):(c=b,f=l[g]);if(I)L&&(f=b.slice(1,3)),e=f[0],f=f[1];else if(J)c=b.x,f=b.stackY,e=f-b.y;b=f===null;$||(h=f>=U&&f<=V);if(!b&&c>=p&&c<=q&&h)if(c=Math.round(d.toPixels(c,
!0)),W){if(o===void 0||c===t){I||(e=f);if(r===void 0||f>v)v=f,r=g;if(o===void 0||e<u)u=e,o=g}c!==t&&(o!==void 0&&(f=i.toPixels(v,!0),n=i.toPixels(u,!0),N(c,G?Math.min(f,H):f,G?Math.max(n,H):n),w(c,f,r),n!==f&&w(c,n,o)),o=r=void 0,t=c)}else f=Math.round(i.toPixels(f,!0)),N(c,f,n),w(c,f,g);K=b&&!aa;g+=1;g%y===0&&a.canvasToSVG()},function(){var b=c.loadingDiv,d=+c.loadingShown;M();a.canvasToSVG();R(a,"renderedCanvas");if(d===1)s(b.style,{transition:"opacity 250ms",opacity:0}),c.loadingShown=!1,setTimeout(function(){b.parentNode&&
b.parentNode.removeChild(b);c.loadingDiv=c.loadingSpan=null},250);if(d)c.loadingShown=d-1;a.directTouch=!1;a.options.stickyTracking=!0;delete a.buildKDTree;a.buildKDTree()},c.renderer.forExport?Number.MAX_VALUE:void 0)}});e.scatter.prototype.cvsMarkerCircle=function(a,b,c,d){a.moveTo(b,c);a.arc(b,c,d,0,2*Math.PI,!1)};e.scatter.prototype.cvsMarkerSquare=function(a,b,c,d){a.moveTo(b,c);a.rect(b-d,c-d,d*2,d*2)};e.scatter.prototype.fill=!0;s(e.area.prototype,{cvsDrawPoint:function(a,b,c,d,e){e&&b!==e.clientX&&
(a.moveTo(e.clientX,e.yBottom),a.lineTo(e.clientX,e.plotY),a.lineTo(b,c),a.lineTo(b,d))},fill:!0,fillOpacity:!0,sampling:!0});s(e.column.prototype,{cvsDrawPoint:function(a,b,c,d){a.rect(b-1,c,1,d-c)},fill:!0,sampling:!0});k(l.prototype,"searchPoint",function(a){var b=a.apply(this,[].slice.call(arguments,1)),c=b;if(b&&!(b instanceof this.pointClass))c=(new this.pointClass).init(this,this.options.data[b.i]),c.dist=b.dist,c.category=c.x,c.plotX=b.plotX,c.plotY=b.plotY;return c})})(Highcharts,HighchartsAdapter);

View File

@ -1,554 +0,0 @@
/**
* This is an experimental Highcharts module that draws long data series on a canvas
* in order to increase performance of the initial load time and tooltip responsiveness.
*
* Compatible with HTML5 canvas compatible browsers (not IE < 9).
*
* Author: Torstein Honsi
*
*
* Development plan
* - Column range.
* - Heatmap.
* - Treemap.
* - Check how it works with Highstock and data grouping.
* - Check inverted charts.
* - Check reversed axes.
* - Chart callback should be async after last series is drawn. (But not necessarily, we don't do
that with initial series animation).
* - Cache full-size image so we don't have to redraw on hide/show and zoom up. But k-d-tree still
* needs to be built.
* - Test IE9 and IE10.
* - Stacking is not perhaps not correct since it doesn't use the translation given in
* the translate method. If this gets to complicated, a possible way out would be to
* have a simplified renderCanvas method that simply draws the areaPath on a canvas.
*
* If this module is taken in as part of the core
* - All the loading logic should be merged with core. Update styles in the core.
* - Most of the method wraps should probably be added directly in parent methods.
*
* Notes for boost mode
* - Area lines are not drawn
* - Point markers are not drawn
* - Zones and negativeColor don't work
* - Columns are always one pixel wide. Don't set the threshold too low.
*
* Optimizing tips for users
* - For scatter plots, use a marker.radius of 1 or less. It results in a rectangle being drawn, which is
* considerably faster than a circle.
* - Set extremes (min, max) explicitly on the axes in order for Highcharts to avoid computing extremes.
* - Set enableMouseTracking to false on the series to improve total rendering time.
* - The default threshold is set based on one series. If you have multiple, dense series, the combined
* number of points drawn gets higher, and you may want to set the threshold lower in order to
* use optimizations.
*/
/*global document, Highcharts, HighchartsAdapter, setTimeout */
(function (H, HA) {
'use strict';
var noop = function () { return undefined; },
Color = H.Color,
Series = H.Series,
seriesTypes = H.seriesTypes,
each = H.each,
extend = H.extend,
addEvent = HA.addEvent,
fireEvent = HA.fireEvent,
merge = H.merge,
pick = H.pick,
wrap = H.wrap,
plotOptions = H.getOptions().plotOptions,
CHUNK_SIZE = 50000;
function eachAsync(arr, fn, callback, chunkSize, i) {
i = i || 0;
chunkSize = chunkSize || CHUNK_SIZE;
each(arr.slice(i, i + chunkSize), fn);
if (i + chunkSize < arr.length) {
setTimeout(function () {
eachAsync(arr, fn, callback, chunkSize, i + chunkSize);
});
} else if (callback) {
callback();
}
}
// Set default options
each(['area', 'arearange', 'column', 'line', 'scatter'], function (type) {
if (plotOptions[type]) {
plotOptions[type].boostThreshold = 5000;
}
});
/**
* Override a bunch of methods the same way. If the number of points is below the threshold,
* run the original method. If not, check for a canvas version or do nothing.
*/
each(['translate', 'generatePoints', 'drawTracker', 'drawPoints', 'render'], function (method) {
function branch(proceed) {
var letItPass = this.options.stacking && (method === 'translate' || method === 'generatePoints');
if ((this.processedXData || this.options.data).length < (this.options.boostThreshold || Number.MAX_VALUE) ||
letItPass) {
// Clear image
if (method === 'render' && this.image) {
this.image.attr({ href: '' });
this.animate = null; // We're zooming in, don't run animation
}
proceed.call(this);
// If a canvas version of the method exists, like renderCanvas(), run
} else if (this[method + 'Canvas']) {
this[method + 'Canvas']();
}
}
wrap(Series.prototype, method, branch);
// A special case for some types - its translate method is already wrapped
if (method === 'translate') {
if (seriesTypes.column) {
wrap(seriesTypes.column.prototype, method, branch);
}
if (seriesTypes.arearange) {
wrap(seriesTypes.arearange.prototype, method, branch);
}
}
});
/**
* Do not compute extremes when min and max are set.
* If we use this in the core, we can add the hook to hasExtremes to the methods directly.
*/
wrap(Series.prototype, 'getExtremes', function (proceed) {
if (!this.hasExtremes()) {
proceed.apply(this, Array.prototype.slice.call(arguments, 1));
}
});
wrap(Series.prototype, 'setData', function (proceed) {
if (!this.hasExtremes(true)) {
proceed.apply(this, Array.prototype.slice.call(arguments, 1));
}
});
wrap(Series.prototype, 'processData', function (proceed) {
if (!this.hasExtremes(true)) {
proceed.apply(this, Array.prototype.slice.call(arguments, 1));
}
});
H.extend(Series.prototype, {
pointRange: 0,
hasExtremes: function (checkX) {
var options = this.options,
data = options.data,
xAxis = this.xAxis && this.xAxis.options,
yAxis = this.yAxis && this.yAxis.options;
return data.length > (options.boostThreshold || Number.MAX_VALUE) && typeof yAxis.min === 'number' && typeof yAxis.max === 'number' &&
(!checkX || (typeof xAxis.min === 'number' && typeof xAxis.max === 'number'));
},
/**
* If implemented in the core, parts of this can probably be shared with other similar
* methods in Highcharts.
*/
destroyGraphics: function () {
var series = this,
points = this.points,
point,
i;
for (i = 0; i < points.length; i = i + 1) {
point = points[i];
if (point && point.graphic) {
point.graphic = point.graphic.destroy();
}
}
each(['graph', 'area'], function (prop) {
if (series[prop]) {
series[prop] = series[prop].destroy();
}
});
},
/**
* Create a hidden canvas to draw the graph on. The contents is later copied over
* to an SVG image element.
*/
getContext: function () {
var width = this.chart.plotWidth,
height = this.chart.plotHeight;
if (!this.canvas) {
this.canvas = document.createElement('canvas');
this.image = this.chart.renderer.image('', 0, 0, width, height).add(this.group);
this.ctx = this.canvas.getContext('2d');
} else {
this.ctx.clearRect(0, 0, width, height);
}
this.canvas.setAttribute('width', width);
this.canvas.setAttribute('height', height);
this.image.attr({
width: width,
height: height
});
return this.ctx;
},
/**
* Draw the canvas image inside an SVG image
*/
canvasToSVG: function () {
this.image.attr({ href: this.canvas.toDataURL('image/png') });
},
cvsLineTo: function (ctx, clientX, plotY) {
ctx.lineTo(clientX, plotY);
},
renderCanvas: function () {
var series = this,
options = series.options,
chart = series.chart,
xAxis = this.xAxis,
yAxis = this.yAxis,
ctx,
i,
c = 0,
xData = series.processedXData,
yData = series.processedYData,
rawData = options.data,
xExtremes = xAxis.getExtremes(),
xMin = xExtremes.min,
xMax = xExtremes.max,
yExtremes = yAxis.getExtremes(),
yMin = yExtremes.min,
yMax = yExtremes.max,
pointTaken = {},
lastClientX,
sampling = !!series.sampling,
points,
r = options.marker && options.marker.radius,
cvsDrawPoint = this.cvsDrawPoint,
cvsLineTo = options.lineWidth ? this.cvsLineTo : false,
cvsMarker = r <= 1 ? this.cvsMarkerSquare : this.cvsMarkerCircle,
enableMouseTracking = options.enableMouseTracking !== false,
lastPoint,
threshold = options.threshold,
yBottom = yAxis.getThreshold(threshold),
hasThreshold = typeof threshold === 'number',
translatedThreshold = yBottom,
doFill = this.fill,
isRange = series.pointArrayMap && series.pointArrayMap.join(',') === 'low,high',
isStacked = !!options.stacking,
cropStart = series.cropStart || 0,
loadingOptions = chart.options.loading,
requireSorting = series.requireSorting,
wasNull,
connectNulls = options.connectNulls,
useRaw = !xData,
minVal,
maxVal,
minI,
maxI,
fillColor = series.fillOpacity ?
new Color(series.color).setOpacity(pick(options.fillOpacity, 0.75)).get() :
series.color,
stroke = function () {
if (doFill) {
ctx.fillStyle = fillColor;
ctx.fill();
} else {
ctx.strokeStyle = series.color;
ctx.lineWidth = options.lineWidth;
ctx.stroke();
}
},
drawPoint = function (clientX, plotY, yBottom) {
if (c === 0) {
ctx.beginPath();
}
if (wasNull) {
ctx.moveTo(clientX, plotY);
} else {
if (cvsDrawPoint) {
cvsDrawPoint(ctx, clientX, plotY, yBottom, lastPoint);
} else if (cvsLineTo) {
cvsLineTo(ctx, clientX, plotY);
} else if (cvsMarker) {
cvsMarker(ctx, clientX, plotY, r);
}
}
// We need to stroke the line for every 1000 pixels. It will crash the browser
// memory use if we stroke too infrequently.
c = c + 1;
if (c === 1000) {
stroke();
c = 0;
}
// Area charts need to keep track of the last point
lastPoint = {
clientX: clientX,
plotY: plotY,
yBottom: yBottom
};
},
addKDPoint = function (clientX, plotY, i) {
// The k-d tree requires series points. Reduce the amount of points, since the time to build the
// tree increases exponentially.
if (enableMouseTracking && !pointTaken[clientX + ',' + plotY]) {
points.push({
clientX: clientX,
plotX: clientX,
plotY: plotY,
i: cropStart + i
});
pointTaken[clientX + ',' + plotY] = true;
}
};
// If we are zooming out from SVG mode, destroy the graphics
if (this.points) {
this.destroyGraphics();
}
// The group
series.plotGroup(
'group',
'series',
series.visible ? 'visible' : 'hidden',
options.zIndex,
chart.seriesGroup
);
series.getAttribs();
series.markerGroup = series.group;
addEvent(series, 'destroy', function () {
series.markerGroup = null;
});
points = this.points = [];
ctx = this.getContext();
series.buildKDTree = noop; // Do not start building while drawing
// Display a loading indicator
if (rawData.length > 99999) {
chart.options.loading = merge(loadingOptions, {
labelStyle: {
backgroundColor: 'rgba(255,255,255,0.75)',
padding: '1em',
borderRadius: '0.5em'
},
style: {
backgroundColor: 'none',
opacity: 1
}
});
chart.showLoading('Drawing...');
chart.options.loading = loadingOptions; // reset
if (chart.loadingShown === true) {
chart.loadingShown = 1;
} else {
chart.loadingShown = chart.loadingShown + 1;
}
}
// Loop over the points
i = 0;
eachAsync(isStacked ? series.data : (xData || rawData), function (d) {
var x,
y,
clientX,
plotY,
isNull,
low,
isYInside = true;
if (useRaw) {
x = d[0];
y = d[1];
} else {
x = d;
y = yData[i];
}
// Resolve low and high for range series
if (isRange) {
if (useRaw) {
y = d.slice(1, 3);
}
low = y[0];
y = y[1];
} else if (isStacked) {
x = d.x;
y = d.stackY;
low = y - d.y;
}
isNull = y === null;
// Optimize for scatter zooming
if (!requireSorting) {
isYInside = y >= yMin && y <= yMax;
}
if (!isNull && x >= xMin && x <= xMax && isYInside) {
clientX = Math.round(xAxis.toPixels(x, true));
if (sampling) {
if (minI === undefined || clientX === lastClientX) {
if (!isRange) {
low = y;
}
if (maxI === undefined || y > maxVal) {
maxVal = y;
maxI = i;
}
if (minI === undefined || low < minVal) {
minVal = low;
minI = i;
}
}
if (clientX !== lastClientX) { // Add points and reset
if (minI !== undefined) { // then maxI is also a number
plotY = yAxis.toPixels(maxVal, true);
yBottom = yAxis.toPixels(minVal, true);
drawPoint(
clientX,
hasThreshold ? Math.min(plotY, translatedThreshold) : plotY,
hasThreshold ? Math.max(yBottom, translatedThreshold) : yBottom
);
addKDPoint(clientX, plotY, maxI);
if (yBottom !== plotY) {
addKDPoint(clientX, yBottom, minI);
}
}
minI = maxI = undefined;
lastClientX = clientX;
}
} else {
plotY = Math.round(yAxis.toPixels(y, true));
drawPoint(clientX, plotY, yBottom);
addKDPoint(clientX, plotY, i);
}
}
wasNull = isNull && !connectNulls;
i = i + 1;
if (i % CHUNK_SIZE === 0) {
series.canvasToSVG();
}
}, function () {
var loadingDiv = chart.loadingDiv,
loadingShown = +chart.loadingShown;
stroke();
series.canvasToSVG();
fireEvent(series, 'renderedCanvas');
// Do not use chart.hideLoading, as it runs JS animation and will be blocked by buildKDTree.
// CSS animation looks good, but then it must be deleted in timeout. If we add the module to core,
// change hideLoading so we can skip this block.
if (loadingShown === 1) {
extend(loadingDiv.style, {
transition: 'opacity 250ms',
opacity: 0
});
chart.loadingShown = false;
setTimeout(function () {
if (loadingDiv.parentNode) { // In exporting it is falsy
loadingDiv.parentNode.removeChild(loadingDiv);
}
chart.loadingDiv = chart.loadingSpan = null;
}, 250);
}
if (loadingShown) {
chart.loadingShown = loadingShown - 1;
}
// Pass tests in Pointer.
// TODO: Replace this with a single property, and replace when zooming in
// below boostThreshold.
series.directTouch = false;
series.options.stickyTracking = true;
delete series.buildKDTree; // Go back to prototype, ready to build
series.buildKDTree();
// Don't do async on export, the exportChart, getSVGForExport and getSVG methods are not chained for it.
}, chart.renderer.forExport ? Number.MAX_VALUE : undefined);
}
});
seriesTypes.scatter.prototype.cvsMarkerCircle = function (ctx, clientX, plotY, r) {
ctx.moveTo(clientX, plotY);
ctx.arc(clientX, plotY, r, 0, 2 * Math.PI, false);
};
// Rect is twice as fast as arc, should be used for small markers
seriesTypes.scatter.prototype.cvsMarkerSquare = function (ctx, clientX, plotY, r) {
ctx.moveTo(clientX, plotY);
ctx.rect(clientX - r, plotY - r, r * 2, r * 2);
};
seriesTypes.scatter.prototype.fill = true;
extend(seriesTypes.area.prototype, {
cvsDrawPoint: function (ctx, clientX, plotY, yBottom, lastPoint) {
if (lastPoint && clientX !== lastPoint.clientX) {
ctx.moveTo(lastPoint.clientX, lastPoint.yBottom);
ctx.lineTo(lastPoint.clientX, lastPoint.plotY);
ctx.lineTo(clientX, plotY);
ctx.lineTo(clientX, yBottom);
}
},
fill: true,
fillOpacity: true,
sampling: true
});
extend(seriesTypes.column.prototype, {
cvsDrawPoint: function (ctx, clientX, plotY, yBottom) {
ctx.rect(clientX - 1, plotY, 1, yBottom - plotY);
},
fill: true,
sampling: true
});
/**
* Return a point instance from the k-d-tree
*/
wrap(Series.prototype, 'searchPoint', function (proceed) {
var point = proceed.apply(this, [].slice.call(arguments, 1)),
ret = point;
if (point && !(point instanceof this.pointClass)) {
ret = (new this.pointClass()).init(this, this.options.data[point.i]);
ret.dist = point.dist;
ret.category = ret.x;
ret.plotX = point.plotX;
ret.plotY = point.plotY;
}
return ret;
});
}(Highcharts, HighchartsAdapter));

View File

@ -1,6 +0,0 @@
(function(i){function p(){return Array.prototype.slice.call(arguments,1)}var n=i.pick,m=i.wrap,q=i.extend,o=HighchartsAdapter.fireEvent,k=i.Axis,r=i.Series;q(k.prototype,{isInBreak:function(h,f){var c=h.repeat||Infinity,b=h.from,a=h.to-h.from,c=f>=b?(f-b)%c:c-(b-f)%c;return h.inclusive?c<=a:c<a&&c!==0},isInAnyBreak:function(h,f){var c=this.options.breaks,b=c&&c.length,a,d,e;if(b){for(;b--;)this.isInBreak(c[b],h)&&(a=!0,d||(d=n(c[b].showPoints,this.isXAxis?!1:!0)));e=a&&f?a&&!d:a}return e}});m(k.prototype,
"setTickPositions",function(h){h.apply(this,Array.prototype.slice.call(arguments,1));if(this.options.breaks){var f=this.tickPositions,c=this.tickPositions.info,b=[],a;for(a=0;a<f.length;a++)this.isInAnyBreak(f[a])||b.push(f[a]);this.tickPositions=b;this.tickPositions.info=c}});m(k.prototype,"init",function(h,f,c){if(c.breaks&&c.breaks.length)c.ordinal=!1;h.call(this,f,c);if(this.options.breaks){var b=this;b.doPostTranslate=!0;this.val2lin=function(a){var d=a,e,c;for(c=0;c<b.breakArray.length;c++)if(e=
b.breakArray[c],e.to<=a)d-=e.len;else if(e.from>=a)break;else if(b.isInBreak(e,a)){d-=a-e.from;break}return d};this.lin2val=function(a){var d,e;for(e=0;e<b.breakArray.length;e++)if(d=b.breakArray[e],d.from>=a)break;else d.to<a?a+=d.len:b.isInBreak(d,a)&&(a+=d.len);return a};this.setExtremes=function(a,b,e,c,f){for(;this.isInAnyBreak(a);)a-=this.closestPointRange;for(;this.isInAnyBreak(b);)b-=this.closestPointRange;k.prototype.setExtremes.call(this,a,b,e,c,f)};this.setAxisTranslation=function(a){k.prototype.setAxisTranslation.call(this,
a);var d=b.options.breaks,a=[],e=[],c=0,f,g,h=b.userMin||b.min,l=b.userMax||b.max,j,i;for(i in d)g=d[i],f=g.repeat||Infinity,b.isInBreak(g,h)&&(h+=g.to%f-h%f),b.isInBreak(g,l)&&(l-=l%f-g.from%f);for(i in d){g=d[i];j=g.from;for(f=g.repeat||Infinity;j-f>h;)j-=f;for(;j<h;)j+=f;for(;j<l;j+=f)a.push({value:j,move:"in"}),a.push({value:j+(g.to-g.from),move:"out",size:g.breakSize})}a.sort(function(a,b){return a.value===b.value?(a.move==="in"?0:1)-(b.move==="in"?0:1):a.value-b.value});d=0;j=h;for(i in a){g=
a[i];d+=g.move==="in"?1:-1;if(d===1&&g.move==="in")j=g.value;d===0&&(e.push({from:j,to:g.value,len:g.value-j-(g.size||0)}),c+=g.value-j-(g.size||0))}b.breakArray=e;o(b,"afterBreaks");b.transA*=(l-b.min)/(l-h-c);b.min=h;b.max=l}}});m(r.prototype,"generatePoints",function(h){h.apply(this,p(arguments));var f=this.xAxis,c=this.yAxis,b=this.points,a,d=b.length,e=this.options.connectNulls,i;if(f&&c&&(f.options.breaks||c.options.breaks))for(;d--;)if(a=b[d],i=a.y===null&&e===!1,!i&&(f.isInAnyBreak(a.x,!0)||
c.isInAnyBreak(a.y,!0)))b.splice(d,1),this.data[d]&&this.data[d].destroyElements()});m(i.seriesTypes.column.prototype,"drawPoints",function(h){h.apply(this);var h=this.points,f=this.yAxis,c=f.breakArray||[],b=n(this.options.threshold,f.min),a,d,e,i,k,g;for(i=0;i<h.length;i++){d=h[i];g=d.stackY||d.y;for(k=0;k<c.length;k++){e=c[k];a=!1;if(b<e.from&&g>e.to||b>e.from&&g<e.from)a="pointBreak";else if(b<e.from&&g>e.from&&g<e.to||b>e.from&&g>e.to&&g<e.from)a="pointInBreak";a&&o(f,a,{point:d,brk:e})}}})})(Highcharts);

View File

@ -1,314 +0,0 @@
/**
* Highcharts JS v4.1.9 (2015-10-07)
* Highcharts Broken Axis module
*
* Author: Stephane Vanraes, Torstein Honsi
* License: www.highcharts.com/license
*/
/*global HighchartsAdapter*/
(function (H) {
"use strict";
var pick = H.pick,
wrap = H.wrap,
extend = H.extend,
fireEvent = HighchartsAdapter.fireEvent,
Axis = H.Axis,
Series = H.Series;
function stripArguments() {
return Array.prototype.slice.call(arguments, 1);
}
extend(Axis.prototype, {
isInBreak: function (brk, val) {
var ret,
repeat = brk.repeat || Infinity,
from = brk.from,
length = brk.to - brk.from,
test = (val >= from ? (val - from) % repeat : repeat - ((from - val) % repeat));
if (!brk.inclusive) {
ret = test < length && test !== 0;
} else {
ret = test <= length;
}
return ret;
},
isInAnyBreak: function (val, testKeep) {
var breaks = this.options.breaks,
i = breaks && breaks.length,
inbrk,
keep,
ret;
if (i) {
while (i--) {
if (this.isInBreak(breaks[i], val)) {
inbrk = true;
if (!keep) {
keep = pick(breaks[i].showPoints, this.isXAxis ? false : true);
}
}
}
if (inbrk && testKeep) {
ret = inbrk && !keep;
} else {
ret = inbrk;
}
}
return ret;
}
});
wrap(Axis.prototype, 'setTickPositions', function (proceed) {
proceed.apply(this, Array.prototype.slice.call(arguments, 1));
if (this.options.breaks) {
var axis = this,
tickPositions = this.tickPositions,
info = this.tickPositions.info,
newPositions = [],
i;
for (i = 0; i < tickPositions.length; i++) {
if (!axis.isInAnyBreak(tickPositions[i])) {
newPositions.push(tickPositions[i]);
}
}
this.tickPositions = newPositions;
this.tickPositions.info = info;
}
});
wrap(Axis.prototype, 'init', function (proceed, chart, userOptions) {
// Force Axis to be not-ordinal when breaks are defined
if (userOptions.breaks && userOptions.breaks.length) {
userOptions.ordinal = false;
}
proceed.call(this, chart, userOptions);
if (this.options.breaks) {
var axis = this;
axis.doPostTranslate = true;
this.val2lin = function (val) {
var nval = val,
brk,
i;
for (i = 0; i < axis.breakArray.length; i++) {
brk = axis.breakArray[i];
if (brk.to <= val) {
nval -= brk.len;
} else if (brk.from >= val) {
break;
} else if (axis.isInBreak(brk, val)) {
nval -= (val - brk.from);
break;
}
}
return nval;
};
this.lin2val = function (val) {
var nval = val,
brk,
i;
for (i = 0; i < axis.breakArray.length; i++) {
brk = axis.breakArray[i];
if (brk.from >= nval) {
break;
} else if (brk.to < nval) {
nval += brk.len;
} else if (axis.isInBreak(brk, nval)) {
nval += brk.len;
}
}
return nval;
};
this.setExtremes = function (newMin, newMax, redraw, animation, eventArguments) {
// If trying to set extremes inside a break, extend it to before and after the break ( #3857 )
while (this.isInAnyBreak(newMin)) {
newMin -= this.closestPointRange;
}
while (this.isInAnyBreak(newMax)) {
newMax -= this.closestPointRange;
}
Axis.prototype.setExtremes.call(this, newMin, newMax, redraw, animation, eventArguments);
};
this.setAxisTranslation = function (saveOld) {
Axis.prototype.setAxisTranslation.call(this, saveOld);
var breaks = axis.options.breaks,
breakArrayT = [], // Temporary one
breakArray = [],
length = 0,
inBrk,
repeat,
brk,
min = axis.userMin || axis.min,
max = axis.userMax || axis.max,
start,
i,
j;
// Min & max check (#4247)
for (i in breaks) {
brk = breaks[i];
repeat = brk.repeat || Infinity;
if (axis.isInBreak(brk, min)) {
min += (brk.to % repeat) - (min % repeat);
}
if (axis.isInBreak(brk, max)) {
max -= (max % repeat) - (brk.from % repeat);
}
}
// Construct an array holding all breaks in the axis
for (i in breaks) {
brk = breaks[i];
start = brk.from;
repeat = brk.repeat || Infinity;
while (start - repeat > min) {
start -= repeat;
}
while (start < min) {
start += repeat;
}
for (j = start; j < max; j += repeat) {
breakArrayT.push({
value: j,
move: 'in'
});
breakArrayT.push({
value: j + (brk.to - brk.from),
move: 'out',
size: brk.breakSize
});
}
}
breakArrayT.sort(function (a, b) {
if (a.value === b.value) {
return (a.move === 'in' ? 0 : 1) - (b.move === 'in' ? 0 : 1);
} else {
return a.value - b.value;
}
});
// Simplify the breaks
inBrk = 0;
start = min;
for (i in breakArrayT) {
brk = breakArrayT[i];
inBrk += (brk.move === 'in' ? 1 : -1);
if (inBrk === 1 && brk.move === 'in') {
start = brk.value;
}
if (inBrk === 0) {
breakArray.push({
from: start,
to: brk.value,
len: brk.value - start - (brk.size || 0)
});
length += brk.value - start - (brk.size || 0);
}
}
axis.breakArray = breakArray;
fireEvent(axis, 'afterBreaks');
axis.transA *= ((max - axis.min) / (max - min - length));
axis.min = min;
axis.max = max;
};
}
});
wrap(Series.prototype, 'generatePoints', function (proceed) {
proceed.apply(this, stripArguments(arguments));
var series = this,
xAxis = series.xAxis,
yAxis = series.yAxis,
points = series.points,
point,
i = points.length,
connectNulls = series.options.connectNulls,
nullGap;
if (xAxis && yAxis && (xAxis.options.breaks || yAxis.options.breaks)) {
while (i--) {
point = points[i];
nullGap = point.y === null && connectNulls === false; // respect nulls inside the break (#4275)
if (!nullGap && (xAxis.isInAnyBreak(point.x, true) || yAxis.isInAnyBreak(point.y, true))) {
points.splice(i, 1);
if (this.data[i]) {
this.data[i].destroyElements(); // removes the graphics for this point if they exist
}
}
}
}
});
wrap(H.seriesTypes.column.prototype, 'drawPoints', function (proceed) {
proceed.apply(this);
var series = this,
points = series.points,
yAxis = series.yAxis,
breaks = yAxis.breakArray || [],
threshold = pick(this.options.threshold, yAxis.min),
eventName,
point,
brk,
i,
j,
y;
for (i = 0; i < points.length; i++) {
point = points[i];
y = point.stackY || point.y;
for (j = 0; j < breaks.length; j++) {
brk = breaks[j];
eventName = false;
if ((threshold < brk.from && y > brk.to) || (threshold > brk.from && y < brk.from)) {
eventName = 'pointBreak';
} else if ((threshold < brk.from && y > brk.from && y < brk.to) || (threshold > brk.from && y > brk.to && y < brk.from)) { // point falls inside the break
eventName = 'pointInBreak'; // docs
}
if (eventName) {
fireEvent(yAxis, eventName, {point: point, brk: brk});
}
}
}
});
}(Highcharts));

View File

@ -1,133 +0,0 @@
/*
A class to parse color values
@author Stoyan Stefanov <sstoo@gmail.com>
@link http://www.phpied.com/rgb-color-parser-in-javascript/
Use it if you like it
canvg.js - Javascript SVG parser and renderer on Canvas
MIT Licensed
Gabe Lerner (gabelerner@gmail.com)
http://code.google.com/p/canvg/
Requires: rgbcolor.js - http://www.phpied.com/rgb-color-parser-in-javascript/
Highcharts JS v4.1.9 (2015-10-07)
CanVGRenderer Extension module
(c) 2011-2012 Torstein Honsi, Erik Olsson
License: www.highcharts.com/license
*/
function RGBColor(m){this.ok=!1;m.charAt(0)=="#"&&(m=m.substr(1,6));var m=m.replace(/ /g,""),m=m.toLowerCase(),a={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",
darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",
gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",
lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",
oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",
slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},c;for(c in a)m==c&&(m=a[c]);var d=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(b){return[parseInt(b[1]),parseInt(b[2]),parseInt(b[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,
example:["#00ff00","336699"],process:function(b){return[parseInt(b[1],16),parseInt(b[2],16),parseInt(b[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(b){return[parseInt(b[1]+b[1],16),parseInt(b[2]+b[2],16),parseInt(b[3]+b[3],16)]}}];for(c=0;c<d.length;c++){var b=d[c].process,k=d[c].re.exec(m);if(k)channels=b(k),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r;this.g=this.g<0||isNaN(this.g)?0:
this.g>255?255:this.g;this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b;this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"};this.toHex=function(){var b=this.r.toString(16),a=this.g.toString(16),d=this.b.toString(16);b.length==1&&(b="0"+b);a.length==1&&(a="0"+a);d.length==1&&(d="0"+d);return"#"+b+a+d};this.getHelpXML=function(){for(var b=[],k=0;k<d.length;k++)for(var c=d[k].example,j=0;j<c.length;j++)b[b.length]=c[j];for(var h in a)b[b.length]=h;c=document.createElement("ul");
c.setAttribute("id","rgbcolor-examples");for(k=0;k<b.length;k++)try{var l=document.createElement("li"),o=new RGBColor(b[k]),n=document.createElement("div");n.style.cssText="margin: 3px; border: 1px solid black; background:"+o.toHex()+"; color:"+o.toHex();n.appendChild(document.createTextNode("test"));var q=document.createTextNode(" "+b[k]+" -> "+o.toRGB()+" -> "+o.toHex());l.appendChild(n);l.appendChild(q);c.appendChild(l)}catch(p){}return c}}
if(!window.console)window.console={},window.console.log=function(){},window.console.dir=function(){};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(m){for(var a=0;a<this.length;a++)if(this[a]==m)return a;return-1};
(function(){function m(){var a={FRAMERATE:30,MAX_VIRTUAL_PIXELS:3E4};a.init=function(c){a.Definitions={};a.Styles={};a.Animations=[];a.Images=[];a.ctx=c;a.ViewPort=new function(){this.viewPorts=[];this.Clear=function(){this.viewPorts=[]};this.SetCurrent=function(a,b){this.viewPorts.push({width:a,height:b})};this.RemoveCurrent=function(){this.viewPorts.pop()};this.Current=function(){return this.viewPorts[this.viewPorts.length-1]};this.width=function(){return this.Current().width};this.height=function(){return this.Current().height};
this.ComputeSize=function(a){return a!=null&&typeof a=="number"?a:a=="x"?this.width():a=="y"?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}};a.init();a.ImagesLoaded=function(){for(var c=0;c<a.Images.length;c++)if(!a.Images[c].loaded)return!1;return!0};a.trim=function(a){return a.replace(/^\s+|\s+$/g,"")};a.compressSpaces=function(a){return a?a.replace(/[\s\r\t\n]+/gm," "):""};a.ajax=function(a){var d;return(d=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"))?
(d.open("GET",a,!1),d.send(null),d.responseText):null};a.parseXml=function(a){if(window.DOMParser)return(new DOMParser).parseFromString(a,"text/xml");else{var a=a.replace(/<!DOCTYPE svg[^>]*>/,""),d=new ActiveXObject("Microsoft.XMLDOM");d.async="false";d.loadXML(a);return d}};a.Property=function(c,d){this.name=c;this.value=d;this.hasValue=function(){return this.value!=null&&this.value!==""};this.numValue=function(){if(!this.hasValue())return 0;var b=parseFloat(this.value);(this.value+"").match(/%$/)&&
(b/=100);return b};this.valueOrDefault=function(b){return this.hasValue()?this.value:b};this.numValueOrDefault=function(b){return this.hasValue()?this.numValue():b};var b=this;this.Color={addOpacity:function(d){var c=b.value;if(d!=null&&d!=""){var f=new RGBColor(b.value);f.ok&&(c="rgba("+f.r+", "+f.g+", "+f.b+", "+d+")")}return new a.Property(b.name,c)}};this.Definition={getDefinition:function(){var d=b.value.replace(/^(url\()?#([^\)]+)\)?$/,"$2");return a.Definitions[d]},isUrl:function(){return b.value.indexOf("url(")==
0},getFillStyle:function(b){var d=this.getDefinition();return d!=null&&d.createGradient?d.createGradient(a.ctx,b):d!=null&&d.createPattern?d.createPattern(a.ctx,b):null}};this.Length={DPI:function(){return 96},EM:function(b){var d=12,c=new a.Property("fontSize",a.Font.Parse(a.ctx.font).fontSize);c.hasValue()&&(d=c.Length.toPixels(b));return d},toPixels:function(d){if(!b.hasValue())return 0;var c=b.value+"";return c.match(/em$/)?b.numValue()*this.EM(d):c.match(/ex$/)?b.numValue()*this.EM(d)/2:c.match(/px$/)?
b.numValue():c.match(/pt$/)?b.numValue()*1.25:c.match(/pc$/)?b.numValue()*15:c.match(/cm$/)?b.numValue()*this.DPI(d)/2.54:c.match(/mm$/)?b.numValue()*this.DPI(d)/25.4:c.match(/in$/)?b.numValue()*this.DPI(d):c.match(/%$/)?b.numValue()*a.ViewPort.ComputeSize(d):b.numValue()}};this.Time={toMilliseconds:function(){if(!b.hasValue())return 0;var a=b.value+"";if(a.match(/s$/))return b.numValue()*1E3;a.match(/ms$/);return b.numValue()}};this.Angle={toRadians:function(){if(!b.hasValue())return 0;var a=b.value+
"";return a.match(/deg$/)?b.numValue()*(Math.PI/180):a.match(/grad$/)?b.numValue()*(Math.PI/200):a.match(/rad$/)?b.numValue():b.numValue()*(Math.PI/180)}}};a.Font=new function(){this.Styles=["normal","italic","oblique","inherit"];this.Variants=["normal","small-caps","inherit"];this.Weights="normal,bold,bolder,lighter,100,200,300,400,500,600,700,800,900,inherit".split(",");this.CreateFont=function(d,b,c,e,f,g){g=g!=null?this.Parse(g):this.CreateFont("","","","","",a.ctx.font);return{fontFamily:f||
g.fontFamily,fontSize:e||g.fontSize,fontStyle:d||g.fontStyle,fontWeight:c||g.fontWeight,fontVariant:b||g.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var c=this;this.Parse=function(d){for(var b={},d=a.trim(a.compressSpaces(d||"")).split(" "),k=!1,e=!1,f=!1,g=!1,j="",h=0;h<d.length;h++)if(!e&&c.Styles.indexOf(d[h])!=-1){if(d[h]!="inherit")b.fontStyle=d[h];e=!0}else if(!g&&c.Variants.indexOf(d[h])!=-1){if(d[h]!="inherit")b.fontVariant=
d[h];e=g=!0}else if(!f&&c.Weights.indexOf(d[h])!=-1){if(d[h]!="inherit")b.fontWeight=d[h];e=g=f=!0}else if(k)d[h]!="inherit"&&(j+=d[h]);else{if(d[h]!="inherit")b.fontSize=d[h].split("/")[0];e=g=f=k=!0}if(j!="")b.fontFamily=j;return b}};a.ToNumberArray=function(c){for(var c=a.trim(a.compressSpaces((c||"").replace(/,/g," "))).split(" "),d=0;d<c.length;d++)c[d]=parseFloat(c[d]);return c};a.Point=function(a,d){this.x=a;this.y=d;this.angleTo=function(b){return Math.atan2(b.y-this.y,b.x-this.x)};this.applyTransform=
function(b){var a=this.x*b[1]+this.y*b[3]+b[5];this.x=this.x*b[0]+this.y*b[2]+b[4];this.y=a}};a.CreatePoint=function(c){c=a.ToNumberArray(c);return new a.Point(c[0],c[1])};a.CreatePath=function(c){for(var c=a.ToNumberArray(c),d=[],b=0;b<c.length;b+=2)d.push(new a.Point(c[b],c[b+1]));return d};a.BoundingBox=function(a,d,b,k){this.y2=this.x2=this.y1=this.x1=Number.NaN;this.x=function(){return this.x1};this.y=function(){return this.y1};this.width=function(){return this.x2-this.x1};this.height=function(){return this.y2-
this.y1};this.addPoint=function(b,a){if(b!=null){if(isNaN(this.x1)||isNaN(this.x2))this.x2=this.x1=b;if(b<this.x1)this.x1=b;if(b>this.x2)this.x2=b}if(a!=null){if(isNaN(this.y1)||isNaN(this.y2))this.y2=this.y1=a;if(a<this.y1)this.y1=a;if(a>this.y2)this.y2=a}};this.addX=function(b){this.addPoint(b,null)};this.addY=function(b){this.addPoint(null,b)};this.addBoundingBox=function(b){this.addPoint(b.x1,b.y1);this.addPoint(b.x2,b.y2)};this.addQuadraticCurve=function(b,a,d,c,k,l){d=b+2/3*(d-b);c=a+2/3*(c-
a);this.addBezierCurve(b,a,d,d+1/3*(k-b),c,c+1/3*(l-a),k,l)};this.addBezierCurve=function(b,a,d,c,k,l,o,n){var q=[b,a],p=[d,c],t=[k,l],m=[o,n];this.addPoint(q[0],q[1]);this.addPoint(m[0],m[1]);for(i=0;i<=1;i++)b=function(b){return Math.pow(1-b,3)*q[i]+3*Math.pow(1-b,2)*b*p[i]+3*(1-b)*Math.pow(b,2)*t[i]+Math.pow(b,3)*m[i]},a=6*q[i]-12*p[i]+6*t[i],d=-3*q[i]+9*p[i]-9*t[i]+3*m[i],c=3*p[i]-3*q[i],d==0?a!=0&&(a=-c/a,0<a&&a<1&&(i==0&&this.addX(b(a)),i==1&&this.addY(b(a)))):(c=Math.pow(a,2)-4*c*d,c<0||(k=
(-a+Math.sqrt(c))/(2*d),0<k&&k<1&&(i==0&&this.addX(b(k)),i==1&&this.addY(b(k))),a=(-a-Math.sqrt(c))/(2*d),0<a&&a<1&&(i==0&&this.addX(b(a)),i==1&&this.addY(b(a)))))};this.isPointInBox=function(b,a){return this.x1<=b&&b<=this.x2&&this.y1<=a&&a<=this.y2};this.addPoint(a,d);this.addPoint(b,k)};a.Transform=function(c){var d=this;this.Type={};this.Type.translate=function(b){this.p=a.CreatePoint(b);this.apply=function(b){b.translate(this.p.x||0,this.p.y||0)};this.applyToPoint=function(b){b.applyTransform([1,
0,0,1,this.p.x||0,this.p.y||0])}};this.Type.rotate=function(b){b=a.ToNumberArray(b);this.angle=new a.Property("angle",b[0]);this.cx=b[1]||0;this.cy=b[2]||0;this.apply=function(b){b.translate(this.cx,this.cy);b.rotate(this.angle.Angle.toRadians());b.translate(-this.cx,-this.cy)};this.applyToPoint=function(b){var a=this.angle.Angle.toRadians();b.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]);b.applyTransform([Math.cos(a),Math.sin(a),-Math.sin(a),Math.cos(a),0,0]);b.applyTransform([1,0,0,1,-this.p.x||
0,-this.p.y||0])}};this.Type.scale=function(b){this.p=a.CreatePoint(b);this.apply=function(b){b.scale(this.p.x||1,this.p.y||this.p.x||1)};this.applyToPoint=function(b){b.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}};this.Type.matrix=function(b){this.m=a.ToNumberArray(b);this.apply=function(b){b.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])};this.applyToPoint=function(b){b.applyTransform(this.m)}};this.Type.SkewBase=function(b){this.base=d.Type.matrix;this.base(b);this.angle=
new a.Property("angle",b)};this.Type.SkewBase.prototype=new this.Type.matrix;this.Type.skewX=function(b){this.base=d.Type.SkewBase;this.base(b);this.m=[1,0,Math.tan(this.angle.Angle.toRadians()),1,0,0]};this.Type.skewX.prototype=new this.Type.SkewBase;this.Type.skewY=function(b){this.base=d.Type.SkewBase;this.base(b);this.m=[1,Math.tan(this.angle.Angle.toRadians()),0,1,0,0]};this.Type.skewY.prototype=new this.Type.SkewBase;this.transforms=[];this.apply=function(b){for(var a=0;a<this.transforms.length;a++)this.transforms[a].apply(b)};
this.applyToPoint=function(b){for(var a=0;a<this.transforms.length;a++)this.transforms[a].applyToPoint(b)};for(var c=a.trim(a.compressSpaces(c)).split(/\s(?=[a-z])/),b=0;b<c.length;b++){var k=c[b].split("(")[0],e=c[b].split("(")[1].replace(")","");this.transforms.push(new this.Type[k](e))}};a.AspectRatio=function(c,d,b,k,e,f,g,j,h,l){var d=a.compressSpaces(d),d=d.replace(/^defer\s/,""),o=d.split(" ")[0]||"xMidYMid",d=d.split(" ")[1]||"meet",n=b/k,q=e/f,p=Math.min(n,q),m=Math.max(n,q);d=="meet"&&(k*=
p,f*=p);d=="slice"&&(k*=m,f*=m);h=new a.Property("refX",h);l=new a.Property("refY",l);h.hasValue()&&l.hasValue()?c.translate(-p*h.Length.toPixels("x"),-p*l.Length.toPixels("y")):(o.match(/^xMid/)&&(d=="meet"&&p==q||d=="slice"&&m==q)&&c.translate(b/2-k/2,0),o.match(/YMid$/)&&(d=="meet"&&p==n||d=="slice"&&m==n)&&c.translate(0,e/2-f/2),o.match(/^xMax/)&&(d=="meet"&&p==q||d=="slice"&&m==q)&&c.translate(b-k,0),o.match(/YMax$/)&&(d=="meet"&&p==n||d=="slice"&&m==n)&&c.translate(0,e-f));o=="none"?c.scale(n,
q):d=="meet"?c.scale(p,p):d=="slice"&&c.scale(m,m);c.translate(g==null?0:-g,j==null?0:-j)};a.Element={};a.Element.ElementBase=function(c){this.attributes={};this.styles={};this.children=[];this.attribute=function(b,d){var c=this.attributes[b];if(c!=null)return c;c=new a.Property(b,"");d==!0&&(this.attributes[b]=c);return c};this.style=function(b,d){var c=this.styles[b];if(c!=null)return c;c=this.attribute(b);if(c!=null&&c.hasValue())return c;c=this.parent;if(c!=null&&(c=c.style(b),c!=null&&c.hasValue()))return c;
c=new a.Property(b,"");d==!0&&(this.styles[b]=c);return c};this.render=function(b){if(this.style("display").value!="none"&&this.attribute("visibility").value!="hidden"){b.save();this.setContext(b);if(this.attribute("mask").hasValue()){var a=this.attribute("mask").Definition.getDefinition();a!=null&&a.apply(b,this)}else this.style("filter").hasValue()?(a=this.style("filter").Definition.getDefinition(),a!=null&&a.apply(b,this)):this.renderChildren(b);this.clearContext(b);b.restore()}};this.setContext=
function(){};this.clearContext=function(){};this.renderChildren=function(b){for(var a=0;a<this.children.length;a++)this.children[a].render(b)};this.addChild=function(b,d){var c=b;d&&(c=a.CreateElement(b));c.parent=this;this.children.push(c)};if(c!=null&&c.nodeType==1){for(var d=0;d<c.childNodes.length;d++){var b=c.childNodes[d];b.nodeType==1&&this.addChild(b,!0)}for(d=0;d<c.attributes.length;d++)b=c.attributes[d],this.attributes[b.nodeName]=new a.Property(b.nodeName,b.nodeValue);b=a.Styles[c.nodeName];
if(b!=null)for(var k in b)this.styles[k]=b[k];if(this.attribute("class").hasValue())for(var d=a.compressSpaces(this.attribute("class").value).split(" "),e=0;e<d.length;e++){b=a.Styles["."+d[e]];if(b!=null)for(k in b)this.styles[k]=b[k];b=a.Styles[c.nodeName+"."+d[e]];if(b!=null)for(k in b)this.styles[k]=b[k]}if(this.attribute("style").hasValue()){b=this.attribute("style").value.split(";");for(d=0;d<b.length;d++)a.trim(b[d])!=""&&(c=b[d].split(":"),k=a.trim(c[0]),c=a.trim(c[1]),this.styles[k]=new a.Property(k,
c))}this.attribute("id").hasValue()&&a.Definitions[this.attribute("id").value]==null&&(a.Definitions[this.attribute("id").value]=this)}};a.Element.RenderedElementBase=function(c){this.base=a.Element.ElementBase;this.base(c);this.setContext=function(d){if(this.style("fill").Definition.isUrl()){var b=this.style("fill").Definition.getFillStyle(this);if(b!=null)d.fillStyle=b}else if(this.style("fill").hasValue())b=this.style("fill"),this.style("fill-opacity").hasValue()&&(b=b.Color.addOpacity(this.style("fill-opacity").value)),
d.fillStyle=b.value=="none"?"rgba(0,0,0,0)":b.value;if(this.style("stroke").Definition.isUrl()){if(b=this.style("stroke").Definition.getFillStyle(this),b!=null)d.strokeStyle=b}else if(this.style("stroke").hasValue())b=this.style("stroke"),this.style("stroke-opacity").hasValue()&&(b=b.Color.addOpacity(this.style("stroke-opacity").value)),d.strokeStyle=b.value=="none"?"rgba(0,0,0,0)":b.value;if(this.style("stroke-width").hasValue())d.lineWidth=this.style("stroke-width").Length.toPixels();if(this.style("stroke-linecap").hasValue())d.lineCap=
this.style("stroke-linecap").value;if(this.style("stroke-linejoin").hasValue())d.lineJoin=this.style("stroke-linejoin").value;if(this.style("stroke-miterlimit").hasValue())d.miterLimit=this.style("stroke-miterlimit").value;if(typeof d.font!="undefined")d.font=a.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").Length.toPixels()+"px":"",this.style("font-family").value).toString();
this.attribute("transform").hasValue()&&(new a.Transform(this.attribute("transform").value)).apply(d);this.attribute("clip-path").hasValue()&&(b=this.attribute("clip-path").Definition.getDefinition(),b!=null&&b.apply(d));if(this.style("opacity").hasValue())d.globalAlpha=this.style("opacity").numValue()}};a.Element.RenderedElementBase.prototype=new a.Element.ElementBase;a.Element.PathElementBase=function(c){this.base=a.Element.RenderedElementBase;this.base(c);this.path=function(d){d!=null&&d.beginPath();
return new a.BoundingBox};this.renderChildren=function(d){this.path(d);a.Mouse.checkPath(this,d);d.fillStyle!=""&&d.fill();d.strokeStyle!=""&&d.stroke();var b=this.getMarkers();if(b!=null){if(this.style("marker-start").Definition.isUrl()){var c=this.style("marker-start").Definition.getDefinition();c.render(d,b[0][0],b[0][1])}if(this.style("marker-mid").Definition.isUrl())for(var c=this.style("marker-mid").Definition.getDefinition(),e=1;e<b.length-1;e++)c.render(d,b[e][0],b[e][1]);this.style("marker-end").Definition.isUrl()&&
(c=this.style("marker-end").Definition.getDefinition(),c.render(d,b[b.length-1][0],b[b.length-1][1]))}};this.getBoundingBox=function(){return this.path()};this.getMarkers=function(){return null}};a.Element.PathElementBase.prototype=new a.Element.RenderedElementBase;a.Element.svg=function(c){this.base=a.Element.RenderedElementBase;this.base(c);this.baseClearContext=this.clearContext;this.clearContext=function(d){this.baseClearContext(d);a.ViewPort.RemoveCurrent()};this.baseSetContext=this.setContext;
this.setContext=function(d){d.strokeStyle="rgba(0,0,0,0)";d.lineCap="butt";d.lineJoin="miter";d.miterLimit=4;this.baseSetContext(d);this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&d.translate(this.attribute("x").Length.toPixels("x"),this.attribute("y").Length.toPixels("y"));var b=a.ViewPort.width(),c=a.ViewPort.height();if(typeof this.root=="undefined"&&this.attribute("width").hasValue()&&this.attribute("height").hasValue()){var b=this.attribute("width").Length.toPixels("x"),c=this.attribute("height").Length.toPixels("y"),
e=0,f=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(e=-this.attribute("refX").Length.toPixels("x"),f=-this.attribute("refY").Length.toPixels("y"));d.beginPath();d.moveTo(e,f);d.lineTo(b,f);d.lineTo(b,c);d.lineTo(e,c);d.closePath();d.clip()}a.ViewPort.SetCurrent(b,c);if(this.attribute("viewBox").hasValue()){var e=a.ToNumberArray(this.attribute("viewBox").value),f=e[0],g=e[1],b=e[2],c=e[3];a.AspectRatio(d,this.attribute("preserveAspectRatio").value,a.ViewPort.width(),b,a.ViewPort.height(),
c,f,g,this.attribute("refX").value,this.attribute("refY").value);a.ViewPort.RemoveCurrent();a.ViewPort.SetCurrent(e[2],e[3])}}};a.Element.svg.prototype=new a.Element.RenderedElementBase;a.Element.rect=function(c){this.base=a.Element.PathElementBase;this.base(c);this.path=function(d){var b=this.attribute("x").Length.toPixels("x"),c=this.attribute("y").Length.toPixels("y"),e=this.attribute("width").Length.toPixels("x"),f=this.attribute("height").Length.toPixels("y"),g=this.attribute("rx").Length.toPixels("x"),
j=this.attribute("ry").Length.toPixels("y");this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(j=g);this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(g=j);d!=null&&(d.beginPath(),d.moveTo(b+g,c),d.lineTo(b+e-g,c),d.quadraticCurveTo(b+e,c,b+e,c+j),d.lineTo(b+e,c+f-j),d.quadraticCurveTo(b+e,c+f,b+e-g,c+f),d.lineTo(b+g,c+f),d.quadraticCurveTo(b,c+f,b,c+f-j),d.lineTo(b,c+j),d.quadraticCurveTo(b,c,b+g,c),d.closePath());return new a.BoundingBox(b,c,b+e,c+f)}};a.Element.rect.prototype=
new a.Element.PathElementBase;a.Element.circle=function(c){this.base=a.Element.PathElementBase;this.base(c);this.path=function(d){var b=this.attribute("cx").Length.toPixels("x"),c=this.attribute("cy").Length.toPixels("y"),e=this.attribute("r").Length.toPixels();d!=null&&(d.beginPath(),d.arc(b,c,e,0,Math.PI*2,!0),d.closePath());return new a.BoundingBox(b-e,c-e,b+e,c+e)}};a.Element.circle.prototype=new a.Element.PathElementBase;a.Element.ellipse=function(c){this.base=a.Element.PathElementBase;this.base(c);
this.path=function(d){var b=4*((Math.sqrt(2)-1)/3),c=this.attribute("rx").Length.toPixels("x"),e=this.attribute("ry").Length.toPixels("y"),f=this.attribute("cx").Length.toPixels("x"),g=this.attribute("cy").Length.toPixels("y");d!=null&&(d.beginPath(),d.moveTo(f,g-e),d.bezierCurveTo(f+b*c,g-e,f+c,g-b*e,f+c,g),d.bezierCurveTo(f+c,g+b*e,f+b*c,g+e,f,g+e),d.bezierCurveTo(f-b*c,g+e,f-c,g+b*e,f-c,g),d.bezierCurveTo(f-c,g-b*e,f-b*c,g-e,f,g-e),d.closePath());return new a.BoundingBox(f-c,g-e,f+c,g+e)}};a.Element.ellipse.prototype=
new a.Element.PathElementBase;a.Element.line=function(c){this.base=a.Element.PathElementBase;this.base(c);this.getPoints=function(){return[new a.Point(this.attribute("x1").Length.toPixels("x"),this.attribute("y1").Length.toPixels("y")),new a.Point(this.attribute("x2").Length.toPixels("x"),this.attribute("y2").Length.toPixels("y"))]};this.path=function(d){var b=this.getPoints();d!=null&&(d.beginPath(),d.moveTo(b[0].x,b[0].y),d.lineTo(b[1].x,b[1].y));return new a.BoundingBox(b[0].x,b[0].y,b[1].x,b[1].y)};
this.getMarkers=function(){var a=this.getPoints(),b=a[0].angleTo(a[1]);return[[a[0],b],[a[1],b]]}};a.Element.line.prototype=new a.Element.PathElementBase;a.Element.polyline=function(c){this.base=a.Element.PathElementBase;this.base(c);this.points=a.CreatePath(this.attribute("points").value);this.path=function(d){var b=new a.BoundingBox(this.points[0].x,this.points[0].y);d!=null&&(d.beginPath(),d.moveTo(this.points[0].x,this.points[0].y));for(var c=1;c<this.points.length;c++)b.addPoint(this.points[c].x,
this.points[c].y),d!=null&&d.lineTo(this.points[c].x,this.points[c].y);return b};this.getMarkers=function(){for(var a=[],b=0;b<this.points.length-1;b++)a.push([this.points[b],this.points[b].angleTo(this.points[b+1])]);a.push([this.points[this.points.length-1],a[a.length-1][1]]);return a}};a.Element.polyline.prototype=new a.Element.PathElementBase;a.Element.polygon=function(c){this.base=a.Element.polyline;this.base(c);this.basePath=this.path;this.path=function(a){var b=this.basePath(a);a!=null&&(a.lineTo(this.points[0].x,
this.points[0].y),a.closePath());return b}};a.Element.polygon.prototype=new a.Element.polyline;a.Element.path=function(c){this.base=a.Element.PathElementBase;this.base(c);c=this.attribute("d").value;c=c.replace(/,/gm," ");c=c.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2");c=c.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2");c=c.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2");c=c.replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2");c=c.replace(/([0-9])([+\-])/gm,
"$1 $2");c=c.replace(/(\.[0-9]*)(\.)/gm,"$1 $2");c=c.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");c=a.compressSpaces(c);c=a.trim(c);this.PathParser=new function(d){this.tokens=d.split(" ");this.reset=function(){this.i=-1;this.previousCommand=this.command="";this.start=new a.Point(0,0);this.control=new a.Point(0,0);this.current=new a.Point(0,0);this.points=[];this.angles=[]};this.isEnd=function(){return this.i>=this.tokens.length-1};this.isCommandOrEnd=function(){return this.isEnd()?
!0:this.tokens[this.i+1].match(/^[A-Za-z]$/)!=null};this.isRelativeCommand=function(){return this.command==this.command.toLowerCase()};this.getToken=function(){this.i+=1;return this.tokens[this.i]};this.getScalar=function(){return parseFloat(this.getToken())};this.nextCommand=function(){this.previousCommand=this.command;this.command=this.getToken()};this.getPoint=function(){return this.makeAbsolute(new a.Point(this.getScalar(),this.getScalar()))};this.getAsControlPoint=function(){var b=this.getPoint();
return this.control=b};this.getAsCurrentPoint=function(){var b=this.getPoint();return this.current=b};this.getReflectedControlPoint=function(){return this.previousCommand.toLowerCase()!="c"&&this.previousCommand.toLowerCase()!="s"?this.current:new a.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y)};this.makeAbsolute=function(b){if(this.isRelativeCommand())b.x=this.current.x+b.x,b.y=this.current.y+b.y;return b};this.addMarker=function(b,a,d){d!=null&&this.angles.length>0&&this.angles[this.angles.length-
1]==null&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(d));this.addMarkerAngle(b,a==null?null:a.angleTo(b))};this.addMarkerAngle=function(b,a){this.points.push(b);this.angles.push(a)};this.getMarkerPoints=function(){return this.points};this.getMarkerAngles=function(){for(var b=0;b<this.angles.length;b++)if(this.angles[b]==null)for(var a=b+1;a<this.angles.length;a++)if(this.angles[a]!=null){this.angles[b]=this.angles[a];break}return this.angles}}(c);this.path=function(d){var b=
this.PathParser;b.reset();var c=new a.BoundingBox;for(d!=null&&d.beginPath();!b.isEnd();)switch(b.nextCommand(),b.command.toUpperCase()){case "M":var e=b.getAsCurrentPoint();b.addMarker(e);c.addPoint(e.x,e.y);d!=null&&d.moveTo(e.x,e.y);for(b.start=b.current;!b.isCommandOrEnd();)e=b.getAsCurrentPoint(),b.addMarker(e,b.start),c.addPoint(e.x,e.y),d!=null&&d.lineTo(e.x,e.y);break;case "L":for(;!b.isCommandOrEnd();){var f=b.current,e=b.getAsCurrentPoint();b.addMarker(e,f);c.addPoint(e.x,e.y);d!=null&&
d.lineTo(e.x,e.y)}break;case "H":for(;!b.isCommandOrEnd();)e=new a.Point((b.isRelativeCommand()?b.current.x:0)+b.getScalar(),b.current.y),b.addMarker(e,b.current),b.current=e,c.addPoint(b.current.x,b.current.y),d!=null&&d.lineTo(b.current.x,b.current.y);break;case "V":for(;!b.isCommandOrEnd();)e=new a.Point(b.current.x,(b.isRelativeCommand()?b.current.y:0)+b.getScalar()),b.addMarker(e,b.current),b.current=e,c.addPoint(b.current.x,b.current.y),d!=null&&d.lineTo(b.current.x,b.current.y);break;case "C":for(;!b.isCommandOrEnd();){var g=
b.current,f=b.getPoint(),j=b.getAsControlPoint(),e=b.getAsCurrentPoint();b.addMarker(e,j,f);c.addBezierCurve(g.x,g.y,f.x,f.y,j.x,j.y,e.x,e.y);d!=null&&d.bezierCurveTo(f.x,f.y,j.x,j.y,e.x,e.y)}break;case "S":for(;!b.isCommandOrEnd();)g=b.current,f=b.getReflectedControlPoint(),j=b.getAsControlPoint(),e=b.getAsCurrentPoint(),b.addMarker(e,j,f),c.addBezierCurve(g.x,g.y,f.x,f.y,j.x,j.y,e.x,e.y),d!=null&&d.bezierCurveTo(f.x,f.y,j.x,j.y,e.x,e.y);break;case "Q":for(;!b.isCommandOrEnd();)g=b.current,j=b.getAsControlPoint(),
e=b.getAsCurrentPoint(),b.addMarker(e,j,j),c.addQuadraticCurve(g.x,g.y,j.x,j.y,e.x,e.y),d!=null&&d.quadraticCurveTo(j.x,j.y,e.x,e.y);break;case "T":for(;!b.isCommandOrEnd();)g=b.current,j=b.getReflectedControlPoint(),b.control=j,e=b.getAsCurrentPoint(),b.addMarker(e,j,j),c.addQuadraticCurve(g.x,g.y,j.x,j.y,e.x,e.y),d!=null&&d.quadraticCurveTo(j.x,j.y,e.x,e.y);break;case "A":for(;!b.isCommandOrEnd();){var g=b.current,h=b.getScalar(),l=b.getScalar(),f=b.getScalar()*(Math.PI/180),o=b.getScalar(),j=b.getScalar(),
e=b.getAsCurrentPoint(),n=new a.Point(Math.cos(f)*(g.x-e.x)/2+Math.sin(f)*(g.y-e.y)/2,-Math.sin(f)*(g.x-e.x)/2+Math.cos(f)*(g.y-e.y)/2),q=Math.pow(n.x,2)/Math.pow(h,2)+Math.pow(n.y,2)/Math.pow(l,2);q>1&&(h*=Math.sqrt(q),l*=Math.sqrt(q));o=(o==j?-1:1)*Math.sqrt((Math.pow(h,2)*Math.pow(l,2)-Math.pow(h,2)*Math.pow(n.y,2)-Math.pow(l,2)*Math.pow(n.x,2))/(Math.pow(h,2)*Math.pow(n.y,2)+Math.pow(l,2)*Math.pow(n.x,2)));isNaN(o)&&(o=0);var p=new a.Point(o*h*n.y/l,o*-l*n.x/h),g=new a.Point((g.x+e.x)/2+Math.cos(f)*
p.x-Math.sin(f)*p.y,(g.y+e.y)/2+Math.sin(f)*p.x+Math.cos(f)*p.y),m=function(b,a){return(b[0]*a[0]+b[1]*a[1])/(Math.sqrt(Math.pow(b[0],2)+Math.pow(b[1],2))*Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2)))},s=function(b,a){return(b[0]*a[1]<b[1]*a[0]?-1:1)*Math.acos(m(b,a))},o=s([1,0],[(n.x-p.x)/h,(n.y-p.y)/l]),q=[(n.x-p.x)/h,(n.y-p.y)/l],p=[(-n.x-p.x)/h,(-n.y-p.y)/l],n=s(q,p);if(m(q,p)<=-1)n=Math.PI;m(q,p)>=1&&(n=0);j==0&&n>0&&(n-=2*Math.PI);j==1&&n<0&&(n+=2*Math.PI);q=new a.Point(g.x-h*Math.cos((o+n)/
2),g.y-l*Math.sin((o+n)/2));b.addMarkerAngle(q,(o+n)/2+(j==0?1:-1)*Math.PI/2);b.addMarkerAngle(e,n+(j==0?1:-1)*Math.PI/2);c.addPoint(e.x,e.y);d!=null&&(m=h>l?h:l,e=h>l?1:h/l,h=h>l?l/h:1,d.translate(g.x,g.y),d.rotate(f),d.scale(e,h),d.arc(0,0,m,o,o+n,1-j),d.scale(1/e,1/h),d.rotate(-f),d.translate(-g.x,-g.y))}break;case "Z":d!=null&&d.closePath(),b.current=b.start}return c};this.getMarkers=function(){for(var a=this.PathParser.getMarkerPoints(),b=this.PathParser.getMarkerAngles(),c=[],e=0;e<a.length;e++)c.push([a[e],
b[e]]);return c}};a.Element.path.prototype=new a.Element.PathElementBase;a.Element.pattern=function(c){this.base=a.Element.ElementBase;this.base(c);this.createPattern=function(d){var b=new a.Element.svg;b.attributes.viewBox=new a.Property("viewBox",this.attribute("viewBox").value);b.attributes.x=new a.Property("x",this.attribute("x").value);b.attributes.y=new a.Property("y",this.attribute("y").value);b.attributes.width=new a.Property("width",this.attribute("width").value);b.attributes.height=new a.Property("height",
this.attribute("height").value);b.children=this.children;var c=document.createElement("canvas");c.width=this.attribute("width").Length.toPixels("x");c.height=this.attribute("height").Length.toPixels("y");b.render(c.getContext("2d"));return d.createPattern(c,"repeat")}};a.Element.pattern.prototype=new a.Element.ElementBase;a.Element.marker=function(c){this.base=a.Element.ElementBase;this.base(c);this.baseRender=this.render;this.render=function(d,b,c){d.translate(b.x,b.y);this.attribute("orient").valueOrDefault("auto")==
"auto"&&d.rotate(c);this.attribute("markerUnits").valueOrDefault("strokeWidth")=="strokeWidth"&&d.scale(d.lineWidth,d.lineWidth);d.save();var e=new a.Element.svg;e.attributes.viewBox=new a.Property("viewBox",this.attribute("viewBox").value);e.attributes.refX=new a.Property("refX",this.attribute("refX").value);e.attributes.refY=new a.Property("refY",this.attribute("refY").value);e.attributes.width=new a.Property("width",this.attribute("markerWidth").value);e.attributes.height=new a.Property("height",
this.attribute("markerHeight").value);e.attributes.fill=new a.Property("fill",this.attribute("fill").valueOrDefault("black"));e.attributes.stroke=new a.Property("stroke",this.attribute("stroke").valueOrDefault("none"));e.children=this.children;e.render(d);d.restore();this.attribute("markerUnits").valueOrDefault("strokeWidth")=="strokeWidth"&&d.scale(1/d.lineWidth,1/d.lineWidth);this.attribute("orient").valueOrDefault("auto")=="auto"&&d.rotate(-c);d.translate(-b.x,-b.y)}};a.Element.marker.prototype=
new a.Element.ElementBase;a.Element.defs=function(c){this.base=a.Element.ElementBase;this.base(c);this.render=function(){}};a.Element.defs.prototype=new a.Element.ElementBase;a.Element.GradientBase=function(c){this.base=a.Element.ElementBase;this.base(c);this.gradientUnits=this.attribute("gradientUnits").valueOrDefault("objectBoundingBox");this.stops=[];for(c=0;c<this.children.length;c++)this.stops.push(this.children[c]);this.getGradient=function(){};this.createGradient=function(d,b){var c=this;this.attribute("xlink:href").hasValue()&&
(c=this.attribute("xlink:href").Definition.getDefinition());for(var e=this.getGradient(d,b),f=0;f<c.stops.length;f++)e.addColorStop(c.stops[f].offset,c.stops[f].color);if(this.attribute("gradientTransform").hasValue()){c=a.ViewPort.viewPorts[0];f=new a.Element.rect;f.attributes.x=new a.Property("x",-a.MAX_VIRTUAL_PIXELS/3);f.attributes.y=new a.Property("y",-a.MAX_VIRTUAL_PIXELS/3);f.attributes.width=new a.Property("width",a.MAX_VIRTUAL_PIXELS);f.attributes.height=new a.Property("height",a.MAX_VIRTUAL_PIXELS);
var g=new a.Element.g;g.attributes.transform=new a.Property("transform",this.attribute("gradientTransform").value);g.children=[f];f=new a.Element.svg;f.attributes.x=new a.Property("x",0);f.attributes.y=new a.Property("y",0);f.attributes.width=new a.Property("width",c.width);f.attributes.height=new a.Property("height",c.height);f.children=[g];g=document.createElement("canvas");g.width=c.width;g.height=c.height;c=g.getContext("2d");c.fillStyle=e;f.render(c);return c.createPattern(g,"no-repeat")}return e}};
a.Element.GradientBase.prototype=new a.Element.ElementBase;a.Element.linearGradient=function(c){this.base=a.Element.GradientBase;this.base(c);this.getGradient=function(a,b){var c=b.getBoundingBox(),e=this.gradientUnits=="objectBoundingBox"?c.x()+c.width()*this.attribute("x1").numValue():this.attribute("x1").Length.toPixels("x"),f=this.gradientUnits=="objectBoundingBox"?c.y()+c.height()*this.attribute("y1").numValue():this.attribute("y1").Length.toPixels("y"),g=this.gradientUnits=="objectBoundingBox"?
c.x()+c.width()*this.attribute("x2").numValue():this.attribute("x2").Length.toPixels("x"),c=this.gradientUnits=="objectBoundingBox"?c.y()+c.height()*this.attribute("y2").numValue():this.attribute("y2").Length.toPixels("y");return a.createLinearGradient(e,f,g,c)}};a.Element.linearGradient.prototype=new a.Element.GradientBase;a.Element.radialGradient=function(c){this.base=a.Element.GradientBase;this.base(c);this.getGradient=function(a,b){var c=b.getBoundingBox(),e=this.gradientUnits=="objectBoundingBox"?
c.x()+c.width()*this.attribute("cx").numValue():this.attribute("cx").Length.toPixels("x"),f=this.gradientUnits=="objectBoundingBox"?c.y()+c.height()*this.attribute("cy").numValue():this.attribute("cy").Length.toPixels("y"),g=e,j=f;this.attribute("fx").hasValue()&&(g=this.gradientUnits=="objectBoundingBox"?c.x()+c.width()*this.attribute("fx").numValue():this.attribute("fx").Length.toPixels("x"));this.attribute("fy").hasValue()&&(j=this.gradientUnits=="objectBoundingBox"?c.y()+c.height()*this.attribute("fy").numValue():
this.attribute("fy").Length.toPixels("y"));c=this.gradientUnits=="objectBoundingBox"?(c.width()+c.height())/2*this.attribute("r").numValue():this.attribute("r").Length.toPixels();return a.createRadialGradient(g,j,0,e,f,c)}};a.Element.radialGradient.prototype=new a.Element.GradientBase;a.Element.stop=function(c){this.base=a.Element.ElementBase;this.base(c);this.offset=this.attribute("offset").numValue();c=this.style("stop-color");this.style("stop-opacity").hasValue()&&(c=c.Color.addOpacity(this.style("stop-opacity").value));
this.color=c.value};a.Element.stop.prototype=new a.Element.ElementBase;a.Element.AnimateBase=function(c){this.base=a.Element.ElementBase;this.base(c);a.Animations.push(this);this.duration=0;this.begin=this.attribute("begin").Time.toMilliseconds();this.maxDuration=this.begin+this.attribute("dur").Time.toMilliseconds();this.getProperty=function(){var a=this.attribute("attributeType").value,b=this.attribute("attributeName").value;return a=="CSS"?this.parent.style(b,!0):this.parent.attribute(b,!0)};this.initialValue=
null;this.removed=!1;this.calcValue=function(){return""};this.update=function(a){if(this.initialValue==null)this.initialValue=this.getProperty().value;if(this.duration>this.maxDuration)if(this.attribute("repeatCount").value=="indefinite")this.duration=0;else return this.attribute("fill").valueOrDefault("remove")=="remove"&&!this.removed?(this.removed=!0,this.getProperty().value=this.initialValue,!0):!1;this.duration+=a;a=!1;if(this.begin<this.duration)a=this.calcValue(),this.attribute("type").hasValue()&&
(a=this.attribute("type").value+"("+a+")"),this.getProperty().value=a,a=!0;return a};this.progress=function(){return(this.duration-this.begin)/(this.maxDuration-this.begin)}};a.Element.AnimateBase.prototype=new a.Element.ElementBase;a.Element.animate=function(c){this.base=a.Element.AnimateBase;this.base(c);this.calcValue=function(){var a=this.attribute("from").numValue(),b=this.attribute("to").numValue();return a+(b-a)*this.progress()}};a.Element.animate.prototype=new a.Element.AnimateBase;a.Element.animateColor=
function(c){this.base=a.Element.AnimateBase;this.base(c);this.calcValue=function(){var a=new RGBColor(this.attribute("from").value),b=new RGBColor(this.attribute("to").value);if(a.ok&&b.ok){var c=a.r+(b.r-a.r)*this.progress(),e=a.g+(b.g-a.g)*this.progress(),a=a.b+(b.b-a.b)*this.progress();return"rgb("+parseInt(c,10)+","+parseInt(e,10)+","+parseInt(a,10)+")"}return this.attribute("from").value}};a.Element.animateColor.prototype=new a.Element.AnimateBase;a.Element.animateTransform=function(c){this.base=
a.Element.animate;this.base(c)};a.Element.animateTransform.prototype=new a.Element.animate;a.Element.font=function(c){this.base=a.Element.ElementBase;this.base(c);this.horizAdvX=this.attribute("horiz-adv-x").numValue();this.isArabic=this.isRTL=!1;this.missingGlyph=this.fontFace=null;this.glyphs=[];for(c=0;c<this.children.length;c++){var d=this.children[c];if(d.type=="font-face")this.fontFace=d,d.style("font-family").hasValue()&&(a.Definitions[d.style("font-family").value]=this);else if(d.type=="missing-glyph")this.missingGlyph=
d;else if(d.type=="glyph")d.arabicForm!=""?(this.isArabic=this.isRTL=!0,typeof this.glyphs[d.unicode]=="undefined"&&(this.glyphs[d.unicode]=[]),this.glyphs[d.unicode][d.arabicForm]=d):this.glyphs[d.unicode]=d}};a.Element.font.prototype=new a.Element.ElementBase;a.Element.fontface=function(c){this.base=a.Element.ElementBase;this.base(c);this.ascent=this.attribute("ascent").value;this.descent=this.attribute("descent").value;this.unitsPerEm=this.attribute("units-per-em").numValue()};a.Element.fontface.prototype=
new a.Element.ElementBase;a.Element.missingglyph=function(c){this.base=a.Element.path;this.base(c);this.horizAdvX=0};a.Element.missingglyph.prototype=new a.Element.path;a.Element.glyph=function(c){this.base=a.Element.path;this.base(c);this.horizAdvX=this.attribute("horiz-adv-x").numValue();this.unicode=this.attribute("unicode").value;this.arabicForm=this.attribute("arabic-form").value};a.Element.glyph.prototype=new a.Element.path;a.Element.text=function(c){this.base=a.Element.RenderedElementBase;
this.base(c);if(c!=null){this.children=[];for(var d=0;d<c.childNodes.length;d++){var b=c.childNodes[d];b.nodeType==1?this.addChild(b,!0):b.nodeType==3&&this.addChild(new a.Element.tspan(b),!1)}}this.baseSetContext=this.setContext;this.setContext=function(b){this.baseSetContext(b);if(this.style("dominant-baseline").hasValue())b.textBaseline=this.style("dominant-baseline").value;if(this.style("alignment-baseline").hasValue())b.textBaseline=this.style("alignment-baseline").value};this.renderChildren=
function(b){for(var a=this.style("text-anchor").valueOrDefault("start"),c=this.attribute("x").Length.toPixels("x"),d=this.attribute("y").Length.toPixels("y"),j=0;j<this.children.length;j++){var h=this.children[j];h.attribute("x").hasValue()?h.x=h.attribute("x").Length.toPixels("x"):(h.attribute("dx").hasValue()&&(c+=h.attribute("dx").Length.toPixels("x")),h.x=c);c=h.measureText?h.measureText(b):0;if(a!="start"&&(j==0||h.attribute("x").hasValue())){for(var l=c,o=j+1;o<this.children.length;o++){var n=
this.children[o];if(n.attribute("x").hasValue())break;l+=n.measureText?n.measureText(b):0}h.x-=a=="end"?l:l/2}c=h.x+c;h.attribute("y").hasValue()?h.y=h.attribute("y").Length.toPixels("y"):(h.attribute("dy").hasValue()&&(d+=h.attribute("dy").Length.toPixels("y")),h.y=d);d=h.y;h.render(b)}}};a.Element.text.prototype=new a.Element.RenderedElementBase;a.Element.TextElementBase=function(c){this.base=a.Element.RenderedElementBase;this.base(c);this.getGlyph=function(a,b,c){var e=b[c],f=null;if(a.isArabic){var g=
"isolated";if((c==0||b[c-1]==" ")&&c<b.length-2&&b[c+1]!=" ")g="terminal";c>0&&b[c-1]!=" "&&c<b.length-2&&b[c+1]!=" "&&(g="medial");if(c>0&&b[c-1]!=" "&&(c==b.length-1||b[c+1]==" "))g="initial";typeof a.glyphs[e]!="undefined"&&(f=a.glyphs[e][g],f==null&&a.glyphs[e].type=="glyph"&&(f=a.glyphs[e]))}else f=a.glyphs[e];if(f==null)f=a.missingGlyph;return f};this.renderChildren=function(c){var b=this.parent.style("font-family").Definition.getDefinition();if(b!=null){var k=this.parent.style("font-size").numValueOrDefault(a.Font.Parse(a.ctx.font).fontSize),
e=this.parent.style("font-style").valueOrDefault(a.Font.Parse(a.ctx.font).fontStyle),f=this.getText();b.isRTL&&(f=f.split("").reverse().join(""));for(var g=a.ToNumberArray(this.parent.attribute("dx").value),j=0;j<f.length;j++){var h=this.getGlyph(b,f,j),l=k/b.fontFace.unitsPerEm;c.translate(this.x,this.y);c.scale(l,-l);var o=c.lineWidth;c.lineWidth=c.lineWidth*b.fontFace.unitsPerEm/k;e=="italic"&&c.transform(1,0,0.4,1,0,0);h.render(c);e=="italic"&&c.transform(1,0,-0.4,1,0,0);c.lineWidth=o;c.scale(1/
l,-1/l);c.translate(-this.x,-this.y);this.x+=k*(h.horizAdvX||b.horizAdvX)/b.fontFace.unitsPerEm;typeof g[j]!="undefined"&&!isNaN(g[j])&&(this.x+=g[j])}}else c.strokeStyle!=""&&c.strokeText(a.compressSpaces(this.getText()),this.x,this.y),c.fillStyle!=""&&c.fillText(a.compressSpaces(this.getText()),this.x,this.y)};this.getText=function(){};this.measureText=function(c){var b=this.parent.style("font-family").Definition.getDefinition();if(b!=null){var c=this.parent.style("font-size").numValueOrDefault(a.Font.Parse(a.ctx.font).fontSize),
k=0,e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var f=a.ToNumberArray(this.parent.attribute("dx").value),g=0;g<e.length;g++){var j=this.getGlyph(b,e,g);k+=(j.horizAdvX||b.horizAdvX)*c/b.fontFace.unitsPerEm;typeof f[g]!="undefined"&&!isNaN(f[g])&&(k+=f[g])}return k}b=a.compressSpaces(this.getText());if(!c.measureText)return b.length*10;c.save();this.setContext(c);b=c.measureText(b).width;c.restore();return b}};a.Element.TextElementBase.prototype=new a.Element.RenderedElementBase;
a.Element.tspan=function(c){this.base=a.Element.TextElementBase;this.base(c);this.text=c.nodeType==3?c.nodeValue:c.childNodes.length>0?c.childNodes[0].nodeValue:c.text;this.getText=function(){return this.text}};a.Element.tspan.prototype=new a.Element.TextElementBase;a.Element.tref=function(c){this.base=a.Element.TextElementBase;this.base(c);this.getText=function(){var a=this.attribute("xlink:href").Definition.getDefinition();if(a!=null)return a.children[0].getText()}};a.Element.tref.prototype=new a.Element.TextElementBase;
a.Element.a=function(c){this.base=a.Element.TextElementBase;this.base(c);this.hasText=!0;for(var d=0;d<c.childNodes.length;d++)if(c.childNodes[d].nodeType!=3)this.hasText=!1;this.text=this.hasText?c.childNodes[0].nodeValue:"";this.getText=function(){return this.text};this.baseRenderChildren=this.renderChildren;this.renderChildren=function(b){if(this.hasText){this.baseRenderChildren(b);var c=new a.Property("fontSize",a.Font.Parse(a.ctx.font).fontSize);a.Mouse.checkBoundingBox(this,new a.BoundingBox(this.x,
this.y-c.Length.toPixels("y"),this.x+this.measureText(b),this.y))}else c=new a.Element.g,c.children=this.children,c.parent=this,c.render(b)};this.onclick=function(){window.open(this.attribute("xlink:href").value)};this.onmousemove=function(){a.ctx.canvas.style.cursor="pointer"}};a.Element.a.prototype=new a.Element.TextElementBase;a.Element.image=function(c){this.base=a.Element.RenderedElementBase;this.base(c);a.Images.push(this);this.img=document.createElement("img");this.loaded=!1;var d=this;this.img.onload=
function(){d.loaded=!0};this.img.src=this.attribute("xlink:href").value;this.renderChildren=function(b){var c=this.attribute("x").Length.toPixels("x"),d=this.attribute("y").Length.toPixels("y"),f=this.attribute("width").Length.toPixels("x"),g=this.attribute("height").Length.toPixels("y");f==0||g==0||(b.save(),b.translate(c,d),a.AspectRatio(b,this.attribute("preserveAspectRatio").value,f,this.img.width,g,this.img.height,0,0),b.drawImage(this.img,0,0),b.restore())}};a.Element.image.prototype=new a.Element.RenderedElementBase;
a.Element.g=function(c){this.base=a.Element.RenderedElementBase;this.base(c);this.getBoundingBox=function(){for(var c=new a.BoundingBox,b=0;b<this.children.length;b++)c.addBoundingBox(this.children[b].getBoundingBox());return c}};a.Element.g.prototype=new a.Element.RenderedElementBase;a.Element.symbol=function(c){this.base=a.Element.RenderedElementBase;this.base(c);this.baseSetContext=this.setContext;this.setContext=function(c){this.baseSetContext(c);if(this.attribute("viewBox").hasValue()){var b=
a.ToNumberArray(this.attribute("viewBox").value),k=b[0],e=b[1];width=b[2];height=b[3];a.AspectRatio(c,this.attribute("preserveAspectRatio").value,this.attribute("width").Length.toPixels("x"),width,this.attribute("height").Length.toPixels("y"),height,k,e);a.ViewPort.SetCurrent(b[2],b[3])}}};a.Element.symbol.prototype=new a.Element.RenderedElementBase;a.Element.style=function(c){this.base=a.Element.ElementBase;this.base(c);for(var c=c.childNodes[0].nodeValue+(c.childNodes.length>1?c.childNodes[1].nodeValue:
""),c=c.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,""),c=a.compressSpaces(c),c=c.split("}"),d=0;d<c.length;d++)if(a.trim(c[d])!="")for(var b=c[d].split("{"),k=b[0].split(","),b=b[1].split(";"),e=0;e<k.length;e++){var f=a.trim(k[e]);if(f!=""){for(var g={},j=0;j<b.length;j++){var h=b[j].indexOf(":"),l=b[j].substr(0,h),h=b[j].substr(h+1,b[j].length-h);l!=null&&h!=null&&(g[a.trim(l)]=new a.Property(a.trim(l),a.trim(h)))}a.Styles[f]=g;if(f=="@font-face"){f=g["font-family"].value.replace(/"/g,
"");g=g.src.value.split(",");for(j=0;j<g.length;j++)if(g[j].indexOf('format("svg")')>0){l=g[j].indexOf("url");h=g[j].indexOf(")",l);l=g[j].substr(l+5,h-l-6);l=a.parseXml(a.ajax(l)).getElementsByTagName("font");for(h=0;h<l.length;h++){var o=a.CreateElement(l[h]);a.Definitions[f]=o}}}}}};a.Element.style.prototype=new a.Element.ElementBase;a.Element.use=function(c){this.base=a.Element.RenderedElementBase;this.base(c);this.baseSetContext=this.setContext;this.setContext=function(a){this.baseSetContext(a);
this.attribute("x").hasValue()&&a.translate(this.attribute("x").Length.toPixels("x"),0);this.attribute("y").hasValue()&&a.translate(0,this.attribute("y").Length.toPixels("y"))};this.getDefinition=function(){var a=this.attribute("xlink:href").Definition.getDefinition();if(this.attribute("width").hasValue())a.attribute("width",!0).value=this.attribute("width").value;if(this.attribute("height").hasValue())a.attribute("height",!0).value=this.attribute("height").value;return a};this.path=function(a){var b=
this.getDefinition();b!=null&&b.path(a)};this.renderChildren=function(a){var b=this.getDefinition();b!=null&&b.render(a)}};a.Element.use.prototype=new a.Element.RenderedElementBase;a.Element.mask=function(c){this.base=a.Element.ElementBase;this.base(c);this.apply=function(a,b){var c=this.attribute("x").Length.toPixels("x"),e=this.attribute("y").Length.toPixels("y"),f=this.attribute("width").Length.toPixels("x"),g=this.attribute("height").Length.toPixels("y"),j=b.attribute("mask").value;b.attribute("mask").value=
"";var h=document.createElement("canvas");h.width=c+f;h.height=e+g;var l=h.getContext("2d");this.renderChildren(l);var o=document.createElement("canvas");o.width=c+f;o.height=e+g;var n=o.getContext("2d");b.render(n);n.globalCompositeOperation="destination-in";n.fillStyle=l.createPattern(h,"no-repeat");n.fillRect(0,0,c+f,e+g);a.fillStyle=n.createPattern(o,"no-repeat");a.fillRect(0,0,c+f,e+g);b.attribute("mask").value=j};this.render=function(){}};a.Element.mask.prototype=new a.Element.ElementBase;a.Element.clipPath=
function(c){this.base=a.Element.ElementBase;this.base(c);this.apply=function(a){for(var b=0;b<this.children.length;b++)this.children[b].path&&(this.children[b].path(a),a.clip())};this.render=function(){}};a.Element.clipPath.prototype=new a.Element.ElementBase;a.Element.filter=function(c){this.base=a.Element.ElementBase;this.base(c);this.apply=function(a,b){var c=b.getBoundingBox(),e=this.attribute("x").Length.toPixels("x"),f=this.attribute("y").Length.toPixels("y");if(e==0||f==0)e=c.x1,f=c.y1;var g=
this.attribute("width").Length.toPixels("x"),j=this.attribute("height").Length.toPixels("y");if(g==0||j==0)g=c.width(),j=c.height();c=b.style("filter").value;b.style("filter").value="";var h=0.2*g,l=0.2*j,o=document.createElement("canvas");o.width=g+2*h;o.height=j+2*l;var n=o.getContext("2d");n.translate(-e+h,-f+l);b.render(n);for(var q=0;q<this.children.length;q++)this.children[q].apply(n,0,0,g+2*h,j+2*l);a.drawImage(o,0,0,g+2*h,j+2*l,e-h,f-l,g+2*h,j+2*l);b.style("filter",!0).value=c};this.render=
function(){}};a.Element.filter.prototype=new a.Element.ElementBase;a.Element.feGaussianBlur=function(c){function d(a,c,d,f,g){for(var j=0;j<g;j++)for(var h=0;h<f;h++)for(var l=a[j*f*4+h*4+3]/255,o=0;o<4;o++){for(var n=d[0]*(l==0?255:a[j*f*4+h*4+o])*(l==0||o==3?1:l),q=1;q<d.length;q++){var p=Math.max(h-q,0),m=a[j*f*4+p*4+3]/255,p=Math.min(h+q,f-1),p=a[j*f*4+p*4+3]/255,s=d[q],r;m==0?r=255:(r=Math.max(h-q,0),r=a[j*f*4+r*4+o]);m=r*(m==0||o==3?1:m);p==0?r=255:(r=Math.min(h+q,f-1),r=a[j*f*4+r*4+o]);n+=
s*(m+r*(p==0||o==3?1:p))}c[h*g*4+j*4+o]=n}}this.base=a.Element.ElementBase;this.base(c);this.apply=function(a,c,e,f,g){var e=this.attribute("stdDeviation").numValue(),c=a.getImageData(0,0,f,g),e=Math.max(e,0.01),j=Math.ceil(e*4)+1;mask=[];for(var h=0;h<j;h++)mask[h]=Math.exp(-0.5*(h/e)*(h/e));e=mask;j=0;for(h=1;h<e.length;h++)j+=Math.abs(e[h]);j=2*j+Math.abs(e[0]);for(h=0;h<e.length;h++)e[h]/=j;tmp=[];d(c.data,tmp,e,f,g);d(tmp,c.data,e,g,f);a.clearRect(0,0,f,g);a.putImageData(c,0,0)}};a.Element.filter.prototype=
new a.Element.feGaussianBlur;a.Element.title=function(){};a.Element.title.prototype=new a.Element.ElementBase;a.Element.desc=function(){};a.Element.desc.prototype=new a.Element.ElementBase;a.Element.MISSING=function(a){console.log("ERROR: Element '"+a.nodeName+"' not yet implemented.")};a.Element.MISSING.prototype=new a.Element.ElementBase;a.CreateElement=function(c){var d=c.nodeName.replace(/^[^:]+:/,""),d=d.replace(/\-/g,""),b=null,b=typeof a.Element[d]!="undefined"?new a.Element[d](c):new a.Element.MISSING(c);
b.type=c.nodeName;return b};a.load=function(c,d){a.loadXml(c,a.ajax(d))};a.loadXml=function(c,d){a.loadXmlDoc(c,a.parseXml(d))};a.loadXmlDoc=function(c,d){a.init(c);var b=function(a){for(var b=c.canvas;b;)a.x-=b.offsetLeft,a.y-=b.offsetTop,b=b.offsetParent;window.scrollX&&(a.x+=window.scrollX);window.scrollY&&(a.y+=window.scrollY);return a};if(a.opts.ignoreMouse!=!0)c.canvas.onclick=function(c){c=b(new a.Point(c!=null?c.clientX:event.clientX,c!=null?c.clientY:event.clientY));a.Mouse.onclick(c.x,c.y)},
c.canvas.onmousemove=function(c){c=b(new a.Point(c!=null?c.clientX:event.clientX,c!=null?c.clientY:event.clientY));a.Mouse.onmousemove(c.x,c.y)};var k=a.CreateElement(d.documentElement),e=k.root=!0,f=function(){a.ViewPort.Clear();c.canvas.parentNode&&a.ViewPort.SetCurrent(c.canvas.parentNode.clientWidth,c.canvas.parentNode.clientHeight);if(a.opts.ignoreDimensions!=!0){if(k.style("width").hasValue())c.canvas.width=k.style("width").Length.toPixels("x"),c.canvas.style.width=c.canvas.width+"px";if(k.style("height").hasValue())c.canvas.height=
k.style("height").Length.toPixels("y"),c.canvas.style.height=c.canvas.height+"px"}var b=c.canvas.clientWidth||c.canvas.width,d=c.canvas.clientHeight||c.canvas.height;a.ViewPort.SetCurrent(b,d);if(a.opts!=null&&a.opts.offsetX!=null)k.attribute("x",!0).value=a.opts.offsetX;if(a.opts!=null&&a.opts.offsetY!=null)k.attribute("y",!0).value=a.opts.offsetY;if(a.opts!=null&&a.opts.scaleWidth!=null&&a.opts.scaleHeight!=null){var f=1,g=1;k.attribute("width").hasValue()&&(f=k.attribute("width").Length.toPixels("x")/
a.opts.scaleWidth);k.attribute("height").hasValue()&&(g=k.attribute("height").Length.toPixels("y")/a.opts.scaleHeight);k.attribute("width",!0).value=a.opts.scaleWidth;k.attribute("height",!0).value=a.opts.scaleHeight;k.attribute("viewBox",!0).value="0 0 "+b*f+" "+d*g;k.attribute("preserveAspectRatio",!0).value="none"}a.opts.ignoreClear!=!0&&c.clearRect(0,0,b,d);k.render(c);e&&(e=!1,a.opts!=null&&typeof a.opts.renderCallback=="function"&&a.opts.renderCallback())},g=!0;a.ImagesLoaded()&&(g=!1,f());
a.intervalID=setInterval(function(){var b=!1;g&&a.ImagesLoaded()&&(g=!1,b=!0);a.opts.ignoreMouse!=!0&&(b|=a.Mouse.hasEvents());if(a.opts.ignoreAnimation!=!0)for(var c=0;c<a.Animations.length;c++)b|=a.Animations[c].update(1E3/a.FRAMERATE);a.opts!=null&&typeof a.opts.forceRedraw=="function"&&a.opts.forceRedraw()==!0&&(b=!0);b&&(f(),a.Mouse.runEvents())},1E3/a.FRAMERATE)};a.stop=function(){a.intervalID&&clearInterval(a.intervalID)};a.Mouse=new function(){this.events=[];this.hasEvents=function(){return this.events.length!=
0};this.onclick=function(a,d){this.events.push({type:"onclick",x:a,y:d,run:function(a){if(a.onclick)a.onclick()}})};this.onmousemove=function(a,d){this.events.push({type:"onmousemove",x:a,y:d,run:function(a){if(a.onmousemove)a.onmousemove()}})};this.eventElements=[];this.checkPath=function(a,d){for(var b=0;b<this.events.length;b++){var k=this.events[b];d.isPointInPath&&d.isPointInPath(k.x,k.y)&&(this.eventElements[b]=a)}};this.checkBoundingBox=function(a,d){for(var b=0;b<this.events.length;b++){var k=
this.events[b];d.isPointInBox(k.x,k.y)&&(this.eventElements[b]=a)}};this.runEvents=function(){a.ctx.canvas.style.cursor="";for(var c=0;c<this.events.length;c++)for(var d=this.events[c],b=this.eventElements[c];b;)d.run(b),b=b.parent;this.events=[];this.eventElements=[]}};return a}this.canvg=function(a,c,d){if(a==null&&c==null&&d==null)for(var c=document.getElementsByTagName("svg"),b=0;b<c.length;b++){a=c[b];d=document.createElement("canvas");d.width=a.clientWidth;d.height=a.clientHeight;a.parentNode.insertBefore(d,
a);a.parentNode.removeChild(a);var k=document.createElement("div");k.appendChild(a);canvg(d,k.innerHTML)}else d=d||{},typeof a=="string"&&(a=document.getElementById(a)),a.svg==null?(b=m(),a.svg=b):(b=a.svg,b.stop()),b.opts=d,a=a.getContext("2d"),typeof c.documentElement!="undefined"?b.loadXmlDoc(a,c):c.substr(0,1)=="<"?b.loadXml(a,c):b.load(a,c)}})();
if(CanvasRenderingContext2D)CanvasRenderingContext2D.prototype.drawSvg=function(m,a,c,d,b){canvg(this.canvas,m,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:a,offsetY:c,scaleWidth:d,scaleHeight:b})};
(function(m){var a=m.css,c=m.CanVGRenderer,d=m.SVGRenderer,b=m.extend,k=m.merge,e=m.addEvent,f=m.createElement,g=m.discardElement;b(c.prototype,d.prototype);b(c.prototype,{create:function(a,b,c,d){this.setContainer(b,c,d);this.configure(a)},setContainer:function(a,b,c){var d=a.style,e=a.parentNode,g=d.left,d=d.top,k=a.offsetWidth,m=a.offsetHeight,s={visibility:"hidden",position:"absolute"};this.init.apply(this,[a,b,c]);this.canvas=f("canvas",{width:k,height:m},{position:"relative",left:g,top:d},a);
this.ttLine=f("div",null,s,e);this.ttDiv=f("div",null,s,e);this.ttTimer=void 0;this.hiddenSvg=a=f("div",{width:k,height:m},{visibility:"hidden",left:g,top:d},e);a.appendChild(this.box)},configure:function(b){var c=this,d=b.options.tooltip,f=d.borderWidth,g=c.ttDiv,m=d.style,p=c.ttLine,t=parseInt(m.padding,10),m=k(m,{padding:t+"px","background-color":d.backgroundColor,"border-style":"solid","border-width":f+"px","border-radius":d.borderRadius+"px"});d.shadow&&(m=k(m,{"box-shadow":"1px 1px 3px gray",
"-webkit-box-shadow":"1px 1px 3px gray"}));a(g,m);a(p,{"border-left":"1px solid darkgray"});e(b,"tooltipRefresh",function(d){var e=b.container,f=e.offsetLeft,e=e.offsetTop,k;g.innerHTML=d.text;k=b.tooltip.getPosition(g.offsetWidth,g.offsetHeight,{plotX:d.x,plotY:d.y});a(g,{visibility:"visible",left:k.x+"px",top:k.y+"px","border-color":d.borderColor});a(p,{visibility:"visible",left:f+d.x+"px",top:e+b.plotTop+"px",height:b.plotHeight+"px"});c.ttTimer!==void 0&&clearTimeout(c.ttTimer);c.ttTimer=setTimeout(function(){a(g,
{visibility:"hidden"});a(p,{visibility:"hidden"})},3E3)})},destroy:function(){g(this.canvas);this.ttTimer!==void 0&&clearTimeout(this.ttTimer);g(this.ttLine);g(this.ttDiv);g(this.hiddenSvg);return d.prototype.destroy.apply(this)},color:function(a,b,c){a&&a.linearGradient&&(a=a.stops[a.stops.length-1][1]);return d.prototype.color.call(this,a,b,c)},draw:function(){window.canvg(this.canvas,this.hiddenSvg.innerHTML)}})})(Highcharts);

File diff suppressed because it is too large Load Diff

View File

@ -1,26 +0,0 @@
/*
Highcharts JS v4.1.9 (2015-10-07)
Data module
(c) 2012-2014 Torstein Honsi
License: www.highcharts.com/license
*/
(function(g){var k=g.each,t=g.pick,r=HighchartsAdapter.inArray,u=g.splat,j,p=function(b,a){this.init(b,a)};g.extend(p.prototype,{init:function(b,a){this.options=b;this.chartOptions=a;this.columns=b.columns||this.rowsToColumns(b.rows)||[];this.firstRowAsNames=t(b.firstRowAsNames,!0);this.decimalRegex=b.decimalPoint&&RegExp("^([0-9]+)"+b.decimalPoint+"([0-9]+)$");this.rawColumns=[];this.columns.length?this.dataFound():(this.parseCSV(),this.parseTable(),this.parseGoogleSpreadsheet())},getColumnDistribution:function(){var b=
this.chartOptions,a=this.options,e=[],f=function(b){return(g.seriesTypes[b||"line"].prototype.pointArrayMap||[0]).length},d=b&&b.chart&&b.chart.type,c=[],h=[],n=0,i;k(b&&b.series||[],function(b){c.push(f(b.type||d))});k(a&&a.seriesMapping||[],function(b){e.push(b.x||0)});e.length===0&&e.push(0);k(a&&a.seriesMapping||[],function(a){var e=new j,o,q=c[n]||f(d),m=g.seriesTypes[((b&&b.series||[])[n]||{}).type||d||"line"].prototype.pointArrayMap||["y"];e.addColumnReader(a.x,"x");for(o in a)a.hasOwnProperty(o)&&
o!=="x"&&e.addColumnReader(a[o],o);for(i=0;i<q;i++)e.hasReader(m[i])||e.addColumnReader(void 0,m[i]);h.push(e);n++});a=g.seriesTypes[d||"line"].prototype.pointArrayMap;a===void 0&&(a=["y"]);this.valueCount={global:f(d),xColumns:e,individual:c,seriesBuilders:h,globalPointArrayMap:a}},dataFound:function(){if(this.options.switchRowsAndColumns)this.columns=this.rowsToColumns(this.columns);this.getColumnDistribution();this.parseTypes();this.parsed()!==!1&&this.complete()},parseCSV:function(){var b=this,
a=this.options,e=a.csv,f=this.columns,d=a.startRow||0,c=a.endRow||Number.MAX_VALUE,h=a.startColumn||0,n=a.endColumn||Number.MAX_VALUE,i,g,s=0;e&&(g=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split(a.lineDelimiter||"\n"),i=a.itemDelimiter||(e.indexOf("\t")!==-1?"\t":","),k(g,function(a,e){var g=b.trim(a),v=g.indexOf("#")===0;e>=d&&e<=c&&!v&&g!==""&&(g=a.split(i),k(g,function(b,a){a>=h&&a<=n&&(f[a-h]||(f[a-h]=[]),f[a-h][s]=b)}),s+=1)}),this.dataFound())},parseTable:function(){var b=this.options,a=
b.table,e=this.columns,f=b.startRow||0,d=b.endRow||Number.MAX_VALUE,c=b.startColumn||0,h=b.endColumn||Number.MAX_VALUE;a&&(typeof a==="string"&&(a=document.getElementById(a)),k(a.getElementsByTagName("tr"),function(b,a){a>=f&&a<=d&&k(b.children,function(b,d){if((b.tagName==="TD"||b.tagName==="TH")&&d>=c&&d<=h)e[d-c]||(e[d-c]=[]),e[d-c][a-f]=b.innerHTML})}),this.dataFound())},parseGoogleSpreadsheet:function(){var b=this,a=this.options,e=a.googleSpreadsheetKey,f=this.columns,d=a.startRow||0,c=a.endRow||
Number.MAX_VALUE,h=a.startColumn||0,n=a.endColumn||Number.MAX_VALUE,i,g;e&&jQuery.ajax({dataType:"json",url:"https://spreadsheets.google.com/feeds/cells/"+e+"/"+(a.googleSpreadsheetWorksheet||"od6")+"/public/values?alt=json-in-script&callback=?",error:a.error,success:function(a){var a=a.feed.entry,e,k=a.length,m=0,j=0,l;for(l=0;l<k;l++)e=a[l],m=Math.max(m,e.gs$cell.col),j=Math.max(j,e.gs$cell.row);for(l=0;l<m;l++)if(l>=h&&l<=n)f[l-h]=[],f[l-h].length=Math.min(j,c-d);for(l=0;l<k;l++)if(e=a[l],i=e.gs$cell.row-
1,g=e.gs$cell.col-1,g>=h&&g<=n&&i>=d&&i<=c)f[g-h][i-d]=e.content.$t;b.dataFound()}})},trim:function(b,a){typeof b==="string"&&(b=b.replace(/^\s+|\s+$/g,""),a&&/^[0-9\s]+$/.test(b)&&(b=b.replace(/\s/g,"")),this.decimalRegex&&(b=b.replace(this.decimalRegex,"$1.$2")));return b},parseTypes:function(){for(var b=this.columns,a=b.length;a--;)this.parseColumn(b[a],a)},parseColumn:function(b,a){var e=this.rawColumns,f=this.columns,d=b.length,c,h,g,i,k=this.firstRowAsNames,j=r(a,this.valueCount.xColumns)!==
-1,o=[],q=this.chartOptions,m,p=(this.options.columnTypes||[])[a],q=j&&(q&&q.xAxis&&u(q.xAxis)[0].type==="category"||p==="string");for(e[a]||(e[a]=[]);d--;)if(c=o[d]||b[d],g=this.trim(c),i=this.trim(c,!0),h=parseFloat(i),e[a][d]===void 0&&(e[a][d]=g),q||d===0&&k)b[d]=g;else if(+i===h)b[d]=h,h>31536E6&&p!=="float"?b.isDatetime=!0:b.isNumeric=!0,b[d+1]!==void 0&&(m=h>b[d+1]);else if(h=this.parseDate(c),j&&typeof h==="number"&&!isNaN(h)&&p!=="float"){if(o[d]=c,b[d]=h,b.isDatetime=!0,b[d+1]!==void 0){c=
h>b[d+1];if(c!==m&&m!==void 0)this.alternativeFormat?(this.dateFormat=this.alternativeFormat,d=b.length,this.alternativeFormat=this.dateFormats[this.dateFormat].alternative):b.unsorted=!0;m=c}}else if(b[d]=g===""?null:g,d!==0&&(b.isDatetime||b.isNumeric))b.mixed=!0;j&&b.mixed&&(f[a]=e[a]);if(j&&m&&this.options.sort)for(a=0;a<f.length;a++)f[a].reverse(),k&&f[a].unshift(f[a].pop())},dateFormats:{"YYYY-mm-dd":{regex:/^([0-9]{4})[\-\/\.]([0-9]{2})[\-\/\.]([0-9]{2})$/,parser:function(b){return Date.UTC(+b[1],
b[2]-1,+b[3])}},"dd/mm/YYYY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{4})$/,parser:function(b){return Date.UTC(+b[3],b[2]-1,+b[1])},alternative:"mm/dd/YYYY"},"mm/dd/YYYY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{4})$/,parser:function(b){return Date.UTC(+b[3],b[1]-1,+b[2])}},"dd/mm/YY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{2})$/,parser:function(b){return Date.UTC(+b[3]+2E3,b[2]-1,+b[1])},alternative:"mm/dd/YY"},"mm/dd/YY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{2})$/,
parser:function(b){return Date.UTC(+b[3]+2E3,b[1]-1,+b[2])}}},parseDate:function(b){var a=this.options.parseDate,e,f,d=this.options.dateFormat||this.dateFormat,c;if(a)e=a(b);else if(typeof b==="string"){if(d)a=this.dateFormats[d],(c=b.match(a.regex))&&(e=a.parser(c));else for(f in this.dateFormats)if(a=this.dateFormats[f],c=b.match(a.regex)){this.dateFormat=f;this.alternativeFormat=a.alternative;e=a.parser(c);break}c||(c=Date.parse(b),typeof c==="object"&&c!==null&&c.getTime?e=c.getTime()-c.getTimezoneOffset()*
6E4:typeof c==="number"&&!isNaN(c)&&(e=c-(new Date(c)).getTimezoneOffset()*6E4))}return e},rowsToColumns:function(b){var a,e,f,d,c;if(b){c=[];e=b.length;for(a=0;a<e;a++){d=b[a].length;for(f=0;f<d;f++)c[f]||(c[f]=[]),c[f][a]=b[a][f]}}return c},parsed:function(){if(this.options.parsed)return this.options.parsed.call(this,this.columns)},getFreeIndexes:function(b,a){var e,f,d=[],c=[],h;for(f=0;f<b;f+=1)d.push(!0);for(e=0;e<a.length;e+=1){h=a[e].getReferencedColumnIndexes();for(f=0;f<h.length;f+=1)d[h[f]]=
!1}for(f=0;f<d.length;f+=1)d[f]&&c.push(f);return c},complete:function(){var b=this.columns,a,e=this.options,f,d,c,h,g=[],i;if(e.complete||e.afterComplete){for(c=0;c<b.length;c++)if(this.firstRowAsNames)b[c].name=b[c].shift();f=[];d=this.getFreeIndexes(b.length,this.valueCount.seriesBuilders);for(c=0;c<this.valueCount.seriesBuilders.length;c++)i=this.valueCount.seriesBuilders[c],i.populateColumns(d)&&g.push(i);for(;d.length>0;){i=new j;i.addColumnReader(0,"x");c=r(0,d);c!==-1&&d.splice(c,1);for(c=
0;c<this.valueCount.global;c++)i.addColumnReader(void 0,this.valueCount.globalPointArrayMap[c]);i.populateColumns(d)&&g.push(i)}g.length>0&&g[0].readers.length>0&&(i=b[g[0].readers[0].columnIndex],i!==void 0&&(i.isDatetime?a="datetime":i.isNumeric||(a="category")));if(a==="category")for(c=0;c<g.length;c++){i=g[c];for(d=0;d<i.readers.length;d++)if(i.readers[d].configName==="x")i.readers[d].configName="name"}for(c=0;c<g.length;c++){i=g[c];d=[];for(h=0;h<b[0].length;h++)d[h]=i.read(b,h);f[c]={data:d};
if(i.name)f[c].name=i.name;if(a==="category")f[c].turboThreshold=0}b={series:f};if(a)b.xAxis={type:a};e.complete&&e.complete(b);e.afterComplete&&e.afterComplete(b)}}});g.Data=p;g.data=function(b,a){return new p(b,a)};g.wrap(g.Chart.prototype,"init",function(b,a,e){var f=this;a&&a.data?g.data(g.extend(a.data,{afterComplete:function(d){var c,h;if(a.hasOwnProperty("series"))if(typeof a.series==="object")for(c=Math.max(a.series.length,d.series.length);c--;)h=a.series[c]||{},a.series[c]=g.merge(h,d.series[c]);
else delete a.series;a=g.merge(d,a);b.call(f,a,e)}}),a):b.call(f,a,e)});j=function(){this.readers=[];this.pointIsArray=!0};j.prototype.populateColumns=function(b){var a=!0;k(this.readers,function(a){if(a.columnIndex===void 0)a.columnIndex=b.shift()});k(this.readers,function(b){b.columnIndex===void 0&&(a=!1)});return a};j.prototype.read=function(b,a){var e=this.pointIsArray,f=e?[]:{},d;k(this.readers,function(c){var d=b[c.columnIndex][a];e?f.push(d):f[c.configName]=d});if(this.name===void 0&&this.readers.length>=
2&&(d=this.getReferencedColumnIndexes(),d.length>=2))d.shift(),d.sort(),this.name=b[d.shift()].name;return f};j.prototype.addColumnReader=function(b,a){this.readers.push({columnIndex:b,configName:a});if(!(a==="x"||a==="y"||a===void 0))this.pointIsArray=!1};j.prototype.getReferencedColumnIndexes=function(){var b,a=[],e;for(b=0;b<this.readers.length;b+=1)e=this.readers[b],e.columnIndex!==void 0&&a.push(e.columnIndex);return a};j.prototype.hasReader=function(b){var a,e;for(a=0;a<this.readers.length;a+=
1)if(e=this.readers[a],e.configName===b)return!0}})(Highcharts);

View File

@ -1,953 +0,0 @@
/**
* @license Highcharts JS v4.1.9 (2015-10-07)
* Data module
*
* (c) 2012-2014 Torstein Honsi
*
* License: www.highcharts.com/license
*/
// JSLint options:
/*global jQuery, HighchartsAdapter */
(function (Highcharts) {
// Utilities
var each = Highcharts.each,
pick = Highcharts.pick,
inArray = HighchartsAdapter.inArray,
splat = Highcharts.splat,
SeriesBuilder;
// The Data constructor
var Data = function (dataOptions, chartOptions) {
this.init(dataOptions, chartOptions);
};
// Set the prototype properties
Highcharts.extend(Data.prototype, {
/**
* Initialize the Data object with the given options
*/
init: function (options, chartOptions) {
this.options = options;
this.chartOptions = chartOptions;
this.columns = options.columns || this.rowsToColumns(options.rows) || [];
this.firstRowAsNames = pick(options.firstRowAsNames, true);
this.decimalRegex = options.decimalPoint && new RegExp('^([0-9]+)' + options.decimalPoint + '([0-9]+)$');
// This is a two-dimensional array holding the raw, trimmed string values
// with the same organisation as the columns array. It makes it possible
// for example to revert from interpreted timestamps to string-based
// categories.
this.rawColumns = [];
// No need to parse or interpret anything
if (this.columns.length) {
this.dataFound();
// Parse and interpret
} else {
// Parse a CSV string if options.csv is given
this.parseCSV();
// Parse a HTML table if options.table is given
this.parseTable();
// Parse a Google Spreadsheet
this.parseGoogleSpreadsheet();
}
},
/**
* Get the column distribution. For example, a line series takes a single column for
* Y values. A range series takes two columns for low and high values respectively,
* and an OHLC series takes four columns.
*/
getColumnDistribution: function () {
var chartOptions = this.chartOptions,
options = this.options,
xColumns = [],
getValueCount = function (type) {
return (Highcharts.seriesTypes[type || 'line'].prototype.pointArrayMap || [0]).length;
},
getPointArrayMap = function (type) {
return Highcharts.seriesTypes[type || 'line'].prototype.pointArrayMap;
},
globalType = chartOptions && chartOptions.chart && chartOptions.chart.type,
individualCounts = [],
seriesBuilders = [],
seriesIndex = 0,
i;
each((chartOptions && chartOptions.series) || [], function (series) {
individualCounts.push(getValueCount(series.type || globalType));
});
// Collect the x-column indexes from seriesMapping
each((options && options.seriesMapping) || [], function (mapping) {
xColumns.push(mapping.x || 0);
});
// If there are no defined series with x-columns, use the first column as x column
if (xColumns.length === 0) {
xColumns.push(0);
}
// Loop all seriesMappings and constructs SeriesBuilders from
// the mapping options.
each((options && options.seriesMapping) || [], function (mapping) {
var builder = new SeriesBuilder(),
name,
numberOfValueColumnsNeeded = individualCounts[seriesIndex] || getValueCount(globalType),
seriesArr = (chartOptions && chartOptions.series) || [],
series = seriesArr[seriesIndex] || {},
pointArrayMap = getPointArrayMap(series.type || globalType) || ['y'];
// Add an x reader from the x property or from an undefined column
// if the property is not set. It will then be auto populated later.
builder.addColumnReader(mapping.x, 'x');
// Add all column mappings
for (name in mapping) {
if (mapping.hasOwnProperty(name) && name !== 'x') {
builder.addColumnReader(mapping[name], name);
}
}
// Add missing columns
for (i = 0; i < numberOfValueColumnsNeeded; i++) {
if (!builder.hasReader(pointArrayMap[i])) {
//builder.addNextColumnReader(pointArrayMap[i]);
// Create and add a column reader for the next free column index
builder.addColumnReader(undefined, pointArrayMap[i]);
}
}
seriesBuilders.push(builder);
seriesIndex++;
});
var globalPointArrayMap = getPointArrayMap(globalType);
if (globalPointArrayMap === undefined) {
globalPointArrayMap = ['y'];
}
this.valueCount = {
global: getValueCount(globalType),
xColumns: xColumns,
individual: individualCounts,
seriesBuilders: seriesBuilders,
globalPointArrayMap: globalPointArrayMap
};
},
/**
* When the data is parsed into columns, either by CSV, table, GS or direct input,
* continue with other operations.
*/
dataFound: function () {
if (this.options.switchRowsAndColumns) {
this.columns = this.rowsToColumns(this.columns);
}
// Interpret the info about series and columns
this.getColumnDistribution();
// Interpret the values into right types
this.parseTypes();
// Handle columns if a handleColumns callback is given
if (this.parsed() !== false) {
// Complete if a complete callback is given
this.complete();
}
},
/**
* Parse a CSV input string
*/
parseCSV: function () {
var self = this,
options = this.options,
csv = options.csv,
columns = this.columns,
startRow = options.startRow || 0,
endRow = options.endRow || Number.MAX_VALUE,
startColumn = options.startColumn || 0,
endColumn = options.endColumn || Number.MAX_VALUE,
itemDelimiter,
lines,
activeRowNo = 0;
if (csv) {
lines = csv
.replace(/\r\n/g, "\n") // Unix
.replace(/\r/g, "\n") // Mac
.split(options.lineDelimiter || "\n");
itemDelimiter = options.itemDelimiter || (csv.indexOf('\t') !== -1 ? '\t' : ',');
each(lines, function (line, rowNo) {
var trimmed = self.trim(line),
isComment = trimmed.indexOf('#') === 0,
isBlank = trimmed === '',
items;
if (rowNo >= startRow && rowNo <= endRow && !isComment && !isBlank) {
items = line.split(itemDelimiter);
each(items, function (item, colNo) {
if (colNo >= startColumn && colNo <= endColumn) {
if (!columns[colNo - startColumn]) {
columns[colNo - startColumn] = [];
}
columns[colNo - startColumn][activeRowNo] = item;
}
});
activeRowNo += 1;
}
});
this.dataFound();
}
},
/**
* Parse a HTML table
*/
parseTable: function () {
var options = this.options,
table = options.table,
columns = this.columns,
startRow = options.startRow || 0,
endRow = options.endRow || Number.MAX_VALUE,
startColumn = options.startColumn || 0,
endColumn = options.endColumn || Number.MAX_VALUE;
if (table) {
if (typeof table === 'string') {
table = document.getElementById(table);
}
each(table.getElementsByTagName('tr'), function (tr, rowNo) {
if (rowNo >= startRow && rowNo <= endRow) {
each(tr.children, function (item, colNo) {
if ((item.tagName === 'TD' || item.tagName === 'TH') && colNo >= startColumn && colNo <= endColumn) {
if (!columns[colNo - startColumn]) {
columns[colNo - startColumn] = [];
}
columns[colNo - startColumn][rowNo - startRow] = item.innerHTML;
}
});
}
});
this.dataFound(); // continue
}
},
/**
*/
parseGoogleSpreadsheet: function () {
var self = this,
options = this.options,
googleSpreadsheetKey = options.googleSpreadsheetKey,
columns = this.columns,
startRow = options.startRow || 0,
endRow = options.endRow || Number.MAX_VALUE,
startColumn = options.startColumn || 0,
endColumn = options.endColumn || Number.MAX_VALUE,
gr, // google row
gc; // google column
if (googleSpreadsheetKey) {
jQuery.ajax({
dataType: 'json',
url: 'https://spreadsheets.google.com/feeds/cells/' +
googleSpreadsheetKey + '/' + (options.googleSpreadsheetWorksheet || 'od6') +
'/public/values?alt=json-in-script&callback=?',
error: options.error,
success: function (json) {
// Prepare the data from the spreadsheat
var cells = json.feed.entry,
cell,
cellCount = cells.length,
colCount = 0,
rowCount = 0,
i;
// First, find the total number of columns and rows that
// are actually filled with data
for (i = 0; i < cellCount; i++) {
cell = cells[i];
colCount = Math.max(colCount, cell.gs$cell.col);
rowCount = Math.max(rowCount, cell.gs$cell.row);
}
// Set up arrays containing the column data
for (i = 0; i < colCount; i++) {
if (i >= startColumn && i <= endColumn) {
// Create new columns with the length of either end-start or rowCount
columns[i - startColumn] = [];
// Setting the length to avoid jslint warning
columns[i - startColumn].length = Math.min(rowCount, endRow - startRow);
}
}
// Loop over the cells and assign the value to the right
// place in the column arrays
for (i = 0; i < cellCount; i++) {
cell = cells[i];
gr = cell.gs$cell.row - 1; // rows start at 1
gc = cell.gs$cell.col - 1; // columns start at 1
// If both row and col falls inside start and end
// set the transposed cell value in the newly created columns
if (gc >= startColumn && gc <= endColumn &&
gr >= startRow && gr <= endRow) {
columns[gc - startColumn][gr - startRow] = cell.content.$t;
}
}
self.dataFound();
}
});
}
},
/**
* Trim a string from whitespace
*/
trim: function (str, inside) {
if (typeof str === 'string') {
str = str.replace(/^\s+|\s+$/g, '');
// Clear white space insdie the string, like thousands separators
if (inside && /^[0-9\s]+$/.test(str)) {
str = str.replace(/\s/g, '');
}
if (this.decimalRegex) {
str = str.replace(this.decimalRegex, '$1.$2');
}
}
return str;
},
/**
* Parse numeric cells in to number types and date types in to true dates.
*/
parseTypes: function () {
var columns = this.columns,
col = columns.length;
while (col--) {
this.parseColumn(columns[col], col);
}
},
/**
* Parse a single column. Set properties like .isDatetime and .isNumeric.
*/
parseColumn: function (column, col) {
var rawColumns = this.rawColumns,
columns = this.columns,
row = column.length,
val,
floatVal,
trimVal,
trimInsideVal,
firstRowAsNames = this.firstRowAsNames,
isXColumn = inArray(col, this.valueCount.xColumns) !== -1,
dateVal,
backup = [],
diff,
chartOptions = this.chartOptions,
descending,
columnTypes = this.options.columnTypes || [],
columnType = columnTypes[col],
forceCategory = isXColumn && ((chartOptions && chartOptions.xAxis && splat(chartOptions.xAxis)[0].type === 'category') || columnType === 'string');
if (!rawColumns[col]) {
rawColumns[col] = [];
}
while (row--) {
val = backup[row] || column[row];
trimVal = this.trim(val);
trimInsideVal = this.trim(val, true);
floatVal = parseFloat(trimInsideVal);
// Set it the first time
if (rawColumns[col][row] === undefined) {
rawColumns[col][row] = trimVal;
}
// Disable number or date parsing by setting the X axis type to category
if (forceCategory || (row === 0 && firstRowAsNames)) {
column[row] = trimVal;
} else if (+trimInsideVal === floatVal) { // is numeric
column[row] = floatVal;
// If the number is greater than milliseconds in a year, assume datetime
if (floatVal > 365 * 24 * 3600 * 1000 && columnType !== 'float') {
column.isDatetime = true;
} else {
column.isNumeric = true;
}
if (column[row + 1] !== undefined) {
descending = floatVal > column[row + 1];
}
// String, continue to determine if it is a date string or really a string
} else {
dateVal = this.parseDate(val);
// Only allow parsing of dates if this column is an x-column
if (isXColumn && typeof dateVal === 'number' && !isNaN(dateVal) && columnType !== 'float') { // is date
backup[row] = val;
column[row] = dateVal;
column.isDatetime = true;
// Check if the dates are uniformly descending or ascending. If they
// are not, chances are that they are a different time format, so check
// for alternative.
if (column[row + 1] !== undefined) {
diff = dateVal > column[row + 1];
if (diff !== descending && descending !== undefined) {
if (this.alternativeFormat) {
this.dateFormat = this.alternativeFormat;
row = column.length;
this.alternativeFormat = this.dateFormats[this.dateFormat].alternative;
} else {
column.unsorted = true;
}
}
descending = diff;
}
} else { // string
column[row] = trimVal === '' ? null : trimVal;
if (row !== 0 && (column.isDatetime || column.isNumeric)) {
column.mixed = true;
}
}
}
}
// If strings are intermixed with numbers or dates in a parsed column, it is an indication
// that parsing went wrong or the data was not intended to display as numbers or dates and
// parsing is too aggressive. Fall back to categories. Demonstrated in the
// highcharts/demo/column-drilldown sample.
if (isXColumn && column.mixed) {
columns[col] = rawColumns[col];
}
// If the 0 column is date or number and descending, reverse all columns.
if (isXColumn && descending && this.options.sort) {
for (col = 0; col < columns.length; col++) {
columns[col].reverse();
if (firstRowAsNames) {
columns[col].unshift(columns[col].pop());
}
}
}
},
/**
* A collection of available date formats, extendable from the outside to support
* custom date formats.
*/
dateFormats: {
'YYYY-mm-dd': {
regex: /^([0-9]{4})[\-\/\.]([0-9]{2})[\-\/\.]([0-9]{2})$/,
parser: function (match) {
return Date.UTC(+match[1], match[2] - 1, +match[3]);
}
},
'dd/mm/YYYY': {
regex: /^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{4})$/,
parser: function (match) {
return Date.UTC(+match[3], match[2] - 1, +match[1]);
},
alternative: 'mm/dd/YYYY' // different format with the same regex
},
'mm/dd/YYYY': {
regex: /^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{4})$/,
parser: function (match) {
return Date.UTC(+match[3], match[1] - 1, +match[2]);
}
},
'dd/mm/YY': {
regex: /^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{2})$/,
parser: function (match) {
return Date.UTC(+match[3] + 2000, match[2] - 1, +match[1]);
},
alternative: 'mm/dd/YY' // different format with the same regex
},
'mm/dd/YY': {
regex: /^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{2})$/,
parser: function (match) {
return Date.UTC(+match[3] + 2000, match[1] - 1, +match[2]);
}
}
},
/**
* Parse a date and return it as a number. Overridable through options.parseDate.
*/
parseDate: function (val) {
var parseDate = this.options.parseDate,
ret,
key,
format,
dateFormat = this.options.dateFormat || this.dateFormat,
match;
if (parseDate) {
ret = parseDate(val);
} else if (typeof val === 'string') {
// Auto-detect the date format the first time
if (!dateFormat) {
for (key in this.dateFormats) {
format = this.dateFormats[key];
match = val.match(format.regex);
if (match) {
this.dateFormat = dateFormat = key;
this.alternativeFormat = format.alternative;
ret = format.parser(match);
break;
}
}
// Next time, use the one previously found
} else {
format = this.dateFormats[dateFormat];
match = val.match(format.regex);
if (match) {
ret = format.parser(match);
}
}
// Fall back to Date.parse
if (!match) {
match = Date.parse(val);
// External tools like Date.js and MooTools extend Date object and
// returns a date.
if (typeof match === 'object' && match !== null && match.getTime) {
ret = match.getTime() - match.getTimezoneOffset() * 60000;
// Timestamp
} else if (typeof match === 'number' && !isNaN(match)) {
ret = match - (new Date(match)).getTimezoneOffset() * 60000;
}
}
}
return ret;
},
/**
* Reorganize rows into columns
*/
rowsToColumns: function (rows) {
var row,
rowsLength,
col,
colsLength,
columns;
if (rows) {
columns = [];
rowsLength = rows.length;
for (row = 0; row < rowsLength; row++) {
colsLength = rows[row].length;
for (col = 0; col < colsLength; col++) {
if (!columns[col]) {
columns[col] = [];
}
columns[col][row] = rows[row][col];
}
}
}
return columns;
},
/**
* A hook for working directly on the parsed columns
*/
parsed: function () {
if (this.options.parsed) {
return this.options.parsed.call(this, this.columns);
}
},
getFreeIndexes: function (numberOfColumns, seriesBuilders) {
var s,
i,
freeIndexes = [],
freeIndexValues = [],
referencedIndexes;
// Add all columns as free
for (i = 0; i < numberOfColumns; i = i + 1) {
freeIndexes.push(true);
}
// Loop all defined builders and remove their referenced columns
for (s = 0; s < seriesBuilders.length; s = s + 1) {
referencedIndexes = seriesBuilders[s].getReferencedColumnIndexes();
for (i = 0; i < referencedIndexes.length; i = i + 1) {
freeIndexes[referencedIndexes[i]] = false;
}
}
// Collect the values for the free indexes
for (i = 0; i < freeIndexes.length; i = i + 1) {
if (freeIndexes[i]) {
freeIndexValues.push(i);
}
}
return freeIndexValues;
},
/**
* If a complete callback function is provided in the options, interpret the
* columns into a Highcharts options object.
*/
complete: function () {
var columns = this.columns,
xColumns = [],
type,
options = this.options,
series,
data,
i,
j,
r,
seriesIndex,
chartOptions,
allSeriesBuilders = [],
builder,
freeIndexes,
typeCol,
index;
xColumns.length = columns.length;
if (options.complete || options.afterComplete) {
// Get the names and shift the top row
for (i = 0; i < columns.length; i++) {
if (this.firstRowAsNames) {
columns[i].name = columns[i].shift();
}
}
// Use the next columns for series
series = [];
freeIndexes = this.getFreeIndexes(columns.length, this.valueCount.seriesBuilders);
// Populate defined series
for (seriesIndex = 0; seriesIndex < this.valueCount.seriesBuilders.length; seriesIndex++) {
builder = this.valueCount.seriesBuilders[seriesIndex];
// If the builder can be populated with remaining columns, then add it to allBuilders
if (builder.populateColumns(freeIndexes)) {
allSeriesBuilders.push(builder);
}
}
// Populate dynamic series
while (freeIndexes.length > 0) {
builder = new SeriesBuilder();
builder.addColumnReader(0, 'x');
// Mark index as used (not free)
index = inArray(0, freeIndexes);
if (index !== -1) {
freeIndexes.splice(index, 1);
}
for (i = 0; i < this.valueCount.global; i++) {
// Create and add a column reader for the next free column index
builder.addColumnReader(undefined, this.valueCount.globalPointArrayMap[i]);
}
// If the builder can be populated with remaining columns, then add it to allBuilders
if (builder.populateColumns(freeIndexes)) {
allSeriesBuilders.push(builder);
}
}
// Get the data-type from the first series x column
if (allSeriesBuilders.length > 0 && allSeriesBuilders[0].readers.length > 0) {
typeCol = columns[allSeriesBuilders[0].readers[0].columnIndex];
if (typeCol !== undefined) {
if (typeCol.isDatetime) {
type = 'datetime';
} else if (!typeCol.isNumeric) {
type = 'category';
}
}
}
// Axis type is category, then the "x" column should be called "name"
if (type === 'category') {
for (seriesIndex = 0; seriesIndex < allSeriesBuilders.length; seriesIndex++) {
builder = allSeriesBuilders[seriesIndex];
for (r = 0; r < builder.readers.length; r++) {
if (builder.readers[r].configName === 'x') {
builder.readers[r].configName = 'name';
}
}
}
}
// Read data for all builders
for (seriesIndex = 0; seriesIndex < allSeriesBuilders.length; seriesIndex++) {
builder = allSeriesBuilders[seriesIndex];
// Iterate down the cells of each column and add data to the series
data = [];
for (j = 0; j < columns[0].length; j++) { // TODO: which column's length should we use here
data[j] = builder.read(columns, j);
}
// Add the series
series[seriesIndex] = {
data: data
};
if (builder.name) {
series[seriesIndex].name = builder.name;
}
if (type === 'category') {
series[seriesIndex].turboThreshold = 0;
}
}
// Do the callback
chartOptions = {
series: series
};
if (type) {
chartOptions.xAxis = {
type: type
};
}
if (options.complete) {
options.complete(chartOptions);
}
// The afterComplete hook is used internally to avoid conflict with the externally
// available complete option.
if (options.afterComplete) {
options.afterComplete(chartOptions);
}
}
}
});
// Register the Data prototype and data function on Highcharts
Highcharts.Data = Data;
Highcharts.data = function (options, chartOptions) {
return new Data(options, chartOptions);
};
// Extend Chart.init so that the Chart constructor accepts a new configuration
// option group, data.
Highcharts.wrap(Highcharts.Chart.prototype, 'init', function (proceed, userOptions, callback) {
var chart = this;
if (userOptions && userOptions.data) {
Highcharts.data(Highcharts.extend(userOptions.data, {
afterComplete: function (dataOptions) {
var i, series;
// Merge series configs
if (userOptions.hasOwnProperty('series')) {
if (typeof userOptions.series === 'object') {
i = Math.max(userOptions.series.length, dataOptions.series.length);
while (i--) {
series = userOptions.series[i] || {};
userOptions.series[i] = Highcharts.merge(series, dataOptions.series[i]);
}
} else { // Allow merging in dataOptions.series (#2856)
delete userOptions.series;
}
}
// Do the merge
userOptions = Highcharts.merge(dataOptions, userOptions);
proceed.call(chart, userOptions, callback);
}
}), userOptions);
} else {
proceed.call(chart, userOptions, callback);
}
});
/**
* Creates a new SeriesBuilder. A SeriesBuilder consists of a number
* of ColumnReaders that reads columns and give them a name.
* Ex: A series builder can be constructed to read column 3 as 'x' and
* column 7 and 8 as 'y1' and 'y2'.
* The output would then be points/rows of the form {x: 11, y1: 22, y2: 33}
*
* The name of the builder is taken from the second column. In the above
* example it would be the column with index 7.
* @constructor
*/
SeriesBuilder = function () {
this.readers = [];
this.pointIsArray = true;
};
/**
* Populates readers with column indexes. A reader can be added without
* a specific index and for those readers the index is taken sequentially
* from the free columns (this is handled by the ColumnCursor instance).
* @returns {boolean}
*/
SeriesBuilder.prototype.populateColumns = function (freeIndexes) {
var builder = this,
enoughColumns = true;
// Loop each reader and give it an index if its missing.
// The freeIndexes.shift() will return undefined if there
// are no more columns.
each(builder.readers, function (reader) {
if (reader.columnIndex === undefined) {
reader.columnIndex = freeIndexes.shift();
}
});
// Now, all readers should have columns mapped. If not
// then return false to signal that this series should
// not be added.
each(builder.readers, function (reader) {
if (reader.columnIndex === undefined) {
enoughColumns = false;
}
});
return enoughColumns;
};
/**
* Reads a row from the dataset and returns a point or array depending
* on the names of the readers.
* @param columns
* @param rowIndex
* @returns {Array | Object}
*/
SeriesBuilder.prototype.read = function (columns, rowIndex) {
var builder = this,
pointIsArray = builder.pointIsArray,
point = pointIsArray ? [] : {},
columnIndexes;
// Loop each reader and ask it to read its value.
// Then, build an array or point based on the readers names.
each(builder.readers, function (reader) {
var value = columns[reader.columnIndex][rowIndex];
if (pointIsArray) {
point.push(value);
} else {
point[reader.configName] = value;
}
});
// The name comes from the first column (excluding the x column)
if (this.name === undefined && builder.readers.length >= 2) {
columnIndexes = builder.getReferencedColumnIndexes();
if (columnIndexes.length >= 2) {
// remove the first one (x col)
columnIndexes.shift();
// Sort the remaining
columnIndexes.sort();
// Now use the lowest index as name column
this.name = columns[columnIndexes.shift()].name;
}
}
return point;
};
/**
* Creates and adds ColumnReader from the given columnIndex and configName.
* ColumnIndex can be undefined and in that case the reader will be given
* an index when columns are populated.
* @param columnIndex {Number | undefined}
* @param configName
*/
SeriesBuilder.prototype.addColumnReader = function (columnIndex, configName) {
this.readers.push({
columnIndex: columnIndex,
configName: configName
});
if (!(configName === 'x' || configName === 'y' || configName === undefined)) {
this.pointIsArray = false;
}
};
/**
* Returns an array of column indexes that the builder will use when
* reading data.
* @returns {Array}
*/
SeriesBuilder.prototype.getReferencedColumnIndexes = function () {
var i,
referencedColumnIndexes = [],
columnReader;
for (i = 0; i < this.readers.length; i = i + 1) {
columnReader = this.readers[i];
if (columnReader.columnIndex !== undefined) {
referencedColumnIndexes.push(columnReader.columnIndex);
}
}
return referencedColumnIndexes;
};
/**
* Returns true if the builder has a reader for the given configName.
* @param configName
* @returns {boolean}
*/
SeriesBuilder.prototype.hasReader = function (configName) {
var i, columnReader;
for (i = 0; i < this.readers.length; i = i + 1) {
columnReader = this.readers[i];
if (columnReader.configName === configName) {
return true;
}
}
// Else return undefined
};
}(Highcharts));

View File

@ -1,17 +0,0 @@
(function(f){function A(b,a,c){var d;!a.rgba.length||!b.rgba.length?b=a.raw||"none":(b=b.rgba,a=a.rgba,d=a[3]!==1||b[3]!==1,b=(d?"rgba(":"rgb(")+Math.round(a[0]+(b[0]-a[0])*(1-c))+","+Math.round(a[1]+(b[1]-a[1])*(1-c))+","+Math.round(a[2]+(b[2]-a[2])*(1-c))+(d?","+(a[3]+(b[3]-a[3])*(1-c)):"")+")");return b}var t=function(){},q=f.getOptions(),h=f.each,l=f.extend,B=f.format,u=f.pick,r=f.wrap,m=f.Chart,p=f.seriesTypes,v=p.pie,n=p.column,w=f.Tick,x=HighchartsAdapter.fireEvent,y=HighchartsAdapter.inArray,
z=1;h(["fill","stroke"],function(b){HighchartsAdapter.addAnimSetter(b,function(a){a.elem.attr(b,A(f.Color(a.start),f.Color(a.end),a.pos))})});l(q.lang,{drillUpText:"\u25c1 Back to {series.name}"});q.drilldown={activeAxisLabelStyle:{cursor:"pointer",color:"#0d233a",fontWeight:"bold",textDecoration:"underline"},activeDataLabelStyle:{cursor:"pointer",color:"#0d233a",fontWeight:"bold",textDecoration:"underline"},animation:{duration:500},drillUpButton:{position:{align:"right",x:-10,y:10}}};f.SVGRenderer.prototype.Element.prototype.fadeIn=
function(b){this.attr({opacity:0.1,visibility:"inherit"}).animate({opacity:u(this.newOpacity,1)},b||{duration:250})};m.prototype.addSeriesAsDrilldown=function(b,a){this.addSingleSeriesAsDrilldown(b,a);this.applyDrilldown()};m.prototype.addSingleSeriesAsDrilldown=function(b,a){var c=b.series,d=c.xAxis,g=c.yAxis,e;e=b.color||c.color;var i,f=[],j=[],k,o;if(!this.drilldownLevels)this.drilldownLevels=[];k=c.options._levelNumber||0;(o=this.drilldownLevels[this.drilldownLevels.length-1])&&o.levelNumber!==
k&&(o=void 0);a=l({color:e,_ddSeriesId:z++},a);i=y(b,c.points);h(c.chart.series,function(a){if(a.xAxis===d&&!a.isDrilling)a.options._ddSeriesId=a.options._ddSeriesId||z++,a.options._colorIndex=a.userOptions._colorIndex,a.options._levelNumber=a.options._levelNumber||k,o?(f=o.levelSeries,j=o.levelSeriesOptions):(f.push(a),j.push(a.options))});e={levelNumber:k,seriesOptions:c.options,levelSeriesOptions:j,levelSeries:f,shapeArgs:b.shapeArgs,bBox:b.graphic?b.graphic.getBBox():{},color:e,lowerSeriesOptions:a,
pointOptions:c.options.data[i],pointIndex:i,oldExtremes:{xMin:d&&d.userMin,xMax:d&&d.userMax,yMin:g&&g.userMin,yMax:g&&g.userMax}};this.drilldownLevels.push(e);e=e.lowerSeries=this.addSeries(a,!1);e.options._levelNumber=k+1;if(d)d.oldPos=d.pos,d.userMin=d.userMax=null,g.userMin=g.userMax=null;if(c.type===e.type)e.animate=e.animateDrilldown||t,e.options.animation=!0};m.prototype.applyDrilldown=function(){var b=this.drilldownLevels,a;if(b&&b.length>0)a=b[b.length-1].levelNumber,h(this.drilldownLevels,
function(b){b.levelNumber===a&&h(b.levelSeries,function(b){b.options&&b.options._levelNumber===a&&b.remove(!1)})});this.redraw();this.showDrillUpButton()};m.prototype.getDrilldownBackText=function(){var b=this.drilldownLevels;if(b&&b.length>0)return b=b[b.length-1],b.series=b.seriesOptions,B(this.options.lang.drillUpText,b)};m.prototype.showDrillUpButton=function(){var b=this,a=this.getDrilldownBackText(),c=b.options.drilldown.drillUpButton,d,g;this.drillUpButton?this.drillUpButton.attr({text:a}).align():
(g=(d=c.theme)&&d.states,this.drillUpButton=this.renderer.button(a,null,null,function(){b.drillUp()},d,g&&g.hover,g&&g.select).attr({align:c.position.align,zIndex:9}).add().align(c.position,!1,c.relativeTo||"plotBox"))};m.prototype.drillUp=function(){for(var b=this,a=b.drilldownLevels,c=a[a.length-1].levelNumber,d=a.length,g=b.series,e,i,f,j,k=function(a){var c;h(g,function(b){b.options._ddSeriesId===a._ddSeriesId&&(c=b)});c=c||b.addSeries(a,!1);if(c.type===f.type&&c.animateDrillupTo)c.animate=c.animateDrillupTo;
a===i.seriesOptions&&(j=c)};d--;)if(i=a[d],i.levelNumber===c){a.pop();f=i.lowerSeries;if(!f.chart)for(e=g.length;e--;)if(g[e].options.id===i.lowerSeriesOptions.id&&g[e].options._levelNumber===c+1){f=g[e];break}f.xData=[];h(i.levelSeriesOptions,k);x(b,"drillup",{seriesOptions:i.seriesOptions});if(j.type===f.type)j.drilldownLevel=i,j.options.animation=b.options.drilldown.animation,f.animateDrillupFrom&&f.chart&&f.animateDrillupFrom(i);j.options._levelNumber=c;f.remove(!1);if(j.xAxis)e=i.oldExtremes,
j.xAxis.setExtremes(e.xMin,e.xMax,!1),j.yAxis.setExtremes(e.yMin,e.yMax,!1)}this.redraw();this.drilldownLevels.length===0?this.drillUpButton=this.drillUpButton.destroy():this.drillUpButton.attr({text:this.getDrilldownBackText()}).align();this.ddDupes.length=[]};n.prototype.supportsDrilldown=!0;n.prototype.animateDrillupTo=function(b){if(!b){var a=this,c=a.drilldownLevel;h(this.points,function(a){a.graphic&&a.graphic.hide();a.dataLabel&&a.dataLabel.hide();a.connector&&a.connector.hide()});setTimeout(function(){a.points&&
h(a.points,function(a,b){var e=b===(c&&c.pointIndex)?"show":"fadeIn",f=e==="show"?!0:void 0;if(a.graphic)a.graphic[e](f);if(a.dataLabel)a.dataLabel[e](f);if(a.connector)a.connector[e](f)})},Math.max(this.chart.options.drilldown.animation.duration-50,0));this.animate=t}};n.prototype.animateDrilldown=function(b){var a=this,c=this.chart.drilldownLevels,d,g=this.chart.options.drilldown.animation,e=this.xAxis;if(!b)h(c,function(b){if(a.options._ddSeriesId===b.lowerSeriesOptions._ddSeriesId)d=b.shapeArgs,
d.fill=b.color}),d.x+=u(e.oldPos,e.pos)-e.pos,h(this.points,function(a){a.graphic&&a.graphic.attr(d).animate(l(a.shapeArgs,{fill:a.color}),g);a.dataLabel&&a.dataLabel.fadeIn(g)}),this.animate=null};n.prototype.animateDrillupFrom=function(b){var a=this.chart.options.drilldown.animation,c=this.group,d=this;h(d.trackerGroups,function(a){if(d[a])d[a].on("mouseover")});delete this.group;h(this.points,function(d){var e=d.graphic,i=function(){e.destroy();c&&(c=c.destroy())};e&&(delete d.graphic,a?e.animate(l(b.shapeArgs,
{fill:b.color}),f.merge(a,{complete:i})):(e.attr(b.shapeArgs),i()))})};v&&l(v.prototype,{supportsDrilldown:!0,animateDrillupTo:n.prototype.animateDrillupTo,animateDrillupFrom:n.prototype.animateDrillupFrom,animateDrilldown:function(b){var a=this.chart.drilldownLevels[this.chart.drilldownLevels.length-1],c=this.chart.options.drilldown.animation,d=a.shapeArgs,g=d.start,e=(d.end-g)/this.points.length;if(!b)h(this.points,function(b,h){b.graphic.attr(f.merge(d,{start:g+h*e,end:g+(h+1)*e,fill:a.color}))[c?
"animate":"attr"](l(b.shapeArgs,{fill:b.color}),c)}),this.animate=null}});f.Point.prototype.doDrilldown=function(b,a){var c=this.series.chart,d=c.options.drilldown,f=(d.series||[]).length,e;if(!c.ddDupes)c.ddDupes=[];for(;f--&&!e;)d.series[f].id===this.drilldown&&y(this.drilldown,c.ddDupes)===-1&&(e=d.series[f],c.ddDupes.push(this.drilldown));x(c,"drilldown",{point:this,seriesOptions:e,category:a,points:a!==void 0&&this.series.xAxis.ddPoints[a].slice(0)});e&&(b?c.addSingleSeriesAsDrilldown(this,e):
c.addSeriesAsDrilldown(this,e))};f.Axis.prototype.drilldownCategory=function(b){var a,c,d=this.ddPoints[b];for(a in d)(c=d[a])&&c.series&&c.series.visible&&c.doDrilldown&&c.doDrilldown(!0,b);this.chart.applyDrilldown()};f.Axis.prototype.getDDPoints=function(b,a){var c=this.ddPoints;if(!c)this.ddPoints=c={};c[b]||(c[b]=[]);if(c[b].levelNumber!==a)c[b].length=0;return c[b]};w.prototype.drillable=function(){var b=this.pos,a=this.label,c=this.axis,d=c.ddPoints&&c.ddPoints[b];if(a&&d&&d.length){if(!a.basicStyles)a.basicStyles=
f.merge(a.styles);a.addClass("highcharts-drilldown-axis-label").css(c.chart.options.drilldown.activeAxisLabelStyle).on("click",function(){c.drilldownCategory(b)})}else if(a&&a.basicStyles)a.styles={},a.css(a.basicStyles),a.on("click",null)};r(w.prototype,"addLabel",function(b){b.call(this);this.drillable()});r(f.Point.prototype,"init",function(b,a,c,d){var g=b.call(this,a,c,d),b=(c=a.xAxis)&&c.ticks[d],c=c&&c.getDDPoints(d,a.options._levelNumber);if(g.drilldown&&(f.addEvent(g,"click",function(){a.xAxis&&
a.chart.options.drilldown.allowPointDrilldown===!1?a.xAxis.drilldownCategory(d):g.doDrilldown()}),c))c.push(g),c.levelNumber=a.options._levelNumber;b&&b.drillable();return g});r(f.Series.prototype,"drawDataLabels",function(b){var a=this.chart.options.drilldown.activeDataLabelStyle;b.call(this);h(this.points,function(b){b.drilldown&&b.dataLabel&&b.dataLabel.attr({"class":"highcharts-drilldown-data-label"}).css(a)})});var s,q=function(b){b.call(this);h(this.points,function(a){a.drilldown&&a.graphic&&
a.graphic.attr({"class":"highcharts-drilldown-point"}).css({cursor:"pointer"})})};for(s in p)p[s].prototype.supportsDrilldown&&r(p[s].prototype,"drawTracker",q)})(Highcharts);

View File

@ -1,713 +0,0 @@
/**
* Highcharts Drilldown plugin
*
* Author: Torstein Honsi
* License: MIT License
*
* Demo: http://jsfiddle.net/highcharts/Vf3yT/
*/
/*global Highcharts,HighchartsAdapter*/
(function (H) {
"use strict";
var noop = function () {},
defaultOptions = H.getOptions(),
each = H.each,
extend = H.extend,
format = H.format,
pick = H.pick,
wrap = H.wrap,
Chart = H.Chart,
seriesTypes = H.seriesTypes,
PieSeries = seriesTypes.pie,
ColumnSeries = seriesTypes.column,
Tick = H.Tick,
fireEvent = HighchartsAdapter.fireEvent,
inArray = HighchartsAdapter.inArray,
ddSeriesId = 1;
// Utilities
/*
* Return an intermediate color between two colors, according to pos where 0
* is the from color and 1 is the to color. This method is copied from ColorAxis.js
* and should always be kept updated, until we get AMD support.
*/
function tweenColors(from, to, pos) {
// Check for has alpha, because rgba colors perform worse due to lack of
// support in WebKit.
var hasAlpha,
ret;
// Unsupported color, return to-color (#3920)
if (!to.rgba.length || !from.rgba.length) {
ret = to.raw || 'none';
// Interpolate
} else {
from = from.rgba;
to = to.rgba;
hasAlpha = (to[3] !== 1 || from[3] !== 1);
ret = (hasAlpha ? 'rgba(' : 'rgb(') +
Math.round(to[0] + (from[0] - to[0]) * (1 - pos)) + ',' +
Math.round(to[1] + (from[1] - to[1]) * (1 - pos)) + ',' +
Math.round(to[2] + (from[2] - to[2]) * (1 - pos)) +
(hasAlpha ? (',' + (to[3] + (from[3] - to[3]) * (1 - pos))) : '') + ')';
}
return ret;
}
/**
* Handle animation of the color attributes directly
*/
each(['fill', 'stroke'], function (prop) {
HighchartsAdapter.addAnimSetter(prop, function (fx) {
fx.elem.attr(prop, tweenColors(H.Color(fx.start), H.Color(fx.end), fx.pos));
});
});
// Add language
extend(defaultOptions.lang, {
drillUpText: '◁ Back to {series.name}'
});
defaultOptions.drilldown = {
activeAxisLabelStyle: {
cursor: 'pointer',
color: '#0d233a',
fontWeight: 'bold',
textDecoration: 'underline'
},
activeDataLabelStyle: {
cursor: 'pointer',
color: '#0d233a',
fontWeight: 'bold',
textDecoration: 'underline'
},
animation: {
duration: 500
},
drillUpButton: {
position: {
align: 'right',
x: -10,
y: 10
}
// relativeTo: 'plotBox'
// theme
}
};
/**
* A general fadeIn method
*/
H.SVGRenderer.prototype.Element.prototype.fadeIn = function (animation) {
this
.attr({
opacity: 0.1,
visibility: 'inherit'
})
.animate({
opacity: pick(this.newOpacity, 1) // newOpacity used in maps
}, animation || {
duration: 250
});
};
Chart.prototype.addSeriesAsDrilldown = function (point, ddOptions) {
this.addSingleSeriesAsDrilldown(point, ddOptions);
this.applyDrilldown();
};
Chart.prototype.addSingleSeriesAsDrilldown = function (point, ddOptions) {
var oldSeries = point.series,
xAxis = oldSeries.xAxis,
yAxis = oldSeries.yAxis,
newSeries,
color = point.color || oldSeries.color,
pointIndex,
levelSeries = [],
levelSeriesOptions = [],
level,
levelNumber,
last;
if (!this.drilldownLevels) {
this.drilldownLevels = [];
}
levelNumber = oldSeries.options._levelNumber || 0;
// See if we can reuse the registered series from last run
last = this.drilldownLevels[this.drilldownLevels.length - 1];
if (last && last.levelNumber !== levelNumber) {
last = undefined;
}
ddOptions = extend({
color: color,
_ddSeriesId: ddSeriesId++
}, ddOptions);
pointIndex = inArray(point, oldSeries.points);
// Record options for all current series
each(oldSeries.chart.series, function (series) {
if (series.xAxis === xAxis && !series.isDrilling) {
series.options._ddSeriesId = series.options._ddSeriesId || ddSeriesId++;
series.options._colorIndex = series.userOptions._colorIndex;
series.options._levelNumber = series.options._levelNumber || levelNumber; // #3182
if (last) {
levelSeries = last.levelSeries;
levelSeriesOptions = last.levelSeriesOptions;
} else {
levelSeries.push(series);
levelSeriesOptions.push(series.options);
}
}
});
// Add a record of properties for each drilldown level
level = {
levelNumber: levelNumber,
seriesOptions: oldSeries.options,
levelSeriesOptions: levelSeriesOptions,
levelSeries: levelSeries,
shapeArgs: point.shapeArgs,
bBox: point.graphic ? point.graphic.getBBox() : {}, // no graphic in line series with markers disabled
color: color,
lowerSeriesOptions: ddOptions,
pointOptions: oldSeries.options.data[pointIndex],
pointIndex: pointIndex,
oldExtremes: {
xMin: xAxis && xAxis.userMin,
xMax: xAxis && xAxis.userMax,
yMin: yAxis && yAxis.userMin,
yMax: yAxis && yAxis.userMax
}
};
// Push it to the lookup array
this.drilldownLevels.push(level);
newSeries = level.lowerSeries = this.addSeries(ddOptions, false);
newSeries.options._levelNumber = levelNumber + 1;
if (xAxis) {
xAxis.oldPos = xAxis.pos;
xAxis.userMin = xAxis.userMax = null;
yAxis.userMin = yAxis.userMax = null;
}
// Run fancy cross-animation on supported and equal types
if (oldSeries.type === newSeries.type) {
newSeries.animate = newSeries.animateDrilldown || noop;
newSeries.options.animation = true;
}
};
Chart.prototype.applyDrilldown = function () {
var drilldownLevels = this.drilldownLevels,
levelToRemove;
if (drilldownLevels && drilldownLevels.length > 0) { // #3352, async loading
levelToRemove = drilldownLevels[drilldownLevels.length - 1].levelNumber;
each(this.drilldownLevels, function (level) {
if (level.levelNumber === levelToRemove) {
each(level.levelSeries, function (series) {
if (series.options && series.options._levelNumber === levelToRemove) { // Not removed, not added as part of a multi-series drilldown
series.remove(false);
}
});
}
});
}
this.redraw();
this.showDrillUpButton();
};
Chart.prototype.getDrilldownBackText = function () {
var drilldownLevels = this.drilldownLevels,
lastLevel;
if (drilldownLevels && drilldownLevels.length > 0) { // #3352, async loading
lastLevel = drilldownLevels[drilldownLevels.length - 1];
lastLevel.series = lastLevel.seriesOptions;
return format(this.options.lang.drillUpText, lastLevel);
}
};
Chart.prototype.showDrillUpButton = function () {
var chart = this,
backText = this.getDrilldownBackText(),
buttonOptions = chart.options.drilldown.drillUpButton,
attr,
states;
if (!this.drillUpButton) {
attr = buttonOptions.theme;
states = attr && attr.states;
this.drillUpButton = this.renderer.button(
backText,
null,
null,
function () {
chart.drillUp();
},
attr,
states && states.hover,
states && states.select
)
.attr({
align: buttonOptions.position.align,
zIndex: 9
})
.add()
.align(buttonOptions.position, false, buttonOptions.relativeTo || 'plotBox');
} else {
this.drillUpButton.attr({
text: backText
})
.align();
}
};
Chart.prototype.drillUp = function () {
var chart = this,
drilldownLevels = chart.drilldownLevels,
levelNumber = drilldownLevels[drilldownLevels.length - 1].levelNumber,
i = drilldownLevels.length,
chartSeries = chart.series,
seriesI,
level,
oldSeries,
newSeries,
oldExtremes,
addSeries = function (seriesOptions) {
var addedSeries;
each(chartSeries, function (series) {
if (series.options._ddSeriesId === seriesOptions._ddSeriesId) {
addedSeries = series;
}
});
addedSeries = addedSeries || chart.addSeries(seriesOptions, false);
if (addedSeries.type === oldSeries.type && addedSeries.animateDrillupTo) {
addedSeries.animate = addedSeries.animateDrillupTo;
}
if (seriesOptions === level.seriesOptions) {
newSeries = addedSeries;
}
};
while (i--) {
level = drilldownLevels[i];
if (level.levelNumber === levelNumber) {
drilldownLevels.pop();
// Get the lower series by reference or id
oldSeries = level.lowerSeries;
if (!oldSeries.chart) { // #2786
seriesI = chartSeries.length; // #2919
while (seriesI--) {
if (chartSeries[seriesI].options.id === level.lowerSeriesOptions.id &&
chartSeries[seriesI].options._levelNumber === levelNumber + 1) { // #3867
oldSeries = chartSeries[seriesI];
break;
}
}
}
oldSeries.xData = []; // Overcome problems with minRange (#2898)
each(level.levelSeriesOptions, addSeries);
fireEvent(chart, 'drillup', { seriesOptions: level.seriesOptions });
if (newSeries.type === oldSeries.type) {
newSeries.drilldownLevel = level;
newSeries.options.animation = chart.options.drilldown.animation;
if (oldSeries.animateDrillupFrom && oldSeries.chart) { // #2919
oldSeries.animateDrillupFrom(level);
}
}
newSeries.options._levelNumber = levelNumber;
oldSeries.remove(false);
// Reset the zoom level of the upper series
if (newSeries.xAxis) {
oldExtremes = level.oldExtremes;
newSeries.xAxis.setExtremes(oldExtremes.xMin, oldExtremes.xMax, false);
newSeries.yAxis.setExtremes(oldExtremes.yMin, oldExtremes.yMax, false);
}
}
}
this.redraw();
if (this.drilldownLevels.length === 0) {
this.drillUpButton = this.drillUpButton.destroy();
} else {
this.drillUpButton.attr({
text: this.getDrilldownBackText()
})
.align();
}
this.ddDupes.length = []; // #3315
};
ColumnSeries.prototype.supportsDrilldown = true;
/**
* When drilling up, keep the upper series invisible until the lower series has
* moved into place
*/
ColumnSeries.prototype.animateDrillupTo = function (init) {
if (!init) {
var newSeries = this,
level = newSeries.drilldownLevel;
each(this.points, function (point) {
if (point.graphic) { // #3407
point.graphic.hide();
}
if (point.dataLabel) {
point.dataLabel.hide();
}
if (point.connector) {
point.connector.hide();
}
});
// Do dummy animation on first point to get to complete
setTimeout(function () {
if (newSeries.points) { // May be destroyed in the meantime, #3389
each(newSeries.points, function (point, i) {
// Fade in other points
var verb = i === (level && level.pointIndex) ? 'show' : 'fadeIn',
inherit = verb === 'show' ? true : undefined;
if (point.graphic) { // #3407
point.graphic[verb](inherit);
}
if (point.dataLabel) {
point.dataLabel[verb](inherit);
}
if (point.connector) {
point.connector[verb](inherit);
}
});
}
}, Math.max(this.chart.options.drilldown.animation.duration - 50, 0));
// Reset
this.animate = noop;
}
};
ColumnSeries.prototype.animateDrilldown = function (init) {
var series = this,
drilldownLevels = this.chart.drilldownLevels,
animateFrom,
animationOptions = this.chart.options.drilldown.animation,
xAxis = this.xAxis;
if (!init) {
each(drilldownLevels, function (level) {
if (series.options._ddSeriesId === level.lowerSeriesOptions._ddSeriesId) {
animateFrom = level.shapeArgs;
animateFrom.fill = level.color;
}
});
animateFrom.x += (pick(xAxis.oldPos, xAxis.pos) - xAxis.pos);
each(this.points, function (point) {
if (point.graphic) {
point.graphic
.attr(animateFrom)
.animate(
extend(point.shapeArgs, { fill: point.color }),
animationOptions
);
}
if (point.dataLabel) {
point.dataLabel.fadeIn(animationOptions);
}
});
this.animate = null;
}
};
/**
* When drilling up, pull out the individual point graphics from the lower series
* and animate them into the origin point in the upper series.
*/
ColumnSeries.prototype.animateDrillupFrom = function (level) {
var animationOptions = this.chart.options.drilldown.animation,
group = this.group,
series = this;
// Cancel mouse events on the series group (#2787)
each(series.trackerGroups, function (key) {
if (series[key]) { // we don't always have dataLabelsGroup
series[key].on('mouseover');
}
});
delete this.group;
each(this.points, function (point) {
var graphic = point.graphic,
complete = function () {
graphic.destroy();
if (group) {
group = group.destroy();
}
};
if (graphic) {
delete point.graphic;
if (animationOptions) {
graphic.animate(
extend(level.shapeArgs, { fill: level.color }),
H.merge(animationOptions, { complete: complete })
);
} else {
graphic.attr(level.shapeArgs);
complete();
}
}
});
};
if (PieSeries) {
extend(PieSeries.prototype, {
supportsDrilldown: true,
animateDrillupTo: ColumnSeries.prototype.animateDrillupTo,
animateDrillupFrom: ColumnSeries.prototype.animateDrillupFrom,
animateDrilldown: function (init) {
var level = this.chart.drilldownLevels[this.chart.drilldownLevels.length - 1],
animationOptions = this.chart.options.drilldown.animation,
animateFrom = level.shapeArgs,
start = animateFrom.start,
angle = animateFrom.end - start,
startAngle = angle / this.points.length;
if (!init) {
each(this.points, function (point, i) {
point.graphic
.attr(H.merge(animateFrom, {
start: start + i * startAngle,
end: start + (i + 1) * startAngle,
fill: level.color
}))[animationOptions ? 'animate' : 'attr'](
extend(point.shapeArgs, { fill: point.color }),
animationOptions
);
});
this.animate = null;
}
}
});
}
H.Point.prototype.doDrilldown = function (_holdRedraw, category) {
var series = this.series,
chart = series.chart,
drilldown = chart.options.drilldown,
i = (drilldown.series || []).length,
seriesOptions;
if (!chart.ddDupes) {
chart.ddDupes = [];
}
while (i-- && !seriesOptions) {
if (drilldown.series[i].id === this.drilldown && inArray(this.drilldown, chart.ddDupes) === -1) {
seriesOptions = drilldown.series[i];
chart.ddDupes.push(this.drilldown);
}
}
// Fire the event. If seriesOptions is undefined, the implementer can check for
// seriesOptions, and call addSeriesAsDrilldown async if necessary.
fireEvent(chart, 'drilldown', {
point: this,
seriesOptions: seriesOptions,
category: category,
points: category !== undefined && this.series.xAxis.ddPoints[category].slice(0)
});
if (seriesOptions) {
if (_holdRedraw) {
chart.addSingleSeriesAsDrilldown(this, seriesOptions);
} else {
chart.addSeriesAsDrilldown(this, seriesOptions);
}
}
};
/**
* Drill down to a given category. This is the same as clicking on an axis label.
*/
H.Axis.prototype.drilldownCategory = function (x) {
var key,
point,
ddPointsX = this.ddPoints[x];
for (key in ddPointsX) {
point = ddPointsX[key];
if (point && point.series && point.series.visible && point.doDrilldown) { // #3197
point.doDrilldown(true, x);
}
}
this.chart.applyDrilldown();
};
/**
* Create and return a collection of points associated with the X position. Reset it for each level.
*/
H.Axis.prototype.getDDPoints = function (x, levelNumber) {
var ddPoints = this.ddPoints;
if (!ddPoints) {
this.ddPoints = ddPoints = {};
}
if (!ddPoints[x]) {
ddPoints[x] = [];
}
if (ddPoints[x].levelNumber !== levelNumber) {
ddPoints[x].length = 0; // reset
}
return ddPoints[x];
};
/**
* Make a tick label drillable, or remove drilling on update
*/
Tick.prototype.drillable = function () {
var pos = this.pos,
label = this.label,
axis = this.axis,
ddPointsX = axis.ddPoints && axis.ddPoints[pos];
if (label && ddPointsX && ddPointsX.length) {
if (!label.basicStyles) {
label.basicStyles = H.merge(label.styles);
}
label
.addClass('highcharts-drilldown-axis-label')
.css(axis.chart.options.drilldown.activeAxisLabelStyle)
.on('click', function () {
axis.drilldownCategory(pos);
});
} else if (label && label.basicStyles) {
label.styles = {}; // reset for full overwrite of styles
label.css(label.basicStyles);
label.on('click', null); // #3806
}
};
/**
* Always keep the drillability updated (#3951)
*/
wrap(Tick.prototype, 'addLabel', function (proceed) {
proceed.call(this);
this.drillable();
});
/**
* On initialization of each point, identify its label and make it clickable. Also, provide a
* list of points associated to that label.
*/
wrap(H.Point.prototype, 'init', function (proceed, series, options, x) {
var point = proceed.call(this, series, options, x),
xAxis = series.xAxis,
tick = xAxis && xAxis.ticks[x],
ddPointsX = xAxis && xAxis.getDDPoints(x, series.options._levelNumber);
if (point.drilldown) {
// Add the click event to the point
H.addEvent(point, 'click', function () {
if (series.xAxis && series.chart.options.drilldown.allowPointDrilldown === false) {
series.xAxis.drilldownCategory(x);
} else {
point.doDrilldown();
}
});
/*wrap(point, 'importEvents', function (proceed) { // wrapping importEvents makes point.click event work
if (!this.hasImportedEvents) {
proceed.call(this);
H.addEvent(this, 'click', function () {
this.doDrilldown();
});
}
});*/
// Register drilldown points on this X value
if (ddPointsX) {
ddPointsX.push(point);
ddPointsX.levelNumber = series.options._levelNumber;
}
}
// Add or remove click handler and style on the tick label
if (tick) {
tick.drillable();
}
return point;
});
wrap(H.Series.prototype, 'drawDataLabels', function (proceed) {
var css = this.chart.options.drilldown.activeDataLabelStyle;
proceed.call(this);
each(this.points, function (point) {
if (point.drilldown && point.dataLabel) {
point.dataLabel
.attr({
'class': 'highcharts-drilldown-data-label'
})
.css(css);
}
});
});
// Mark the trackers with a pointer
var type,
drawTrackerWrapper = function (proceed) {
proceed.call(this);
each(this.points, function (point) {
if (point.drilldown && point.graphic) {
point.graphic
.attr({
'class': 'highcharts-drilldown-point'
})
.css({ cursor: 'pointer' });
}
});
};
for (type in seriesTypes) {
if (seriesTypes[type].prototype.supportsDrilldown) {
wrap(seriesTypes[type].prototype, 'drawTracker', drawTrackerWrapper);
}
}
}(Highcharts));

View File

@ -1,24 +0,0 @@
/*
Highcharts JS v4.1.9 (2015-10-07)
Exporting module
(c) 2010-2014 Torstein Honsi
License: www.highcharts.com/license
*/
(function(g){var z=g.Chart,s=g.addEvent,A=g.removeEvent,B=HighchartsAdapter.fireEvent,j=g.createElement,p=g.discardElement,u=g.css,l=g.merge,m=g.each,q=g.extend,E=g.splat,F=Math.max,k=document,C=window,G=g.isTouchDevice,H=g.Renderer.prototype.symbols,r=g.getOptions(),x;q(r.lang,{printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",contextButtonTitle:"Chart context menu"});r.navigation=
{menuStyle:{border:"1px solid #A0A0A0",background:"#FFFFFF",padding:"5px 0"},menuItemStyle:{padding:"0 10px",background:"none",color:"#303030",fontSize:G?"14px":"11px"},menuItemHoverStyle:{background:"#4572A5",color:"#FFFFFF"},buttonOptions:{symbolFill:"#E0E0E0",symbolSize:14,symbolStroke:"#666",symbolStrokeWidth:3,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,theme:{fill:"white",stroke:"none"},verticalAlign:"top",width:24}};r.exporting={type:"image/png",url:"http://export.highcharts.com/",
buttons:{contextButton:{menuClassName:"highcharts-contextmenu",symbol:"menu",_titleKey:"contextButtonTitle",menuItems:[{textKey:"printChart",onclick:function(){this.print()}},{separator:!0},{textKey:"downloadPNG",onclick:function(){this.exportChart()}},{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}]}}};
g.post=function(b,a,e){var c,b=j("form",l({method:"post",action:b,enctype:"multipart/form-data"},e),{display:"none"},k.body);for(c in a)j("input",{type:"hidden",name:c,value:a[c]},null,b);b.submit();p(b)};q(z.prototype,{sanitizeSVG:function(b){return b.replace(/zIndex="[^"]+"/g,"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\([^#]+#/g,"url(#").replace(/<svg /,'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ (NS[0-9]+\:)?href=/g,
" xlink:href=").replace(/\n/," ").replace(/<\/svg>.*?$/,"</svg>").replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g,'$1="rgb($2)" $1-opacity="$3"').replace(/&nbsp;/g,"\u00a0").replace(/&shy;/g,"\u00ad").replace(/<IMG /g,"<image ").replace(/<(\/?)TITLE>/g,"<$1title>").replace(/height=([^" ]+)/g,'height="$1"').replace(/width=([^" ]+)/g,'width="$1"').replace(/hc-svg-href="([^"]+)">/g,'xlink:href="$1"/>').replace(/ id=([^" >]+)/g,' id="$1"').replace(/class=([^" >]+)/g,'class="$1"').replace(/ transform /g,
" ").replace(/:(path|rect)/g,"$1").replace(/style="([^"]+)"/g,function(a){return a.toLowerCase()})},getChartHTML:function(){return this.container.innerHTML},getSVG:function(b){var a=this,e,c,f,y,h,d=l(a.options,b),I=d.exporting.allowHTML;if(!k.createElementNS)k.createElementNS=function(a,b){return k.createElement(b)};c=j("div",null,{position:"absolute",top:"-9999em",width:a.chartWidth+"px",height:a.chartHeight+"px"},k.body);f=a.renderTo.style.width;h=a.renderTo.style.height;f=d.exporting.sourceWidth||
d.chart.width||/px$/.test(f)&&parseInt(f,10)||600;h=d.exporting.sourceHeight||d.chart.height||/px$/.test(h)&&parseInt(h,10)||400;q(d.chart,{animation:!1,renderTo:c,forExport:!0,renderer:"SVGRenderer",width:f,height:h});d.exporting.enabled=!1;delete d.data;d.series=[];m(a.series,function(a){y=l(a.options,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:a.visible});y.isInternal||d.series.push(y)});b&&m(["xAxis","yAxis"],function(a){m(E(b[a]),function(b,c){d[a][c]=l(d[a][c],b)})});e=new g.Chart(d,
a.callback);m(["xAxis","yAxis"],function(b){m(a[b],function(a,c){var d=e[b][c],f=a.getExtremes(),h=f.userMin,f=f.userMax;d&&(h!==void 0||f!==void 0)&&d.setExtremes(h,f,!0,!1)})});f=e.getChartHTML();d=null;e.destroy();p(c);if(I&&(c=f.match(/<\/svg>(.*?$)/)))c='<foreignObject x="0" y="0" width="200" height="200"><body xmlns="http://www.w3.org/1999/xhtml">'+c[1]+"</body></foreignObject>",f=f.replace("</svg>",c+"</svg>");f=this.sanitizeSVG(f);return f=f.replace(/(url\(#highcharts-[0-9]+)&quot;/g,"$1").replace(/&quot;/g,
"'")},getSVGForExport:function(b,a){var e=this.options.exporting;return this.getSVG(l({chart:{borderRadius:0}},e.chartOptions,a,{exporting:{sourceWidth:b&&b.sourceWidth||e.sourceWidth,sourceHeight:b&&b.sourceHeight||e.sourceHeight}}))},exportChart:function(b,a){var e=this.getSVGForExport(b,a),b=l(this.options.exporting,b);g.post(b.url,{filename:b.filename||"chart",type:b.type,width:b.width||0,scale:b.scale||2,svg:e},b.formAttributes)},print:function(){var b=this,a=b.container,e=[],c=a.parentNode,
f=k.body,g=f.childNodes;if(!b.isPrinting)b.isPrinting=!0,B(b,"beforePrint"),m(g,function(a,b){if(a.nodeType===1)e[b]=a.style.display,a.style.display="none"}),f.appendChild(a),C.focus(),C.print(),setTimeout(function(){c.appendChild(a);m(g,function(a,b){if(a.nodeType===1)a.style.display=e[b]});b.isPrinting=!1;B(b,"afterPrint")},1E3)},contextMenu:function(b,a,e,c,f,g,h){var d=this,l=d.options.navigation,D=l.menuItemStyle,n=d.chartWidth,o=d.chartHeight,k="cache-"+b,i=d[k],t=F(f,g),v,w,p,r=function(a){d.pointer.inClass(a.target,
b)||w()};if(!i)d[k]=i=j("div",{className:b},{position:"absolute",zIndex:1E3,padding:t+"px"},d.container),v=j("div",null,q({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},l.menuStyle),i),w=function(){u(i,{display:"none"});h&&h.setState(0);d.openMenu=!1},s(i,"mouseleave",function(){p=setTimeout(w,500)}),s(i,"mouseenter",function(){clearTimeout(p)}),s(document,"mouseup",r),s(d,"destroy",function(){A(document,"mouseup",r)}),m(a,function(a){if(a){var b=
a.separator?j("hr",null,null,v):j("div",{onmouseover:function(){u(this,l.menuItemHoverStyle)},onmouseout:function(){u(this,D)},onclick:function(b){b.stopPropagation();w();a.onclick&&a.onclick.apply(d,arguments)},innerHTML:a.text||d.options.lang[a.textKey]},q({cursor:"pointer"},D),v);d.exportDivElements.push(b)}}),d.exportDivElements.push(v,i),d.exportMenuWidth=i.offsetWidth,d.exportMenuHeight=i.offsetHeight;a={display:"block"};e+d.exportMenuWidth>n?a.right=n-e-f-t+"px":a.left=e-t+"px";c+g+d.exportMenuHeight>
o&&h.alignOptions.verticalAlign!=="top"?a.bottom=o-c-t+"px":a.top=c+g-t+"px";u(i,a);d.openMenu=!0},addButton:function(b){var a=this,e=a.renderer,c=l(a.options.navigation.buttonOptions,b),f=c.onclick,k=c.menuItems,h,d,m={stroke:c.symbolStroke,fill:c.symbolFill},j=c.symbolSize||12;if(!a.btnCount)a.btnCount=0;if(!a.exportDivElements)a.exportDivElements=[],a.exportSVGElements=[];if(c.enabled!==!1){var n=c.theme,o=n.states,p=o&&o.hover,o=o&&o.select,i;delete n.states;f?i=function(b){b.stopPropagation();
f.call(a,b)}:k&&(i=function(){a.contextMenu(d.menuClassName,k,d.translateX,d.translateY,d.width,d.height,d);d.setState(2)});c.text&&c.symbol?n.paddingLeft=g.pick(n.paddingLeft,25):c.text||q(n,{width:c.width,height:c.height,padding:0});d=e.button(c.text,0,0,i,n,p,o).attr({title:a.options.lang[c._titleKey],"stroke-linecap":"round"});d.menuClassName=b.menuClassName||"highcharts-menu-"+a.btnCount++;c.symbol&&(h=e.symbol(c.symbol,c.symbolX-j/2,c.symbolY-j/2,j,j).attr(q(m,{"stroke-width":c.symbolStrokeWidth||
1,zIndex:1})).add(d));d.add().align(q(c,{width:d.width,x:g.pick(c.x,x)}),!0,"spacingBox");x+=(d.width+c.buttonSpacing)*(c.align==="right"?-1:1);a.exportSVGElements.push(d,h)}},destroyExport:function(b){var b=b.target,a,e;for(a=0;a<b.exportSVGElements.length;a++)if(e=b.exportSVGElements[a])e.onclick=e.ontouchstart=null,b.exportSVGElements[a]=e.destroy();for(a=0;a<b.exportDivElements.length;a++)e=b.exportDivElements[a],A(e,"mouseleave"),b.exportDivElements[a]=e.onmouseout=e.onmouseover=e.ontouchstart=
e.onclick=null,p(e)}});H.menu=function(b,a,e,c){return["M",b,a+2.5,"L",b+e,a+2.5,"M",b,a+c/2+0.5,"L",b+e,a+c/2+0.5,"M",b,a+c-1.5,"L",b+e,a+c-1.5]};z.prototype.callbacks.push(function(b){var a,e=b.options.exporting,c=e.buttons;x=0;if(e.enabled!==!1){for(a in c)b.addButton(c[a]);s(b,"destroy",b.destroyExport)}})})(Highcharts);

View File

@ -1,775 +0,0 @@
/**
* @license Highcharts JS v4.1.9 (2015-10-07)
* Exporting module
*
* (c) 2010-2014 Torstein Honsi
*
* License: www.highcharts.com/license
*/
// JSLint options:
/*global Highcharts, HighchartsAdapter, document, window, Math, setTimeout */
(function (Highcharts) { // encapsulate
// create shortcuts
var Chart = Highcharts.Chart,
addEvent = Highcharts.addEvent,
removeEvent = Highcharts.removeEvent,
fireEvent = HighchartsAdapter.fireEvent,
createElement = Highcharts.createElement,
discardElement = Highcharts.discardElement,
css = Highcharts.css,
merge = Highcharts.merge,
each = Highcharts.each,
extend = Highcharts.extend,
splat = Highcharts.splat,
math = Math,
mathMax = math.max,
doc = document,
win = window,
isTouchDevice = Highcharts.isTouchDevice,
M = 'M',
L = 'L',
DIV = 'div',
HIDDEN = 'hidden',
NONE = 'none',
PREFIX = 'highcharts-',
ABSOLUTE = 'absolute',
PX = 'px',
UNDEFINED,
symbols = Highcharts.Renderer.prototype.symbols,
defaultOptions = Highcharts.getOptions(),
buttonOffset;
// Add language
extend(defaultOptions.lang, {
printChart: 'Print chart',
downloadPNG: 'Download PNG image',
downloadJPEG: 'Download JPEG image',
downloadPDF: 'Download PDF document',
downloadSVG: 'Download SVG vector image',
contextButtonTitle: 'Chart context menu'
});
// Buttons and menus are collected in a separate config option set called 'navigation'.
// This can be extended later to add control buttons like zoom and pan right click menus.
defaultOptions.navigation = {
menuStyle: {
border: '1px solid #A0A0A0',
background: '#FFFFFF',
padding: '5px 0'
},
menuItemStyle: {
padding: '0 10px',
background: NONE,
color: '#303030',
fontSize: isTouchDevice ? '14px' : '11px'
},
menuItemHoverStyle: {
background: '#4572A5',
color: '#FFFFFF'
},
buttonOptions: {
symbolFill: '#E0E0E0',
symbolSize: 14,
symbolStroke: '#666',
symbolStrokeWidth: 3,
symbolX: 12.5,
symbolY: 10.5,
align: 'right',
buttonSpacing: 3,
height: 22,
// text: null,
theme: {
fill: 'white', // capture hover
stroke: 'none'
},
verticalAlign: 'top',
width: 24
}
};
// Add the export related options
defaultOptions.exporting = {
//enabled: true,
//filename: 'chart',
type: 'image/png',
url: 'http://export.highcharts.com/',
//width: undefined,
//scale: 2
buttons: {
contextButton: {
menuClassName: PREFIX + 'contextmenu',
//x: -10,
symbol: 'menu',
_titleKey: 'contextButtonTitle',
menuItems: [{
textKey: 'printChart',
onclick: function () {
this.print();
}
}, {
separator: true
}, {
textKey: 'downloadPNG',
onclick: function () {
this.exportChart();
}
}, {
textKey: 'downloadJPEG',
onclick: function () {
this.exportChart({
type: 'image/jpeg'
});
}
}, {
textKey: 'downloadPDF',
onclick: function () {
this.exportChart({
type: 'application/pdf'
});
}
}, {
textKey: 'downloadSVG',
onclick: function () {
this.exportChart({
type: 'image/svg+xml'
});
}
}
// Enable this block to add "View SVG" to the dropdown menu
/*
,{
text: 'View SVG',
onclick: function () {
var svg = this.getSVG()
.replace(/</g, '\n&lt;')
.replace(/>/g, '&gt;');
doc.body.innerHTML = '<pre>' + svg + '</pre>';
}
} // */
]
}
}
};
// Add the Highcharts.post utility
Highcharts.post = function (url, data, formAttributes) {
var name,
form;
// create the form
form = createElement('form', merge({
method: 'post',
action: url,
enctype: 'multipart/form-data'
}, formAttributes), {
display: NONE
}, doc.body);
// add the data
for (name in data) {
createElement('input', {
type: HIDDEN,
name: name,
value: data[name]
}, null, form);
}
// submit
form.submit();
// clean up
discardElement(form);
};
extend(Chart.prototype, {
/**
* A collection of regex fixes on the produces SVG to account for expando properties,
* browser bugs, VML problems and other. Returns a cleaned SVG.
*/
sanitizeSVG: function (svg) {
return svg
.replace(/zIndex="[^"]+"/g, '')
.replace(/isShadow="[^"]+"/g, '')
.replace(/symbolName="[^"]+"/g, '')
.replace(/jQuery[0-9]+="[^"]+"/g, '')
.replace(/url\([^#]+#/g, 'url(#')
.replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')
.replace(/ (NS[0-9]+\:)?href=/g, ' xlink:href=') // #3567
.replace(/\n/, ' ')
// Any HTML added to the container after the SVG (#894)
.replace(/<\/svg>.*?$/, '</svg>')
// Batik doesn't support rgba fills and strokes (#3095)
.replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g, '$1="rgb($2)" $1-opacity="$3"')
/* This fails in IE < 8
.replace(/([0-9]+)\.([0-9]+)/g, function(s1, s2, s3) { // round off to save weight
return s2 +'.'+ s3[0];
})*/
// Replace HTML entities, issue #347
.replace(/&nbsp;/g, '\u00A0') // no-break space
.replace(/&shy;/g, '\u00AD') // soft hyphen
// IE specific
.replace(/<IMG /g, '<image ')
.replace(/<(\/?)TITLE>/g, '<$1title>')
.replace(/height=([^" ]+)/g, 'height="$1"')
.replace(/width=([^" ]+)/g, 'width="$1"')
.replace(/hc-svg-href="([^"]+)">/g, 'xlink:href="$1"/>')
.replace(/ id=([^" >]+)/g, ' id="$1"') // #4003
.replace(/class=([^" >]+)/g, 'class="$1"')
.replace(/ transform /g, ' ')
.replace(/:(path|rect)/g, '$1')
.replace(/style="([^"]+)"/g, function (s) {
return s.toLowerCase();
});
},
/**
* Return innerHTML of chart. Used as hook for plugins.
*/
getChartHTML: function () {
return this.container.innerHTML;
},
/**
* Return an SVG representation of the chart
*
* @param additionalOptions {Object} Additional chart options for the generated SVG representation
*/
getSVG: function (additionalOptions) {
var chart = this,
chartCopy,
sandbox,
svg,
seriesOptions,
sourceWidth,
sourceHeight,
cssWidth,
cssHeight,
html,
options = merge(chart.options, additionalOptions), // copy the options and add extra options
allowHTML = options.exporting.allowHTML; // docs: experimental, see #2473
// IE compatibility hack for generating SVG content that it doesn't really understand
if (!doc.createElementNS) {
/*jslint unparam: true*//* allow unused parameter ns in function below */
doc.createElementNS = function (ns, tagName) {
return doc.createElement(tagName);
};
/*jslint unparam: false*/
}
// create a sandbox where a new chart will be generated
sandbox = createElement(DIV, null, {
position: ABSOLUTE,
top: '-9999em',
width: chart.chartWidth + PX,
height: chart.chartHeight + PX
}, doc.body);
// get the source size
cssWidth = chart.renderTo.style.width;
cssHeight = chart.renderTo.style.height;
sourceWidth = options.exporting.sourceWidth ||
options.chart.width ||
(/px$/.test(cssWidth) && parseInt(cssWidth, 10)) ||
600;
sourceHeight = options.exporting.sourceHeight ||
options.chart.height ||
(/px$/.test(cssHeight) && parseInt(cssHeight, 10)) ||
400;
// override some options
extend(options.chart, {
animation: false,
renderTo: sandbox,
forExport: true,
renderer: 'SVGRenderer',
width: sourceWidth,
height: sourceHeight
});
options.exporting.enabled = false; // hide buttons in print
delete options.data; // #3004
// prepare for replicating the chart
options.series = [];
each(chart.series, function (serie) {
seriesOptions = merge(serie.options, {
animation: false, // turn off animation
enableMouseTracking: false,
showCheckbox: false,
visible: serie.visible
});
if (!seriesOptions.isInternal) { // used for the navigator series that has its own option set
options.series.push(seriesOptions);
}
});
// Axis options must be merged in one by one, since it may be an array or an object (#2022, #3900)
if (additionalOptions) {
each(['xAxis', 'yAxis'], function (axisType) {
each(splat(additionalOptions[axisType]), function (axisOptions, i) {
options[axisType][i] = merge(options[axisType][i], axisOptions);
});
});
}
// generate the chart copy
chartCopy = new Highcharts.Chart(options, chart.callback);
// reflect axis extremes in the export
each(['xAxis', 'yAxis'], function (axisType) {
each(chart[axisType], function (axis, i) {
var axisCopy = chartCopy[axisType][i],
extremes = axis.getExtremes(),
userMin = extremes.userMin,
userMax = extremes.userMax;
if (axisCopy && (userMin !== UNDEFINED || userMax !== UNDEFINED)) {
axisCopy.setExtremes(userMin, userMax, true, false);
}
});
});
// get the SVG from the container's innerHTML
svg = chartCopy.getChartHTML();
// free up memory
options = null;
chartCopy.destroy();
discardElement(sandbox);
// Move HTML into a foreignObject
if (allowHTML) {
html = svg.match(/<\/svg>(.*?$)/);
if (html) {
html = '<foreignObject x="0" y="0" width="200" height="200">' +
'<body xmlns="http://www.w3.org/1999/xhtml">' +
html[1] +
'</body>' +
'</foreignObject>';
svg = svg.replace('</svg>', html + '</svg>');
}
}
// sanitize
svg = this.sanitizeSVG(svg);
// IE9 beta bugs with innerHTML. Test again with final IE9.
svg = svg.replace(/(url\(#highcharts-[0-9]+)&quot;/g, '$1')
.replace(/&quot;/g, "'");
return svg;
},
getSVGForExport: function (options, chartOptions) {
var chartExportingOptions = this.options.exporting;
return this.getSVG(merge(
{ chart: { borderRadius: 0 } },
chartExportingOptions.chartOptions,
chartOptions,
{
exporting: {
sourceWidth: (options && options.sourceWidth) || chartExportingOptions.sourceWidth,
sourceHeight: (options && options.sourceHeight) || chartExportingOptions.sourceHeight
}
}
));
},
/**
* Submit the SVG representation of the chart to the server
* @param {Object} options Exporting options. Possible members are url, type, width and formAttributes.
* @param {Object} chartOptions Additional chart options for the SVG representation of the chart
*/
exportChart: function (options, chartOptions) {
var svg = this.getSVGForExport(options, chartOptions);
// merge the options
options = merge(this.options.exporting, options);
// do the post
Highcharts.post(options.url, {
filename: options.filename || 'chart',
type: options.type,
width: options.width || 0, // IE8 fails to post undefined correctly, so use 0
scale: options.scale || 2,
svg: svg
}, options.formAttributes);
},
/**
* Print the chart
*/
print: function () {
var chart = this,
container = chart.container,
origDisplay = [],
origParent = container.parentNode,
body = doc.body,
childNodes = body.childNodes;
if (chart.isPrinting) { // block the button while in printing mode
return;
}
chart.isPrinting = true;
fireEvent(chart, 'beforePrint');
// hide all body content
each(childNodes, function (node, i) {
if (node.nodeType === 1) {
origDisplay[i] = node.style.display;
node.style.display = NONE;
}
});
// pull out the chart
body.appendChild(container);
// print
win.focus(); // #1510
win.print();
// allow the browser to prepare before reverting
setTimeout(function () {
// put the chart back in
origParent.appendChild(container);
// restore all body content
each(childNodes, function (node, i) {
if (node.nodeType === 1) {
node.style.display = origDisplay[i];
}
});
chart.isPrinting = false;
fireEvent(chart, 'afterPrint');
}, 1000);
},
/**
* Display a popup menu for choosing the export type
*
* @param {String} className An identifier for the menu
* @param {Array} items A collection with text and onclicks for the items
* @param {Number} x The x position of the opener button
* @param {Number} y The y position of the opener button
* @param {Number} width The width of the opener button
* @param {Number} height The height of the opener button
*/
contextMenu: function (className, items, x, y, width, height, button) {
var chart = this,
navOptions = chart.options.navigation,
menuItemStyle = navOptions.menuItemStyle,
chartWidth = chart.chartWidth,
chartHeight = chart.chartHeight,
cacheName = 'cache-' + className,
menu = chart[cacheName],
menuPadding = mathMax(width, height), // for mouse leave detection
boxShadow = '3px 3px 10px #888',
innerMenu,
hide,
hideTimer,
menuStyle,
docMouseUpHandler = function (e) {
if (!chart.pointer.inClass(e.target, className)) {
hide();
}
};
// create the menu only the first time
if (!menu) {
// create a HTML element above the SVG
chart[cacheName] = menu = createElement(DIV, {
className: className
}, {
position: ABSOLUTE,
zIndex: 1000,
padding: menuPadding + PX
}, chart.container);
innerMenu = createElement(DIV, null,
extend({
MozBoxShadow: boxShadow,
WebkitBoxShadow: boxShadow,
boxShadow: boxShadow
}, navOptions.menuStyle), menu);
// hide on mouse out
hide = function () {
css(menu, { display: NONE });
if (button) {
button.setState(0);
}
chart.openMenu = false;
};
// Hide the menu some time after mouse leave (#1357)
addEvent(menu, 'mouseleave', function () {
hideTimer = setTimeout(hide, 500);
});
addEvent(menu, 'mouseenter', function () {
clearTimeout(hideTimer);
});
// Hide it on clicking or touching outside the menu (#2258, #2335, #2407)
addEvent(document, 'mouseup', docMouseUpHandler);
addEvent(chart, 'destroy', function () {
removeEvent(document, 'mouseup', docMouseUpHandler);
});
// create the items
each(items, function (item) {
if (item) {
var element = item.separator ?
createElement('hr', null, null, innerMenu) :
createElement(DIV, {
onmouseover: function () {
css(this, navOptions.menuItemHoverStyle);
},
onmouseout: function () {
css(this, menuItemStyle);
},
onclick: function (e) {
e.stopPropagation();
hide();
if (item.onclick) {
item.onclick.apply(chart, arguments);
}
},
innerHTML: item.text || chart.options.lang[item.textKey]
}, extend({
cursor: 'pointer'
}, menuItemStyle), innerMenu);
// Keep references to menu divs to be able to destroy them
chart.exportDivElements.push(element);
}
});
// Keep references to menu and innerMenu div to be able to destroy them
chart.exportDivElements.push(innerMenu, menu);
chart.exportMenuWidth = menu.offsetWidth;
chart.exportMenuHeight = menu.offsetHeight;
}
menuStyle = { display: 'block' };
// if outside right, right align it
if (x + chart.exportMenuWidth > chartWidth) {
menuStyle.right = (chartWidth - x - width - menuPadding) + PX;
} else {
menuStyle.left = (x - menuPadding) + PX;
}
// if outside bottom, bottom align it
if (y + height + chart.exportMenuHeight > chartHeight && button.alignOptions.verticalAlign !== 'top') {
menuStyle.bottom = (chartHeight - y - menuPadding) + PX;
} else {
menuStyle.top = (y + height - menuPadding) + PX;
}
css(menu, menuStyle);
chart.openMenu = true;
},
/**
* Add the export button to the chart
*/
addButton: function (options) {
var chart = this,
renderer = chart.renderer,
btnOptions = merge(chart.options.navigation.buttonOptions, options),
onclick = btnOptions.onclick,
menuItems = btnOptions.menuItems,
symbol,
button,
symbolAttr = {
stroke: btnOptions.symbolStroke,
fill: btnOptions.symbolFill
},
symbolSize = btnOptions.symbolSize || 12;
if (!chart.btnCount) {
chart.btnCount = 0;
}
// Keeps references to the button elements
if (!chart.exportDivElements) {
chart.exportDivElements = [];
chart.exportSVGElements = [];
}
if (btnOptions.enabled === false) {
return;
}
var attr = btnOptions.theme,
states = attr.states,
hover = states && states.hover,
select = states && states.select,
callback;
delete attr.states;
if (onclick) {
callback = function (e) {
e.stopPropagation();
onclick.call(chart, e);
};
} else if (menuItems) {
callback = function () {
chart.contextMenu(
button.menuClassName,
menuItems,
button.translateX,
button.translateY,
button.width,
button.height,
button
);
button.setState(2);
};
}
if (btnOptions.text && btnOptions.symbol) {
attr.paddingLeft = Highcharts.pick(attr.paddingLeft, 25);
} else if (!btnOptions.text) {
extend(attr, {
width: btnOptions.width,
height: btnOptions.height,
padding: 0
});
}
button = renderer.button(btnOptions.text, 0, 0, callback, attr, hover, select)
.attr({
title: chart.options.lang[btnOptions._titleKey],
'stroke-linecap': 'round'
});
button.menuClassName = options.menuClassName || PREFIX + 'menu-' + chart.btnCount++;
if (btnOptions.symbol) {
symbol = renderer.symbol(
btnOptions.symbol,
btnOptions.symbolX - (symbolSize / 2),
btnOptions.symbolY - (symbolSize / 2),
symbolSize,
symbolSize
)
.attr(extend(symbolAttr, {
'stroke-width': btnOptions.symbolStrokeWidth || 1,
zIndex: 1
})).add(button);
}
button.add()
.align(extend(btnOptions, {
width: button.width,
x: Highcharts.pick(btnOptions.x, buttonOffset) // #1654
}), true, 'spacingBox');
buttonOffset += (button.width + btnOptions.buttonSpacing) * (btnOptions.align === 'right' ? -1 : 1);
chart.exportSVGElements.push(button, symbol);
},
/**
* Destroy the buttons.
*/
destroyExport: function (e) {
var chart = e.target,
i,
elem;
// Destroy the extra buttons added
for (i = 0; i < chart.exportSVGElements.length; i++) {
elem = chart.exportSVGElements[i];
// Destroy and null the svg/vml elements
if (elem) { // #1822
elem.onclick = elem.ontouchstart = null;
chart.exportSVGElements[i] = elem.destroy();
}
}
// Destroy the divs for the menu
for (i = 0; i < chart.exportDivElements.length; i++) {
elem = chart.exportDivElements[i];
// Remove the event handler
removeEvent(elem, 'mouseleave');
// Remove inline events
chart.exportDivElements[i] = elem.onmouseout = elem.onmouseover = elem.ontouchstart = elem.onclick = null;
// Destroy the div by moving to garbage bin
discardElement(elem);
}
}
});
symbols.menu = function (x, y, width, height) {
var arr = [
M, x, y + 2.5,
L, x + width, y + 2.5,
M, x, y + height / 2 + 0.5,
L, x + width, y + height / 2 + 0.5,
M, x, y + height - 1.5,
L, x + width, y + height - 1.5
];
return arr;
};
// Add the buttons on chart load
Chart.prototype.callbacks.push(function (chart) {
var n,
exportingOptions = chart.options.exporting,
buttons = exportingOptions.buttons;
buttonOffset = 0;
if (exportingOptions.enabled !== false) {
for (n in buttons) {
chart.addButton(buttons[n]);
}
// Destroy the export elements at chart destroy
addEvent(chart, 'destroy', chart.destroyExport);
}
});
}(Highcharts));

View File

@ -1,13 +0,0 @@
/*
Highcharts funnel module
(c) 2010-2014 Torstein Honsi
License: www.highcharts.com/license
*/
(function(c){var q=c.getOptions(),w=q.plotOptions,r=c.seriesTypes,G=c.merge,F=function(){},C=c.each,x=c.pick;w.funnel=G(w.pie,{animation:!1,center:["50%","50%"],width:"90%",neckWidth:"30%",height:"100%",neckHeight:"25%",reversed:!1,dataLabels:{connectorWidth:1,connectorColor:"#606060"},size:!0,states:{select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}}});r.funnel=c.extendClass(r.pie,{type:"funnel",animate:F,translate:function(){var a=function(b,a){return/%$/.test(b)?a*parseInt(b,10)/100:parseInt(b,
10)},D=0,f=this.chart,d=this.options,c=d.reversed,n=d.ignoreHiddenPoint,g=f.plotWidth,h=f.plotHeight,q=0,f=d.center,i=a(f[0],g),r=a(f[1],h),w=a(d.width,g),k,s,e=a(d.height,h),t=a(d.neckWidth,g),u=a(d.neckHeight,h),y=e-u,a=this.data,z,A,x=d.dataLabels.position==="left"?1:0,B,l,E,p,j,v,m;this.getWidthAt=s=function(b){return b>e-u||e===u?t:t+(w-t)*((e-u-b)/(e-u))};this.getX=function(b,a){return i+(a?-1:1)*(s(c?h-b:b)/2+d.dataLabels.distance)};this.center=[i,r,e];this.centerX=i;C(a,function(b){if(!n||
b.visible!==!1)D+=b.y});C(a,function(b){m=null;A=D?b.y/D:0;l=r-e/2+q*e;j=l+A*e;k=s(l);B=i-k/2;E=B+k;k=s(j);p=i-k/2;v=p+k;l>y?(B=p=i-t/2,E=v=i+t/2):j>y&&(m=j,k=s(y),p=i-k/2,v=p+k,j=y);c&&(l=e-l,j=e-j,m=m?e-m:null);z=["M",B,l,"L",E,l,v,j];m&&z.push(v,m,p,m);z.push(p,j,"Z");b.shapeType="path";b.shapeArgs={d:z};b.percentage=A*100;b.plotX=i;b.plotY=(l+(m||j))/2;b.tooltipPos=[i,b.plotY];b.slice=F;b.half=x;if(!n||b.visible!==!1)q+=A})},drawPoints:function(){var a=this,c=a.options,f=a.chart.renderer;C(a.data,
function(d){var o=d.options,n=d.graphic,g=d.shapeArgs;n?n.animate(g):d.graphic=f.path(g).attr({fill:d.color,stroke:x(o.borderColor,c.borderColor),"stroke-width":x(o.borderWidth,c.borderWidth)}).add(a.group)})},sortByAngle:function(a){a.sort(function(a,c){return a.plotY-c.plotY})},drawDataLabels:function(){var a=this.data,c=this.options.dataLabels.distance,f,d,o,n=a.length,g,h;for(this.center[2]-=2*c;n--;)o=a[n],d=(f=o.half)?1:-1,h=o.plotY,g=this.getX(h,f),o.labelPos=[0,h,g+(c-5)*d,h,g+c*d,h,f?"right":
"left",0];r.pie.prototype.drawDataLabels.call(this)}});q.plotOptions.pyramid=c.merge(q.plotOptions.funnel,{neckWidth:"0%",neckHeight:"0%",reversed:!0});c.seriesTypes.pyramid=c.extendClass(c.seriesTypes.funnel,{type:"pyramid"})})(Highcharts);

View File

@ -1,315 +0,0 @@
/**
* @license
* Highcharts funnel module
*
* (c) 2010-2014 Torstein Honsi
*
* License: www.highcharts.com/license
*/
/*global Highcharts */
(function (Highcharts) {
'use strict';
// create shortcuts
var defaultOptions = Highcharts.getOptions(),
defaultPlotOptions = defaultOptions.plotOptions,
seriesTypes = Highcharts.seriesTypes,
merge = Highcharts.merge,
noop = function () {},
each = Highcharts.each,
pick = Highcharts.pick;
// set default options
defaultPlotOptions.funnel = merge(defaultPlotOptions.pie, {
animation: false,
center: ['50%', '50%'],
width: '90%',
neckWidth: '30%',
height: '100%',
neckHeight: '25%',
reversed: false,
dataLabels: {
//position: 'right',
connectorWidth: 1,
connectorColor: '#606060'
},
size: true, // to avoid adapting to data label size in Pie.drawDataLabels
states: {
select: {
color: '#C0C0C0',
borderColor: '#000000',
shadow: false
}
}
});
seriesTypes.funnel = Highcharts.extendClass(seriesTypes.pie, {
type: 'funnel',
animate: noop,
/**
* Overrides the pie translate method
*/
translate: function () {
var
// Get positions - either an integer or a percentage string must be given
getLength = function (length, relativeTo) {
return (/%$/).test(length) ?
relativeTo * parseInt(length, 10) / 100 :
parseInt(length, 10);
},
sum = 0,
series = this,
chart = series.chart,
options = series.options,
reversed = options.reversed,
ignoreHiddenPoint = options.ignoreHiddenPoint,
plotWidth = chart.plotWidth,
plotHeight = chart.plotHeight,
cumulative = 0, // start at top
center = options.center,
centerX = getLength(center[0], plotWidth),
centerY = getLength(center[1], plotHeight),
width = getLength(options.width, plotWidth),
tempWidth,
getWidthAt,
height = getLength(options.height, plotHeight),
neckWidth = getLength(options.neckWidth, plotWidth),
neckHeight = getLength(options.neckHeight, plotHeight),
neckY = height - neckHeight,
data = series.data,
path,
fraction,
half = options.dataLabels.position === 'left' ? 1 : 0,
x1,
y1,
x2,
x3,
y3,
x4,
y5;
// Return the width at a specific y coordinate
series.getWidthAt = getWidthAt = function (y) {
return y > height - neckHeight || height === neckHeight ?
neckWidth :
neckWidth + (width - neckWidth) * ((height - neckHeight - y) / (height - neckHeight));
};
series.getX = function (y, half) {
return centerX + (half ? -1 : 1) * ((getWidthAt(reversed ? plotHeight - y : y) / 2) + options.dataLabels.distance);
};
// Expose
series.center = [centerX, centerY, height];
series.centerX = centerX;
/*
* Individual point coordinate naming:
*
* x1,y1 _________________ x2,y1
* \ /
* \ /
* \ /
* \ /
* \ /
* x3,y3 _________ x4,y3
*
* Additional for the base of the neck:
*
* | |
* | |
* | |
* x3,y5 _________ x4,y5
*/
// get the total sum
each(data, function (point) {
if (!ignoreHiddenPoint || point.visible !== false) {
sum += point.y;
}
});
each(data, function (point) {
// set start and end positions
y5 = null;
fraction = sum ? point.y / sum : 0;
y1 = centerY - height / 2 + cumulative * height;
y3 = y1 + fraction * height;
//tempWidth = neckWidth + (width - neckWidth) * ((height - neckHeight - y1) / (height - neckHeight));
tempWidth = getWidthAt(y1);
x1 = centerX - tempWidth / 2;
x2 = x1 + tempWidth;
tempWidth = getWidthAt(y3);
x3 = centerX - tempWidth / 2;
x4 = x3 + tempWidth;
// the entire point is within the neck
if (y1 > neckY) {
x1 = x3 = centerX - neckWidth / 2;
x2 = x4 = centerX + neckWidth / 2;
// the base of the neck
} else if (y3 > neckY) {
y5 = y3;
tempWidth = getWidthAt(neckY);
x3 = centerX - tempWidth / 2;
x4 = x3 + tempWidth;
y3 = neckY;
}
if (reversed) {
y1 = height - y1;
y3 = height - y3;
y5 = (y5 ? height - y5 : null);
}
// save the path
path = [
'M',
x1, y1,
'L',
x2, y1,
x4, y3
];
if (y5) {
path.push(x4, y5, x3, y5);
}
path.push(x3, y3, 'Z');
// prepare for using shared dr
point.shapeType = 'path';
point.shapeArgs = { d: path };
// for tooltips and data labels
point.percentage = fraction * 100;
point.plotX = centerX;
point.plotY = (y1 + (y5 || y3)) / 2;
// Placement of tooltips and data labels
point.tooltipPos = [
centerX,
point.plotY
];
// Slice is a noop on funnel points
point.slice = noop;
// Mimicking pie data label placement logic
point.half = half;
if (!ignoreHiddenPoint || point.visible !== false) {
cumulative += fraction;
}
});
},
/**
* Draw a single point (wedge)
* @param {Object} point The point object
* @param {Object} color The color of the point
* @param {Number} brightness The brightness relative to the color
*/
drawPoints: function () {
var series = this,
options = series.options,
chart = series.chart,
renderer = chart.renderer;
each(series.data, function (point) {
var pointOptions = point.options,
graphic = point.graphic,
shapeArgs = point.shapeArgs;
if (!graphic) { // Create the shapes
point.graphic = renderer.path(shapeArgs).
attr({
fill: point.color,
stroke: pick(pointOptions.borderColor, options.borderColor),
'stroke-width': pick(pointOptions.borderWidth, options.borderWidth)
}).
add(series.group);
} else { // Update the shapes
graphic.animate(shapeArgs);
}
});
},
/**
* Funnel items don't have angles (#2289)
*/
sortByAngle: function (points) {
points.sort(function (a, b) {
return a.plotY - b.plotY;
});
},
/**
* Extend the pie data label method
*/
drawDataLabels: function () {
var data = this.data,
labelDistance = this.options.dataLabels.distance,
leftSide,
sign,
point,
i = data.length,
x,
y;
// In the original pie label anticollision logic, the slots are distributed
// from one labelDistance above to one labelDistance below the pie. In funnels
// we don't want this.
this.center[2] -= 2 * labelDistance;
// Set the label position array for each point.
while (i--) {
point = data[i];
leftSide = point.half;
sign = leftSide ? 1 : -1;
y = point.plotY;
x = this.getX(y, leftSide);
// set the anchor point for data labels
point.labelPos = [
0, // first break of connector
y, // a/a
x + (labelDistance - 5) * sign, // second break, right outside point shape
y, // a/a
x + labelDistance * sign, // landing point for connector
y, // a/a
leftSide ? 'right' : 'left', // alignment
0 // center angle
];
}
seriesTypes.pie.prototype.drawDataLabels.call(this);
}
});
/**
* Pyramid series type.
* A pyramid series is a special type of funnel, without neck and reversed by default.
*/
defaultOptions.plotOptions.pyramid = Highcharts.merge(defaultOptions.plotOptions.funnel, {
neckWidth: '0%',
neckHeight: '0%',
reversed: true
});
Highcharts.seriesTypes.pyramid = Highcharts.extendClass(Highcharts.seriesTypes.funnel, {
type: 'pyramid'
});
}(Highcharts));

View File

@ -1,23 +0,0 @@
/*
Highcharts JS v4.1.9 (2015-10-07)
(c) 2011-2014 Torstein Honsi
License: www.highcharts.com/license
*/
(function(h){var n=h.Axis,r=h.Chart,k=h.Color,y=h.Legend,t=h.LegendSymbolMixin,u=h.Series,z=h.Point,v=h.getOptions(),i=h.each,s=h.extend,w=h.extendClass,l=h.merge,m=h.pick,p=h.seriesTypes,x=h.wrap,o=function(){},q=h.ColorAxis=function(){this.isColorAxis=!0;this.init.apply(this,arguments)};s(q.prototype,n.prototype);s(q.prototype,{defaultColorAxisOptions:{lineWidth:0,minPadding:0,maxPadding:0,gridLineWidth:1,tickPixelInterval:72,startOnTick:!0,endOnTick:!0,offset:0,marker:{animation:{duration:50},
color:"gray",width:0.01},labels:{overflow:"justify"},minColor:"#EFEFFF",maxColor:"#003875",tickLength:5},init:function(a,b){var c=a.options.legend.layout!=="vertical",e;e=l(this.defaultColorAxisOptions,{side:c?2:1,reversed:!c},b,{opposite:!c,showEmpty:!1,title:null,isColor:!0});n.prototype.init.call(this,a,e);b.dataClasses&&this.initDataClasses(b);this.initStops(b);this.horiz=c;this.zoomEnabled=!1},tweenColors:function(a,b,c){var e;!b.rgba.length||!a.rgba.length?a=b.raw||"none":(a=a.rgba,b=b.rgba,
e=b[3]!==1||a[3]!==1,a=(e?"rgba(":"rgb(")+Math.round(b[0]+(a[0]-b[0])*(1-c))+","+Math.round(b[1]+(a[1]-b[1])*(1-c))+","+Math.round(b[2]+(a[2]-b[2])*(1-c))+(e?","+(b[3]+(a[3]-b[3])*(1-c)):"")+")");return a},initDataClasses:function(a){var b=this,c=this.chart,e,d=0,f=this.options,g=a.dataClasses.length;this.dataClasses=e=[];this.legendItems=[];i(a.dataClasses,function(a,h){var i,a=l(a);e.push(a);if(!a.color)f.dataClassColor==="category"?(i=c.options.colors,a.color=i[d++],d===i.length&&(d=0)):a.color=
b.tweenColors(k(f.minColor),k(f.maxColor),g<2?0.5:h/(g-1))})},initStops:function(a){this.stops=a.stops||[[0,this.options.minColor],[1,this.options.maxColor]];i(this.stops,function(a){a.color=k(a[1])})},setOptions:function(a){n.prototype.setOptions.call(this,a);this.options.crosshair=this.options.marker;this.coll="colorAxis"},setAxisSize:function(){var a=this.legendSymbol,b=this.chart,c,e,d;if(a)this.left=c=a.attr("x"),this.top=e=a.attr("y"),this.width=d=a.attr("width"),this.height=a=a.attr("height"),
this.right=b.chartWidth-c-d,this.bottom=b.chartHeight-e-a,this.len=this.horiz?d:a,this.pos=this.horiz?c:e},toColor:function(a,b){var c,e=this.stops,d,f=this.dataClasses,g,j;if(f)for(j=f.length;j--;){if(g=f[j],d=g.from,e=g.to,(d===void 0||a>=d)&&(e===void 0||a<=e)){c=g.color;if(b)b.dataClass=j;break}}else{this.isLog&&(a=this.val2lin(a));c=1-(this.max-a)/(this.max-this.min||1);for(j=e.length;j--;)if(c>e[j][0])break;d=e[j]||e[j+1];e=e[j+1]||d;c=1-(e[0]-c)/(e[0]-d[0]||1);c=this.tweenColors(d.color,e.color,
c)}return c},getOffset:function(){var a=this.legendGroup,b=this.chart.axisOffset[this.side];if(a){this.axisParent=a;n.prototype.getOffset.call(this);if(!this.added)this.added=!0,this.labelLeft=0,this.labelRight=this.width;this.chart.axisOffset[this.side]=b}},setLegendColor:function(){var a,b=this.options;a=this.reversed;a=this.horiz?[+a,0,+!a,0]:[0,+!a,0,+a];this.legendColor={linearGradient:{x1:a[0],y1:a[1],x2:a[2],y2:a[3]},stops:b.stops||[[0,b.minColor],[1,b.maxColor]]}},drawLegendSymbol:function(a,
b){var c=a.padding,e=a.options,d=this.horiz,f=m(e.symbolWidth,d?200:12),g=m(e.symbolHeight,d?12:200),j=m(e.labelPadding,d?16:30),e=m(e.itemDistance,10);this.setLegendColor();b.legendSymbol=this.chart.renderer.rect(0,a.baseline-11,f,g).attr({zIndex:1}).add(b.legendGroup);b.legendSymbol.getBBox();this.legendItemWidth=f+c+(d?e:j);this.legendItemHeight=g+c+(d?j:0)},setState:o,visible:!0,setVisible:o,getSeriesExtremes:function(){var a;if(this.series.length)a=this.series[0],this.dataMin=a.valueMin,this.dataMax=
a.valueMax},drawCrosshair:function(a,b){var c=b&&b.plotX,e=b&&b.plotY,d,f=this.pos,g=this.len;if(b)d=this.toPixels(b[b.series.colorKey]),d<f?d=f-2:d>f+g&&(d=f+g+2),b.plotX=d,b.plotY=this.len-d,n.prototype.drawCrosshair.call(this,a,b),b.plotX=c,b.plotY=e,this.cross&&this.cross.attr({fill:this.crosshair.color}).add(this.legendGroup)},getPlotLinePath:function(a,b,c,e,d){return typeof d==="number"?this.horiz?["M",d-4,this.top-6,"L",d+4,this.top-6,d,this.top,"Z"]:["M",this.left,d,"L",this.left-6,d+6,this.left-
6,d-6,"Z"]:n.prototype.getPlotLinePath.call(this,a,b,c,e)},update:function(a,b){var c=this.chart,e=c.legend;i(this.series,function(a){a.isDirtyData=!0});if(a.dataClasses&&e.allItems)i(e.allItems,function(a){a.isDataClass&&a.legendGroup.destroy()}),c.isDirtyLegend=!0;c.options[this.coll]=l(this.userOptions,a);n.prototype.update.call(this,a,b);this.legendItem&&(this.setLegendColor(),e.colorizeItem(this,!0))},getDataClassLegendSymbols:function(){var a=this,b=this.chart,c=this.legendItems,e=b.options.legend,
d=e.valueDecimals,f=e.valueSuffix||"",g;c.length||i(this.dataClasses,function(e,n){var k=!0,l=e.from,m=e.to;g="";l===void 0?g="< ":m===void 0&&(g="> ");l!==void 0&&(g+=h.numberFormat(l,d)+f);l!==void 0&&m!==void 0&&(g+=" - ");m!==void 0&&(g+=h.numberFormat(m,d)+f);c.push(s({chart:b,name:g,options:{},drawLegendSymbol:t.drawRectangle,visible:!0,setState:o,isDataClass:!0,setVisible:function(){k=this.visible=!k;i(a.series,function(a){i(a.points,function(a){a.dataClass===n&&a.setVisible(k)})});b.legend.colorizeItem(this,
k)}},e))});return c},name:""});i(["fill","stroke"],function(a){HighchartsAdapter.addAnimSetter(a,function(b){b.elem.attr(a,q.prototype.tweenColors(k(b.start),k(b.end),b.pos))})});x(r.prototype,"getAxes",function(a){var b=this.options.colorAxis;a.call(this);this.colorAxis=[];b&&new q(this,b)});x(y.prototype,"getAllItems",function(a){var b=[],c=this.chart.colorAxis[0];c&&(c.options.dataClasses?b=b.concat(c.getDataClassLegendSymbols()):b.push(c),i(c.series,function(a){a.options.showInLegend=!1}));return b.concat(a.call(this))});
r={pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color",dashstyle:"dashStyle"},pointArrayMap:["value"],axisTypes:["xAxis","yAxis","colorAxis"],optionalAxis:"colorAxis",trackerGroups:["group","markerGroup","dataLabelsGroup"],getSymbol:o,parallelArrays:["x","y","value"],colorKey:"value",translateColors:function(){var a=this,b=this.options.nullColor,c=this.colorAxis,e=this.colorKey;i(this.data,function(d){var f=d[e];if(f=d.options.color||(f===null?b:c&&f!==void 0?c.toColor(f,
d):d.color||a.color))d.color=f})}};v.plotOptions.heatmap=l(v.plotOptions.scatter,{animation:!1,borderWidth:0,nullColor:"#F8F8F8",dataLabels:{formatter:function(){return this.point.value},inside:!0,verticalAlign:"middle",crop:!1,overflow:!1,padding:0},marker:null,pointRange:null,tooltip:{pointFormat:"{point.x}, {point.y}: {point.value}<br/>"},states:{normal:{animation:!0},hover:{halo:!1,brightness:0.2}}});p.heatmap=w(p.scatter,l(r,{type:"heatmap",pointArrayMap:["y","value"],hasPointSpecificOptions:!0,
pointClass:w(z,{setVisible:function(a){var b=this,c=a?"show":"hide";i(["graphic","dataLabel"],function(a){if(b[a])b[a][c]()})}}),supportsDrilldown:!0,getExtremesFromAll:!0,directTouch:!0,init:function(){var a;p.scatter.prototype.init.apply(this,arguments);a=this.options;this.pointRange=a.pointRange=m(a.pointRange,a.colsize||1);this.yAxis.axisPointRange=a.rowsize||1},translate:function(){var a=this.options,b=this.xAxis,c=this.yAxis,e=function(a,b,c){return Math.min(Math.max(b,a),c)};this.generatePoints();
i(this.points,function(d){var f=(a.colsize||1)/2,g=(a.rowsize||1)/2,h=e(Math.round(b.len-b.translate(d.x-f,0,1,0,1)),0,b.len),f=e(Math.round(b.len-b.translate(d.x+f,0,1,0,1)),0,b.len),i=e(Math.round(c.translate(d.y-g,0,1,0,1)),0,c.len),g=e(Math.round(c.translate(d.y+g,0,1,0,1)),0,c.len);d.plotX=d.clientX=(h+f)/2;d.plotY=(i+g)/2;d.shapeType="rect";d.shapeArgs={x:Math.min(h,f),y:Math.min(i,g),width:Math.abs(f-h),height:Math.abs(g-i)}});this.translateColors();this.chart.hasRendered&&i(this.points,function(a){a.shapeArgs.fill=
a.options.color||a.color})},drawPoints:p.column.prototype.drawPoints,animate:o,getBox:o,drawLegendSymbol:t.drawRectangle,getExtremes:function(){u.prototype.getExtremes.call(this,this.valueData);this.valueMin=this.dataMin;this.valueMax=this.dataMax;u.prototype.getExtremes.call(this)}}))})(Highcharts);

View File

@ -1,705 +0,0 @@
/**
* @license Highcharts JS v4.1.9 (2015-10-07)
*
* (c) 2011-2014 Torstein Honsi
*
* License: www.highcharts.com/license
*/
/*global HighchartsAdapter*/
(function (Highcharts) {
var UNDEFINED,
Axis = Highcharts.Axis,
Chart = Highcharts.Chart,
Color = Highcharts.Color,
Legend = Highcharts.Legend,
LegendSymbolMixin = Highcharts.LegendSymbolMixin,
Series = Highcharts.Series,
Point = Highcharts.Point,
defaultOptions = Highcharts.getOptions(),
each = Highcharts.each,
extend = Highcharts.extend,
extendClass = Highcharts.extendClass,
merge = Highcharts.merge,
pick = Highcharts.pick,
seriesTypes = Highcharts.seriesTypes,
wrap = Highcharts.wrap,
noop = function () {};
/**
* The ColorAxis object for inclusion in gradient legends
*/
var ColorAxis = Highcharts.ColorAxis = function () {
this.isColorAxis = true;
this.init.apply(this, arguments);
};
extend(ColorAxis.prototype, Axis.prototype);
extend(ColorAxis.prototype, {
defaultColorAxisOptions: {
lineWidth: 0,
minPadding: 0,
maxPadding: 0,
gridLineWidth: 1,
tickPixelInterval: 72,
startOnTick: true,
endOnTick: true,
offset: 0,
marker: {
animation: {
duration: 50
},
color: 'gray',
width: 0.01
},
labels: {
overflow: 'justify'
},
minColor: '#EFEFFF',
maxColor: '#003875',
tickLength: 5
},
init: function (chart, userOptions) {
var horiz = chart.options.legend.layout !== 'vertical',
options;
// Build the options
options = merge(this.defaultColorAxisOptions, {
side: horiz ? 2 : 1,
reversed: !horiz
}, userOptions, {
opposite: !horiz,
showEmpty: false,
title: null,
isColor: true
});
Axis.prototype.init.call(this, chart, options);
// Base init() pushes it to the xAxis array, now pop it again
//chart[this.isXAxis ? 'xAxis' : 'yAxis'].pop();
// Prepare data classes
if (userOptions.dataClasses) {
this.initDataClasses(userOptions);
}
this.initStops(userOptions);
// Override original axis properties
this.horiz = horiz;
this.zoomEnabled = false;
},
/*
* Return an intermediate color between two colors, according to pos where 0
* is the from color and 1 is the to color.
* NOTE: Changes here should be copied
* to the same function in drilldown.src.js and solid-gauge-src.js.
*/
tweenColors: function (from, to, pos) {
// Check for has alpha, because rgba colors perform worse due to lack of
// support in WebKit.
var hasAlpha,
ret;
// Unsupported color, return to-color (#3920)
if (!to.rgba.length || !from.rgba.length) {
ret = to.raw || 'none';
// Interpolate
} else {
from = from.rgba;
to = to.rgba;
hasAlpha = (to[3] !== 1 || from[3] !== 1);
ret = (hasAlpha ? 'rgba(' : 'rgb(') +
Math.round(to[0] + (from[0] - to[0]) * (1 - pos)) + ',' +
Math.round(to[1] + (from[1] - to[1]) * (1 - pos)) + ',' +
Math.round(to[2] + (from[2] - to[2]) * (1 - pos)) +
(hasAlpha ? (',' + (to[3] + (from[3] - to[3]) * (1 - pos))) : '') + ')';
}
return ret;
},
initDataClasses: function (userOptions) {
var axis = this,
chart = this.chart,
dataClasses,
colorCounter = 0,
options = this.options,
len = userOptions.dataClasses.length;
this.dataClasses = dataClasses = [];
this.legendItems = [];
each(userOptions.dataClasses, function (dataClass, i) {
var colors;
dataClass = merge(dataClass);
dataClasses.push(dataClass);
if (!dataClass.color) {
if (options.dataClassColor === 'category') {
colors = chart.options.colors;
dataClass.color = colors[colorCounter++];
// loop back to zero
if (colorCounter === colors.length) {
colorCounter = 0;
}
} else {
dataClass.color = axis.tweenColors(
Color(options.minColor),
Color(options.maxColor),
len < 2 ? 0.5 : i / (len - 1) // #3219
);
}
}
});
},
initStops: function (userOptions) {
this.stops = userOptions.stops || [
[0, this.options.minColor],
[1, this.options.maxColor]
];
each(this.stops, function (stop) {
stop.color = Color(stop[1]);
});
},
/**
* Extend the setOptions method to process extreme colors and color
* stops.
*/
setOptions: function (userOptions) {
Axis.prototype.setOptions.call(this, userOptions);
this.options.crosshair = this.options.marker;
this.coll = 'colorAxis';
},
setAxisSize: function () {
var symbol = this.legendSymbol,
chart = this.chart,
x,
y,
width,
height;
if (symbol) {
this.left = x = symbol.attr('x');
this.top = y = symbol.attr('y');
this.width = width = symbol.attr('width');
this.height = height = symbol.attr('height');
this.right = chart.chartWidth - x - width;
this.bottom = chart.chartHeight - y - height;
this.len = this.horiz ? width : height;
this.pos = this.horiz ? x : y;
}
},
/**
* Translate from a value to a color
*/
toColor: function (value, point) {
var pos,
stops = this.stops,
from,
to,
color,
dataClasses = this.dataClasses,
dataClass,
i;
if (dataClasses) {
i = dataClasses.length;
while (i--) {
dataClass = dataClasses[i];
from = dataClass.from;
to = dataClass.to;
if ((from === UNDEFINED || value >= from) && (to === UNDEFINED || value <= to)) {
color = dataClass.color;
if (point) {
point.dataClass = i;
}
break;
}
}
} else {
if (this.isLog) {
value = this.val2lin(value);
}
pos = 1 - ((this.max - value) / ((this.max - this.min) || 1));
i = stops.length;
while (i--) {
if (pos > stops[i][0]) {
break;
}
}
from = stops[i] || stops[i + 1];
to = stops[i + 1] || from;
// The position within the gradient
pos = 1 - (to[0] - pos) / ((to[0] - from[0]) || 1);
color = this.tweenColors(
from.color,
to.color,
pos
);
}
return color;
},
/**
* Override the getOffset method to add the whole axis groups inside the legend.
*/
getOffset: function () {
var group = this.legendGroup,
sideOffset = this.chart.axisOffset[this.side];
if (group) {
// Hook for the getOffset method to add groups to this parent group
this.axisParent = group;
// Call the base
Axis.prototype.getOffset.call(this);
// First time only
if (!this.added) {
this.added = true;
this.labelLeft = 0;
this.labelRight = this.width;
}
// Reset it to avoid color axis reserving space
this.chart.axisOffset[this.side] = sideOffset;
}
},
/**
* Create the color gradient
*/
setLegendColor: function () {
var grad,
horiz = this.horiz,
options = this.options,
reversed = this.reversed;
grad = horiz ? [+reversed, 0, +!reversed, 0] : [0, +!reversed, 0, +reversed]; // #3190
this.legendColor = {
linearGradient: { x1: grad[0], y1: grad[1], x2: grad[2], y2: grad[3] },
stops: options.stops || [
[0, options.minColor],
[1, options.maxColor]
]
};
},
/**
* The color axis appears inside the legend and has its own legend symbol
*/
drawLegendSymbol: function (legend, item) {
var padding = legend.padding,
legendOptions = legend.options,
horiz = this.horiz,
box,
width = pick(legendOptions.symbolWidth, horiz ? 200 : 12),
height = pick(legendOptions.symbolHeight, horiz ? 12 : 200),
labelPadding = pick(legendOptions.labelPadding, horiz ? 16 : 30),
itemDistance = pick(legendOptions.itemDistance, 10);
this.setLegendColor();
// Create the gradient
item.legendSymbol = this.chart.renderer.rect(
0,
legend.baseline - 11,
width,
height
).attr({
zIndex: 1
}).add(item.legendGroup);
box = item.legendSymbol.getBBox();
// Set how much space this legend item takes up
this.legendItemWidth = width + padding + (horiz ? itemDistance : labelPadding);
this.legendItemHeight = height + padding + (horiz ? labelPadding : 0);
},
/**
* Fool the legend
*/
setState: noop,
visible: true,
setVisible: noop,
getSeriesExtremes: function () {
var series;
if (this.series.length) {
series = this.series[0];
this.dataMin = series.valueMin;
this.dataMax = series.valueMax;
}
},
drawCrosshair: function (e, point) {
var plotX = point && point.plotX,
plotY = point && point.plotY,
crossPos,
axisPos = this.pos,
axisLen = this.len;
if (point) {
crossPos = this.toPixels(point[point.series.colorKey]);
if (crossPos < axisPos) {
crossPos = axisPos - 2;
} else if (crossPos > axisPos + axisLen) {
crossPos = axisPos + axisLen + 2;
}
point.plotX = crossPos;
point.plotY = this.len - crossPos;
Axis.prototype.drawCrosshair.call(this, e, point);
point.plotX = plotX;
point.plotY = plotY;
if (this.cross) {
this.cross
.attr({
fill: this.crosshair.color
})
.add(this.legendGroup);
}
}
},
getPlotLinePath: function (a, b, c, d, pos) {
if (typeof pos === 'number') { // crosshairs only // #3969 pos can be 0 !!
return this.horiz ?
['M', pos - 4, this.top - 6, 'L', pos + 4, this.top - 6, pos, this.top, 'Z'] :
['M', this.left, pos, 'L', this.left - 6, pos + 6, this.left - 6, pos - 6, 'Z'];
} else {
return Axis.prototype.getPlotLinePath.call(this, a, b, c, d);
}
},
update: function (newOptions, redraw) {
var chart = this.chart,
legend = chart.legend;
each(this.series, function (series) {
series.isDirtyData = true; // Needed for Axis.update when choropleth colors change
});
// When updating data classes, destroy old items and make sure new ones are created (#3207)
if (newOptions.dataClasses && legend.allItems) {
each(legend.allItems, function (item) {
if (item.isDataClass) {
item.legendGroup.destroy();
}
});
chart.isDirtyLegend = true;
}
// Keep the options structure updated for export. Unlike xAxis and yAxis, the colorAxis is
// not an array. (#3207)
chart.options[this.coll] = merge(this.userOptions, newOptions);
Axis.prototype.update.call(this, newOptions, redraw);
if (this.legendItem) {
this.setLegendColor();
legend.colorizeItem(this, true);
}
},
/**
* Get the legend item symbols for data classes
*/
getDataClassLegendSymbols: function () {
var axis = this,
chart = this.chart,
legendItems = this.legendItems,
legendOptions = chart.options.legend,
valueDecimals = legendOptions.valueDecimals,
valueSuffix = legendOptions.valueSuffix || '',
name;
if (!legendItems.length) {
each(this.dataClasses, function (dataClass, i) {
var vis = true,
from = dataClass.from,
to = dataClass.to;
// Assemble the default name. This can be overridden by legend.options.labelFormatter
name = '';
if (from === UNDEFINED) {
name = '< ';
} else if (to === UNDEFINED) {
name = '> ';
}
if (from !== UNDEFINED) {
name += Highcharts.numberFormat(from, valueDecimals) + valueSuffix;
}
if (from !== UNDEFINED && to !== UNDEFINED) {
name += ' - ';
}
if (to !== UNDEFINED) {
name += Highcharts.numberFormat(to, valueDecimals) + valueSuffix;
}
// Add a mock object to the legend items
legendItems.push(extend({
chart: chart,
name: name,
options: {},
drawLegendSymbol: LegendSymbolMixin.drawRectangle,
visible: true,
setState: noop,
isDataClass: true,
setVisible: function () {
vis = this.visible = !vis;
each(axis.series, function (series) {
each(series.points, function (point) {
if (point.dataClass === i) {
point.setVisible(vis);
}
});
});
chart.legend.colorizeItem(this, vis);
}
}, dataClass));
});
}
return legendItems;
},
name: '' // Prevents 'undefined' in legend in IE8
});
/**
* Handle animation of the color attributes directly
*/
each(['fill', 'stroke'], function (prop) {
HighchartsAdapter.addAnimSetter(prop, function (fx) {
fx.elem.attr(prop, ColorAxis.prototype.tweenColors(Color(fx.start), Color(fx.end), fx.pos));
});
});
/**
* Extend the chart getAxes method to also get the color axis
*/
wrap(Chart.prototype, 'getAxes', function (proceed) {
var options = this.options,
colorAxisOptions = options.colorAxis;
proceed.call(this);
this.colorAxis = [];
if (colorAxisOptions) {
proceed = new ColorAxis(this, colorAxisOptions); // Fake assignment for jsLint
}
});
/**
* Wrap the legend getAllItems method to add the color axis. This also removes the
* axis' own series to prevent them from showing up individually.
*/
wrap(Legend.prototype, 'getAllItems', function (proceed) {
var allItems = [],
colorAxis = this.chart.colorAxis[0];
if (colorAxis) {
// Data classes
if (colorAxis.options.dataClasses) {
allItems = allItems.concat(colorAxis.getDataClassLegendSymbols());
// Gradient legend
} else {
// Add this axis on top
allItems.push(colorAxis);
}
// Don't add the color axis' series
each(colorAxis.series, function (series) {
series.options.showInLegend = false;
});
}
return allItems.concat(proceed.call(this));
});/**
* Mixin for maps and heatmaps
*/
var colorPointMixin = {
/**
* Set the visibility of a single point
*/
setVisible: function (vis) {
var point = this,
method = vis ? 'show' : 'hide';
// Show and hide associated elements
each(['graphic', 'dataLabel'], function (key) {
if (point[key]) {
point[key][method]();
}
});
}
};
var colorSeriesMixin = {
pointAttrToOptions: { // mapping between SVG attributes and the corresponding options
stroke: 'borderColor',
'stroke-width': 'borderWidth',
fill: 'color',
dashstyle: 'dashStyle'
},
pointArrayMap: ['value'],
axisTypes: ['xAxis', 'yAxis', 'colorAxis'],
optionalAxis: 'colorAxis',
trackerGroups: ['group', 'markerGroup', 'dataLabelsGroup'],
getSymbol: noop,
parallelArrays: ['x', 'y', 'value'],
colorKey: 'value',
/**
* In choropleth maps, the color is a result of the value, so this needs translation too
*/
translateColors: function () {
var series = this,
nullColor = this.options.nullColor,
colorAxis = this.colorAxis,
colorKey = this.colorKey;
each(this.data, function (point) {
var value = point[colorKey],
color;
color = point.options.color ||
(value === null ? nullColor : (colorAxis && value !== undefined) ? colorAxis.toColor(value, point) : point.color || series.color);
if (color) {
point.color = color;
}
});
}
};
/**
* Extend the default options with map options
*/
defaultOptions.plotOptions.heatmap = merge(defaultOptions.plotOptions.scatter, {
animation: false,
borderWidth: 0,
nullColor: '#F8F8F8',
dataLabels: {
formatter: function () { // #2945
return this.point.value;
},
inside: true,
verticalAlign: 'middle',
crop: false,
overflow: false,
padding: 0 // #3837
},
marker: null,
pointRange: null, // dynamically set to colsize by default
tooltip: {
pointFormat: '{point.x}, {point.y}: {point.value}<br/>'
},
states: {
normal: {
animation: true
},
hover: {
halo: false, // #3406, halo is not required on heatmaps
brightness: 0.2
}
}
});
// The Heatmap series type
seriesTypes.heatmap = extendClass(seriesTypes.scatter, merge(colorSeriesMixin, {
type: 'heatmap',
pointArrayMap: ['y', 'value'],
hasPointSpecificOptions: true,
pointClass: extendClass(Point, colorPointMixin),
supportsDrilldown: true,
getExtremesFromAll: true,
directTouch: true,
/**
* Override the init method to add point ranges on both axes.
*/
init: function () {
var options;
seriesTypes.scatter.prototype.init.apply(this, arguments);
options = this.options;
this.pointRange = options.pointRange = pick(options.pointRange, options.colsize || 1); // #3758, prevent resetting in setData
this.yAxis.axisPointRange = options.rowsize || 1; // general point range
},
translate: function () {
var series = this,
options = series.options,
xAxis = series.xAxis,
yAxis = series.yAxis,
between = function (x, a, b) {
return Math.min(Math.max(a, x), b);
};
series.generatePoints();
each(series.points, function (point) {
var xPad = (options.colsize || 1) / 2,
yPad = (options.rowsize || 1) / 2,
x1 = between(Math.round(xAxis.len - xAxis.translate(point.x - xPad, 0, 1, 0, 1)), 0, xAxis.len),
x2 = between(Math.round(xAxis.len - xAxis.translate(point.x + xPad, 0, 1, 0, 1)), 0, xAxis.len),
y1 = between(Math.round(yAxis.translate(point.y - yPad, 0, 1, 0, 1)), 0, yAxis.len),
y2 = between(Math.round(yAxis.translate(point.y + yPad, 0, 1, 0, 1)), 0, yAxis.len);
// Set plotX and plotY for use in K-D-Tree and more
point.plotX = point.clientX = (x1 + x2) / 2;
point.plotY = (y1 + y2) / 2;
point.shapeType = 'rect';
point.shapeArgs = {
x: Math.min(x1, x2),
y: Math.min(y1, y2),
width: Math.abs(x2 - x1),
height: Math.abs(y2 - y1)
};
});
series.translateColors();
// Make sure colors are updated on colorAxis update (#2893)
if (this.chart.hasRendered) {
each(series.points, function (point) {
point.shapeArgs.fill = point.options.color || point.color; // #3311
});
}
},
drawPoints: seriesTypes.column.prototype.drawPoints,
animate: noop,
getBox: noop,
drawLegendSymbol: LegendSymbolMixin.drawRectangle,
getExtremes: function () {
// Get the extremes from the value data
Series.prototype.getExtremes.call(this, this.valueData);
this.valueMin = this.dataMin;
this.valueMax = this.dataMax;
// Get the extremes from the y data
Series.prototype.getExtremes.call(this);
}
}));
}(Highcharts));

View File

@ -1,12 +0,0 @@
/*
Highcharts JS v4.1.9 (2015-10-07)
Plugin for displaying a message when there is no data visible in chart.
(c) 2010-2014 Highsoft AS
Author: Oystein Moseng
License: www.highcharts.com/license
*/
(function(c){function i(){return!!this.points.length}function e(){this.hasData()?this.hideNoData():this.showNoData()}var f=c.seriesTypes,d=c.Chart.prototype,g=c.getOptions(),h=c.extend,j=c.each;h(g.lang,{noData:"No data to display"});g.noData={position:{x:0,y:0,align:"center",verticalAlign:"middle"},attr:{},style:{fontWeight:"bold",fontSize:"12px",color:"#60606a"}};j(["pie","gauge","waterfall","bubble"],function(a){if(f[a])f[a].prototype.hasData=i});c.Series.prototype.hasData=function(){return this.visible&&
this.dataMax!==void 0&&this.dataMin!==void 0};d.showNoData=function(a){var b=this.options,a=a||b.lang.noData,b=b.noData;if(!this.noDataLabel)this.noDataLabel=this.renderer.label(a,0,0,null,null,null,b.useHTML,null,"no-data").attr(b.attr).css(b.style).add(),this.noDataLabel.align(h(this.noDataLabel.getBBox(),b.position),!1,"plotBox")};d.hideNoData=function(){if(this.noDataLabel)this.noDataLabel=this.noDataLabel.destroy()};d.hasData=function(){for(var a=this.series,b=a.length;b--;)if(a[b].hasData()&&
!a[b].options.isInternal)return!0;return!1};d.callbacks.push(function(a){c.addEvent(a,"load",e);c.addEvent(a,"redraw",e)})})(Highcharts);

View File

@ -1,137 +0,0 @@
/**
* @license Highcharts JS v4.1.9 (2015-10-07)
* Plugin for displaying a message when there is no data visible in chart.
*
* (c) 2010-2014 Highsoft AS
* Author: Oystein Moseng
*
* License: www.highcharts.com/license
*/
(function (H) {
var seriesTypes = H.seriesTypes,
chartPrototype = H.Chart.prototype,
defaultOptions = H.getOptions(),
extend = H.extend,
each = H.each;
// Add language option
extend(defaultOptions.lang, {
noData: 'No data to display'
});
// Add default display options for message
defaultOptions.noData = {
position: {
x: 0,
y: 0,
align: 'center',
verticalAlign: 'middle'
},
attr: {
},
style: {
fontWeight: 'bold',
fontSize: '12px',
color: '#60606a'
}
// useHTML: false // docs
};
/**
* Define hasData functions for series. These return true if there are data points on this series within the plot area
*/
function hasDataPie() {
return !!this.points.length; /* != 0 */
}
each(['pie', 'gauge', 'waterfall', 'bubble'], function (type) {
if (seriesTypes[type]) {
seriesTypes[type].prototype.hasData = hasDataPie;
}
});
H.Series.prototype.hasData = function () {
return this.visible && this.dataMax !== undefined && this.dataMin !== undefined; // #3703
};
/**
* Display a no-data message.
*
* @param {String} str An optional message to show in place of the default one
*/
chartPrototype.showNoData = function (str) {
var chart = this,
options = chart.options,
text = str || options.lang.noData,
noDataOptions = options.noData;
if (!chart.noDataLabel) {
chart.noDataLabel = chart.renderer
.label(
text,
0,
0,
null,
null,
null,
noDataOptions.useHTML,
null,
'no-data'
)
.attr(noDataOptions.attr)
.css(noDataOptions.style)
.add();
chart.noDataLabel.align(extend(chart.noDataLabel.getBBox(), noDataOptions.position), false, 'plotBox');
}
};
/**
* Hide no-data message
*/
chartPrototype.hideNoData = function () {
var chart = this;
if (chart.noDataLabel) {
chart.noDataLabel = chart.noDataLabel.destroy();
}
};
/**
* Returns true if there are data points within the plot area now
*/
chartPrototype.hasData = function () {
var chart = this,
series = chart.series,
i = series.length;
while (i--) {
if (series[i].hasData() && !series[i].options.isInternal) {
return true;
}
}
return false;
};
/**
* Show no-data message if there is no data in sight. Otherwise, hide it.
*/
function handleNoData() {
var chart = this;
if (chart.hasData()) {
chart.hideNoData();
} else {
chart.showNoData();
}
}
/**
* Add event listener to handle automatic display of no-data message
*/
chartPrototype.callbacks.push(function (chart) {
H.addEvent(chart, 'load', handleNoData);
H.addEvent(chart, 'redraw', handleNoData);
});
}(Highcharts));

View File

@ -1,14 +0,0 @@
/*
Highcharts JS v4.1.9 (2015-10-07)
Client side exporting module
(c) 2015 Torstein Honsi / Oystein Moseng
License: www.highcharts.com/license
*/
(function(d){d.CanVGRenderer={};d.Chart.prototype.exportChartLocal=function(x,y){var i=this,e=d.merge(i.options.exporting,x),q=navigator.userAgent.indexOf("WebKit")>-1&&navigator.userAgent.indexOf("Chrome")<0,l=e.scale||2,n,r=window.URL||window.webkitURL||window,f,s=0,o,m,t,g=function(){if(e.fallbackToExportServer===!1)throw"Fallback to export server disabled";i.exportChart(e)},u=function(a,b,c,g,k,d,e){var j=new Image;if(!q)j.crossOrigin="Anonymous";j.onload=function(){var h=document.createElement("canvas"),
d=h.getContext&&h.getContext("2d"),i;if(d){h.height=j.height*l;h.width=j.width*l;d.drawImage(j,0,0,h.width,h.height);try{i=h.toDataURL(),c(i,b)}catch(f){if(f.name==="SecurityError"||f.name==="SECURITY_ERR"||f.message==="SecurityError")g(a,b);else throw f;}}else k(a,b);e&&e(a,b)};j.onerror=function(){d(a,b);e&&e(a,b)};j.src=a},v=function(a){try{if(!q&&navigator.userAgent.toLowerCase().indexOf("firefox")<0)return r.createObjectURL(new Blob([a],{type:"image/svg+xml;charset-utf-16"}))}catch(b){}return"data:image/svg+xml;charset=UTF-8,"+
encodeURIComponent(a)},p=function(a,b){var c=document.createElement("a"),d=(e.filename||"chart")+"."+b,k;if(navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(a,d);else if(typeof c.download!=="undefined")c.href=a,c.download=d,c.target="_blank",document.body.appendChild(c),c.click(),document.body.removeChild(c);else try{if(k=window.open(a,"chart"),typeof k==="undefined"||k===null)throw 1;}catch(g){window.location.href=a}},w=function(){var a,b,c=i.sanitizeSVG(n.innerHTML);if(e&&e.type==="image/svg+xml")try{navigator.msSaveOrOpenBlob?
(b=new MSBlobBuilder,b.append(c),a=b.getBlob("image/svg+xml")):a=v(c),p(a,"svg")}catch(f){g()}else a=v(c),u(a,{},function(a){try{p(a,"png")}catch(c){g()}},function(){var a=document.createElement("canvas"),b=a.getContext("2d"),e=c.match(/^<svg[^>]*width\s*=\s*\"?(\d+)\"?[^>]*>/)[1]*l,f=c.match(/^<svg[^>]*height\s*=\s*\"?(\d+)\"?[^>]*>/)[1]*l,h=function(){b.drawSvg(c,0,0,e,f);try{p(navigator.msSaveOrOpenBlob?a.msToBlob():a.toDataURL("image/png"),"png")}catch(d){g()}};a.width=e;a.height=f;window.canvg?
h():(i.showLoading(),HighchartsAdapter.getScript(d.getOptions().global.canvasToolsURL,function(){i.hideLoading();h()}))},g,g,function(){try{r.revokeObjectURL(a)}catch(b){}})};d.wrap(d.Chart.prototype,"getChartHTML",function(a){n=this.container.cloneNode(!0);return a.apply(this,Array.prototype.slice.call(arguments,1))});i.getSVGForExport(e,y);f=n.getElementsByTagName("image");try{f.length||w();var z=function(a,b){++s;b.imageElement.setAttributeNS("http://www.w3.org/1999/xlink","href",a);s===f.length&&
w()};for(m=0,t=f.length;m<t;++m)o=f[m],u(o.getAttributeNS("http://www.w3.org/1999/xlink","href"),{imageElement:o},z,g,g,g)}catch(A){g()}};d.getOptions().exporting.buttons.contextButton.menuItems=[{textKey:"printChart",onclick:function(){this.print()}},{separator:!0},{textKey:"downloadPNG",onclick:function(){this.exportChartLocal()}},{textKey:"downloadSVG",onclick:function(){this.exportChartLocal({type:"image/svg+xml"})}}]})(Highcharts);

View File

@ -1,277 +0,0 @@
/**
* @license Highcharts JS v4.1.9 (2015-10-07)
* Client side exporting module
*
* (c) 2015 Torstein Honsi / Oystein Moseng
*
* License: www.highcharts.com/license
*/
// JSLint options:
/*global Highcharts, HighchartsAdapter, document, window, Blob, MSBlobBuilder */
(function (Highcharts) {
// Dummy object so we can reuse our canvas-tools.js without errors
Highcharts.CanVGRenderer = {};
/**
* Add a new method to the Chart object to perform a local download
*/
Highcharts.Chart.prototype.exportChartLocal = function (exportingOptions, chartOptions) {
var chart = this,
options = Highcharts.merge(chart.options.exporting, exportingOptions),
webKit = navigator.userAgent.indexOf('WebKit') > -1 && navigator.userAgent.indexOf("Chrome") < 0, // Webkit and not chrome
scale = options.scale || 2,
chartCopyContainer,
domurl = window.URL || window.webkitURL || window,
images,
imagesEmbedded = 0,
el,
i,
l,
fallbackToExportServer = function () {
if (options.fallbackToExportServer === false) {
throw 'Fallback to export server disabled';
}
chart.exportChart(options);
},
// Get data:URL from image URL
// Pass in callbacks to handle results. finallyCallback is always called at the end of the process. Supplying this callback is optional.
// All callbacks receive two arguments: imageURL, and callbackArgs. callbackArgs is used only by callbacks and can contain whatever.
imageToDataUrl = function (imageURL, callbackArgs, successCallback, taintedCallback, noCanvasSupportCallback, failedLoadCallback, finallyCallback) {
var img = new Image();
if (!webKit) {
img.crossOrigin = 'Anonymous'; // For some reason Safari chokes on this attribute
}
img.onload = function () {
var canvas = document.createElement('canvas'),
ctx = canvas.getContext && canvas.getContext('2d'),
dataURL;
if (!ctx) {
noCanvasSupportCallback(imageURL, callbackArgs);
} else {
canvas.height = img.height * scale;
canvas.width = img.width * scale;
ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
// Now we try to get the contents of the canvas.
try {
dataURL = canvas.toDataURL();
successCallback(dataURL, callbackArgs);
} catch (e) {
// Failed - either tainted canvas or something else went horribly wrong
if (e.name === 'SecurityError' || e.name === 'SECURITY_ERR' || e.message === 'SecurityError') {
taintedCallback(imageURL, callbackArgs);
} else {
throw e;
}
}
}
if (finallyCallback) {
finallyCallback(imageURL, callbackArgs);
}
};
img.onerror = function () {
failedLoadCallback(imageURL, callbackArgs);
if (finallyCallback) {
finallyCallback(imageURL, callbackArgs);
}
};
img.src = imageURL;
},
// Get blob URL from SVG code. Falls back to normal data URI.
svgToDataUrl = function (svg) {
try {
// Safari requires data URI since it doesn't allow navigation to blob URLs
// Firefox has an issue with Blobs and internal references, leading to gradients not working using Blobs (#4550)
if (!webKit && navigator.userAgent.toLowerCase().indexOf('firefox') < 0) {
return domurl.createObjectURL(new Blob([svg], { type: 'image/svg+xml;charset-utf-16'}));
}
} catch (e) {
// Ignore
}
return 'data:image/svg+xml;charset=UTF-8,' + encodeURIComponent(svg);
},
// Download contents by dataURL/blob
download = function (dataURL, extension) {
var a = document.createElement('a'),
filename = (options.filename || 'chart') + '.' + extension,
windowRef;
// IE specific blob implementation
if (navigator.msSaveOrOpenBlob) {
navigator.msSaveOrOpenBlob(dataURL, filename);
return;
}
// Try HTML5 download attr if supported
if (typeof a.download !== 'undefined') {
a.href = dataURL;
a.download = filename; // HTML5 download attribute
a.target = '_blank';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
} else {
// No download attr, just opening data URI
try {
windowRef = window.open(dataURL, 'chart');
if (typeof windowRef === 'undefined' || windowRef === null) {
throw 1;
}
} catch (e) {
// window.open failed, trying location.href
window.location.href = dataURL;
}
}
},
// Get data URL to an image of the chart and call download on it
initiateDownload = function () {
var svgurl,
blob,
svg = chart.sanitizeSVG(chartCopyContainer.innerHTML); // SVG of chart copy
// Initiate download depending on file type
if (options && options.type === 'image/svg+xml') {
// SVG download. In this case, we want to use Microsoft specific Blob if available
try {
if (navigator.msSaveOrOpenBlob) {
blob = new MSBlobBuilder();
blob.append(svg);
svgurl = blob.getBlob('image/svg+xml');
} else {
svgurl = svgToDataUrl(svg);
}
download(svgurl, 'svg');
} catch (e) {
fallbackToExportServer();
}
} else {
// PNG download - create bitmap from SVG
// First, try to get PNG by rendering on canvas
svgurl = svgToDataUrl(svg);
imageToDataUrl(svgurl, { /* args */ }, function (imageURL) {
// Success
try {
download(imageURL, 'png');
} catch (e) {
fallbackToExportServer();
}
}, function () {
// Failed due to tainted canvas
// Create new and untainted canvas
var canvas = document.createElement('canvas'),
ctx = canvas.getContext('2d'),
imageWidth = svg.match(/^<svg[^>]*width\s*=\s*\"?(\d+)\"?[^>]*>/)[1] * scale,
imageHeight = svg.match(/^<svg[^>]*height\s*=\s*\"?(\d+)\"?[^>]*>/)[1] * scale,
downloadWithCanVG = function () {
ctx.drawSvg(svg, 0, 0, imageWidth, imageHeight);
try {
download(navigator.msSaveOrOpenBlob ? canvas.msToBlob() : canvas.toDataURL('image/png'), 'png');
} catch (e) {
fallbackToExportServer();
}
};
canvas.width = imageWidth;
canvas.height = imageHeight;
if (window.canvg) {
// Use preloaded canvg
downloadWithCanVG();
} else {
// Must load canVG first
chart.showLoading();
HighchartsAdapter.getScript(Highcharts.getOptions().global.canvasToolsURL, function () {
chart.hideLoading();
downloadWithCanVG();
});
}
},
// No canvas support
fallbackToExportServer,
// Failed to load image
fallbackToExportServer,
// Finally
function () {
try {
domurl.revokeObjectURL(svgurl);
} catch (e) {
// Ignore
}
});
}
};
// Hook into getSVG to get a copy of the chart copy's container
Highcharts.wrap(Highcharts.Chart.prototype, 'getChartHTML', function (proceed) {
chartCopyContainer = this.container.cloneNode(true);
return proceed.apply(this, Array.prototype.slice.call(arguments, 1));
});
// Trigger hook to get chart copy
chart.getSVGForExport(options, chartOptions);
images = chartCopyContainer.getElementsByTagName('image');
try {
// If there are no images to embed, just go ahead and start the download process
if (!images.length) {
initiateDownload();
}
// Success handler, we converted image to base64!
function embeddedSuccess(imageURL, callbackArgs) {
++imagesEmbedded;
// Change image href in chart copy
callbackArgs.imageElement.setAttributeNS('http://www.w3.org/1999/xlink', 'href', imageURL);
// Start download when done with the last image
if (imagesEmbedded === images.length) {
initiateDownload();
}
}
// Go through the images we want to embed
for (i = 0, l = images.length; i < l; ++i) {
el = images[i];
imageToDataUrl(el.getAttributeNS('http://www.w3.org/1999/xlink', 'href'), { imageElement: el },
embeddedSuccess,
// Tainted canvas
fallbackToExportServer,
// No canvas support
fallbackToExportServer,
// Failed to load source
fallbackToExportServer
);
}
} catch (e) {
fallbackToExportServer();
}
};
// Extend the default options to use the local exporter logic
Highcharts.getOptions().exporting.buttons.contextButton.menuItems = [{
textKey: 'printChart',
onclick: function () {
this.print();
}
}, {
separator: true
}, {
textKey: 'downloadPNG',
onclick: function () {
this.exportChartLocal();
}
}, {
textKey: 'downloadSVG',
onclick: function () {
this.exportChartLocal({
type: 'image/svg+xml'
});
}
}];
}(Highcharts));

View File

@ -1,14 +0,0 @@
/*
Highcharts JS v4.1.9 (2015-10-07)
Solid angular gauge module
(c) 2010-2014 Torstein Honsi
License: www.highcharts.com/license
*/
(function(a){var q=a.getOptions().plotOptions,r=a.pInt,s=a.pick,j=a.each,k;q.solidgauge=a.merge(q.gauge,{colorByPoint:!0});k={initDataClasses:function(b){var c=this,e=this.chart,d,o=0,f=this.options;this.dataClasses=d=[];j(b.dataClasses,function(g,h){var p,g=a.merge(g);d.push(g);if(!g.color)f.dataClassColor==="category"?(p=e.options.colors,g.color=p[o++],o===p.length&&(o=0)):g.color=c.tweenColors(a.Color(f.minColor),a.Color(f.maxColor),h/(b.dataClasses.length-1))})},initStops:function(b){this.stops=
b.stops||[[0,this.options.minColor],[1,this.options.maxColor]];j(this.stops,function(b){b.color=a.Color(b[1])})},toColor:function(b,c){var e,d=this.stops,a,f=this.dataClasses,g,h;if(f)for(h=f.length;h--;){if(g=f[h],a=g.from,d=g.to,(a===void 0||b>=a)&&(d===void 0||b<=d)){e=g.color;if(c)c.dataClass=h;break}}else{this.isLog&&(b=this.val2lin(b));e=1-(this.max-b)/(this.max-this.min);for(h=d.length;h--;)if(e>d[h][0])break;a=d[h]||d[h+1];d=d[h+1]||a;e=1-(d[0]-e)/(d[0]-a[0]||1);e=this.tweenColors(a.color,
d.color,e)}return e},tweenColors:function(b,c,a){var d;!c.rgba.length||!b.rgba.length?b=c.raw||"none":(b=b.rgba,c=c.rgba,d=c[3]!==1||b[3]!==1,b=(d?"rgba(":"rgb(")+Math.round(c[0]+(b[0]-c[0])*(1-a))+","+Math.round(c[1]+(b[1]-c[1])*(1-a))+","+Math.round(c[2]+(b[2]-c[2])*(1-a))+(d?","+(c[3]+(b[3]-c[3])*(1-a)):"")+")");return b}};j(["fill","stroke"],function(b){HighchartsAdapter.addAnimSetter(b,function(c){c.elem.attr(b,k.tweenColors(a.Color(c.start),a.Color(c.end),c.pos))})});a.seriesTypes.solidgauge=
a.extendClass(a.seriesTypes.gauge,{type:"solidgauge",pointAttrToOptions:{},bindAxes:function(){var b;a.seriesTypes.gauge.prototype.bindAxes.call(this);b=this.yAxis;a.extend(b,k);b.options.dataClasses&&b.initDataClasses(b.options);b.initStops(b.options)},drawPoints:function(){var b=this,c=b.yAxis,e=c.center,d=b.options,o=b.chart.renderer,f=d.overshoot,g=f&&typeof f==="number"?f/180*Math.PI:0;a.each(b.points,function(a){var f=a.graphic,i=c.startAngleRad+c.translate(a.y,null,null,null,!0),j=r(s(a.options.radius,
d.radius,100))*e[2]/200,l=r(s(a.options.innerRadius,d.innerRadius,60))*e[2]/200,m=c.toColor(a.y,a),n=Math.min(c.startAngleRad,c.endAngleRad),k=Math.max(c.startAngleRad,c.endAngleRad);m==="none"&&(m=a.color||b.color||"none");if(m!=="none")a.color=m;i=Math.max(n-g,Math.min(k+g,i));d.wrap===!1&&(i=Math.max(n,Math.min(k,i)));n=Math.min(i,c.startAngleRad);i=Math.max(i,c.startAngleRad);i-n>2*Math.PI&&(i=n+2*Math.PI);a.shapeArgs=l={x:e[0],y:e[1],r:j,innerR:l,start:n,end:i,fill:m};a.startR=j;if(f){if(a=l.d,
f.animate(l),a)l.d=a}else a.graphic=o.arc(l).attr({stroke:d.borderColor||"none","stroke-width":d.borderWidth||0,fill:m,"sweep-flag":0}).add(b.group)})},animate:function(b){if(!b)this.startAngleRad=this.yAxis.startAngleRad,a.seriesTypes.pie.prototype.animate.call(this,b)}})})(Highcharts);

View File

@ -1,270 +0,0 @@
/**
* @license Highcharts JS v4.1.9 (2015-10-07)
* Solid angular gauge module
*
* (c) 2010-2014 Torstein Honsi
*
* License: www.highcharts.com/license
*/
/*global Highcharts, HighchartsAdapter*/
(function (H) {
"use strict";
var defaultPlotOptions = H.getOptions().plotOptions,
pInt = H.pInt,
pick = H.pick,
each = H.each,
colorAxisMethods,
UNDEFINED;
// The default options
defaultPlotOptions.solidgauge = H.merge(defaultPlotOptions.gauge, {
colorByPoint: true
});
// These methods are defined in the ColorAxis object, and copied here.
// If we implement an AMD system we should make ColorAxis a dependency.
colorAxisMethods = {
initDataClasses: function (userOptions) {
var axis = this,
chart = this.chart,
dataClasses,
colorCounter = 0,
options = this.options;
this.dataClasses = dataClasses = [];
each(userOptions.dataClasses, function (dataClass, i) {
var colors;
dataClass = H.merge(dataClass);
dataClasses.push(dataClass);
if (!dataClass.color) {
if (options.dataClassColor === 'category') {
colors = chart.options.colors;
dataClass.color = colors[colorCounter++];
// loop back to zero
if (colorCounter === colors.length) {
colorCounter = 0;
}
} else {
dataClass.color = axis.tweenColors(H.Color(options.minColor), H.Color(options.maxColor), i / (userOptions.dataClasses.length - 1));
}
}
});
},
initStops: function (userOptions) {
this.stops = userOptions.stops || [
[0, this.options.minColor],
[1, this.options.maxColor]
];
each(this.stops, function (stop) {
stop.color = H.Color(stop[1]);
});
},
/**
* Translate from a value to a color
*/
toColor: function (value, point) {
var pos,
stops = this.stops,
from,
to,
color,
dataClasses = this.dataClasses,
dataClass,
i;
if (dataClasses) {
i = dataClasses.length;
while (i--) {
dataClass = dataClasses[i];
from = dataClass.from;
to = dataClass.to;
if ((from === UNDEFINED || value >= from) && (to === UNDEFINED || value <= to)) {
color = dataClass.color;
if (point) {
point.dataClass = i;
}
break;
}
}
} else {
if (this.isLog) {
value = this.val2lin(value);
}
pos = 1 - ((this.max - value) / (this.max - this.min));
i = stops.length;
while (i--) {
if (pos > stops[i][0]) {
break;
}
}
from = stops[i] || stops[i + 1];
to = stops[i + 1] || from;
// The position within the gradient
pos = 1 - (to[0] - pos) / ((to[0] - from[0]) || 1);
color = this.tweenColors(
from.color,
to.color,
pos
);
}
return color;
},
/*
* Return an intermediate color between two colors, according to pos where 0
* is the from color and 1 is the to color.
*/
tweenColors: function (from, to, pos) {
// Check for has alpha, because rgba colors perform worse due to lack of
// support in WebKit.
var hasAlpha,
ret;
// Unsupported color, return to-color (#3920)
if (!to.rgba.length || !from.rgba.length) {
ret = to.raw || 'none';
// Interpolate
} else {
from = from.rgba;
to = to.rgba;
hasAlpha = (to[3] !== 1 || from[3] !== 1);
ret = (hasAlpha ? 'rgba(' : 'rgb(') +
Math.round(to[0] + (from[0] - to[0]) * (1 - pos)) + ',' +
Math.round(to[1] + (from[1] - to[1]) * (1 - pos)) + ',' +
Math.round(to[2] + (from[2] - to[2]) * (1 - pos)) +
(hasAlpha ? (',' + (to[3] + (from[3] - to[3]) * (1 - pos))) : '') + ')';
}
return ret;
}
};
/**
* Handle animation of the color attributes directly
*/
each(['fill', 'stroke'], function (prop) {
HighchartsAdapter.addAnimSetter(prop, function (fx) {
fx.elem.attr(prop, colorAxisMethods.tweenColors(H.Color(fx.start), H.Color(fx.end), fx.pos));
});
});
// The series prototype
H.seriesTypes.solidgauge = H.extendClass(H.seriesTypes.gauge, {
type: 'solidgauge',
pointAttrToOptions: {}, // #4301, don't inherit line marker's attribs
bindAxes: function () {
var axis;
H.seriesTypes.gauge.prototype.bindAxes.call(this);
axis = this.yAxis;
H.extend(axis, colorAxisMethods);
// Prepare data classes
if (axis.options.dataClasses) {
axis.initDataClasses(axis.options);
}
axis.initStops(axis.options);
},
/**
* Draw the points where each point is one needle
*/
drawPoints: function () {
var series = this,
yAxis = series.yAxis,
center = yAxis.center,
options = series.options,
renderer = series.chart.renderer,
overshoot = options.overshoot,
overshootVal = overshoot && typeof overshoot === 'number' ? overshoot / 180 * Math.PI : 0;
H.each(series.points, function (point) {
var graphic = point.graphic,
rotation = yAxis.startAngleRad + yAxis.translate(point.y, null, null, null, true),
radius = (pInt(pick(point.options.radius, options.radius, 100)) * center[2]) / 200,
innerRadius = (pInt(pick(point.options.innerRadius, options.innerRadius, 60)) * center[2]) / 200,
shapeArgs,
d,
toColor = yAxis.toColor(point.y, point),
fromColor,
axisMinAngle = Math.min(yAxis.startAngleRad, yAxis.endAngleRad),
axisMaxAngle = Math.max(yAxis.startAngleRad, yAxis.endAngleRad),
minAngle,
maxAngle;
if (toColor === 'none') { // #3708
toColor = point.color || series.color || 'none';
}
if (toColor !== 'none') {
fromColor = point.color;
point.color = toColor;
}
// Handle overshoot and clipping to axis max/min
rotation = Math.max(axisMinAngle - overshootVal, Math.min(axisMaxAngle + overshootVal, rotation));
// Handle the wrap option
if (options.wrap === false) {
rotation = Math.max(axisMinAngle, Math.min(axisMaxAngle, rotation));
}
minAngle = Math.min(rotation, yAxis.startAngleRad);
maxAngle = Math.max(rotation, yAxis.startAngleRad);
if (maxAngle - minAngle > 2 * Math.PI) {
maxAngle = minAngle + 2 * Math.PI;
}
point.shapeArgs = shapeArgs = {
x: center[0],
y: center[1],
r: radius,
innerR: innerRadius,
start: minAngle,
end: maxAngle,
fill: toColor
};
point.startR = radius; // For PieSeries.animate
if (graphic) {
d = shapeArgs.d;
graphic.animate(shapeArgs);
if (d) {
shapeArgs.d = d; // animate alters it
}
} else {
point.graphic = renderer.arc(shapeArgs)
.attr({
stroke: options.borderColor || 'none',
'stroke-width': options.borderWidth || 0,
fill: toColor,
'sweep-flag': 0
})
.add(series.group);
}
});
},
/**
* Extend the pie slice animation by animating from start angle and up
*/
animate: function (init) {
if (!init) {
this.startAngleRad = this.yAxis.startAngleRad;
H.seriesTypes.pie.prototype.animate.call(this, init);
}
}
});
}(Highcharts));

View File

@ -1,30 +0,0 @@
/*
Highcharts JS v4.1.9 (2015-10-07)
(c) 2014 Highsoft AS
Authors: Jon Arild Nygard / Oystein Moseng
License: www.highcharts.com/license
*/
(function(h){var j=h.seriesTypes,A=h.map,o=h.merge,t=h.extend,u=h.extendClass,v=h.getOptions().plotOptions,w=function(){},k=h.each,r=HighchartsAdapter.grep,i=h.pick,m=h.Series,x=h.Color,B=function(a,b,c){var d,c=c||this;for(d in a)a.hasOwnProperty(d)&&b.call(c,a[d],d,a)},y=function(a,b,c,d){d=d||this;a=a||[];k(a,function(e,f){c=b.call(d,c,e,f,a)});return c},q=function(a,b,c){c=c||this;a=b.call(c,a);a!==!1&&q(a,b,c)};v.treemap=o(v.scatter,{showInLegend:!1,marker:!1,borderColor:"#E0E0E0",borderWidth:1,
dataLabels:{enabled:!0,defer:!1,verticalAlign:"middle",formatter:function(){return this.point.name||this.point.id},inside:!0},tooltip:{headerFormat:"",pointFormat:"<b>{point.name}</b>: {point.node.val}</b><br/>"},layoutAlgorithm:"sliceAndDice",layoutStartingDirection:"vertical",alternateStartingDirection:!1,levelIsConstant:!0,states:{hover:{borderColor:"#A0A0A0",brightness:j.heatmap?0:0.1,shadow:!1}},drillUpButton:{position:{align:"left",x:10,y:-50}}});j.treemap=u(j.scatter,o({pointAttrToOptions:{},
pointArrayMap:["value"],axisTypes:j.heatmap?["xAxis","yAxis","colorAxis"]:["xAxis","yAxis"],optionalAxis:"colorAxis",getSymbol:w,parallelArrays:["x","y","value","colorValue"],colorKey:"colorValue",translateColors:j.heatmap&&j.heatmap.prototype.translateColors},{type:"treemap",trackerGroups:["group","dataLabelsGroup"],pointClass:u(h.Point,{setVisible:j.pie.prototype.pointClass.prototype.setVisible}),getListOfParents:function(a,b){var c=y(a,function(a,c,b){c=i(c.parent,"");a[c]===void 0&&(a[c]=[]);
a[c].push(b);return a},{});B(c,function(a,c,f){c!==""&&HighchartsAdapter.inArray(c,b)===-1&&(k(a,function(a){f[""].push(a)}),delete f[c])});return c},getTree:function(){var a,b=this;a=A(this.data,function(a){return a.id});a=b.getListOfParents(this.data,a);b.nodeMap=[];a=b.buildNode("",-1,0,a,null);q(this.nodeMap[this.rootNode],function(a){var d=!1,e=a.parent;a.visible=!0;if(e||e==="")d=b.nodeMap[e];return d});q(this.nodeMap[this.rootNode].children,function(a){var b=!1;k(a,function(a){a.visible=!0;
a.children.length&&(b=(b||[]).concat(a.children))});return b});this.setTreeValues(a);return a},init:function(a,b){m.prototype.init.call(this,a,b);this.options.allowDrillToNode&&this.drillTo()},buildNode:function(a,b,c,d,e){var f=this,g=[],n=f.points[b],z;k(d[a]||[],function(b){z=f.buildNode(f.points[b].id,b,c+1,d,a);g.push(z)});b={id:a,i:b,children:g,level:c,parent:e,visible:!1};f.nodeMap[b.id]=b;if(n)n.node=b;return b},setTreeValues:function(a){var b=this,c=b.options,d=0,e=[],f,g=b.points[a.i];k(a.children,
function(a){a=b.setTreeValues(a);b.insertElementSorted(e,a,function(a,c){return a.val>c.val});a.ignore?q(a.children,function(a){var c=!1;k(a,function(a){t(a,{ignore:!0,isLeaf:!1,visible:!1});a.children.length&&(c=(c||[]).concat(a.children))});return c}):d+=a.val});f=i(g&&g.value,d);t(a,{children:e,childrenTotal:d,ignore:!(i(g&&g.visible,!0)&&f>0),isLeaf:a.visible&&!d,levelDynamic:c.levelIsConstant?a.level:a.level-b.nodeMap[b.rootNode].level,name:i(g&&g.name,""),val:f});return a},calculateChildrenAreas:function(a,
b){var c=this,d=c.options,e=this.levelMap[a.levelDynamic+1],f=i(c[e&&e.layoutAlgorithm]&&e.layoutAlgorithm,d.layoutAlgorithm),g=d.alternateStartingDirection,n=[],d=r(a.children,function(a){return!a.ignore});if(e&&e.layoutStartingDirection)b.direction=e.layoutStartingDirection==="vertical"?0:1;n=c[f](b,d);k(d,function(a,d){var e=n[d];a.values=o(e,{val:a.childrenTotal,direction:g?1-b.direction:b.direction});a.pointValues=o(e,{x:e.x/c.axisRatio,width:e.width/c.axisRatio});a.children.length&&c.calculateChildrenAreas(a,
a.values)})},setPointValues:function(){var a=this.xAxis,b=this.yAxis;k(this.points,function(c){var d=c.node.pointValues,e,f,g;d?(e=Math.round(a.translate(d.x,0,0,0,1)),f=Math.round(a.translate(d.x+d.width,0,0,0,1)),g=Math.round(b.translate(d.y,0,0,0,1)),d=Math.round(b.translate(d.y+d.height,0,0,0,1)),c.shapeType="rect",c.shapeArgs={x:Math.min(e,f),y:Math.min(g,d),width:Math.abs(f-e),height:Math.abs(d-g)},c.plotX=c.shapeArgs.x+c.shapeArgs.width/2,c.plotY=c.shapeArgs.y+c.shapeArgs.height/2):(delete c.plotX,
delete c.plotY)})},setColorRecursive:function(a,b){var c=this,d,e;if(a){d=c.points[a.i];e=c.levelMap[a.levelDynamic];b=i(d&&d.options.color,e&&e.color,b);if(d)d.color=b;a.children.length&&k(a.children,function(a){c.setColorRecursive(a,b)})}},alg_func_group:function(a,b,c,d){this.height=a;this.width=b;this.plot=d;this.startDirection=this.direction=c;this.lH=this.nH=this.lW=this.nW=this.total=0;this.elArr=[];this.lP={total:0,lH:0,nH:0,lW:0,nW:0,nR:0,lR:0,aspectRatio:function(a,c){return Math.max(a/
c,c/a)}};this.addElement=function(a){this.lP.total=this.elArr[this.elArr.length-1];this.total+=a;this.direction===0?(this.lW=this.nW,this.lP.lH=this.lP.total/this.lW,this.lP.lR=this.lP.aspectRatio(this.lW,this.lP.lH),this.nW=this.total/this.height,this.lP.nH=this.lP.total/this.nW,this.lP.nR=this.lP.aspectRatio(this.nW,this.lP.nH)):(this.lH=this.nH,this.lP.lW=this.lP.total/this.lH,this.lP.lR=this.lP.aspectRatio(this.lP.lW,this.lH),this.nH=this.total/this.width,this.lP.nW=this.lP.total/this.nH,this.lP.nR=
this.lP.aspectRatio(this.lP.nW,this.nH));this.elArr.push(a)};this.reset=function(){this.lW=this.nW=0;this.elArr=[];this.total=0}},alg_func_calcPoints:function(a,b,c,d){var e,f,g,n,h=c.lW,s=c.lH,l=c.plot,j,i=0,p=c.elArr.length-1;b?(h=c.nW,s=c.nH):j=c.elArr[c.elArr.length-1];k(c.elArr,function(a){if(b||i<p)c.direction===0?(e=l.x,f=l.y,g=h,n=a/g):(e=l.x,f=l.y,n=s,g=a/n),d.push({x:e,y:f,width:g,height:n}),c.direction===0?l.y+=n:l.x+=g;i+=1});c.reset();c.direction===0?c.width-=h:c.height-=s;l.y=l.parent.y+
(l.parent.height-c.height);l.x=l.parent.x+(l.parent.width-c.width);if(a)c.direction=1-c.direction;b||c.addElement(j)},alg_func_lowAspectRatio:function(a,b,c){var d=[],e=this,f,g={x:b.x,y:b.y,parent:b},h=0,j=c.length-1,i=new this.alg_func_group(b.height,b.width,b.direction,g);k(c,function(c){f=b.width*b.height*(c.val/b.val);i.addElement(f);i.lP.nR>i.lP.lR&&e.alg_func_calcPoints(a,!1,i,d,g);h===j&&e.alg_func_calcPoints(a,!0,i,d,g);h+=1});return d},alg_func_fill:function(a,b,c){var d=[],e,f=b.direction,
g=b.x,h=b.y,i=b.width,j=b.height,l,o,m,p;k(c,function(c){e=b.width*b.height*(c.val/b.val);l=g;o=h;f===0?(p=j,m=e/p,i-=m,g+=m):(m=i,p=e/m,j-=p,h+=p);d.push({x:l,y:o,width:m,height:p});a&&(f=1-f)});return d},strip:function(a,b){return this.alg_func_lowAspectRatio(!1,a,b)},squarified:function(a,b){return this.alg_func_lowAspectRatio(!0,a,b)},sliceAndDice:function(a,b){return this.alg_func_fill(!0,a,b)},stripes:function(a,b){return this.alg_func_fill(!1,a,b)},translate:function(){var a,b;m.prototype.translate.call(this);
if(this.points.length)this.rootNode=i(this.options.rootId,""),this.levelMap=y(this.options.levels,function(a,b){a[b.level]=b;return a},{}),b=this.tree=this.getTree(),this.axisRatio=this.xAxis.len/this.yAxis.len,this.nodeMap[""].pointValues=a={x:0,y:0,width:100,height:100},this.nodeMap[""].values=a=o(a,{width:a.width*this.axisRatio,direction:this.options.layoutStartingDirection==="vertical"?0:1,val:b.val}),this.calculateChildrenAreas(b,a);this.colorAxis?this.translateColors():this.options.colorByPoint||
this.setColorRecursive(this.tree,void 0);b=this.nodeMap[this.rootNode].pointValues;this.xAxis.setExtremes(b.x,b.x+b.width,!1);this.yAxis.setExtremes(b.y,b.y+b.height,!1);this.xAxis.setScale();this.yAxis.setScale();this.setPointValues()},drawDataLabels:function(){var a=this,b=r(a.points,function(a){return a.node.visible}),c,d;k(b,function(b){d=a.levelMap[b.node.levelDynamic];c={style:{}};if(!b.node.isLeaf)c.enabled=!1;if(d&&d.dataLabels)c=o(c,d.dataLabels),a._hasPointLabels=!0;if(b.shapeArgs)c.style.width=
b.shapeArgs.width;b.dlOptions=o(c,b.options.dataLabels)});m.prototype.drawDataLabels.call(this)},alignDataLabel:j.column.prototype.alignDataLabel,pointAttribs:function(a,b){var c=this.levelMap[a.node.levelDynamic]||{},d=this.options,e=b&&d.states[b]||{},c={stroke:a.borderColor||c.borderColor||e.borderColor||d.borderColor,"stroke-width":i(a.borderWidth,c.borderWidth,e.borderWidth,d.borderWidth),dashstyle:a.borderDashStyle||c.borderDashStyle||e.borderDashStyle||d.borderDashStyle,fill:a.color||this.color};
if(b==="hover")c.zIndex=1;if(a.node.level<=this.nodeMap[this.rootNode].level)c.fill="none",c["stroke-width"]=0;else if(a.node.isLeaf){if(b)c.fill=x(c.fill).brighten(e.brightness).get()}else c.fill=i(d.interactByLeaf,!d.allowDrillToNode)?"none":x(c.fill).setOpacity(b==="hover"?0.75:0.15).get();return c},drawPoints:function(){var a=this,b=r(a.points,function(a){return a.node.visible});k(b,function(c){var b="levelGroup-"+c.node.levelDynamic;a[b]||(a[b]=a.chart.renderer.g(b).attr({zIndex:1E3-c.node.levelDynamic}).add(a.group));
c.group=a[b];c.pointAttr={"":a.pointAttribs(c),hover:a.pointAttribs(c,"hover"),select:{}}});j.column.prototype.drawPoints.call(this);a.options.allowDrillToNode&&k(b,function(b){var d;if(b.graphic)d=b.drillId=a.options.interactByLeaf?a.drillToByLeaf(b):a.drillToByGroup(b),b.graphic.css({cursor:d?"pointer":"default"})})},insertElementSorted:function(a,b,c){var d=0,e=!1;a.length!==0&&k(a,function(f){c(b,f)&&!e&&(a.splice(d,0,b),e=!0);d+=1});e||a.push(b)},drillTo:function(){var a=this;h.addEvent(a,"click",
function(b){var b=b.point,c=b.drillId,d;c&&(d=a.nodeMap[a.rootNode].name||a.rootNode,b.setState(""),a.drillToNode(c),a.showDrillUpButton(d))})},drillToByGroup:function(a){var b=!1;if(a.node.level-this.nodeMap[this.rootNode].level===1&&!a.node.isLeaf)b=a.id;return b},drillToByLeaf:function(a){var b=!1;if(a.node.parent!==this.rootNode&&a.node.isLeaf)for(a=a.node;!b;)if(a=this.nodeMap[a.parent],a.parent===this.rootNode)b=a.id;return b},drillUp:function(){var a=null;this.rootNode&&(a=this.nodeMap[this.rootNode],
a=a.parent!==null?this.nodeMap[a.parent]:this.nodeMap[""]);if(a!==null)this.drillToNode(a.id),a.id===""?this.drillUpButton=this.drillUpButton.destroy():(a=this.nodeMap[a.parent],this.showDrillUpButton(a.name||a.id))},drillToNode:function(a){this.options.rootId=a;this.isDirty=!0;this.chart.redraw()},showDrillUpButton:function(a){var b=this,a=a||"< Back",c=b.options.drillUpButton,d,e;if(c.text)a=c.text;this.drillUpButton?this.drillUpButton.attr({text:a}).align():(e=(d=c.theme)&&d.states,this.drillUpButton=
this.chart.renderer.button(a,null,null,function(){b.drillUp()},d,e&&e.hover,e&&e.select).attr({align:c.position.align,zIndex:9}).add().align(c.position,!1,c.relativeTo||"plotBox"))},buildKDTree:w,drawLegendSymbol:h.LegendSymbolMixin.drawRectangle,getExtremes:function(){m.prototype.getExtremes.call(this,this.colorValueData);this.valueMin=this.dataMin;this.valueMax=this.dataMax;m.prototype.getExtremes.call(this)},getExtremesFromAll:!0,bindAxes:function(){var a={endOnTick:!1,gridLineWidth:0,lineWidth:0,
min:0,dataMin:0,minPadding:0,max:100,dataMax:100,maxPadding:0,startOnTick:!1,title:null,tickPositions:[]};m.prototype.bindAxes.call(this);h.extend(this.yAxis.options,a);h.extend(this.xAxis.options,a)}}))})(Highcharts);

View File

@ -1,887 +0,0 @@
/**
* @license Highcharts JS v4.1.9 (2015-10-07)
*
* (c) 2014 Highsoft AS
* Authors: Jon Arild Nygard / Oystein Moseng
*
* License: www.highcharts.com/license
*/
/*global HighchartsAdapter */
(function (H) {
var seriesTypes = H.seriesTypes,
map = H.map,
merge = H.merge,
extend = H.extend,
extendClass = H.extendClass,
defaultOptions = H.getOptions(),
plotOptions = defaultOptions.plotOptions,
noop = function () { return; },
each = H.each,
grep = HighchartsAdapter.grep,
pick = H.pick,
Series = H.Series,
Color = H.Color,
eachObject = function (list, func, context) {
var key;
context = context || this;
for (key in list) {
if (list.hasOwnProperty(key)) {
func.call(context, list[key], key, list);
}
}
},
reduce = function (arr, func, previous, context) {
context = context || this;
arr = arr || []; // @note should each be able to handle empty values automatically?
each(arr, function (current, i) {
previous = func.call(context, previous, current, i, arr);
});
return previous;
},
// @todo find correct name for this function.
recursive = function (item, func, context) {
var next;
context = context || this;
next = func.call(context, item);
if (next !== false) {
recursive(next, func, context);
}
};
// Define default options
plotOptions.treemap = merge(plotOptions.scatter, {
showInLegend: false,
marker: false,
borderColor: '#E0E0E0',
borderWidth: 1,
dataLabels: {
enabled: true,
defer: false,
verticalAlign: 'middle',
formatter: function () { // #2945
return this.point.name || this.point.id;
},
inside: true
},
tooltip: {
headerFormat: '',
pointFormat: '<b>{point.name}</b>: {point.node.val}</b><br/>'
},
layoutAlgorithm: 'sliceAndDice',
layoutStartingDirection: 'vertical',
alternateStartingDirection: false,
levelIsConstant: true,
states: {
hover: {
borderColor: '#A0A0A0',
brightness: seriesTypes.heatmap ? 0 : 0.1,
shadow: false
}
},
drillUpButton: {
position: {
align: 'left',
x: 10,
y: -50
}
}
});
// Stolen from heatmap
var colorSeriesMixin = {
// mapping between SVG attributes and the corresponding options
pointAttrToOptions: {},
pointArrayMap: ['value'],
axisTypes: seriesTypes.heatmap ? ['xAxis', 'yAxis', 'colorAxis'] : ['xAxis', 'yAxis'],
optionalAxis: 'colorAxis',
getSymbol: noop,
parallelArrays: ['x', 'y', 'value', 'colorValue'],
colorKey: 'colorValue', // Point color option key
translateColors: seriesTypes.heatmap && seriesTypes.heatmap.prototype.translateColors
};
// The Treemap series type
seriesTypes.treemap = extendClass(seriesTypes.scatter, merge(colorSeriesMixin, {
type: 'treemap',
trackerGroups: ['group', 'dataLabelsGroup'],
pointClass: extendClass(H.Point, {
setVisible: seriesTypes.pie.prototype.pointClass.prototype.setVisible
}),
/**
* Creates an object map from parent id to childrens index.
* @param {Array} data List of points set in options.
* @param {string} data[].parent Parent id of point.
* @param {Array} ids List of all point ids.
* @return {Object} Map from parent id to children index in data.
*/
getListOfParents: function (data, ids) {
var listOfParents = reduce(data, function (prev, curr, i) {
var parent = pick(curr.parent, "");
if (prev[parent] === undefined) {
prev[parent] = [];
}
prev[parent].push(i);
return prev;
}, {});
// If parent does not exist, hoist parent to root of tree.
eachObject(listOfParents, function (children, parent, list) {
if ((parent !== "") && (HighchartsAdapter.inArray(parent, ids) === -1)) {
each(children, function (child) {
list[""].push(child);
});
delete list[parent];
}
});
return listOfParents;
},
/**
* Creates a tree structured object from the series points
*/
getTree: function () {
var tree,
series = this,
allIds = map(this.data, function (d) {
return d.id;
}),
parentList = series.getListOfParents(this.data, allIds);
series.nodeMap = [];
tree = series.buildNode("", -1, 0, parentList, null);
recursive(this.nodeMap[this.rootNode], function (node) {
var next = false,
p = node.parent;
node.visible = true;
if (p || p === "") {
next = series.nodeMap[p];
}
return next;
});
recursive(this.nodeMap[this.rootNode].children, function (children) {
var next = false;
each(children, function (child) {
child.visible = true;
if (child.children.length) {
next = (next || []).concat(child.children);
}
});
return next;
});
this.setTreeValues(tree);
return tree;
},
init: function (chart, options) {
var series = this;
Series.prototype.init.call(series, chart, options);
if (series.options.allowDrillToNode) {
series.drillTo();
}
},
buildNode: function (id, i, level, list, parent) {
var series = this,
children = [],
point = series.points[i],
node,
child;
// Actions
each((list[id] || []), function (i) {
child = series.buildNode(series.points[i].id, i, (level + 1), list, id);
children.push(child);
});
node = {
id: id,
i: i,
children: children,
level: level,
parent: parent,
visible: false // @todo move this to better location
};
series.nodeMap[node.id] = node;
if (point) {
point.node = node;
}
return node;
},
setTreeValues: function (tree) {
var series = this,
options = series.options,
childrenTotal = 0,
sorted = [],
val,
point = series.points[tree.i];
// First give the children some values
each(tree.children, function (child) {
child = series.setTreeValues(child);
series.insertElementSorted(sorted, child, function (el, el2) {
return el.val > el2.val;
});
if (!child.ignore) {
childrenTotal += child.val;
} else {
// @todo Add predicate to avoid looping already ignored children
recursive(child.children, function (children) {
var next = false;
each(children, function (node) {
extend(node, {
ignore: true,
isLeaf: false,
visible: false
});
if (node.children.length) {
next = (next || []).concat(node.children);
}
});
return next;
});
}
});
// Set the values
val = pick(point && point.value, childrenTotal);
extend(tree, {
children: sorted,
childrenTotal: childrenTotal,
// Ignore this node if point is not visible
ignore: !(pick(point && point.visible, true) && (val > 0)),
isLeaf: tree.visible && !childrenTotal,
levelDynamic: (options.levelIsConstant ? tree.level : (tree.level - series.nodeMap[series.rootNode].level)),
name: pick(point && point.name, ""),
val: val
});
return tree;
},
/**
* Recursive function which calculates the area for all children of a node.
* @param {Object} node The node which is parent to the children.
* @param {Object} area The rectangular area of the parent.
*/
calculateChildrenAreas: function (parent, area) {
var series = this,
options = series.options,
level = this.levelMap[parent.levelDynamic + 1],
algorithm = pick((series[level && level.layoutAlgorithm] && level.layoutAlgorithm), options.layoutAlgorithm),
alternate = options.alternateStartingDirection,
childrenValues = [],
children;
// Collect all children which should be included
children = grep(parent.children, function (n) {
return !n.ignore;
});
if (level && level.layoutStartingDirection) {
area.direction = level.layoutStartingDirection === 'vertical' ? 0 : 1;
}
childrenValues = series[algorithm](area, children);
each(children, function (child, index) {
var values = childrenValues[index];
child.values = merge(values, {
val: child.childrenTotal,
direction: (alternate ? 1 - area.direction : area.direction)
});
child.pointValues = merge(values, {
x: (values.x / series.axisRatio),
width: (values.width / series.axisRatio)
});
// If node has children, then call method recursively
if (child.children.length) {
series.calculateChildrenAreas(child, child.values);
}
});
},
setPointValues: function () {
var series = this,
xAxis = series.xAxis,
yAxis = series.yAxis;
each(series.points, function (point) {
var node = point.node,
values = node.pointValues,
x1,
x2,
y1,
y2;
// Points which is ignored, have no values.
if (values) {
x1 = Math.round(xAxis.translate(values.x, 0, 0, 0, 1));
x2 = Math.round(xAxis.translate(values.x + values.width, 0, 0, 0, 1));
y1 = Math.round(yAxis.translate(values.y, 0, 0, 0, 1));
y2 = Math.round(yAxis.translate(values.y + values.height, 0, 0, 0, 1));
// Set point values
point.shapeType = 'rect';
point.shapeArgs = {
x: Math.min(x1, x2),
y: Math.min(y1, y2),
width: Math.abs(x2 - x1),
height: Math.abs(y2 - y1)
};
point.plotX = point.shapeArgs.x + (point.shapeArgs.width / 2);
point.plotY = point.shapeArgs.y + (point.shapeArgs.height / 2);
} else {
// Reset visibility
delete point.plotX;
delete point.plotY;
}
});
},
setColorRecursive: function (node, color) {
var series = this,
point,
level;
if (node) {
point = series.points[node.i];
level = series.levelMap[node.levelDynamic];
// Select either point color, level color or inherited color.
color = pick(point && point.options.color, level && level.color, color);
if (point) {
point.color = color;
}
// Do it all again with the children
if (node.children.length) {
each(node.children, function (child) {
series.setColorRecursive(child, color);
});
}
}
},
alg_func_group: function (h, w, d, p) {
this.height = h;
this.width = w;
this.plot = p;
this.direction = d;
this.startDirection = d;
this.total = 0;
this.nW = 0;
this.lW = 0;
this.nH = 0;
this.lH = 0;
this.elArr = [];
this.lP = {
total: 0,
lH: 0,
nH: 0,
lW: 0,
nW: 0,
nR: 0,
lR: 0,
aspectRatio: function (w, h) {
return Math.max((w / h), (h / w));
}
};
this.addElement = function (el) {
this.lP.total = this.elArr[this.elArr.length - 1];
this.total = this.total + el;
if (this.direction === 0) {
// Calculate last point old aspect ratio
this.lW = this.nW;
this.lP.lH = this.lP.total / this.lW;
this.lP.lR = this.lP.aspectRatio(this.lW, this.lP.lH);
// Calculate last point new aspect ratio
this.nW = this.total / this.height;
this.lP.nH = this.lP.total / this.nW;
this.lP.nR = this.lP.aspectRatio(this.nW, this.lP.nH);
} else {
// Calculate last point old aspect ratio
this.lH = this.nH;
this.lP.lW = this.lP.total / this.lH;
this.lP.lR = this.lP.aspectRatio(this.lP.lW, this.lH);
// Calculate last point new aspect ratio
this.nH = this.total / this.width;
this.lP.nW = this.lP.total / this.nH;
this.lP.nR = this.lP.aspectRatio(this.lP.nW, this.nH);
}
this.elArr.push(el);
};
this.reset = function () {
this.nW = 0;
this.lW = 0;
this.elArr = [];
this.total = 0;
};
},
alg_func_calcPoints: function (directionChange, last, group, childrenArea) {
var pX,
pY,
pW,
pH,
gW = group.lW,
gH = group.lH,
plot = group.plot,
keep,
i = 0,
end = group.elArr.length - 1;
if (last) {
gW = group.nW;
gH = group.nH;
} else {
keep = group.elArr[group.elArr.length - 1];
}
each(group.elArr, function (p) {
if (last || (i < end)) {
if (group.direction === 0) {
pX = plot.x;
pY = plot.y;
pW = gW;
pH = p / pW;
} else {
pX = plot.x;
pY = plot.y;
pH = gH;
pW = p / pH;
}
childrenArea.push({
x: pX,
y: pY,
width: pW,
height: pH
});
if (group.direction === 0) {
plot.y = plot.y + pH;
} else {
plot.x = plot.x + pW;
}
}
i = i + 1;
});
// Reset variables
group.reset();
if (group.direction === 0) {
group.width = group.width - gW;
} else {
group.height = group.height - gH;
}
plot.y = plot.parent.y + (plot.parent.height - group.height);
plot.x = plot.parent.x + (plot.parent.width - group.width);
if (directionChange) {
group.direction = 1 - group.direction;
}
// If not last, then add uncalculated element
if (!last) {
group.addElement(keep);
}
},
alg_func_lowAspectRatio: function (directionChange, parent, children) {
var childrenArea = [],
series = this,
pTot,
plot = {
x: parent.x,
y: parent.y,
parent: parent
},
direction = parent.direction,
i = 0,
end = children.length - 1,
group = new this.alg_func_group(parent.height, parent.width, direction, plot);
// Loop through and calculate all areas
each(children, function (child) {
pTot = (parent.width * parent.height) * (child.val / parent.val);
group.addElement(pTot);
if (group.lP.nR > group.lP.lR) {
series.alg_func_calcPoints(directionChange, false, group, childrenArea, plot);
}
// If last child, then calculate all remaining areas
if (i === end) {
series.alg_func_calcPoints(directionChange, true, group, childrenArea, plot);
}
i = i + 1;
});
return childrenArea;
},
alg_func_fill: function (directionChange, parent, children) {
var childrenArea = [],
pTot,
direction = parent.direction,
x = parent.x,
y = parent.y,
width = parent.width,
height = parent.height,
pX,
pY,
pW,
pH;
each(children, function (child) {
pTot = (parent.width * parent.height) * (child.val / parent.val);
pX = x;
pY = y;
if (direction === 0) {
pH = height;
pW = pTot / pH;
width = width - pW;
x = x + pW;
} else {
pW = width;
pH = pTot / pW;
height = height - pH;
y = y + pH;
}
childrenArea.push({
x: pX,
y: pY,
width: pW,
height: pH
});
if (directionChange) {
direction = 1 - direction;
}
});
return childrenArea;
},
strip: function (parent, children) {
return this.alg_func_lowAspectRatio(false, parent, children);
},
squarified: function (parent, children) {
return this.alg_func_lowAspectRatio(true, parent, children);
},
sliceAndDice: function (parent, children) {
return this.alg_func_fill(true, parent, children);
},
stripes: function (parent, children) {
return this.alg_func_fill(false, parent, children);
},
translate: function () {
var pointValues,
seriesArea,
tree,
val;
// Call prototype function
Series.prototype.translate.call(this);
if (this.points.length) {
// Assign variables
this.rootNode = pick(this.options.rootId, "");
// Create a object map from level to options
this.levelMap = reduce(this.options.levels, function (arr, item) {
arr[item.level] = item;
return arr;
}, {});
tree = this.tree = this.getTree(); // @todo Only if series.isDirtyData is true
// Calculate plotting values.
this.axisRatio = (this.xAxis.len / this.yAxis.len);
this.nodeMap[""].pointValues = pointValues = {x: 0, y: 0, width: 100, height: 100 };
this.nodeMap[""].values = seriesArea = merge(pointValues, {
width: (pointValues.width * this.axisRatio),
direction: (this.options.layoutStartingDirection === 'vertical' ? 0 : 1),
val: tree.val
});
this.calculateChildrenAreas(tree, seriesArea);
}
// Logic for point colors
if (this.colorAxis) {
this.translateColors();
} else if (!this.options.colorByPoint) {
this.setColorRecursive(this.tree, undefined);
}
// Update axis extremes according to the root node.
val = this.nodeMap[this.rootNode].pointValues;
this.xAxis.setExtremes(val.x, val.x + val.width, false);
this.yAxis.setExtremes(val.y, val.y + val.height, false);
this.xAxis.setScale();
this.yAxis.setScale();
// Assign values to points.
this.setPointValues();
},
/**
* Extend drawDataLabels with logic to handle custom options related to the treemap series:
* - Points which is not a leaf node, has dataLabels disabled by default.
* - Options set on series.levels is merged in.
* - Width of the dataLabel is set to match the width of the point shape.
*/
drawDataLabels: function () {
var series = this,
points = grep(series.points, function (n) {
return n.node.visible;
}),
options,
level;
each(points, function (point) {
level = series.levelMap[point.node.levelDynamic];
// Set options to new object to avoid problems with scope
options = {style: {}};
// If not a leaf, then label should be disabled as default
if (!point.node.isLeaf) {
options.enabled = false;
}
// If options for level exists, include them as well
if (level && level.dataLabels) {
options = merge(options, level.dataLabels);
series._hasPointLabels = true;
}
// Set dataLabel width to the width of the point shape.
if (point.shapeArgs) {
options.style.width = point.shapeArgs.width;
}
// Merge custom options with point options
point.dlOptions = merge(options, point.options.dataLabels);
});
Series.prototype.drawDataLabels.call(this);
},
alignDataLabel: seriesTypes.column.prototype.alignDataLabel,
/**
* Get presentational attributes
*/
pointAttribs: function (point, state) {
var level = this.levelMap[point.node.levelDynamic] || {},
options = this.options,
attr,
stateOptions = (state && options.states[state]) || {};
// Set attributes by precedence. Point trumps level trumps series. Stroke width uses pick
// because it can be 0.
attr = {
'stroke': point.borderColor || level.borderColor || stateOptions.borderColor || options.borderColor,
'stroke-width': pick(point.borderWidth, level.borderWidth, stateOptions.borderWidth, options.borderWidth),
'dashstyle': point.borderDashStyle || level.borderDashStyle || stateOptions.borderDashStyle || options.borderDashStyle,
'fill': point.color || this.color
};
if (state === 'hover') {
attr.zIndex = 1;
}
if (point.node.level <= this.nodeMap[this.rootNode].level) {
// Hide levels above the current view
attr.fill = 'none';
attr["stroke-width"] = 0;
} else if (!point.node.isLeaf) {
// If not a leaf, then remove fill
// @todo let users set the opacity
attr.fill = pick(options.interactByLeaf, !options.allowDrillToNode) ? 'none' : Color(attr.fill).setOpacity(state === 'hover' ? 0.75 : 0.15).get();
} else if (state) {
// Brighten and hoist the hover nodes
attr.fill = Color(attr.fill).brighten(stateOptions.brightness).get();
}
return attr;
},
/**
* Extending ColumnSeries drawPoints
*/
drawPoints: function () {
var series = this,
points = grep(series.points, function (n) {
return n.node.visible;
});
each(points, function (point) {
var groupKey = "levelGroup-" + point.node.levelDynamic;
if (!series[groupKey]) {
series[groupKey] = series.chart.renderer.g(groupKey)
.attr({
zIndex: 1000 - point.node.levelDynamic // @todo Set the zIndex based upon the number of levels, instead of using 1000
})
.add(series.group);
}
point.group = series[groupKey];
// Preliminary code in prepraration for HC5 that uses pointAttribs for all series
point.pointAttr = {
'': series.pointAttribs(point),
'hover': series.pointAttribs(point, 'hover'),
'select': {}
};
});
// Call standard drawPoints
seriesTypes.column.prototype.drawPoints.call(this);
// If drillToNode is allowed, set a point cursor on clickables & add drillId to point
if (series.options.allowDrillToNode) {
each(points, function (point) {
var cursor,
drillId;
if (point.graphic) {
drillId = point.drillId = series.options.interactByLeaf ? series.drillToByLeaf(point) : series.drillToByGroup(point);
cursor = drillId ? "pointer" : "default";
point.graphic.css({ cursor: cursor });
}
});
}
},
/**
* Inserts an element into an array, sorted by a condition.
* Modifies the referenced array
* @param {*[]} arr The array which the element is inserted into.
* @param {*} el The element to insert.
* @param {function} cond The condition to sort on. First parameter is el, second parameter is array element
*/
insertElementSorted: function (arr, el, cond) {
var i = 0,
inserted = false;
if (arr.length !== 0) {
each(arr, function (arrayElement) {
if (cond(el, arrayElement) && !inserted) {
arr.splice(i, 0, el);
inserted = true;
}
i = i + 1;
});
}
if (!inserted) {
arr.push(el);
}
},
/**
* Add drilling on the suitable points
*/
drillTo: function () {
var series = this;
H.addEvent(series, 'click', function (event) {
var point = event.point,
drillId = point.drillId,
drillName;
// If a drill id is returned, add click event and cursor.
if (drillId) {
drillName = series.nodeMap[series.rootNode].name || series.rootNode;
point.setState(''); // Remove hover
series.drillToNode(drillId);
series.showDrillUpButton(drillName);
}
});
},
/**
* Finds the drill id for a parent node.
* Returns false if point should not have a click event
* @param {Object} point
* @return {string || boolean} Drill to id or false when point should not have a click event
*/
drillToByGroup: function (point) {
var series = this,
drillId = false;
if ((point.node.level - series.nodeMap[series.rootNode].level) === 1 && !point.node.isLeaf) {
drillId = point.id;
}
return drillId;
},
/**
* Finds the drill id for a leaf node.
* Returns false if point should not have a click event
* @param {Object} point
* @return {string || boolean} Drill to id or false when point should not have a click event
*/
drillToByLeaf: function (point) {
var series = this,
drillId = false,
nodeParent;
if ((point.node.parent !== series.rootNode) && (point.node.isLeaf)) {
nodeParent = point.node;
while (!drillId) {
nodeParent = series.nodeMap[nodeParent.parent];
if (nodeParent.parent === series.rootNode) {
drillId = nodeParent.id;
}
}
}
return drillId;
},
drillUp: function () {
var drillPoint = null,
node,
parent;
if (this.rootNode) {
node = this.nodeMap[this.rootNode];
if (node.parent !== null) {
drillPoint = this.nodeMap[node.parent];
} else {
drillPoint = this.nodeMap[""];
}
}
if (drillPoint !== null) {
this.drillToNode(drillPoint.id);
if (drillPoint.id === "") {
this.drillUpButton = this.drillUpButton.destroy();
} else {
parent = this.nodeMap[drillPoint.parent];
this.showDrillUpButton((parent.name || parent.id));
}
}
},
drillToNode: function (id) {
this.options.rootId = id;
this.isDirty = true; // Force redraw
this.chart.redraw();
},
showDrillUpButton: function (name) {
var series = this,
backText = (name || '< Back'),
buttonOptions = series.options.drillUpButton,
attr,
states;
if (buttonOptions.text) {
backText = buttonOptions.text;
}
if (!this.drillUpButton) {
attr = buttonOptions.theme;
states = attr && attr.states;
this.drillUpButton = this.chart.renderer.button(
backText,
null,
null,
function () {
series.drillUp();
},
attr,
states && states.hover,
states && states.select
)
.attr({
align: buttonOptions.position.align,
zIndex: 9
})
.add()
.align(buttonOptions.position, false, buttonOptions.relativeTo || 'plotBox');
} else {
this.drillUpButton.attr({
text: backText
})
.align();
}
},
buildKDTree: noop,
drawLegendSymbol: H.LegendSymbolMixin.drawRectangle,
getExtremes: function () {
// Get the extremes from the value data
Series.prototype.getExtremes.call(this, this.colorValueData);
this.valueMin = this.dataMin;
this.valueMax = this.dataMax;
// Get the extremes from the y data
Series.prototype.getExtremes.call(this);
},
getExtremesFromAll: true,
bindAxes: function () {
var treeAxis = {
endOnTick: false,
gridLineWidth: 0,
lineWidth: 0,
min: 0,
dataMin: 0,
minPadding: 0,
max: 100,
dataMax: 100,
maxPadding: 0,
startOnTick: false,
title: null,
tickPositions: []
};
Series.prototype.bindAxes.call(this);
H.extend(this.yAxis.options, treeAxis);
H.extend(this.xAxis.options, treeAxis);
}
}));
}(Highcharts));

View File

@ -1,254 +0,0 @@
/**
* Dark blue theme for Highcharts JS
* @author Torstein Honsi
*/
Highcharts.theme = {
colors: ["#DDDF0D", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
chart: {
backgroundColor: {
linearGradient: { x1: 0, y1: 0, x2: 1, y2: 1 },
stops: [
[0, 'rgb(48, 48, 96)'],
[1, 'rgb(0, 0, 0)']
]
},
borderColor: '#000000',
borderWidth: 2,
className: 'dark-container',
plotBackgroundColor: 'rgba(255, 255, 255, .1)',
plotBorderColor: '#CCCCCC',
plotBorderWidth: 1
},
title: {
style: {
color: '#C0C0C0',
font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
}
},
subtitle: {
style: {
color: '#666666',
font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
}
},
xAxis: {
gridLineColor: '#333333',
gridLineWidth: 1,
labels: {
style: {
color: '#A0A0A0'
}
},
lineColor: '#A0A0A0',
tickColor: '#A0A0A0',
title: {
style: {
color: '#CCC',
fontWeight: 'bold',
fontSize: '12px',
fontFamily: 'Trebuchet MS, Verdana, sans-serif'
}
}
},
yAxis: {
gridLineColor: '#333333',
labels: {
style: {
color: '#A0A0A0'
}
},
lineColor: '#A0A0A0',
minorTickInterval: null,
tickColor: '#A0A0A0',
tickWidth: 1,
title: {
style: {
color: '#CCC',
fontWeight: 'bold',
fontSize: '12px',
fontFamily: 'Trebuchet MS, Verdana, sans-serif'
}
}
},
tooltip: {
backgroundColor: 'rgba(0, 0, 0, 0.75)',
style: {
color: '#F0F0F0'
}
},
toolbar: {
itemStyle: {
color: 'silver'
}
},
plotOptions: {
line: {
dataLabels: {
color: '#CCC'
},
marker: {
lineColor: '#333'
}
},
spline: {
marker: {
lineColor: '#333'
}
},
scatter: {
marker: {
lineColor: '#333'
}
},
candlestick: {
lineColor: 'white'
}
},
legend: {
itemStyle: {
font: '9pt Trebuchet MS, Verdana, sans-serif',
color: '#A0A0A0'
},
itemHoverStyle: {
color: '#FFF'
},
itemHiddenStyle: {
color: '#444'
}
},
credits: {
style: {
color: '#666'
}
},
labels: {
style: {
color: '#CCC'
}
},
navigation: {
buttonOptions: {
symbolStroke: '#DDDDDD',
hoverSymbolStroke: '#FFFFFF',
theme: {
fill: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0.4, '#606060'],
[0.6, '#333333']
]
},
stroke: '#000000'
}
}
},
// scroll charts
rangeSelector: {
buttonTheme: {
fill: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0.4, '#888'],
[0.6, '#555']
]
},
stroke: '#000000',
style: {
color: '#CCC',
fontWeight: 'bold'
},
states: {
hover: {
fill: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0.4, '#BBB'],
[0.6, '#888']
]
},
stroke: '#000000',
style: {
color: 'white'
}
},
select: {
fill: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0.1, '#000'],
[0.3, '#333']
]
},
stroke: '#000000',
style: {
color: 'yellow'
}
}
}
},
inputStyle: {
backgroundColor: '#333',
color: 'silver'
},
labelStyle: {
color: 'silver'
}
},
navigator: {
handles: {
backgroundColor: '#666',
borderColor: '#AAA'
},
outlineColor: '#CCC',
maskFill: 'rgba(16, 16, 16, 0.5)',
series: {
color: '#7798BF',
lineColor: '#A6C7ED'
}
},
scrollbar: {
barBackgroundColor: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0.4, '#888'],
[0.6, '#555']
]
},
barBorderColor: '#CCC',
buttonArrowColor: '#CCC',
buttonBackgroundColor: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0.4, '#888'],
[0.6, '#555']
]
},
buttonBorderColor: '#CCC',
rifleColor: '#FFF',
trackBackgroundColor: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0, '#000'],
[1, '#333']
]
},
trackBorderColor: '#666'
},
// special colors for some of the
legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
background2: 'rgb(35, 35, 70)',
dataLabelsColor: '#444',
textColor: '#C0C0C0',
maskColor: 'rgba(255,255,255,0.3)'
};
// Apply the theme
var highchartsOptions = Highcharts.setOptions(Highcharts.theme);

View File

@ -1,255 +0,0 @@
/**
* Dark blue theme for Highcharts JS
* @author Torstein Honsi
*/
Highcharts.theme = {
colors: ["#DDDF0D", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
chart: {
backgroundColor: {
linearGradient: [0, 0, 250, 500],
stops: [
[0, 'rgb(48, 96, 48)'],
[1, 'rgb(0, 0, 0)']
]
},
borderColor: '#000000',
borderWidth: 2,
className: 'dark-container',
plotBackgroundColor: 'rgba(255, 255, 255, .1)',
plotBorderColor: '#CCCCCC',
plotBorderWidth: 1
},
title: {
style: {
color: '#C0C0C0',
font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
}
},
subtitle: {
style: {
color: '#666666',
font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
}
},
xAxis: {
gridLineColor: '#333333',
gridLineWidth: 1,
labels: {
style: {
color: '#A0A0A0'
}
},
lineColor: '#A0A0A0',
tickColor: '#A0A0A0',
title: {
style: {
color: '#CCC',
fontWeight: 'bold',
fontSize: '12px',
fontFamily: 'Trebuchet MS, Verdana, sans-serif'
}
}
},
yAxis: {
gridLineColor: '#333333',
labels: {
style: {
color: '#A0A0A0'
}
},
lineColor: '#A0A0A0',
minorTickInterval: null,
tickColor: '#A0A0A0',
tickWidth: 1,
title: {
style: {
color: '#CCC',
fontWeight: 'bold',
fontSize: '12px',
fontFamily: 'Trebuchet MS, Verdana, sans-serif'
}
}
},
tooltip: {
backgroundColor: 'rgba(0, 0, 0, 0.75)',
style: {
color: '#F0F0F0'
}
},
toolbar: {
itemStyle: {
color: 'silver'
}
},
plotOptions: {
line: {
dataLabels: {
color: '#CCC'
},
marker: {
lineColor: '#333'
}
},
spline: {
marker: {
lineColor: '#333'
}
},
scatter: {
marker: {
lineColor: '#333'
}
},
candlestick: {
lineColor: 'white'
}
},
legend: {
itemStyle: {
font: '9pt Trebuchet MS, Verdana, sans-serif',
color: '#A0A0A0'
},
itemHoverStyle: {
color: '#FFF'
},
itemHiddenStyle: {
color: '#444'
}
},
credits: {
style: {
color: '#666'
}
},
labels: {
style: {
color: '#CCC'
}
},
navigation: {
buttonOptions: {
symbolStroke: '#DDDDDD',
hoverSymbolStroke: '#FFFFFF',
theme: {
fill: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0.4, '#606060'],
[0.6, '#333333']
]
},
stroke: '#000000'
}
}
},
// scroll charts
rangeSelector: {
buttonTheme: {
fill: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0.4, '#888'],
[0.6, '#555']
]
},
stroke: '#000000',
style: {
color: '#CCC',
fontWeight: 'bold'
},
states: {
hover: {
fill: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0.4, '#BBB'],
[0.6, '#888']
]
},
stroke: '#000000',
style: {
color: 'white'
}
},
select: {
fill: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0.1, '#000'],
[0.3, '#333']
]
},
stroke: '#000000',
style: {
color: 'yellow'
}
}
}
},
inputStyle: {
backgroundColor: '#333',
color: 'silver'
},
labelStyle: {
color: 'silver'
}
},
navigator: {
handles: {
backgroundColor: '#666',
borderColor: '#AAA'
},
outlineColor: '#CCC',
maskFill: 'rgba(16, 16, 16, 0.5)',
series: {
color: '#7798BF',
lineColor: '#A6C7ED'
}
},
scrollbar: {
barBackgroundColor: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0.4, '#888'],
[0.6, '#555']
]
},
barBorderColor: '#CCC',
buttonArrowColor: '#CCC',
buttonBackgroundColor: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0.4, '#888'],
[0.6, '#555']
]
},
buttonBorderColor: '#CCC',
rifleColor: '#FFF',
trackBackgroundColor: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0, '#000'],
[1, '#333']
]
},
trackBorderColor: '#666'
},
// special colors for some of the
legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
background2: 'rgb(35, 35, 70)',
dataLabelsColor: '#444',
textColor: '#C0C0C0',
maskColor: 'rgba(255,255,255,0.3)'
};
// Apply the theme
var highchartsOptions = Highcharts.setOptions(Highcharts.theme);

View File

@ -1,213 +0,0 @@
/**
* Dark theme for Highcharts JS
* @author Torstein Honsi
*/
// Load the fonts
Highcharts.createElement('link', {
href: '//fonts.googleapis.com/css?family=Unica+One',
rel: 'stylesheet',
type: 'text/css'
}, null, document.getElementsByTagName('head')[0]);
Highcharts.theme = {
colors: ["#2b908f", "#90ee7e", "#f45b5b", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
chart: {
backgroundColor: {
linearGradient: { x1: 0, y1: 0, x2: 1, y2: 1 },
stops: [
[0, '#2a2a2b'],
[1, '#3e3e40']
]
},
style: {
fontFamily: "'Unica One', sans-serif"
},
plotBorderColor: '#606063'
},
title: {
style: {
color: '#E0E0E3',
textTransform: 'uppercase',
fontSize: '20px'
}
},
subtitle: {
style: {
color: '#E0E0E3',
textTransform: 'uppercase'
}
},
xAxis: {
gridLineColor: '#707073',
labels: {
style: {
color: '#E0E0E3'
}
},
lineColor: '#707073',
minorGridLineColor: '#505053',
tickColor: '#707073',
title: {
style: {
color: '#A0A0A3'
}
}
},
yAxis: {
gridLineColor: '#707073',
labels: {
style: {
color: '#E0E0E3'
}
},
lineColor: '#707073',
minorGridLineColor: '#505053',
tickColor: '#707073',
tickWidth: 1,
title: {
style: {
color: '#A0A0A3'
}
}
},
tooltip: {
backgroundColor: 'rgba(0, 0, 0, 0.85)',
style: {
color: '#F0F0F0'
}
},
plotOptions: {
series: {
dataLabels: {
color: '#B0B0B3'
},
marker: {
lineColor: '#333'
}
},
boxplot: {
fillColor: '#505053'
},
candlestick: {
lineColor: 'white'
},
errorbar: {
color: 'white'
}
},
legend: {
itemStyle: {
color: '#E0E0E3'
},
itemHoverStyle: {
color: '#FFF'
},
itemHiddenStyle: {
color: '#606063'
}
},
credits: {
style: {
color: '#666'
}
},
labels: {
style: {
color: '#707073'
}
},
drilldown: {
activeAxisLabelStyle: {
color: '#F0F0F3'
},
activeDataLabelStyle: {
color: '#F0F0F3'
}
},
navigation: {
buttonOptions: {
symbolStroke: '#DDDDDD',
theme: {
fill: '#505053'
}
}
},
// scroll charts
rangeSelector: {
buttonTheme: {
fill: '#505053',
stroke: '#000000',
style: {
color: '#CCC'
},
states: {
hover: {
fill: '#707073',
stroke: '#000000',
style: {
color: 'white'
}
},
select: {
fill: '#000003',
stroke: '#000000',
style: {
color: 'white'
}
}
}
},
inputBoxBorderColor: '#505053',
inputStyle: {
backgroundColor: '#333',
color: 'silver'
},
labelStyle: {
color: 'silver'
}
},
navigator: {
handles: {
backgroundColor: '#666',
borderColor: '#AAA'
},
outlineColor: '#CCC',
maskFill: 'rgba(255,255,255,0.1)',
series: {
color: '#7798BF',
lineColor: '#A6C7ED'
},
xAxis: {
gridLineColor: '#505053'
}
},
scrollbar: {
barBackgroundColor: '#808083',
barBorderColor: '#808083',
buttonArrowColor: '#CCC',
buttonBackgroundColor: '#606063',
buttonBorderColor: '#606063',
rifleColor: '#FFF',
trackBackgroundColor: '#404043',
trackBorderColor: '#404043'
},
// special colors for some of the
legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
background2: '#505053',
dataLabelsColor: '#B0B0B3',
textColor: '#C0C0C0',
contrastTextColor: '#F0F0F3',
maskColor: 'rgba(255,255,255,0.3)'
};
// Apply the theme
Highcharts.setOptions(Highcharts.theme);

View File

@ -1,257 +0,0 @@
/**
* Gray theme for Highcharts JS
* @author Torstein Honsi
*/
Highcharts.theme = {
colors: ["#DDDF0D", "#7798BF", "#55BF3B", "#DF5353", "#aaeeee", "#ff0066", "#eeaaee",
"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
chart: {
backgroundColor: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0, 'rgb(96, 96, 96)'],
[1, 'rgb(16, 16, 16)']
]
},
borderWidth: 0,
borderRadius: 0,
plotBackgroundColor: null,
plotShadow: false,
plotBorderWidth: 0
},
title: {
style: {
color: '#FFF',
font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
}
},
subtitle: {
style: {
color: '#DDD',
font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
}
},
xAxis: {
gridLineWidth: 0,
lineColor: '#999',
tickColor: '#999',
labels: {
style: {
color: '#999',
fontWeight: 'bold'
}
},
title: {
style: {
color: '#AAA',
font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
}
}
},
yAxis: {
alternateGridColor: null,
minorTickInterval: null,
gridLineColor: 'rgba(255, 255, 255, .1)',
minorGridLineColor: 'rgba(255,255,255,0.07)',
lineWidth: 0,
tickWidth: 0,
labels: {
style: {
color: '#999',
fontWeight: 'bold'
}
},
title: {
style: {
color: '#AAA',
font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
}
}
},
legend: {
itemStyle: {
color: '#CCC'
},
itemHoverStyle: {
color: '#FFF'
},
itemHiddenStyle: {
color: '#333'
}
},
labels: {
style: {
color: '#CCC'
}
},
tooltip: {
backgroundColor: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0, 'rgba(96, 96, 96, .8)'],
[1, 'rgba(16, 16, 16, .8)']
]
},
borderWidth: 0,
style: {
color: '#FFF'
}
},
plotOptions: {
series: {
nullColor: '#444444'
},
line: {
dataLabels: {
color: '#CCC'
},
marker: {
lineColor: '#333'
}
},
spline: {
marker: {
lineColor: '#333'
}
},
scatter: {
marker: {
lineColor: '#333'
}
},
candlestick: {
lineColor: 'white'
}
},
toolbar: {
itemStyle: {
color: '#CCC'
}
},
navigation: {
buttonOptions: {
symbolStroke: '#DDDDDD',
hoverSymbolStroke: '#FFFFFF',
theme: {
fill: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0.4, '#606060'],
[0.6, '#333333']
]
},
stroke: '#000000'
}
}
},
// scroll charts
rangeSelector: {
buttonTheme: {
fill: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0.4, '#888'],
[0.6, '#555']
]
},
stroke: '#000000',
style: {
color: '#CCC',
fontWeight: 'bold'
},
states: {
hover: {
fill: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0.4, '#BBB'],
[0.6, '#888']
]
},
stroke: '#000000',
style: {
color: 'white'
}
},
select: {
fill: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0.1, '#000'],
[0.3, '#333']
]
},
stroke: '#000000',
style: {
color: 'yellow'
}
}
}
},
inputStyle: {
backgroundColor: '#333',
color: 'silver'
},
labelStyle: {
color: 'silver'
}
},
navigator: {
handles: {
backgroundColor: '#666',
borderColor: '#AAA'
},
outlineColor: '#CCC',
maskFill: 'rgba(16, 16, 16, 0.5)',
series: {
color: '#7798BF',
lineColor: '#A6C7ED'
}
},
scrollbar: {
barBackgroundColor: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0.4, '#888'],
[0.6, '#555']
]
},
barBorderColor: '#CCC',
buttonArrowColor: '#CCC',
buttonBackgroundColor: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0.4, '#888'],
[0.6, '#555']
]
},
buttonBorderColor: '#CCC',
rifleColor: '#FFF',
trackBackgroundColor: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
stops: [
[0, '#000'],
[1, '#333']
]
},
trackBorderColor: '#666'
},
// special colors for some of the demo examples
legendBackgroundColor: 'rgba(48, 48, 48, 0.8)',
background2: 'rgb(70, 70, 70)',
dataLabelsColor: '#444',
textColor: '#E0E0E0',
maskColor: 'rgba(255,255,255,0.3)'
};
// Apply the theme
var highchartsOptions = Highcharts.setOptions(Highcharts.theme);

View File

@ -1,74 +0,0 @@
/**
* Grid-light theme for Highcharts JS
* @author Torstein Honsi
*/
// Load the fonts
Highcharts.createElement('link', {
href: '//fonts.googleapis.com/css?family=Dosis:400,600',
rel: 'stylesheet',
type: 'text/css'
}, null, document.getElementsByTagName('head')[0]);
Highcharts.theme = {
colors: ["#7cb5ec", "#f7a35c", "#90ee7e", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
chart: {
backgroundColor: null,
style: {
fontFamily: "Dosis, sans-serif"
}
},
title: {
style: {
fontSize: '16px',
fontWeight: 'bold',
textTransform: 'uppercase'
}
},
tooltip: {
borderWidth: 0,
backgroundColor: 'rgba(219,219,216,0.8)',
shadow: false
},
legend: {
itemStyle: {
fontWeight: 'bold',
fontSize: '13px'
}
},
xAxis: {
gridLineWidth: 1,
labels: {
style: {
fontSize: '12px'
}
}
},
yAxis: {
minorTickInterval: 'auto',
title: {
style: {
textTransform: 'uppercase'
}
},
labels: {
style: {
fontSize: '12px'
}
}
},
plotOptions: {
candlestick: {
lineColor: '#404048'
}
},
// General
background2: '#F0F0EA'
};
// Apply the theme
Highcharts.setOptions(Highcharts.theme);

View File

@ -1,103 +0,0 @@
/**
* Grid theme for Highcharts JS
* @author Torstein Honsi
*/
Highcharts.theme = {
colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'],
chart: {
backgroundColor: {
linearGradient: { x1: 0, y1: 0, x2: 1, y2: 1 },
stops: [
[0, 'rgb(255, 255, 255)'],
[1, 'rgb(240, 240, 255)']
]
},
borderWidth: 2,
plotBackgroundColor: 'rgba(255, 255, 255, .9)',
plotShadow: true,
plotBorderWidth: 1
},
title: {
style: {
color: '#000',
font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
}
},
subtitle: {
style: {
color: '#666666',
font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
}
},
xAxis: {
gridLineWidth: 1,
lineColor: '#000',
tickColor: '#000',
labels: {
style: {
color: '#000',
font: '11px Trebuchet MS, Verdana, sans-serif'
}
},
title: {
style: {
color: '#333',
fontWeight: 'bold',
fontSize: '12px',
fontFamily: 'Trebuchet MS, Verdana, sans-serif'
}
}
},
yAxis: {
minorTickInterval: 'auto',
lineColor: '#000',
lineWidth: 1,
tickWidth: 1,
tickColor: '#000',
labels: {
style: {
color: '#000',
font: '11px Trebuchet MS, Verdana, sans-serif'
}
},
title: {
style: {
color: '#333',
fontWeight: 'bold',
fontSize: '12px',
fontFamily: 'Trebuchet MS, Verdana, sans-serif'
}
}
},
legend: {
itemStyle: {
font: '9pt Trebuchet MS, Verdana, sans-serif',
color: 'black'
},
itemHoverStyle: {
color: '#039'
},
itemHiddenStyle: {
color: 'gray'
}
},
labels: {
style: {
color: '#99b'
}
},
navigation: {
buttonOptions: {
theme: {
stroke: '#CCCCCC'
}
}
}
};
// Apply the theme
var highchartsOptions = Highcharts.setOptions(Highcharts.theme);

View File

@ -1,104 +0,0 @@
/**
* Sand-Signika theme for Highcharts JS
* @author Torstein Honsi
*/
// Load the fonts
Highcharts.createElement('link', {
href: '//fonts.googleapis.com/css?family=Signika:400,700',
rel: 'stylesheet',
type: 'text/css'
}, null, document.getElementsByTagName('head')[0]);
// Add the background image to the container
Highcharts.wrap(Highcharts.Chart.prototype, 'getContainer', function (proceed) {
proceed.call(this);
this.container.style.background = 'url(http://www.highcharts.com/samples/graphics/sand.png)';
});
Highcharts.theme = {
colors: ["#f45b5b", "#8085e9", "#8d4654", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
chart: {
backgroundColor: null,
style: {
fontFamily: "Signika, serif"
}
},
title: {
style: {
color: 'black',
fontSize: '16px',
fontWeight: 'bold'
}
},
subtitle: {
style: {
color: 'black'
}
},
tooltip: {
borderWidth: 0
},
legend: {
itemStyle: {
fontWeight: 'bold',
fontSize: '13px'
}
},
xAxis: {
labels: {
style: {
color: '#6e6e70'
}
}
},
yAxis: {
labels: {
style: {
color: '#6e6e70'
}
}
},
plotOptions: {
series: {
shadow: true
},
candlestick: {
lineColor: '#404048'
},
map: {
shadow: false
}
},
// Highstock specific
navigator: {
xAxis: {
gridLineColor: '#D0D0D8'
}
},
rangeSelector: {
buttonTheme: {
fill: 'white',
stroke: '#C0C0C8',
'stroke-width': 1,
states: {
select: {
fill: '#D0D0D8'
}
}
}
},
scrollbar: {
trackBorderColor: '#C0C0C8'
},
// General
background2: '#E0E0E8'
};
// Apply the theme
Highcharts.setOptions(Highcharts.theme);

View File

@ -1,89 +0,0 @@
/**
* Skies theme for Highcharts JS
* @author Torstein Honsi
*/
Highcharts.theme = {
colors: ["#514F78", "#42A07B", "#9B5E4A", "#72727F", "#1F949A", "#82914E", "#86777F", "#42A07B"],
chart: {
className: 'skies',
borderWidth: 0,
plotShadow: true,
plotBackgroundImage: 'http://www.highcharts.com/demo/gfx/skies.jpg',
plotBackgroundColor: {
linearGradient: [0, 0, 250, 500],
stops: [
[0, 'rgba(255, 255, 255, 1)'],
[1, 'rgba(255, 255, 255, 0)']
]
},
plotBorderWidth: 1
},
title: {
style: {
color: '#3E576F',
font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
}
},
subtitle: {
style: {
color: '#6D869F',
font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
}
},
xAxis: {
gridLineWidth: 0,
lineColor: '#C0D0E0',
tickColor: '#C0D0E0',
labels: {
style: {
color: '#666',
fontWeight: 'bold'
}
},
title: {
style: {
color: '#666',
font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
}
}
},
yAxis: {
alternateGridColor: 'rgba(255, 255, 255, .5)',
lineColor: '#C0D0E0',
tickColor: '#C0D0E0',
tickWidth: 1,
labels: {
style: {
color: '#666',
fontWeight: 'bold'
}
},
title: {
style: {
color: '#666',
font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
}
}
},
legend: {
itemStyle: {
font: '9pt Trebuchet MS, Verdana, sans-serif',
color: '#3E576F'
},
itemHoverStyle: {
color: 'black'
},
itemHiddenStyle: {
color: 'silver'
}
},
labels: {
style: {
color: '#3E576F'
}
}
};
// Apply the theme
var highchartsOptions = Highcharts.setOptions(Highcharts.theme);

BIN
lib/ipipfree.ipdb Normal file

Binary file not shown.

View File

@ -1,932 +0,0 @@
body.stop-scrolling {
height: 100%;
overflow: hidden; }
.sweet-overlay {
background-color: black;
/* IE8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
/* IE8 */
background-color: rgba(0, 0, 0, 0.4);
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
display: none;
z-index: 10000; }
.sweet-alert {
background-color: white;
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
width: 478px;
padding: 17px;
border-radius: 5px;
text-align: center;
position: fixed;
left: 50%;
top: 50%;
margin-left: -256px;
margin-top: -200px;
overflow: hidden;
display: none;
z-index: 99999; }
@media all and (max-width: 540px) {
.sweet-alert {
width: auto;
margin-left: 0;
margin-right: 0;
left: 15px;
right: 15px; } }
.sweet-alert h2 {
color: #575757;
font-size: 30px;
text-align: center;
font-weight: 600;
text-transform: none;
position: relative;
margin: 25px 0;
padding: 0;
line-height: 40px;
display: block; }
.sweet-alert p {
color: #797979;
font-size: 16px;
text-align: center;
font-weight: 300;
position: relative;
text-align: inherit;
float: none;
margin: 0;
padding: 0;
line-height: normal; }
.sweet-alert fieldset {
border: none;
position: relative; }
.sweet-alert .sa-error-container {
background-color: #f1f1f1;
margin-left: -17px;
margin-right: -17px;
overflow: hidden;
padding: 0 10px;
max-height: 0;
webkit-transition: padding 0.15s, max-height 0.15s;
transition: padding 0.15s, max-height 0.15s; }
.sweet-alert .sa-error-container.show {
padding: 10px 0;
max-height: 100px;
webkit-transition: padding 0.2s, max-height 0.2s;
transition: padding 0.25s, max-height 0.25s; }
.sweet-alert .sa-error-container .icon {
display: inline-block;
width: 24px;
height: 24px;
border-radius: 50%;
background-color: #ea7d7d;
color: white;
line-height: 24px;
text-align: center;
margin-right: 3px; }
.sweet-alert .sa-error-container p {
display: inline-block; }
.sweet-alert .sa-input-error {
position: absolute;
top: 29px;
right: 26px;
width: 20px;
height: 20px;
opacity: 0;
-webkit-transform: scale(0.5);
transform: scale(0.5);
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-transition: all 0.1s;
transition: all 0.1s; }
.sweet-alert .sa-input-error::before, .sweet-alert .sa-input-error::after {
content: "";
width: 20px;
height: 6px;
background-color: #f06e57;
border-radius: 3px;
position: absolute;
top: 50%;
margin-top: -4px;
left: 50%;
margin-left: -9px; }
.sweet-alert .sa-input-error::before {
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg); }
.sweet-alert .sa-input-error::after {
-webkit-transform: rotate(45deg);
transform: rotate(45deg); }
.sweet-alert .sa-input-error.show {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1); }
.sweet-alert input {
width: 100%;
box-sizing: border-box;
border-radius: 3px;
border: 1px solid #d7d7d7;
height: 43px;
margin-top: 10px;
margin-bottom: 17px;
font-size: 18px;
box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.06);
padding: 0 12px;
display: none;
-webkit-transition: all 0.3s;
transition: all 0.3s; }
.sweet-alert input:focus {
outline: none;
box-shadow: 0px 0px 3px #c4e6f5;
border: 1px solid #b4dbed; }
.sweet-alert input:focus::-moz-placeholder {
transition: opacity 0.3s 0.03s ease;
opacity: 0.5; }
.sweet-alert input:focus:-ms-input-placeholder {
transition: opacity 0.3s 0.03s ease;
opacity: 0.5; }
.sweet-alert input:focus::-webkit-input-placeholder {
transition: opacity 0.3s 0.03s ease;
opacity: 0.5; }
.sweet-alert input::-moz-placeholder {
color: #bdbdbd; }
.sweet-alert input:-ms-input-placeholder {
color: #bdbdbd; }
.sweet-alert input::-webkit-input-placeholder {
color: #bdbdbd; }
.sweet-alert.show-input input {
display: block; }
.sweet-alert .sa-confirm-button-container {
display: inline-block;
position: relative; }
.sweet-alert .la-ball-fall {
position: absolute;
left: 50%;
top: 50%;
margin-left: -27px;
margin-top: 4px;
opacity: 0;
visibility: hidden; }
.sweet-alert button {
background-color: #8CD4F5;
color: white;
border: none;
box-shadow: none;
font-size: 17px;
font-weight: 500;
-webkit-border-radius: 4px;
border-radius: 5px;
padding: 10px 32px;
margin: 26px 5px 0 5px;
cursor: pointer; }
.sweet-alert button:focus {
outline: none;
box-shadow: 0 0 2px rgba(128, 179, 235, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.05); }
.sweet-alert button:hover {
background-color: #7ecff4; }
.sweet-alert button:active {
background-color: #5dc2f1; }
.sweet-alert button.cancel {
background-color: #C1C1C1; }
.sweet-alert button.cancel:hover {
background-color: #b9b9b9; }
.sweet-alert button.cancel:active {
background-color: #a8a8a8; }
.sweet-alert button.cancel:focus {
box-shadow: rgba(197, 205, 211, 0.8) 0px 0px 2px, rgba(0, 0, 0, 0.0470588) 0px 0px 0px 1px inset !important; }
.sweet-alert button[disabled] {
opacity: .6;
cursor: default; }
.sweet-alert button.confirm[disabled] {
color: transparent; }
.sweet-alert button.confirm[disabled] ~ .la-ball-fall {
opacity: 1;
visibility: visible;
transition-delay: 0s; }
.sweet-alert button::-moz-focus-inner {
border: 0; }
.sweet-alert[data-has-cancel-button=false] button {
box-shadow: none !important; }
.sweet-alert[data-has-confirm-button=false][data-has-cancel-button=false] {
padding-bottom: 40px; }
.sweet-alert .sa-icon {
width: 80px;
height: 80px;
border: 4px solid gray;
-webkit-border-radius: 40px;
border-radius: 40px;
border-radius: 50%;
margin: 20px auto;
padding: 0;
position: relative;
box-sizing: content-box; }
.sweet-alert .sa-icon.sa-error {
border-color: #F27474; }
.sweet-alert .sa-icon.sa-error .sa-x-mark {
position: relative;
display: block; }
.sweet-alert .sa-icon.sa-error .sa-line {
position: absolute;
height: 5px;
width: 47px;
background-color: #F27474;
display: block;
top: 37px;
border-radius: 2px; }
.sweet-alert .sa-icon.sa-error .sa-line.sa-left {
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
left: 17px; }
.sweet-alert .sa-icon.sa-error .sa-line.sa-right {
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
right: 16px; }
.sweet-alert .sa-icon.sa-warning {
border-color: #F8BB86; }
.sweet-alert .sa-icon.sa-warning .sa-body {
position: absolute;
width: 5px;
height: 47px;
left: 50%;
top: 10px;
-webkit-border-radius: 2px;
border-radius: 2px;
margin-left: -2px;
background-color: #F8BB86; }
.sweet-alert .sa-icon.sa-warning .sa-dot {
position: absolute;
width: 7px;
height: 7px;
-webkit-border-radius: 50%;
border-radius: 50%;
margin-left: -3px;
left: 50%;
bottom: 10px;
background-color: #F8BB86; }
.sweet-alert .sa-icon.sa-info {
border-color: #C9DAE1; }
.sweet-alert .sa-icon.sa-info::before {
content: "";
position: absolute;
width: 5px;
height: 29px;
left: 50%;
bottom: 17px;
border-radius: 2px;
margin-left: -2px;
background-color: #C9DAE1; }
.sweet-alert .sa-icon.sa-info::after {
content: "";
position: absolute;
width: 7px;
height: 7px;
border-radius: 50%;
margin-left: -3px;
top: 19px;
background-color: #C9DAE1; }
.sweet-alert .sa-icon.sa-success {
border-color: #A5DC86; }
.sweet-alert .sa-icon.sa-success::before, .sweet-alert .sa-icon.sa-success::after {
content: '';
-webkit-border-radius: 40px;
border-radius: 40px;
border-radius: 50%;
position: absolute;
width: 60px;
height: 120px;
background: white;
-webkit-transform: rotate(45deg);
transform: rotate(45deg); }
.sweet-alert .sa-icon.sa-success::before {
-webkit-border-radius: 120px 0 0 120px;
border-radius: 120px 0 0 120px;
top: -7px;
left: -33px;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-transform-origin: 60px 60px;
transform-origin: 60px 60px; }
.sweet-alert .sa-icon.sa-success::after {
-webkit-border-radius: 0 120px 120px 0;
border-radius: 0 120px 120px 0;
top: -11px;
left: 30px;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-transform-origin: 0px 60px;
transform-origin: 0px 60px; }
.sweet-alert .sa-icon.sa-success .sa-placeholder {
width: 80px;
height: 80px;
border: 4px solid rgba(165, 220, 134, 0.2);
-webkit-border-radius: 40px;
border-radius: 40px;
border-radius: 50%;
box-sizing: content-box;
position: absolute;
left: -4px;
top: -4px;
z-index: 2; }
.sweet-alert .sa-icon.sa-success .sa-fix {
width: 5px;
height: 90px;
background-color: white;
position: absolute;
left: 28px;
top: 8px;
z-index: 1;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg); }
.sweet-alert .sa-icon.sa-success .sa-line {
height: 5px;
background-color: #A5DC86;
display: block;
border-radius: 2px;
position: absolute;
z-index: 2; }
.sweet-alert .sa-icon.sa-success .sa-line.sa-tip {
width: 25px;
left: 14px;
top: 46px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg); }
.sweet-alert .sa-icon.sa-success .sa-line.sa-long {
width: 47px;
right: 8px;
top: 38px;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg); }
.sweet-alert .sa-icon.sa-custom {
background-size: contain;
border-radius: 0;
border: none;
background-position: center center;
background-repeat: no-repeat; }
/*
* Animations
*/
@-webkit-keyframes showSweetAlert {
0% {
transform: scale(0.7);
-webkit-transform: scale(0.7); }
45% {
transform: scale(1.05);
-webkit-transform: scale(1.05); }
80% {
transform: scale(0.95);
-webkit-transform: scale(0.95); }
100% {
transform: scale(1);
-webkit-transform: scale(1); } }
@keyframes showSweetAlert {
0% {
transform: scale(0.7);
-webkit-transform: scale(0.7); }
45% {
transform: scale(1.05);
-webkit-transform: scale(1.05); }
80% {
transform: scale(0.95);
-webkit-transform: scale(0.95); }
100% {
transform: scale(1);
-webkit-transform: scale(1); } }
@-webkit-keyframes hideSweetAlert {
0% {
transform: scale(1);
-webkit-transform: scale(1); }
100% {
transform: scale(0.5);
-webkit-transform: scale(0.5); } }
@keyframes hideSweetAlert {
0% {
transform: scale(1);
-webkit-transform: scale(1); }
100% {
transform: scale(0.5);
-webkit-transform: scale(0.5); } }
@-webkit-keyframes slideFromTop {
0% {
top: 0%; }
100% {
top: 50%; } }
@keyframes slideFromTop {
0% {
top: 0%; }
100% {
top: 50%; } }
@-webkit-keyframes slideToTop {
0% {
top: 50%; }
100% {
top: 0%; } }
@keyframes slideToTop {
0% {
top: 50%; }
100% {
top: 0%; } }
@-webkit-keyframes slideFromBottom {
0% {
top: 70%; }
100% {
top: 50%; } }
@keyframes slideFromBottom {
0% {
top: 70%; }
100% {
top: 50%; } }
@-webkit-keyframes slideToBottom {
0% {
top: 50%; }
100% {
top: 70%; } }
@keyframes slideToBottom {
0% {
top: 50%; }
100% {
top: 70%; } }
.showSweetAlert[data-animation=pop] {
-webkit-animation: showSweetAlert 0.3s;
animation: showSweetAlert 0.3s; }
.showSweetAlert[data-animation=none] {
-webkit-animation: none;
animation: none; }
.showSweetAlert[data-animation=slide-from-top] {
-webkit-animation: slideFromTop 0.3s;
animation: slideFromTop 0.3s; }
.showSweetAlert[data-animation=slide-from-bottom] {
-webkit-animation: slideFromBottom 0.3s;
animation: slideFromBottom 0.3s; }
.hideSweetAlert[data-animation=pop] {
-webkit-animation: hideSweetAlert 0.2s;
animation: hideSweetAlert 0.2s; }
.hideSweetAlert[data-animation=none] {
-webkit-animation: none;
animation: none; }
.hideSweetAlert[data-animation=slide-from-top] {
-webkit-animation: slideToTop 0.4s;
animation: slideToTop 0.4s; }
.hideSweetAlert[data-animation=slide-from-bottom] {
-webkit-animation: slideToBottom 0.3s;
animation: slideToBottom 0.3s; }
@-webkit-keyframes animateSuccessTip {
0% {
width: 0;
left: 1px;
top: 19px; }
54% {
width: 0;
left: 1px;
top: 19px; }
70% {
width: 50px;
left: -8px;
top: 37px; }
84% {
width: 17px;
left: 21px;
top: 48px; }
100% {
width: 25px;
left: 14px;
top: 45px; } }
@keyframes animateSuccessTip {
0% {
width: 0;
left: 1px;
top: 19px; }
54% {
width: 0;
left: 1px;
top: 19px; }
70% {
width: 50px;
left: -8px;
top: 37px; }
84% {
width: 17px;
left: 21px;
top: 48px; }
100% {
width: 25px;
left: 14px;
top: 45px; } }
@-webkit-keyframes animateSuccessLong {
0% {
width: 0;
right: 46px;
top: 54px; }
65% {
width: 0;
right: 46px;
top: 54px; }
84% {
width: 55px;
right: 0px;
top: 35px; }
100% {
width: 47px;
right: 8px;
top: 38px; } }
@keyframes animateSuccessLong {
0% {
width: 0;
right: 46px;
top: 54px; }
65% {
width: 0;
right: 46px;
top: 54px; }
84% {
width: 55px;
right: 0px;
top: 35px; }
100% {
width: 47px;
right: 8px;
top: 38px; } }
@-webkit-keyframes rotatePlaceholder {
0% {
transform: rotate(-45deg);
-webkit-transform: rotate(-45deg); }
5% {
transform: rotate(-45deg);
-webkit-transform: rotate(-45deg); }
12% {
transform: rotate(-405deg);
-webkit-transform: rotate(-405deg); }
100% {
transform: rotate(-405deg);
-webkit-transform: rotate(-405deg); } }
@keyframes rotatePlaceholder {
0% {
transform: rotate(-45deg);
-webkit-transform: rotate(-45deg); }
5% {
transform: rotate(-45deg);
-webkit-transform: rotate(-45deg); }
12% {
transform: rotate(-405deg);
-webkit-transform: rotate(-405deg); }
100% {
transform: rotate(-405deg);
-webkit-transform: rotate(-405deg); } }
.animateSuccessTip {
-webkit-animation: animateSuccessTip 0.75s;
animation: animateSuccessTip 0.75s; }
.animateSuccessLong {
-webkit-animation: animateSuccessLong 0.75s;
animation: animateSuccessLong 0.75s; }
.sa-icon.sa-success.animate::after {
-webkit-animation: rotatePlaceholder 4.25s ease-in;
animation: rotatePlaceholder 4.25s ease-in; }
@-webkit-keyframes animateErrorIcon {
0% {
transform: rotateX(100deg);
-webkit-transform: rotateX(100deg);
opacity: 0; }
100% {
transform: rotateX(0deg);
-webkit-transform: rotateX(0deg);
opacity: 1; } }
@keyframes animateErrorIcon {
0% {
transform: rotateX(100deg);
-webkit-transform: rotateX(100deg);
opacity: 0; }
100% {
transform: rotateX(0deg);
-webkit-transform: rotateX(0deg);
opacity: 1; } }
.animateErrorIcon {
-webkit-animation: animateErrorIcon 0.5s;
animation: animateErrorIcon 0.5s; }
@-webkit-keyframes animateXMark {
0% {
transform: scale(0.4);
-webkit-transform: scale(0.4);
margin-top: 26px;
opacity: 0; }
50% {
transform: scale(0.4);
-webkit-transform: scale(0.4);
margin-top: 26px;
opacity: 0; }
80% {
transform: scale(1.15);
-webkit-transform: scale(1.15);
margin-top: -6px; }
100% {
transform: scale(1);
-webkit-transform: scale(1);
margin-top: 0;
opacity: 1; } }
@keyframes animateXMark {
0% {
transform: scale(0.4);
-webkit-transform: scale(0.4);
margin-top: 26px;
opacity: 0; }
50% {
transform: scale(0.4);
-webkit-transform: scale(0.4);
margin-top: 26px;
opacity: 0; }
80% {
transform: scale(1.15);
-webkit-transform: scale(1.15);
margin-top: -6px; }
100% {
transform: scale(1);
-webkit-transform: scale(1);
margin-top: 0;
opacity: 1; } }
.animateXMark {
-webkit-animation: animateXMark 0.5s;
animation: animateXMark 0.5s; }
@-webkit-keyframes pulseWarning {
0% {
border-color: #F8D486; }
100% {
border-color: #F8BB86; } }
@keyframes pulseWarning {
0% {
border-color: #F8D486; }
100% {
border-color: #F8BB86; } }
.pulseWarning {
-webkit-animation: pulseWarning 0.75s infinite alternate;
animation: pulseWarning 0.75s infinite alternate; }
@-webkit-keyframes pulseWarningIns {
0% {
background-color: #F8D486; }
100% {
background-color: #F8BB86; } }
@keyframes pulseWarningIns {
0% {
background-color: #F8D486; }
100% {
background-color: #F8BB86; } }
.pulseWarningIns {
-webkit-animation: pulseWarningIns 0.75s infinite alternate;
animation: pulseWarningIns 0.75s infinite alternate; }
@-webkit-keyframes rotate-loading {
0% {
transform: rotate(0deg); }
100% {
transform: rotate(360deg); } }
@keyframes rotate-loading {
0% {
transform: rotate(0deg); }
100% {
transform: rotate(360deg); } }
/* Internet Explorer 9 has some special quirks that are fixed here */
/* The icons are not animated. */
/* This file is automatically merged into sweet-alert.min.js through Gulp */
/* Error icon */
.sweet-alert .sa-icon.sa-error .sa-line.sa-left {
-ms-transform: rotate(45deg) \9; }
.sweet-alert .sa-icon.sa-error .sa-line.sa-right {
-ms-transform: rotate(-45deg) \9; }
/* Success icon */
.sweet-alert .sa-icon.sa-success {
border-color: transparent\9; }
.sweet-alert .sa-icon.sa-success .sa-line.sa-tip {
-ms-transform: rotate(45deg) \9; }
.sweet-alert .sa-icon.sa-success .sa-line.sa-long {
-ms-transform: rotate(-45deg) \9; }
/*!
* Load Awesome v1.1.0 (http://github.danielcardoso.net/load-awesome/)
* Copyright 2015 Daniel Cardoso <@DanielCardoso>
* Licensed under MIT
*/
.la-ball-fall,
.la-ball-fall > div {
position: relative;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; }
.la-ball-fall {
display: block;
font-size: 0;
color: #fff; }
.la-ball-fall.la-dark {
color: #333; }
.la-ball-fall > div {
display: inline-block;
float: none;
background-color: currentColor;
border: 0 solid currentColor; }
.la-ball-fall {
width: 54px;
height: 18px; }
.la-ball-fall > div {
width: 10px;
height: 10px;
margin: 4px;
border-radius: 100%;
opacity: 0;
-webkit-animation: ball-fall 1s ease-in-out infinite;
-moz-animation: ball-fall 1s ease-in-out infinite;
-o-animation: ball-fall 1s ease-in-out infinite;
animation: ball-fall 1s ease-in-out infinite; }
.la-ball-fall > div:nth-child(1) {
-webkit-animation-delay: -200ms;
-moz-animation-delay: -200ms;
-o-animation-delay: -200ms;
animation-delay: -200ms; }
.la-ball-fall > div:nth-child(2) {
-webkit-animation-delay: -100ms;
-moz-animation-delay: -100ms;
-o-animation-delay: -100ms;
animation-delay: -100ms; }
.la-ball-fall > div:nth-child(3) {
-webkit-animation-delay: 0ms;
-moz-animation-delay: 0ms;
-o-animation-delay: 0ms;
animation-delay: 0ms; }
.la-ball-fall.la-sm {
width: 26px;
height: 8px; }
.la-ball-fall.la-sm > div {
width: 4px;
height: 4px;
margin: 2px; }
.la-ball-fall.la-2x {
width: 108px;
height: 36px; }
.la-ball-fall.la-2x > div {
width: 20px;
height: 20px;
margin: 8px; }
.la-ball-fall.la-3x {
width: 162px;
height: 54px; }
.la-ball-fall.la-3x > div {
width: 30px;
height: 30px;
margin: 12px; }
/*
* Animation
*/
@-webkit-keyframes ball-fall {
0% {
opacity: 0;
-webkit-transform: translateY(-145%);
transform: translateY(-145%); }
10% {
opacity: .5; }
20% {
opacity: 1;
-webkit-transform: translateY(0);
transform: translateY(0); }
80% {
opacity: 1;
-webkit-transform: translateY(0);
transform: translateY(0); }
90% {
opacity: .5; }
100% {
opacity: 0;
-webkit-transform: translateY(145%);
transform: translateY(145%); } }
@-moz-keyframes ball-fall {
0% {
opacity: 0;
-moz-transform: translateY(-145%);
transform: translateY(-145%); }
10% {
opacity: .5; }
20% {
opacity: 1;
-moz-transform: translateY(0);
transform: translateY(0); }
80% {
opacity: 1;
-moz-transform: translateY(0);
transform: translateY(0); }
90% {
opacity: .5; }
100% {
opacity: 0;
-moz-transform: translateY(145%);
transform: translateY(145%); } }
@-o-keyframes ball-fall {
0% {
opacity: 0;
-o-transform: translateY(-145%);
transform: translateY(-145%); }
10% {
opacity: .5; }
20% {
opacity: 1;
-o-transform: translateY(0);
transform: translateY(0); }
80% {
opacity: 1;
-o-transform: translateY(0);
transform: translateY(0); }
90% {
opacity: .5; }
100% {
opacity: 0;
-o-transform: translateY(145%);
transform: translateY(145%); } }
@keyframes ball-fall {
0% {
opacity: 0;
-webkit-transform: translateY(-145%);
-moz-transform: translateY(-145%);
-o-transform: translateY(-145%);
transform: translateY(-145%); }
10% {
opacity: .5; }
20% {
opacity: 1;
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-o-transform: translateY(0);
transform: translateY(0); }
80% {
opacity: 1;
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-o-transform: translateY(0);
transform: translateY(0); }
90% {
opacity: .5; }
100% {
opacity: 0;
-webkit-transform: translateY(145%);
-moz-transform: translateY(145%);
-o-transform: translateY(145%);
transform: translateY(145%); } }

File diff suppressed because one or more lines are too long

View File

@ -5,11 +5,10 @@ include 'menu.php';
require_once __DIR__ . '/../Access_Bootstrap.php';
$access = new Access_Core();
?>
<link rel="stylesheet" href="<?php $options->pluginUrl('Access/lib/sweetalert/sweetalert.css')?>">
<div class="main">
<div class="body container">
<div class="typecho-page-title">
<h2><?php echo $access->title;?></h2>
<h2><?= $access->title;?></h2>
</div>
<div class="row typecho-page-main" role="main">
<div class="col-mb-12">
@ -40,9 +39,9 @@ $access = new Access_Core();
<?php if ($request->get('filter', 'all') != 'all'): ?>
<a href="<?php $options->adminUrl('extending.php?panel=' . Access_Plugin::$panel . '&action=logs'); ?>"><?php _e('&laquo; 取消筛选'); ?></a>
<?php endif; ?>
<input type="hidden" value="<?php echo $request->get('panel'); ?>" name="panel" />
<input type="hidden" value="<?= $request->get('panel'); ?>" name="panel" />
<?php if(isset($request->page)): ?>
<input type="hidden" value="<?php echo $request->get('page'); ?>" name="page" />
<input type="hidden" value="<?= $request->get('page'); ?>" name="page" />
<?php endif; ?>
<select name="filter">
<option <?php if($request->filter == 'all'): ?> selected="true"<?php endif; ?>value="all"><?php _e('所有'); ?></option>
@ -50,13 +49,13 @@ $access = new Access_Core();
<option <?php if($request->filter == 'post'): ?> selected="true"<?php endif; ?>value="post"><?php _e('按文章'); ?></option>
<option <?php if($request->filter == 'path'): ?> selected="true"<?php endif; ?>value="path"><?php _e('按路由'); ?></option>
</select>
<input style="<?php if($request->get('filter', 'all') != 'ip'): ?>display: none<?php endif; ?>" type="text" class="text-s" placeholder="" value="<?php echo htmlspecialchars($request->ip); ?>" name="ip" />
<input style="<?php if($request->get('filter', 'all') != 'ip'): ?>display: none<?php endif; ?>" type="text" class="text-s" placeholder="" value="<?= htmlspecialchars($request->ip); ?>" name="ip" />
<select style="<?php if($request->get('filter', 'all') != 'post'): ?>display: none<?php endif; ?>" name="cid">
<?php foreach ($access->logs['cidList'] as $content):?>
<option <?php if($request->cid == $content['cid']): ?> selected="true"<?php endif; ?>value="<?php echo $content['cid'];?>"><?php echo $content['title'];?> (<?php echo $content['count'];?>)</option>
<option <?php if($request->cid == $content['cid']): ?> selected="true"<?php endif; ?>value="<?= $content['cid'];?>"><?= $content['title'];?> (<?= $content['count'];?>)</option>
<?php endforeach;?>
</select>
<input style="<?php if($request->get('filter', 'all') != 'path'): ?>display: none<?php endif; ?>" type="text" class="text-s" placeholder="" value="<?php echo htmlspecialchars($request->path); ?>" name="path" />
<input style="<?php if($request->get('filter', 'all') != 'path'): ?>display: none<?php endif; ?>" type="text" class="text-s" placeholder="" value="<?= htmlspecialchars($request->path); ?>" name="path" />
<select name="type">
<option <?php if($request->type == 1): ?> selected="true"<?php endif; ?>value="1"><?php _e('默认(仅人类)'); ?></option>
<option <?php if($request->type == 2): ?> selected="true"<?php endif; ?>value="2"><?php _e('仅爬虫'); ?></option>
@ -73,11 +72,12 @@ $access = new Access_Core();
<table class="typecho-list-table">
<colgroup>
<col width="5%"/>
<col width="20%"/>
<col width="28%"/>
<col width="25%"/>
<col width="18%"/>
<col width="16%"/>
<col width="20%"/>
<col width="15%"/>
<col width="18%"/>
</colgroup>
<thead>
<tr>
@ -85,6 +85,7 @@ $access = new Access_Core();
<th><?php _e('受访地址'); ?></th>
<th><?php _e('UA'); ?></th>
<th><?php _e('IP地址'); ?></th>
<th><?php _e('IP属地'); ?></th>
<th><?php _e('Referer'); ?></th>
<th><?php _e('日期'); ?></th>
</tr>
@ -92,13 +93,14 @@ $access = new Access_Core();
<tbody>
<?php if(!empty($access->logs['list'])): ?>
<?php foreach ($access->logs['list'] as $log): ?>
<tr id="<?php echo $log['id']; ?>" data-id="<?php echo $log['id']; ?>">
<td><input type="checkbox" data-id="<?php echo $log['id']; ?>" value="<?php echo $log['id']; ?>" name="id[]"/></td>
<td><a target="_self" href="<?php $options->adminUrl('extending.php?panel=' . Access_Plugin::$panel . '&filter=path&path=' . $log['path'] . '&type='. $request->type); ?>"><?php echo urldecode(str_replace("%23", "#", $log['url'])); ?></a></td>
<td><a data-action="ua" href="#" title="<?php echo $log['ua'];?>"><?php echo $log['display_name']; ?></a></td>
<td><a data-action="ip" data-ip="<?php echo $access->long2ip($log['ip']); ?>" href="#"><?php echo $access->long2ip($log['ip']); ?></a><?php if($request->filter != 'ip'): ?> <a target="_self" href="<?php $options->adminUrl('extending.php?panel=' . Access_Plugin::$panel . '&filter=ip&ip=' . $access->long2ip($log['ip']) . '&type='. $request->type); ?>">[ ? ]</a><?php endif; ?></td>
<td><a target="_blank" data-action="referer" href="<?php echo $log['referer']; ?>"><?php echo $log['referer']; ?></a></td>
<td><?php echo date('Y-m-d H:i:s',$log['time']); ?></td>
<tr id="<?= $log['id']; ?>" data-id="<?= $log['id']; ?>">
<td><input type="checkbox" data-id="<?= $log['id']; ?>" value="<?= $log['id']; ?>" name="id[]"/></td>
<td><a target="_self" href="<?php $options->adminUrl('extending.php?panel=' . Access_Plugin::$panel . '&filter=path&path=' . $log['path'] . '&type='. $request->type); ?>"><?= urldecode(str_replace("%23", "#", $log['url'])); ?></a></td>
<td><a data-action="ua" href="#" title="<?= $log['ua'];?>"><?= $log['display_name']; ?></a></td>
<td><a data-action="ip" data-ip="<?= $access->long2ip($log['ip']); ?>" href="<?php $options->adminUrl('extending.php?panel=' . Access_Plugin::$panel . '&filter=ip&ip=' . $access->long2ip($log['ip']) . '&type='. $request->type); ?>"><?= $access->long2ip($log['ip']); ?></td>
<td><?= $log['ip_loc'] ?></td>
<td><a target="_blank" data-action="referer" href="<?= $log['referer']; ?>"><?= $log['referer']; ?></a></td>
<td><?= date('Y-m-d H:i:s', $log['time']); ?></td>
</tr>
<?php endforeach; ?>
<?php else: ?>
@ -127,7 +129,7 @@ $access = new Access_Core();
<?php if($access->logs['rows'] > 1): ?>
<ul class="typecho-pager">
<?php echo $access->logs['page']; ?>
<?= $access->logs['page']; ?>
</ul>
<?php endif; ?>
</form>
@ -142,7 +144,7 @@ $access = new Access_Core();
<h4 class="typecho-list-table-title">访问数表格</h4>
<div class="typecho-table-wrap">
<div class="typecho-table-wrap" id="tbl-count">
<table class="typecho-list-table">
<colgroup>
<col width="10%"/>
@ -159,98 +161,122 @@ $access = new Access_Core();
</tr>
</thead>
<tbody>
<tr>
<tr name="count-today">
<td>今日</td>
<td><?php echo $access->overview['today']['pv']['count'];?></td>
<td><?php echo $access->overview['today']['uv']['count'];?></td>
<td><?php echo $access->overview['today']['ip']['count'];?></td>
<td>loaging...</td>
<td></td>
<td></td>
</tr>
<tr>
<tr name="count-yesterday">
<td>昨日</td>
<td><?php echo $access->overview['yesterday']['pv']['count'];?></td>
<td><?php echo $access->overview['yesterday']['uv']['count'];?></td>
<td><?php echo $access->overview['yesterday']['ip']['count'];?></td>
<td>loaging...</td>
<td></td>
<td></td>
</tr>
<tr>
<tr name="count-total">
<td>总计</td>
<td><?php echo $access->overview['total']['pv'];?></td>
<td><?php echo $access->overview['total']['uv'];?></td>
<td><?php echo $access->overview['total']['ip'];?></td>
<td>loaging...</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<h4 class="typecho-list-table-title">来源域名</h4>
<div class="col-mb-12 col-4">
<h4 class="typecho-list-table-title">来源域名</h4>
<div class="typecho-table-wrap">
<table class="typecho-list-table">
<colgroup>
<col width="10%"/>
<col width="10%"/>
<col width="80%"/>
</colgroup>
<thead>
<tr>
<th>排名</th>
<th>次数</th>
<th>来源域名</th>
</tr>
</thead>
<tbody>
<?php foreach ($access->referer['domain'] as $key => $value):?>
<tr>
<td><?php echo $key +1 ?></td>
<td><?php echo $value['count']?></td>
<td><?php echo $value['value']?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class="typecho-table-wrap">
<table class="typecho-list-table" id="tbl-referer-domain">
<colgroup>
<col width="15%"/>
<col width="15%"/>
<col width="70%"/>
</colgroup>
<thead>
<tr>
<th>排名</th>
<th>次数</th>
<th>来源域名</th>
</tr>
</thead>
<tbody>
<tr>
<td>loaging...</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-mb-12 col-8">
<h4 class="typecho-list-table-title">来源页</h4>
<div class="typecho-table-wrap">
<table class="typecho-list-table" id="tbl-referer-url">
<colgroup>
<col width="15%"/>
<col width="15%"/>
<col width="70%"/>
</colgroup>
<thead>
<tr>
<th>排名</th>
<th>次数</th>
<th>来源URL</th>
</tr>
</thead>
<tbody>
<tr>
<td>loaging...</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-mb-12">
<h4 class="typecho-list-table-title">文章浏览分析</h4>
<div class="typecho-table-wrap" id="pie-article">loading...</div>
</div>
<h4 class="typecho-list-table-title">来源页</h4>
<div class="typecho-table-wrap">
<table class="typecho-list-table">
<colgroup>
<col width="10%"/>
<col width="10%"/>
<col width="80%"/>
</colgroup>
<thead>
<tr>
<th>排名</th>
<th>次数</th>
<th>来源URL</th>
</tr>
</thead>
<tbody>
<?php foreach ($access->referer['url'] as $key => $value):?>
<tr>
<td><?php echo $key +1 ?></td>
<td><?php echo $value['count']?></td>
<td><?php echo $value['value']?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class="col-mb-12">
<h4 class="typecho-list-table-title">访客地域分析</h4>
<div class="typecho-table-wrap">
<ul class="typecho-option-tabs clearfix">
<li><button id="btn-china" class="btn btn-s primary">国内</button></li>
<li><button id="btn-inter" class="btn btn-s">国际</button><li>
</ul>
<div class="typecho-table-wrap" id="bar-location">loading...</div>
</div>
</div>
<h4 class="typecho-list-table-title">今日图表</h4>
<div class="typecho-table-wrap" id="chart-today"></div>
<h4 class="typecho-list-table-title">昨日图表</h4>
<div class="typecho-table-wrap" id="chart-yesterday"></div>
<h4 class="typecho-list-table-title">当月图表</h4>
<div class="typecho-table-wrap" id="chart-month"></div>
</div><!-- end .typecho-list -->
<div class="col-mb-12">
<h4 class="typecho-list-table-title">今日图表</h4>
<div class="typecho-table-wrap" id="chart-today"></div>
</div>
<div class="col-mb-12">
<h4 class="typecho-list-table-title">昨日图表</h4>
<div class="typecho-table-wrap" id="chart-yesterday"></div>
</div>
<div class="col-mb-12">
<h4 class="typecho-list-table-title">当月图表</h4>
<div class="typecho-table-wrap" id="chart-month"></div>
</div>
</div>
<!-- end .typecho-list -->
<?php endif;?>
</div><!-- end .typecho-page-main -->
</div>
<!-- end .typecho-page-main -->
</div>
</div>
@ -262,69 +288,71 @@ include 'table-js.php';
<script type="text/javascript">
$(document).ready(function() {
$('a[data-action="ua"]').click(function() {
swal('User-Agent', $.trim($(this).attr('title')), 'info');
return false;
});
$('a[data-action="ip"]').click(function() {
swal('IP查询中...', '正在查询...', 'info');
$.ajax({
url: '<?php echo rtrim(Helper::options()->index, '/').'/access/ip.json';?>',
method: 'get',
dataType: 'json',
data: {ip: $(this).data('ip')},
success: function(data) {
if (data.code == 0) {
swal('IP查询成功', data.data, 'success');
} else {
swal('IP查询失败', data.data, 'warning');
}
},
error: function() {
swal('IP查询失败', '网络异常或PHP环境配置异常', 'warning');
}
swal({
icon: 'info',
title: 'User-Agent',
text: $(this).attr('title').trim()
});
return false;
});
$('.dropdown-menu a[data-action="delete"]').click(function() {
swal({
title: '你确定?',
text: '你确认要删除这些记录吗?',
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#DD6B55',
confirmButtonText: '是的',
cancelButtonText: '算啦',
closeOnConfirm: false
}, function() {
var ids = [];
title: '你确定?',
text: '你确认要删除这些记录吗?',
icon: 'warning',
buttons: {
cancel: '算啦',
confirm: '是的'
}
}).then((value) => {
if(value === true) {
let ids = [];
$('.typecho-list-table input[type="checkbox"]').each(function(index, elem) {
if (elem.checked) {
ids.push($(elem).data('id'));
}
});
if (ids.length == 0) {
return swal('错误', '你并没有勾选任何内容', 'warning');
}
$.ajax({
url: '<?php echo rtrim(Helper::options()->index, '/').'/access/log/delete.json';?>',
method: 'post',
dataType: 'json',
contentType: 'application/json',
data: JSON.stringify(ids),
success: function(data) {
if (data.code == 0) {
swal('删除成功', '所选记录已删除', 'success');
$.each(ids, function(index, elem) {
$('.typecho-list-table tbody tr[data-id="' + elem + '"]').fadeOut(500).remove();
if(ids.length != 0) {
$.ajax({
url: '/access/log/delete',
method: 'post',
dataType: 'json',
contentType: 'application/json',
data: JSON.stringify(ids),
success: function(data) {
if (data.code == 0) {
swal({
icon: 'success',
title: '删除成功',
text: '所选记录已删除'
});
$.each(ids, function(index, elem) {
$('.typecho-list-table tbody tr[data-id="' + elem + '"]').fadeOut(500).remove();
});
} else {
swal({
icon: 'error',
title: '错误',
text: '删除出错啦'
});
}
},
error: function(xhr, status, error) {
swal({
icon: 'error',
title: '错误',
text: '请求错误 code: '+xhr.status
});
} else {
swal('错误', '发生错误了', 'warning');
}
}
});
});
} else {
return swal({
icon: 'warning',
title: '错误',
text: '你并没有勾选任何内容'
});
}
}
});
var $this = $(this);
$this.parents('.dropdown-menu').hide().prev().removeClass('active');
@ -358,38 +386,248 @@ $(document).ready(function() {
var ipRegex = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
if ($filterSelect.val() == 'ip' && !ipRegex.test($ipInput.val())) {
return swal('筛选条件错误', 'IP地址不合法', 'warning');
return swal({
icon: 'error',
title: '筛选条件错误',
text: 'IP地址不合法'
});
}
$form.submit();
});
});
</script>
<script src="<?php $options->pluginUrl('Access/lib/sweetalert/sweetalert.min.js')?>"></script>
<script src="<?php $options->pluginUrl('Access/page/sweetalert.min.js')?>"></script>
<?php if($access->action == 'overview'):?>
<script src="<?php $options->pluginUrl('Access/lib/highcharts/js/highcharts.js')?>"></script>
<script src="<?php $options->pluginUrl('Access/lib/highcharts/js/modules/exporting.js')?>"></script>
<script src="<?php $options->pluginUrl('Access/page/highcharts/js/highcharts.js')?>"></script>
<script src="<?php $options->pluginUrl('Access/page/highcharts/js/modules/exporting.js')?>"></script>
<script src="<?php $options->pluginUrl('Access/page/highcharts/js/modules/accessibility.js')?>"></script>
<script type="text/javascript">
chartData = <?php echo $access->overview['chart_data'] ?>;
printChart = function(target, data) {
target.highcharts({
title: {text: data['title'], x: -20},
subtitle: {text: data['sub_title'], x: -20},
xAxis: {categories: data['xAxis']},
yAxis: {title: {text: '数量'},plotLines: [{value: 0,width: 1,color: '#808080'}]},
// html转义
htmlEncode = function(target) {
return target.replace(/[<>&"]/g, function(c){
return {'<': '&lt;', '>': '&gt;', '&': '&amp;', '"': '&quot;'}[c];
});
}
// 输出图表
printChart = function(target, title, data, avg=null) {
let pv = [], uv = [], ip = [], time = [];
for(let i = 0;i < data.length;i++)
pv.push(data[i].pv), uv.push(data[i].uv), ip.push(data[i].ip), time.push(data[i].time);
const chart = Highcharts.chart(target, {
title: {text: title, x: -20},
subtitle: {text: 'Generate By AccessPlugin', x: -20},
xAxis: {categories: time, title: {text: '时间', align: 'high'}},
yAxis: {
title: {text: '数量'},
plotLines: (avg !== null) ? [
// 平均值
{
value: avg.pv,
width: 1,
color: '#F7A35C'
}, {
value: avg.uv,
width: 1,
color: '#90ED7D'
}, {
value: avg.ip,
width: 1,
color: '#7CB5ED'
}
] : null
},
tooltip: {valueSuffix: ''},
plotOptions: {line: {dataLabels: {enabled: true},enableMouseTracking: false}},
plotOptions: {line: {dataLabels: {enabled: true}}},
series: [
{name: 'PV浏览',data: data['pv']['detail']},
{name: 'UV访客',data: data['uv']['detail']},
{name: 'IP地址',data: data['ip']['detail']}
{
name: 'PV浏览',
data: pv,
color: '#F7A35C'
}, {
name: 'UV访客',
data: uv,
color: '#90ED7D'
}, {
name: 'IP地址',
data: ip,
color: '#7CB5ED'
}
]
});
}
$(document).ready(function() {
printChart($('#chart-today'), chartData['today']);
printChart($('#chart-yesterday'), chartData['yesterday']);
printChart($('#chart-month'), chartData['month']);
// 输出饼图
printPie = function(target, title, data) {
let value = [];
// 生成统计row
for(let i = 0;i < data.length;i++)
value.push({name: data[i].title, y: data[i].count, cid: data[i].cid})
// 计算最大比例并选中
let maxKey = 0;
for(let i = 0;i < value.length;i++) {
if(value[i].y >= value[maxKey].y)
maxKey = i;
}
if(value.length)
value[maxKey].sliced = true;
const chart = Highcharts.chart(target, {
chart: {type: 'pie'},
title: {text: title},
subtitle: {text: 'Generate By AccessPlugin'},
tooltip: {pointFormat: '<b>阅读数: {point.y}<br>占比: {point.percentage:.1f}%<br>cid={point.cid}</b>'},
accessibility: {point: {valueSuffix: '%'}},
plotOptions: {pie: {allowPointSelect: true, cursor: 'pointer', dataLabels: {enabled: true, format: '<b>{point.name}</b>: {point.y}'}}},
series: [{colorByPoint: true, data: value}]
})
}
// 输出条形统计图
printBar = function(target, title, data) {
let values = [],
areas = [];
for(let i = 0;i < data.length;i++)
areas.push(data[i].area), values.push(data[i].count);
return Highcharts.chart(target, {
chart: {type: 'bar'},
title: {text: title, x: -20},
subtitle: {text: 'Generate By AccessPlugin', x: -20},
xAxis: {categories: areas, title: {text: '地域'}},
yAxis: {title: {text: '访问次数', align: 'high'}},
plotOptions: {bar: {dataLabels: {enabled: true}, colorByPoint: true}},
legend: {enabled: false},
series: [{name: '访问量', data: values}]
});
}
updateBar = function(target, title, data) {
let values = [],
areas = [];
for(let i = 0;i < data.length;i++)
areas.push(data[i].area), values.push(data[i].count);
target.update({
title: {text: title},
xAxis: {categories: areas, title: {text: '地域'}},
series: [{name: '访问量', data: values}]
}, true, false, {duration: 800});
}
// 显示来源统计表
printRefererTable = function(target, data) {
let tbl = $('#'+target+' tbody');
tbl.children().remove(); // 清空表格
for(let i = 0;i < data.length;i++) {
tbl.append('<tr><td>'+(i+1)+'</td><td>'+data[i].count+'</td><td>'+htmlEncode(data[i].value)+'</td><td></td></tr>');
}
}
// 拉取统计数据
getStatisticData = function(rpc, params=null, callback) {
$.ajax({
url: '/access/statistic/view',
method: 'get',
dataType: 'json',
data: {rpc: rpc, ...params},
async: true,
success: function(data) {
if(data.code === 0)
callback(data.data);
else
console.log('rpc='+rpc+'数据获取错误 code='+data.code+' msg='+data.message);
},
error: function(xhr, status, error) {
console.log('rpc='+rpc+' API拉取错误 '+error.toString());
}
})
}
// 挂接format方法
Date.prototype.format = function(fmt) {
var o = {
'%Y+': this.getFullYear(), // 年
'%m+': this.getMonth() + 1, //月份
'%d+': this.getDate(), //日
'%H+': this.getHours(), //小时
'%M+': this.getMinutes(), //分
'%S+': this.getSeconds(), //秒
'%Q+': Math.floor((this.getMonth() + 3) / 3), //季度
'%s+': this.getMilliseconds() //毫秒
};
for(var k in o)
if(new RegExp("(" + k + ")").test(fmt))
fmt = fmt.replace(RegExp.$1,
(RegExp.$1.length == 2) ?
o[k] : (('00' + o[k]).substr(('' + o[k]).length))
);
return fmt;
}
$().ready(function() {
const today = new Date();
const yesterday = new Date(today);
yesterday.setDate(yesterday.getDate() - 1);
// 今日计数统计数据
getStatisticData('count', {type: 'day', time: today.format('%Y-%mm-%dd')} ,function(data) {
let row = $('#tbl-count tr[name="count-today"] td');
row.eq(1).text(data.count.pv), row.eq(2).text(data.count.uv), row.eq(3).text(data.count.ip);
});
// 昨日计数统计数据
getStatisticData('count', {type: 'day', time: yesterday.format('%Y-%mm-%dd')} ,function(data) {
let row = $('#tbl-count tr[name="count-yesterday"] td');
row.eq(1).text(data.count.pv), row.eq(2).text(data.count.uv), row.eq(3).text(data.count.ip);
});
// 总计数统计数据
getStatisticData('count', {type: 'total'} ,function(data) {
let row = $('#tbl-count tr[name="count-total"] td');
row.eq(1).text(data.count.pv), row.eq(2).text(data.count.uv), row.eq(3).text(data.count.ip);
});
// 来源域名统计
getStatisticData('referer', {type: 'domain', pn: 1, ps: 10} ,function(data) {
printRefererTable('tbl-referer-domain', data);
});
// 来源页统计
getStatisticData('referer', {type: 'url', pn: 1, ps: 10} ,function(data) {
printRefererTable('tbl-referer-url', data);
});
// 文章浏览比例统计
getStatisticData('article', {ps: 10} ,function(data) {
printPie('pie-article', '最受欢迎的文章', data);
});
// 浏览地域分析图
getStatisticData('location', {cate: 'china', ps: 10} ,function(data) {
const chartBar = printBar('bar-location', '国内访问地域分析', data);
// 国际按钮
$('#btn-inter').click(function(){
$('#btn-inter').addClass('primary');
$('#btn-china').removeClass('primary');
getStatisticData('location', {cate: 'inter', ps: 10} ,function(data) {
updateBar(chartBar, '国际访问地域分析', data)
});
});
// 国内按钮
$('#btn-china').click(function(){
$('#btn-china').addClass('primary');
$('#btn-inter').removeClass('primary');
getStatisticData('location', {cate: 'china', ps: 10} ,function(data) {
updateBar(chartBar, '国内访问地域分析', data)
});
});
});
// 当天访问图表
getStatisticData('chart', {type: 'day', time: today.format('%Y-%mm-%dd')} ,function(data) {
printChart('chart-today', data.dst+' 统计', data.chart, data.avg);
});
// 昨天访问图表
getStatisticData('chart', {type: 'day', time: yesterday.format('%Y-%mm-%dd')} ,function(data) {
printChart('chart-yesterday', data.dst+' 统计', data.chart, data.avg);
});
// 当月访问图表
getStatisticData('chart', {type: 'month', time: today.format('%Y-%mm')} ,function(data) {
printChart('chart-month', data.dst+' 统计', data.chart, data.avg);
});
});
</script>

View File

@ -0,0 +1,276 @@
.highcharts-popup.highcharts-annotation-toolbar {
right: 10%;
left: auto;
height: 40px;
overflow: hidden;
padding-right: 40px;
width: auto;
min-width: 0;
}
.highcharts-popup.highcharts-annotation-toolbar button {
margin-top: 0px;
}
.highcharts-popup.highcharts-annotation-toolbar > span {
display: block;
float: left;
padding: 12px;
}
.highcharts-popup {
font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif;
background-color: #fff;
color: #666666;
display: none;
font-size: 0.876em;
max-height: 90%;
top: 5%;
left: 15%;
overflow-x: hidden;
overflow-y: hidden;
width: 75%;
min-width: 300px;
max-width: 600px;
position: absolute;
z-index: 100;
-webkit-box-shadow: 0px 0px 8px 0px rgba(61, 61, 61, 0.3);
-moz-box-shadow: 0px 0px 8px 0px rgba(61, 61, 61, 0.3);
box-shadow: 0px 0px 8px 0px rgba(61, 61, 61, 0.3);
}
.highcharts-popup div, .highcharts-popup span {
box-sizing: border-box;
}
.highcharts-popup input, .highcharts-popup label, .highcharts-popup select {
clear: both;
float: left;
width: 100%;
margin-bottom: 10px;
box-sizing: border-box;
}
.highcharts-popup input {
border: 1px solid #e6e6e6;
border-radius: 0.3rem;
padding: 5px;
width: 100%;
}
.highcharts-popup-lhs-col, .highcharts-popup-rhs-col {
height: 100%;
float: left;
overflow-y: auto;
}
.highcharts-popup-lhs-col.highcharts-popup-lhs-full {
width: 100%;
overflow-x: hidden;
height: calc(100% - 104px);
border: none;
padding: 20px;
padding-bottom: 10px;
}
.highcharts-popup-lhs-col.highcharts-popup-lhs-full + .highcharts-popup-bottom-row {
width: 100%;
}
.highcharts-popup-lhs-col {
clear: both;
width: 30%;
border-right: 1px solid #e6e6e6;
}
.highcharts-popup-bottom-row {
float: left;
padding: 0px 20px;
padding-bottom: 12px;
width: 100%;
border-top: 1px solid #e6e6e6;
}
.highcharts-popup-rhs-col {
width: 70%;
height: calc(100% - 40px);
padding: 20px;
}
.highcharts-popup-rhs-col-wrapper {
width: 100%;
overflow-x: hidden;
}
.highcharts-popup-rhs-col-wrapper h3 {
margin-top: 0px;
padding-bottom: 0px;
}
.highcharts-bindings-wrapper ul.highcharts-indicator-list,
.highcharts-indicator-list {
float: left;
color: #666666;
height: calc(100% - 150px);
width: 100%;
overflow-x: hidden;
margin: 0px;
padding: 15px 0px;
}
.highcharts-indicator-list li {
cursor: pointer;
padding: 5px 20px;
margin: 0px;
width: 100%;
height: auto;
overflow: hidden;
word-break: break-all;
box-sizing: border-box;
}
.highcharts-indicator-list li:hover {
background-color: #e6e6e6;
}
.highcharts-tab-item {
background-color: #f7f7f7;
cursor: pointer;
display: block;
float: left;
padding: 0px 10px;
height: 40px;
line-height: 40px;
}
.highcharts-tab-item.highcharts-tab-item-active {
background-color: #e6e6e6;
}
.highcharts-tab-item-content {
display: none;
float: left;
height: 100%;
overflow: hidden;
width: 100%;
border-top: 1px solid #e6e6e6;
}
.highcharts-tab-item-show {
display: block;
}
.highcharts-popup-close {
background-repeat: no-repeat;
background-position: 50% 50%;
width: 40px;
height: 40px;
cursor: pointer;
position: absolute;
padding: 10px;
top: 0%;
right: 0%;
color: #333333;
}
.highcharts-popup-close:hover,
.highcharts-popup button:hover,
.highcharts-popup button.highcharts-annotation-edit-button:hover,
.highcharts-popup button.highcharts-annotation-remove-button:hover {
background-color: #e6e6e6;
cursor: pointer;
}
.highcharts-popup button {
float: right;
border: none;
background: #f7f7f7;
color: #666666;
margin-left: 5px;
margin-top: 12px;
}
.highcharts-popup button:first-child {
margin-left: 0;
}
.highcharts-tab-disabled {
color: #cccccc;
}
/* annotation edit small popup */
.highcharts-popup button.highcharts-annotation-edit-button,
.highcharts-popup button.highcharts-annotation-remove-button {
width: 20px;
height: 40px;
padding: 20px;
}
.highcharts-popup button.highcharts-annotation-edit-button {
background-repeat: no-repeat;
background-position: 50% 50%;
text-indent: -9999px;
}
.highcharts-popup button.highcharts-annotation-remove-button {
background-repeat: no-repeat;
background-position: 50% 50%;
text-indent: -9999px;
}
.highcharts-popup .highcharts-annotation-title {
display: block;
float: left;
font-size: 1.2em;
font-weight: bold;
margin-bottom: 15px;
width: 100%;
}
.highcharts-popup .highcharts-popup-main-title {
border-bottom: 1px solid #e6e6e6;
margin: 0px;
padding: 8px 0px 6px 20px;
}
.highcharts-indicator-title {
float: left;
padding-bottom: 15px;
}
.highcharts-input-wrapper {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
flex-wrap: wrap;
}
.highcharts-input-search-indicators-label {
text-align: center;
font-weight: bold;
color: #000000;
margin-top: 0.5rem;
}
input.highcharts-input-search-indicators {
width: 80%;
margin: 0 auto;
float: none;
border-color: #949494;
}
.highcharts-popup a.clear-filter-button {
margin: 0 auto;
display: none;
color: #335cad;
background-color: #fff;
border: 1px solid #335cad;
margin-top: 10px;
}
.highcharts-popup a.clear-filter-button:hover {
color: #fff;
background-color: #335cad;
cursor: pointer;
}

View File

@ -0,0 +1,289 @@
// Colors, using same names and values as in highcharts.scss
$background-color: #fff;
$neutral-color-100: #000000;
$neutral-color-80: #333333;
$neutral-color-60: #666666;
$neutral-color-20: #cccccc;
$neutral-color-10: #e6e6e6;
$neutral-color-3: #f7f7f7;
$highlight-color-80: #335cad;
.highcharts-popup.highcharts-annotation-toolbar {
right: 10%;
left: auto;
height: 40px;
overflow: hidden;
padding-right: 40px;
width: auto;
min-width: 0;
}
.highcharts-popup.highcharts-annotation-toolbar button {
margin-top:0px;
}
.highcharts-popup.highcharts-annotation-toolbar > span {
display:block;
float:left;
padding: 12px;
}
.highcharts-popup {
font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif;
background-color: $background-color;
color: $neutral-color-60;
display: none;
font-size: 0.876em;
max-height: 90%;
top: 5%;
left: 15%;
overflow-x: hidden;
overflow-y: hidden;
width: 75%;
min-width: 300px;
max-width: 600px;
position: absolute;
z-index: 100;
-webkit-box-shadow: 0px 0px 8px 0px rgba(61,61,61,0.3);
-moz-box-shadow: 0px 0px 8px 0px rgba(61,61,61,0.3);
box-shadow: 0px 0px 8px 0px rgba(61,61,61,0.3);
}
.highcharts-popup div, .highcharts-popup span {
box-sizing: border-box;
}
.highcharts-popup input, .highcharts-popup label, .highcharts-popup select {
clear: both;
float: left;
width: 100%;
margin-bottom: 10px;
box-sizing: border-box;
}
.highcharts-popup input {
border: 1px solid $neutral-color-10;
border-radius: 0.3rem;
padding: 5px;
width: 100%;
}
.highcharts-popup-lhs-col, .highcharts-popup-rhs-col {
height: 100%;
float: left;
overflow-y: auto;
}
.highcharts-popup-lhs-col.highcharts-popup-lhs-full {
width: 100%;
overflow-x: hidden;
height: calc(100% - 104px);
border: none;
padding: 20px;
padding-bottom: 10px;
}
.highcharts-popup-lhs-col.highcharts-popup-lhs-full + .highcharts-popup-bottom-row {
width: 100%;
}
.highcharts-popup-lhs-col {
clear: both;
width: 30%;
border-right: 1px solid $neutral-color-10;
}
.highcharts-popup-bottom-row {
float: left;
padding: 0px 20px;
padding-bottom: 12px;
width: 100%;
border-top: 1px solid $neutral-color-10;
}
.highcharts-popup-rhs-col {
width: 70%;
height: calc(100% - 40px);
padding: 20px;
}
.highcharts-popup-rhs-col-wrapper {
width: 100%;
overflow-x: hidden;
}
.highcharts-popup-rhs-col-wrapper h3 {
margin-top:0px;
padding-bottom:0px;
}
.highcharts-bindings-wrapper ul.highcharts-indicator-list,
.highcharts-indicator-list {
float: left;
color: $neutral-color-60;
height: calc(100% - 150px);
width: 100%;
overflow-x: hidden;
margin: 0px;
padding: 15px 0px;
}
.highcharts-indicator-list li {
cursor: pointer;
padding: 5px 20px;
margin: 0px;
width: 100%;
height: auto;
overflow: hidden;
word-break: break-all;
box-sizing: border-box;
}
.highcharts-indicator-list li:hover {
background-color: $neutral-color-10;
}
.highcharts-tab-item {
background-color: $neutral-color-3;
cursor: pointer;
display: block;
float:left;
padding: 0px 10px;
height: 40px;
line-height: 40px;
}
.highcharts-tab-item.highcharts-tab-item-active {
background-color: $neutral-color-10;
}
.highcharts-tab-item-content {
display: none;
float: left;
height: 100%;
overflow: hidden;
width: 100%;
border-top: 1px solid $neutral-color-10;
}
.highcharts-tab-item-show {
display: block;
}
.highcharts-popup-close {
background-repeat: no-repeat;
background-position: 50% 50%;
width: 40px;
height: 40px;
cursor: pointer;
position: absolute;
padding: 10px;
top: 0%;
right: 0%;
color: $neutral-color-80;
}
.highcharts-popup-close:hover,
.highcharts-popup button:hover,
.highcharts-popup button.highcharts-annotation-edit-button:hover,
.highcharts-popup button.highcharts-annotation-remove-button:hover {
background-color: $neutral-color-10;
cursor: pointer;
}
.highcharts-popup button {
float: right;
border: none;
background: $neutral-color-3;
color: $neutral-color-60;
margin-left:5px;
margin-top:12px;
}
.highcharts-popup button:first-child {
margin-left: 0;
}
.highcharts-tab-disabled {
color: $neutral-color-20;
}
/* annotation edit small popup */
.highcharts-popup button.highcharts-annotation-edit-button,
.highcharts-popup button.highcharts-annotation-remove-button {
width: 20px;
height: 40px;
padding: 20px;
}
.highcharts-popup button.highcharts-annotation-edit-button {
background-repeat: no-repeat;
background-position: 50% 50%;
text-indent: -9999px;
}
.highcharts-popup button.highcharts-annotation-remove-button {
background-repeat: no-repeat;
background-position: 50% 50%;
text-indent: -9999px;
}
.highcharts-popup .highcharts-annotation-title {
display: block;
float: left;
font-size: 1.2em;
font-weight: bold;
margin-bottom: 15px;
width: 100%;
}
.highcharts-popup .highcharts-popup-main-title {
border-bottom: 1px solid $neutral-color-10;
margin: 0px;
padding: 8px 0px 6px 20px;
}
.highcharts-indicator-title {
float: left;
padding-bottom: 15px;
}
.highcharts-input-wrapper {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
flex-wrap: wrap;
}
.highcharts-input-search-indicators-label {
text-align: center;
font-weight: bold;
color: $neutral-color-100;
margin-top: 0.5rem;
}
input.highcharts-input-search-indicators {
width: 80%;
margin: 0 auto;
float: none;
border-color: #949494;
}
.highcharts-popup a.clear-filter-button {
margin: 0 auto;
display: none;
color: $highlight-color-80;
background-color: $background-color;
border: 1px solid $highlight-color-80;
margin-top: 10px;
}
.highcharts-popup a.clear-filter-button:hover {
color: $background-color;
background-color: $highlight-color-80;
cursor: pointer;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,911 @@
/**
* @license Highcharts
*
* (c) 2009-2016 Torstein Honsi
*
* License: www.highcharts.com/license
*/
// Colors for data series and points.
$colors: #7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1 !default;
// Chart background, point stroke for markers and columns etc
$background-color: #ffffff !default;
// Neutral colors, grayscale by default. The default colors are defined by mixing the
// background-color with neutral, with a weight corresponding to the number in the name.
$neutral-color-100: #000000 !default; // Strong text.
$neutral-color-80: #333333 !default; // Main text and some strokes.
$neutral-color-60: #666666 !default; // Axis labels, axis title, connector fallback.
$neutral-color-40: #999999 !default; // Credits text, export menu stroke.
$neutral-color-20: #cccccc !default; // Disabled texts, button strokes, crosshair etc.
$neutral-color-10: #e6e6e6 !default; // Grid lines etc.
$neutral-color-5: #f2f2f2 !default; // Minor grid lines etc.
$neutral-color-3: #f7f7f7 !default; // Tooltip backgroud, button fills, map null points.
// Colored, shades of blue by default
$highlight-color-100: #003399 !default; // Drilldown clickable labels, color axis max color.
$highlight-color-80: #335cad !default; // Selection marker, menu hover, button hover, chart border, navigator series.
$highlight-color-60: #6685c2 !default; // Navigator mask fill.
$highlight-color-20: #ccd6eb !default; // Ticks and axis line.
$highlight-color-10: #e6ebf5 !default; // Pressed button, color axis min color.
// Fonts
$font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif !default;
$title-font-size: 1.5em !default;
$subtitle-font-size: 1em !default;
$legend-font-size: 1em !default;
$axis-labels-font-size: 0.9em !default;
// Tooltip
$tooltip-border: 1px !default;
$tooltip-background: $neutral-color-3 !default;
// Axes
$xaxis-grid-line: 0px !default;
// Range-selector
$range-selector-button-border: 0px !default;
$range-selector-input-text: $neutral-color-80 !default;
$range-selector-input-border: $neutral-color-20 !default;
// Data-labels
$data-label-color: $neutral-color-80 !default;
// Buttons
$context-button-background: $background-color !default;
$highcharts-button-background: $neutral-color-3 !default;
$highcharts-button-border: $neutral-color-20 !default;
$highcharts-button-text: $neutral-color-80 !default;
$highcharts-button-pressed-background: $highlight-color-10 !default;
$highcharts-button-pressed-border: $neutral-color-20 !default;
$highcharts-button-pressed-text: $neutral-color-80 !default;
$highcharts-button-hover-background: $neutral-color-10 !default;
$highcharts-button-hover-border: $neutral-color-20 !default;
$highcharts-button-hover-text: $neutral-color-80 !default;
// Navigator
$navigator-series-fill: $highlight-color-80 !default;
$navigator-series-border: $highlight-color-80 !default;
// Scrollbar
$scrollbar-track-background: $neutral-color-5 !default;
$scrollbar-track-border: $neutral-color-5 !default;
// Indicators
$positive-color: #06b535; // Positive indicator color
$negative-color: #f21313; // Negative indicator color
.highcharts-container {
position: relative;
overflow: hidden;
width: 100%;
height: 100%;
text-align: left;
line-height: normal;
z-index: 0; /* #1072 */
-webkit-tap-highlight-color: rgba(0,0,0,0);
font-family: $font-family;
font-size: 12px;
user-select: none;
touch-action: manipulation;
outline: none;
}
.highcharts-root {
display: block;
}
.highcharts-root text {
stroke-width: 0;
}
.highcharts-strong {
font-weight: bold;
}
.highcharts-emphasized {
font-style: italic;
}
.highcharts-anchor {
cursor: pointer;
}
.highcharts-background {
fill: $background-color;
}
.highcharts-plot-border, .highcharts-plot-background {
fill: none;
}
.highcharts-label-box {
fill: none;
}
.highcharts-button-box {
fill: inherit;
}
.highcharts-tracker-line {
stroke-linejoin: round;
stroke: rgba(192, 192, 192, 0.0001);
stroke-width: 22;
fill: none;
}
.highcharts-tracker-area {
fill: rgba(192, 192, 192, 0.0001);
stroke-width: 0;
}
/* Titles */
.highcharts-title {
fill: $neutral-color-80;
font-size: $title-font-size;
}
.highcharts-subtitle {
fill: $neutral-color-60;
font-size: $subtitle-font-size;
}
/* Axes */
.highcharts-axis-line {
fill: none;
stroke: $highlight-color-20;
}
.highcharts-yaxis .highcharts-axis-line {
stroke-width: 0;
}
.highcharts-axis-title {
fill: $neutral-color-60;
}
.highcharts-axis-labels {
fill: $neutral-color-60;
cursor: default;
font-size: $axis-labels-font-size;
}
.highcharts-grid-line {
fill: none;
stroke: $neutral-color-10;
}
.highcharts-xaxis-grid .highcharts-grid-line {
stroke-width: $xaxis-grid-line;
}
.highcharts-tick {
stroke: $highlight-color-20;
}
.highcharts-yaxis .highcharts-tick {
stroke-width: 0;
}
.highcharts-minor-grid-line {
stroke: $neutral-color-5;
}
.highcharts-crosshair-thin {
stroke-width: 1px;
stroke: $neutral-color-20;
}
.highcharts-crosshair-category {
stroke: $highlight-color-20;
stroke-opacity: 0.25;
}
/* Credits */
.highcharts-credits {
cursor: pointer;
fill: $neutral-color-40;
font-size: 0.7em;
transition: fill 250ms, font-size 250ms;
}
.highcharts-credits:hover {
fill: black;
font-size: 1em;
}
/* Tooltip */
.highcharts-tooltip {
cursor: default;
pointer-events: none;
white-space: nowrap;
transition: stroke 150ms;
}
.highcharts-tooltip text {
fill: $neutral-color-80;
}
.highcharts-tooltip .highcharts-header {
font-size: 0.85em;
}
.highcharts-tooltip-box {
stroke-width: $tooltip-border;
fill: $tooltip-background;
fill-opacity: 0.85;
}
.highcharts-tooltip-box .highcharts-label-box {
fill: $tooltip-background;
fill-opacity: 0.85;
}
div.highcharts-tooltip {
filter: none;
}
.highcharts-selection-marker {
fill: $highlight-color-80;
fill-opacity: 0.25;
}
.highcharts-graph {
fill: none;
stroke-width: 2px;
stroke-linecap: round;
stroke-linejoin: round;
}
.highcharts-empty-series {
stroke-width: 1px;
fill: none;
stroke: $neutral-color-20;
}
.highcharts-state-hover .highcharts-graph {
stroke-width: 3;
}
.highcharts-point-inactive {
opacity: 0.2;
transition: opacity 50ms; /* quick in */
}
.highcharts-series-inactive {
opacity: 0.2;
transition: opacity 50ms; /* quick in */
}
.highcharts-state-hover path {
transition: stroke-width 50ms; /* quick in */
}
.highcharts-state-normal path {
transition: stroke-width 250ms; /* slow out */
}
/* Legend hover affects points and series */
g.highcharts-series,
.highcharts-point,
.highcharts-markers,
.highcharts-data-labels {
transition: opacity 250ms;
}
.highcharts-legend-series-active g.highcharts-series:not(.highcharts-series-hover),
.highcharts-legend-point-active .highcharts-point:not(.highcharts-point-hover),
.highcharts-legend-series-active .highcharts-markers:not(.highcharts-series-hover),
.highcharts-legend-series-active .highcharts-data-labels:not(.highcharts-series-hover) {
opacity: 0.2;
}
/* Series options */
/* Default colors */
@for $i from 1 through length($colors) {
$color: nth($colors, $i);
.highcharts-color-#{$i - 1} {
fill: $color;
stroke: $color;
}
}
.highcharts-area {
fill-opacity: 0.75;
stroke-width: 0;
}
.highcharts-markers {
stroke-width: 1px;
stroke: $background-color;
}
.highcharts-a11y-markers-hidden .highcharts-point:not(.highcharts-point-hover):not(.highcharts-a11y-marker-visible),
.highcharts-a11y-marker-hidden {
opacity: 0;
}
.highcharts-point {
stroke-width: 1px;
}
.highcharts-dense-data .highcharts-point {
stroke-width: 0;
}
.highcharts-data-label {
font-size: 0.9em;
font-weight: bold;
}
.highcharts-data-label-box {
fill: none;
stroke-width: 0;
}
.highcharts-data-label text, text.highcharts-data-label {
fill: $data-label-color;
}
.highcharts-data-label-connector {
fill: none;
}
.highcharts-data-label-hidden {
pointer-events: none;
}
.highcharts-halo {
fill-opacity: 0.25;
stroke-width: 0;
}
.highcharts-series:not(.highcharts-pie-series) .highcharts-point-select,
.highcharts-markers .highcharts-point-select {
fill: $neutral-color-20;
stroke: $neutral-color-100;
}
.highcharts-column-series rect.highcharts-point {
// rect to prevent stroke on 3D columns
stroke: $background-color;
}
.highcharts-column-series .highcharts-point {
transition: fill-opacity 250ms;
}
.highcharts-column-series .highcharts-point-hover {
fill-opacity: 0.75;
transition: fill-opacity 50ms;
}
.highcharts-pie-series .highcharts-point {
stroke-linejoin: round;
stroke: $background-color;
}
.highcharts-pie-series .highcharts-point-hover {
fill-opacity: 0.75;
transition: fill-opacity 50ms;
}
.highcharts-funnel-series .highcharts-point {
stroke-linejoin: round;
stroke: $background-color;
}
.highcharts-funnel-series .highcharts-point-hover {
fill-opacity: 0.75;
transition: fill-opacity 50ms;
}
.highcharts-funnel-series .highcharts-point-select {
fill: inherit;
stroke: inherit;
}
.highcharts-pyramid-series .highcharts-point {
stroke-linejoin: round;
stroke: $background-color;
}
.highcharts-pyramid-series .highcharts-point-hover {
fill-opacity: 0.75;
transition: fill-opacity 50ms;
}
.highcharts-pyramid-series .highcharts-point-select {
fill: inherit;
stroke: inherit;
}
.highcharts-solidgauge-series .highcharts-point {
stroke-width: 0;
}
.highcharts-treemap-series .highcharts-point {
stroke-width: 1px;
stroke: $neutral-color-10;
transition: stroke 250ms, fill 250ms, fill-opacity 250ms;
}
.highcharts-treemap-series .highcharts-point-hover {
stroke: $neutral-color-40;
transition: stroke 25ms, fill 25ms, fill-opacity 25ms;
}
.highcharts-treemap-series .highcharts-above-level {
display: none;
}
.highcharts-treemap-series .highcharts-internal-node {
fill: none;
}
.highcharts-treemap-series .highcharts-internal-node-interactive {
fill-opacity: 0.15;
cursor: pointer;
}
.highcharts-treemap-series .highcharts-internal-node-interactive:hover {
fill-opacity: 0.75;
}
.highcharts-vector-series .highcharts-point {
fill: none;
stroke-width: 2px;
}
.highcharts-windbarb-series .highcharts-point {
fill: none;
stroke-width: 2px;
}
.highcharts-lollipop-stem {
stroke: $neutral-color-100;
}
.highcharts-focus-border {
fill: none;
stroke-width: 2px;
}
.highcharts-legend-item-hidden .highcharts-focus-border {
fill: none !important;
}
/* Legend */
.highcharts-legend-box {
fill: none;
stroke-width: 0;
}
.highcharts-legend-item > text {
fill: $neutral-color-80;
font-weight: bold;
font-size: $legend-font-size;
cursor: pointer;
stroke-width: 0;
}
.highcharts-legend-item:hover text {
fill: $neutral-color-100;
}
.highcharts-legend-item-hidden * {
fill: $neutral-color-20 !important;
stroke: $neutral-color-20 !important;
transition: fill 250ms;
}
.highcharts-legend-nav-active {
fill: $highlight-color-100;
cursor: pointer;
}
.highcharts-legend-nav-inactive {
fill: $neutral-color-20;
}
circle.highcharts-legend-nav-active, circle.highcharts-legend-nav-inactive { /* tracker */
fill: rgba(192, 192, 192, 0.0001);
}
.highcharts-legend-title-box {
fill: none;
stroke-width: 0;
}
/* Bubble legend */
.highcharts-bubble-legend-symbol {
stroke-width: 2;
fill-opacity: 0.5;
}
.highcharts-bubble-legend-connectors {
stroke-width: 1;
}
.highcharts-bubble-legend-labels {
fill: $neutral-color-80;
}
/* Loading */
.highcharts-loading {
position: absolute;
background-color: $background-color;
opacity: 0.5;
text-align: center;
z-index: 10;
transition: opacity 250ms;
}
.highcharts-loading-hidden {
height: 0 !important;
opacity: 0;
overflow: hidden;
transition: opacity 250ms, height 250ms step-end;
}
.highcharts-loading-inner {
font-weight: bold;
position: relative;
top: 45%;
}
/* Plot bands and polar pane backgrounds */
.highcharts-plot-band, .highcharts-pane {
fill: $neutral-color-100;
fill-opacity: 0.05;
}
.highcharts-plot-line {
fill: none;
stroke: $neutral-color-40;
stroke-width: 1px;
}
/* Highcharts More and modules */
.highcharts-boxplot-box {
fill: $background-color;
}
.highcharts-boxplot-median {
stroke-width: 2px;
}
.highcharts-bubble-series .highcharts-point {
fill-opacity: 0.5;
}
.highcharts-errorbar-series .highcharts-point {
stroke: $neutral-color-100;
}
.highcharts-gauge-series .highcharts-data-label-box {
stroke: $neutral-color-20;
stroke-width: 1px;
}
.highcharts-gauge-series .highcharts-dial {
fill: $neutral-color-100;
stroke-width: 0;
}
.highcharts-polygon-series .highcharts-graph {
fill: inherit;
stroke-width: 0;
}
.highcharts-waterfall-series .highcharts-graph {
stroke: $neutral-color-80;
stroke-dasharray: 1, 3;
}
.highcharts-sankey-series .highcharts-point {
stroke-width: 0;
}
.highcharts-sankey-series .highcharts-link {
transition: fill 250ms, fill-opacity 250ms;
fill-opacity: 0.5;
}
.highcharts-sankey-series .highcharts-point-hover.highcharts-link {
transition: fill 50ms, fill-opacity 50ms;
fill-opacity: 1;
}
.highcharts-venn-series .highcharts-point {
fill-opacity: 0.75;
stroke: $neutral-color-20;
transition: stroke 250ms, fill-opacity 250ms;
}
.highcharts-venn-series .highcharts-point-hover {
fill-opacity: 1;
stroke: $neutral-color-20;
}
/* Highstock */
.highcharts-navigator-mask-outside {
fill-opacity: 0;
}
.highcharts-navigator-mask-inside {
fill: $highlight-color-60; /* navigator.maskFill option */
fill-opacity: 0.25;
cursor: ew-resize;
}
.highcharts-navigator-outline {
stroke: $neutral-color-20;
fill: none;
}
.highcharts-navigator-handle {
stroke: $neutral-color-20;
fill: $neutral-color-5;
cursor: ew-resize;
}
.highcharts-navigator-series {
fill: $navigator-series-fill;
stroke: $navigator-series-border;
}
.highcharts-navigator-series .highcharts-graph {
stroke-width: 1px;
}
.highcharts-navigator-series .highcharts-area {
fill-opacity: 0.05;
}
.highcharts-navigator-xaxis .highcharts-axis-line {
stroke-width: 0;
}
.highcharts-navigator-xaxis .highcharts-grid-line {
stroke-width: 1px;
stroke: $neutral-color-10;
}
.highcharts-navigator-xaxis.highcharts-axis-labels {
fill: $neutral-color-40;
}
.highcharts-navigator-yaxis .highcharts-grid-line {
stroke-width: 0;
}
.highcharts-scrollbar-thumb {
fill: $neutral-color-20;
stroke: $neutral-color-20;
stroke-width: 1px;
}
.highcharts-scrollbar-button {
fill: $neutral-color-10;
stroke: $neutral-color-20;
stroke-width: 1px;
}
.highcharts-scrollbar-arrow {
fill: $neutral-color-60;
}
.highcharts-scrollbar-rifles {
stroke: $neutral-color-60;
stroke-width: 1px;
}
.highcharts-scrollbar-track {
fill: $scrollbar-track-background;
stroke: $scrollbar-track-border;
stroke-width: 1px;
}
.highcharts-button {
fill: $highcharts-button-background;
stroke: $highcharts-button-border;
cursor: default;
stroke-width: 1px;
transition: fill 250ms;
}
.highcharts-button text {
fill: $highcharts-button-text;
}
.highcharts-button-hover {
transition: fill 0ms;
fill: $highcharts-button-hover-background;
stroke: $highcharts-button-hover-border;
}
.highcharts-button-hover text {
fill: $highcharts-button-hover-text;
}
.highcharts-button-pressed {
font-weight: bold;
fill: $highcharts-button-pressed-background;
stroke: $highcharts-button-pressed-border;
}
.highcharts-button-pressed text {
fill: $highcharts-button-pressed-text;
font-weight: bold;
}
.highcharts-button-disabled text {
fill: $highcharts-button-text;
}
.highcharts-range-selector-buttons .highcharts-button {
stroke-width: $range-selector-button-border;
}
.highcharts-range-label rect {
fill: none;
}
.highcharts-range-label text {
fill: $neutral-color-60;
}
.highcharts-range-input rect {
fill: none;
}
.highcharts-range-input text {
fill: $range-selector-input-text;
}
.highcharts-range-input {
stroke-width:1px;
stroke: $range-selector-input-border;
}
input.highcharts-range-selector {
position: absolute;
border: 0;
width: 1px; /* Chrome needs a pixel to see it */
height: 1px;
padding: 0;
text-align: center;
left: -9em; /* #4798 */
}
.highcharts-crosshair-label text {
fill: $background-color;
font-size: 1.1em;
}
.highcharts-crosshair-label .highcharts-label-box {
fill: inherit;
}
.highcharts-candlestick-series .highcharts-point {
stroke: $neutral-color-100;
stroke-width: 1px;
}
.highcharts-candlestick-series .highcharts-point-up {
fill: $background-color;
}
.highcharts-hollowcandlestick-series .highcharts-point-down {
fill: $negative-color;
stroke: $negative-color;
}
.highcharts-hollowcandlestick-series .highcharts-point-down-bearish-up {
fill: $positive-color;
stroke: $positive-color;
}
.highcharts-hollowcandlestick-series .highcharts-point-up {
fill: transparent;
stroke: $positive-color;
}
.highcharts-ohlc-series .highcharts-point-hover {
stroke-width: 3px;
}
.highcharts-flags-series .highcharts-point .highcharts-label-box {
stroke: $neutral-color-40;
fill: $background-color;
transition: fill 250ms;
}
.highcharts-flags-series .highcharts-point-hover .highcharts-label-box {
stroke: $neutral-color-100;
fill: $highlight-color-20;
}
.highcharts-flags-series .highcharts-point text {
fill: $neutral-color-100;
font-size: 0.9em;
font-weight: bold;
}
/* Highcharts Maps */
.highcharts-map-series .highcharts-point {
transition: fill 500ms, fill-opacity 500ms, stroke-width 250ms;
stroke: $neutral-color-20;
stroke-width: inherit;
}
.highcharts-map-series .highcharts-point-hover {
transition: fill 0ms, fill-opacity 0ms;
fill-opacity: 0.5;
}
.highcharts-mapline-series .highcharts-point {
fill: none;
}
.highcharts-heatmap-series .highcharts-point {
stroke-width: 0;
}
.highcharts-map-navigation {
font-size: 1.3em;
font-weight: bold;
text-align: center;
}
.highcharts-mapview-inset-border {
stroke: $neutral-color-20;
stroke-width: 1px;
fill: none;
}
.highcharts-coloraxis {
stroke-width: 0;
}
.highcharts-coloraxis-marker {
fill: $neutral-color-40;
}
.highcharts-null-point {
fill: $neutral-color-3;
}
/* 3d charts */
.highcharts-3d-frame {
fill: transparent;
}
/* Exporting module */
.highcharts-contextbutton {
fill: $context-button-background; /* needed to capture hover */
stroke: none;
stroke-linecap: round;
}
.highcharts-contextbutton:hover {
fill: $neutral-color-10;
stroke: $neutral-color-10;
}
.highcharts-button-symbol {
stroke: $neutral-color-60;
stroke-width: 3px;
}
.highcharts-menu {
border: 1px solid $neutral-color-40;
background: $background-color;
padding: 5px 0;
box-shadow: 3px 3px 10px #888;
}
.highcharts-menu-item {
padding: 0.5em 1em;
background: none;
color: $neutral-color-80;
cursor: pointer;
transition: background 250ms, color 250ms;
}
.highcharts-menu-item:hover {
background: $highlight-color-80;
color: $background-color;
}
/* Breadcrumbs */
.highcharts-breadcrumbs-button {
fill: none;
stroke-width: 0;
cursor: pointer;
}
.highcharts-breadcrumbs-separator {
fill: $neutral-color-60;
}
/* Drilldown module */
.highcharts-drilldown-point {
cursor: pointer;
}
.highcharts-drilldown-data-label text,
text.highcharts-drilldown-data-label,
.highcharts-drilldown-axis-label {
cursor: pointer;
fill: $highlight-color-100;
font-weight: bold;
text-decoration: underline;
}
/* No-data module */
.highcharts-no-data text {
font-weight: bold;
font-size: 12px;
fill: $neutral-color-60;
}
/* Drag-panes module */
.highcharts-axis-resizer {
cursor: ns-resize;
stroke: black;
stroke-width: 2px;
}
/* Bullet type series */
.highcharts-bullet-target {
stroke-width: 0;
}
/* Lineargauge type series */
.highcharts-lineargauge-target {
stroke-width: 1px;
stroke: $neutral-color-80;
}
.highcharts-lineargauge-target-line {
stroke-width: 1px;
stroke: $neutral-color-80;
}
/* Annotations module */
.highcharts-annotation-label-box {
stroke-width: 1px;
stroke: $neutral-color-100;
fill: $neutral-color-100;
fill-opacity: 0.75;
}
.highcharts-annotation-label text {
fill: $neutral-color-10;
}
/* A11y module */
.highcharts-a11y-proxy-button {
border-width: 0;
background-color: transparent;
cursor: pointer;
outline: none;
opacity: 0.001;
z-index: 999;
overflow: hidden;
padding: 0;
margin: 0;
display: block;
position: absolute;
}
.highcharts-a11y-proxy-group li {
list-style: none;
}
.highcharts-visually-hidden {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
white-space: nowrap;
clip: rect(1px, 1px, 1px, 1px);
margin-top: -3px;
opacity: 0.01;
}
.highcharts-a11y-invisible {
visibility: hidden;
}
.highcharts-a11y-proxy-container,
.highcharts-a11y-proxy-container-before,
.highcharts-a11y-proxy-container-after {
position: absolute;
white-space: nowrap;
}
g.highcharts-series, .highcharts-markers, .highcharts-point {
outline: none;
}
/* Gantt */
.highcharts-treegrid-node-collapsed, .highcharts-treegrid-node-expanded {
cursor: pointer;
}
.highcharts-point-connecting-path {
fill: none;
}
.highcharts-grid-axis .highcharts-tick {
stroke-width: 1px;
}
.highcharts-grid-axis .highcharts-axis-line {
stroke-width: 1px;
}

View File

@ -0,0 +1,271 @@
.chart:-webkit-full-screen {
width: 100%;
height: 100%;
}
.chart:-moz-full-screen {
width: 100%;
height: 100%;
}
.chart:-ms-fullscreen {
width: 100%;
height: 100%;
}
.chart:fullscreen {
width: 100%;
height: 100%;
}
.chart {
width: 100%;
float: left;
height: 400px;
position: relative;
}
.highcharts-draw-mode {
cursor: crosshair;
}
.highcharts-bindings-wrapper * {
box-sizing: content-box;
}
.highcharts-bindings-wrapper {
display: block;
width: 40px;
height: 100%;
position: absolute;
z-index: 10;
top: 0px;
}
.highcharts-stocktools-popup {
width: 100%;
}
.highcharts-menu-wrapper {
float: left;
width: 40px;
height: calc(100% - 50px);
overflow: hidden;
position: absolute;
left: 0px;
top: 0px;
padding: 10px;
}
.highcharts-bindings-wrapper .highcharts-submenu-wrapper {
display: none;
position: absolute;
z-index: 10;
left: 0px;
top: 0px;
background: #fff;
width: 40px;
}
.highcharts-bindings-wrapper .highcharts-arrow-wrapper {
text-align: center;
width: 40px;
position: absolute;
left: 10px;
bottom: 10px;
font-size: 1.5em;
}
.highcharts-bindings-wrapper .highcharts-arrow-wrapper > div {
cursor: pointer;
}
.highcharts-bindings-wrapper .highcharts-arrow-down {
background-size: cover;
/* Safari */
-webkit-transform: rotate(90deg);
/* Firefox */
-moz-transform: rotate(90deg);
/* IE */
-ms-transform: rotate(90deg);
/* Opera */
-o-transform: rotate(90deg);
/* Internet Explorer */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
transform: rotate(90deg);
}
.highcharts-bindings-wrapper .highcharts-arrow-up {
background-size: cover;
outline: none;
display: inline-block;
width: 25px;
cursor: pointer;
-webkit-user-select: none;
/* Chrome/Safari */
-moz-user-select: none;
/* Firefox */
-ms-user-select: none;
/* IE10+ */
/* Rules below not implemented in browsers yet */
-o-user-select: none;
user-select: none;
/* Safari */
-webkit-transform: rotate(-90deg);
/* Firefox */
-moz-transform: rotate(-90deg);
/* IE */
-ms-transform: rotate(-90deg);
/* Opera */
-o-transform: rotate(-90deg);
/* Internet Explorer */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
transform: rotate(-90deg);
}
.highcharts-bindings-wrapper .highcharts-arrow-right {
background-repeat: no-repeat;
background-position: right bottom;
background-size: contain;
}
.highcharts-bindings-wrapper .highcharts-arrow-left.highcharts-arrow-right {
/* Safari */
-webkit-transform: rotate(0deg);
/* Firefox */
-moz-transform: rotate(0deg);
/* IE */
-ms-transform: rotate(0deg);
/* Opera */
-o-transform: rotate(0deg);
/* Internet Explorer */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
transform: rotate(0deg);
}
.highcharts-bindings-wrapper .highcharts-arrow-left {
/* Safari */
-webkit-transform: rotate(180deg);
/* Firefox */
-moz-transform: rotate(180deg);
/* IE */
-ms-transform: rotate(180deg);
/* Opera */
-o-transform: rotate(180deg);
/* Internet Explorer */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
transform: rotate(180deg);
}
.highcharts-bindings-wrapper ul {
width: 40px;
/* 30px spacing for arrows to scroll */
margin: 0px;
padding: 0px;
float: left;
transition: margin 250ms;
}
.highcharts-bindings-wrapper > ul {
width: 40px;
position: relative;
}
.highcharts-bindings-wrapper .highcharts-stocktools-toolbar li {
list-style: none;
margin-bottom: 3px;
padding: 0px;
clear: both;
width: 100%;
height: 40px;
cursor: pointer;
position: relative;
background-color: #f7f7f7;
}
.highcharts-bindings-wrapper .highcharts-stocktools-toolbar li.highcharts-disabled-btn {
cursor: default;
}
.highcharts-bindings-wrapper .highcharts-stocktools-toolbar li.highcharts-disabled-btn > .highcharts-menu-item-btn {
opacity: 0.5;
}
.highcharts-bindings-wrapper .highcharts-stocktools-toolbar li.highcharts-disabled-btn.highcharts-active {
background: #f7f7f7;
}
.highcharts-bindings-wrapper .highcharts-stocktools-toolbar li.highcharts-disabled-btn .highcharts-menu-item-btn:hover {
background-color: transparent;
}
.highcharts-bindings-wrapper li > span.highcharts-menu-item-btn {
display: block;
float: left;
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-position: 50% 50%;
background-size: 32px 32px;
}
.highcharts-submenu-wrapper li > span.highcharts-menu-item-btn {
width: 40px;
}
.highcharts-bindings-wrapper li > span.highcharts-submenu-item-arrow {
float: left;
width: 10px;
height: 100%;
cursor: pointer;
position: absolute;
bottom: 0px;
right: 0px;
}
.highcharts-bindings-wrapper li.highcharts-separator {
height: 15px;
background-color: transparent;
width: 36px;
pointer-events: none;
}
.highcharts-bindings-wrapper li.highcharts-separator > span.highcharts-menu-item-btn {
width: 100%;
}
.highcharts-bindings-wrapper li.highcharts-active > span.highcharts-menu-item-btn,
.highcharts-bindings-wrapper li > span.highcharts-menu-item-btn:hover,
.highcharts-bindings-wrapper .highcharts-arrow-wrapper > div:hover,
.highcharts-bindings-wrapper li.highcharts-active,
.highcharts-toggle-toolbar:hover {
background-color: #e6ebf5;
transition: background-color 100ms;
}
.highcharts-toggle-toolbar {
position: absolute;
cursor: pointer;
width: 10px;
height: 10px;
background-color: #f7f7f7;
background-size: cover;
}
.highcharts-hide {
display: none;
}
.highcharts-bindings-wrapper li:hover, .highcharts-submenu-item-arrow:hover {
background-color: #e6ebf5;
}
.highcharts-bindings-wrapper .highcharts-arrow-down, .highcharts-bindings-wrapper .highcharts-arrow-up {
width: 50%;
height: 20px;
float: left;
}
li.highcharts-disabled-btn:hover, .highcharts-disabled-btn .highcharts-submenu-item-arrow:hover {
background-color: #f7f7f7;
}

View File

@ -0,0 +1,271 @@
// Colors for buttons.
$button-background-color: #f7f7f7;
$button-hover-color: #e6ebf5;
.chart:-webkit-full-screen {
width: 100%;
height: 100%;
}
.chart:-moz-full-screen {
width: 100%;
height: 100%;
}
.chart:-ms-fullscreen {
width: 100%;
height: 100%;
}
.chart:fullscreen {
width: 100%;
height: 100%;
}
.chart {
width: 100%;
float: left;
height: 400px;
position: relative;
}
.highcharts-draw-mode { cursor: crosshair; }
.highcharts-bindings-wrapper * {
box-sizing: content-box;
}
.highcharts-bindings-wrapper {
display: block;
width: 40px;
height: 100%;
position: absolute;
z-index: 10;
top: 0px;
}
.highcharts-stocktools-popup {
width: 100%;
}
.highcharts-menu-wrapper {
float: left;
width: 40px;
height: calc(100% - 50px);
overflow: hidden;
position: absolute;
left: 0px;
top: 0px;
padding: 10px;
}
.highcharts-bindings-wrapper .highcharts-submenu-wrapper {
display: none;
position: absolute;
z-index: 10;
left: 0px;
top: 0px;
background: #fff;
width: 40px;
}
.highcharts-bindings-wrapper .highcharts-arrow-wrapper {
text-align: center;
width: 40px;
position: absolute;
left: 10px;
bottom: 10px;
font-size: 1.5em;
}
.highcharts-bindings-wrapper .highcharts-arrow-wrapper > div {
cursor: pointer;
}
.highcharts-bindings-wrapper .highcharts-arrow-down {
background-size: cover;
/* Safari */
-webkit-transform: rotate(90deg);
/* Firefox */
-moz-transform: rotate(90deg);
/* IE */
-ms-transform: rotate(90deg);
/* Opera */
-o-transform: rotate(90deg);
/* Internet Explorer */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
transform: rotate(90deg);
}
.highcharts-bindings-wrapper .highcharts-arrow-up {
background-size: cover;
outline: none;
display: inline-block;
width: 25px;
cursor: pointer;
-webkit-user-select: none;
/* Chrome/Safari */
-moz-user-select: none;
/* Firefox */
-ms-user-select: none;
/* IE10+ */
/* Rules below not implemented in browsers yet */
-o-user-select: none;
user-select: none;
/* Safari */
-webkit-transform: rotate(-90deg);
/* Firefox */
-moz-transform: rotate(-90deg);
/* IE */
-ms-transform: rotate(-90deg);
/* Opera */
-o-transform: rotate(-90deg);
/* Internet Explorer */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
transform: rotate(-90deg);
}
.highcharts-bindings-wrapper .highcharts-arrow-right {
background-repeat: no-repeat;
background-position: right bottom;
background-size: contain;
}
.highcharts-bindings-wrapper .highcharts-arrow-left.highcharts-arrow-right {
/* Safari */
-webkit-transform: rotate(0deg);
/* Firefox */
-moz-transform: rotate(0deg);
/* IE */
-ms-transform: rotate(0deg);
/* Opera */
-o-transform: rotate(0deg);
/* Internet Explorer */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
transform: rotate(0deg);
}
.highcharts-bindings-wrapper .highcharts-arrow-left {
/* Safari */
-webkit-transform: rotate(180deg);
/* Firefox */
-moz-transform: rotate(180deg);
/* IE */
-ms-transform: rotate(180deg);
/* Opera */
-o-transform: rotate(180deg);
/* Internet Explorer */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
transform: rotate(180deg);
}
.highcharts-bindings-wrapper ul {
width: 40px;
/* 30px spacing for arrows to scroll */
margin: 0px;
padding: 0px;
float: left;
transition: margin 250ms;
}
.highcharts-bindings-wrapper>ul {
width: 40px;
position: relative;
}
.highcharts-bindings-wrapper .highcharts-stocktools-toolbar li {
list-style: none;
margin-bottom: 3px;
padding: 0px;
clear: both;
width: 100%;
height: 40px;
cursor: pointer;
position: relative;
background-color: $button-background-color;
}
.highcharts-bindings-wrapper .highcharts-stocktools-toolbar li.highcharts-disabled-btn {
cursor: default;
}
.highcharts-bindings-wrapper .highcharts-stocktools-toolbar li.highcharts-disabled-btn > .highcharts-menu-item-btn {
opacity: 0.5;
}
.highcharts-bindings-wrapper .highcharts-stocktools-toolbar li.highcharts-disabled-btn.highcharts-active {
background: $button-background-color;
}
.highcharts-bindings-wrapper .highcharts-stocktools-toolbar li.highcharts-disabled-btn .highcharts-menu-item-btn:hover {
background-color: transparent;
}
.highcharts-bindings-wrapper li>span.highcharts-menu-item-btn {
display: block;
float: left;
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-position: 50% 50%;
background-size: 32px 32px;
}
.highcharts-submenu-wrapper li>span.highcharts-menu-item-btn {
width: 40px;
}
.highcharts-bindings-wrapper li>span.highcharts-submenu-item-arrow {
float: left;
width: 10px;
height: 100%;
cursor: pointer;
position: absolute;
bottom: 0px;
right: 0px;
}
.highcharts-bindings-wrapper li.highcharts-separator {
height: 15px;
background-color: transparent;
width: 36px;
pointer-events: none;
}
.highcharts-bindings-wrapper li.highcharts-separator>span.highcharts-menu-item-btn {
width: 100%;
}
.highcharts-bindings-wrapper li.highcharts-active>span.highcharts-menu-item-btn,
.highcharts-bindings-wrapper li>span.highcharts-menu-item-btn:hover,
.highcharts-bindings-wrapper .highcharts-arrow-wrapper > div:hover,
.highcharts-bindings-wrapper li.highcharts-active,
.highcharts-toggle-toolbar:hover {
background-color: $button-hover-color;
transition: background-color 100ms;
}
.highcharts-toggle-toolbar {
position: absolute;
cursor: pointer;
width: 10px;
height: 10px;
background-color: $button-background-color;
background-size: cover;
}
.highcharts-hide {
display: none;
}
.highcharts-bindings-wrapper li:hover, .highcharts-submenu-item-arrow:hover {
background-color: $button-hover-color;
}
.highcharts-bindings-wrapper .highcharts-arrow-down, .highcharts-bindings-wrapper .highcharts-arrow-up {
width: 50%;
height: 20px;
float: left;
}
li.highcharts-disabled-btn:hover, .highcharts-disabled-btn .highcharts-submenu-item-arrow:hover {
background-color: $button-background-color;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,122 @@
// Global font
@import 'https://fonts.googleapis.com/css?family=Unica+One';
// Chart background, point stroke for markers and columns etc
$background-color: #2a2a2b;
// Colors for data series and points.
$colors: #2b908f #90ee7e #f45b5b #7798BF #aaeeee #ff0066 #eeaaee #55BF3B #DF5353 #7798BF #aaeeee;
// Neutral colors
$neutral-color-100: #fff;
$neutral-color-80: #E0E0E3;
$neutral-color-60: #E0E0E3;
$neutral-color-40: #666;
$neutral-color-20: #606063;
$neutral-color-10: #707073;
$neutral-color-5: #505053;
// Colored, shades
$highlight-color-100: #F0F0F3;
$highlight-color-60: rgba(255,255,255,0.1);
$highlight-color-20: $neutral-color-10;
// Data-labels
$data-label-color: #B0B0B3;
// Fonts
$font-family: 'Unica One', Arial, Helvetica, sans-serif;
$title-font-size: 20px;
// Tooltip
$tooltip-background: rgba(0, 0, 0, 0.85);
// Range-selector
$range-selector-input-text: silver;
$range-selector-input-border: $neutral-color-5;
// Buttons
$highcharts-button-background: $neutral-color-5;
$highcharts-button-text: #ccc;
$highcharts-button-pressed-background: #000003;
$highcharts-button-pressed-text: $neutral-color-100;
$highcharts-button-hover-background: $neutral-color-10;
$highcharts-button-hover-text: $neutral-color-100;
$context-button-background: $neutral-color-5;
// Navigator
$navigator-series-fill: #7798BF;
$navigator-series-border: #A6C7ED;
// Navigator
$scrollbar-track-background: #404043;
$scrollbar-track-border: #404043;
// Titles
.highcharts-title, .highcharts-subtitle {
text-transform: uppercase;
}
// Tooltip
.highcharts-tooltip text {
fill: #F0F0F0
}
// Range-selector
.highcharts-range-selector-buttons text {
fill: silver;
}
// Axes
.highcharts-yaxis-grid {
stroke-width: 1px;
}
.highcharts-axis-labels, .highcharts-axis-title {
fill: #E0E0E3;
}
// Navigator
.highcharts-navigator .highcharts-navigator-handle {
fill: $neutral-color-40;
stroke: #aaa;
}
.highcharts-navigator .highcharts-navigator-outline {
stroke: #CCC;
}
.highcharts-navigator .highcharts-navigator-xaxis .highcharts-grid-line {
stroke: $neutral-color-5;
}
// Scrollbar
.highcharts-scrollbar .highcharts-scrollbar-rifles {
stroke: $neutral-color-100;
}
.highcharts-scrollbar .highcharts-scrollbar-button {
stroke: #606063;
fill: #606063;
}
.highcharts-scrollbar .highcharts-scrollbar-arrow {
fill: #CCC;
}
.highcharts-scrollbar .highcharts-scrollbar-thumb {
fill: #808083;
stroke: #808083;
}
// Navigation
.highcharts-contextbutton .highcharts-button-symbol {
stroke: #DDDDDD;
}
@import '../highcharts';

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,33 @@
// Global font
@import 'https://fonts.googleapis.com/css?family=Dosis:400,600';
// Colors for data series and points.
$colors: #7cb5ec #f7a35c #90ee7e #7798BF #aaeeee #ff0066 #eeaaee #55BF3B #DF5353 #7798BF #aaeeee;
// Neutral colors
$neutral-color-100: #404048;
$neutral-color-80: #000;
// Fonts
$font-family: 'Dosis', Arial, Helvetica, sans-serif;
$title-font-size: 16px;
$legend-font-size: 13px;
$axis-labels-font-size: 12px;
// Tooltip
$tooltip-border: 0px;
$tooltip-background: rgba(219,219,216,0.8);
// Axes
$xaxis-grid-line: 1px !default;
// Title
.highcharts-title, .highcharts-subtitle, .highcharts-yaxis .highcharts-axis-title {
text-transform: uppercase;
}
.highcharts-title {
font-weight: bold;
}
@import '../highcharts';

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,74 @@
// Global font
@import 'https://fonts.googleapis.com/css?family=Signika:400,700';
// Chart background, point stroke for markers and columns etc
$background-color: none;
// Colors for data series and points.
$colors: #f45b5b #8085e9 #8d4654 #7798BF #aaeeee #ff0066 #eeaaee #55BF3B #DF5353 #7798BF #aaeeee;
// Neutral colors
$neutral-color-100: #fff;
$neutral-color-80: #000;
// Data-labels
$data-label-color: #000;
// Fonts
$font-family: 'Signika', Arial, Helvetica, sans-serif;
$title-font-size: 16px;
$legend-font-size: 13px;
$axis-labels-font-size: 12px;
// Tooltip
$tooltip-border: 0px;
$tooltip-background: $neutral-color-100;
// Buttons
$highcharts-button-background: $neutral-color-100;
$highcharts-button-border: #C0C0C8;
$highcharts-button-text: #000;
$highcharts-button-pressed-background: #D0D0D8;
$highcharts-button-pressed-text: #000;
$context-button-background: $neutral-color-100;
// Navigator
$navigator-series-fill: #f45b5b;
$navigator-series-border: #f45b5b;
// Scrollbar
$scrollbar-track-border: #C0C0C8;
// General
.highcharts-container {
background: url(https://www.highcharts.com/samples/graphics/sand.png);
}
// Boxplot
.highcharts-boxplot-box {
fill: #505053;
}
// Navigator
.highcharts-navigator-xaxis .highcharts-grid-line {
stroke: #D0D0D8;
}
// Scrollbar
.highcharts-scrollbar-track {
stroke: #C0C0C8;
}
// Title
.highcharts-title {
font-weight: bold;
}
// Buttons
.highcharts-button-box {
stroke-width: 1px;
}
@import '../highcharts';

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<g>
<path fill="#4B4B4D" d="M16.001,20.25c-2.344,0-4.25-1.906-4.25-4.25c0-2.343,1.906-4.25,4.25-4.25s4.25,1.907,4.25,4.25
C20.251,18.344,18.345,20.25,16.001,20.25z M16.001,13.25c-1.517,0-2.75,1.233-2.75,2.75s1.233,2.75,2.75,2.75
s2.75-1.233,2.75-2.75S17.518,13.25,16.001,13.25z"/>
</g>
<g>
<path fill="#4B4B4D" d="M16.001,23.238L16.001,23.238c-2.729-0.001-5.302-1.062-7.246-2.988L4.465,16l4.29-4.25
c1.945-1.926,4.519-2.987,7.246-2.987c2.729,0,5.302,1.061,7.246,2.987L27.537,16l-4.29,4.25
C21.302,22.177,18.729,23.238,16.001,23.238z M6.454,16l3.357,3.186c1.661,1.646,3.859,2.553,6.189,2.553s4.528-0.907,6.19-2.553
L25.548,16l-3.357-3.186c-1.661-1.646-3.859-2.553-6.189-2.553s-4.528,0.907-6.19,2.553L6.454,16z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<path fill="#4B4B4D" d="M11.751,16c0,0.427,0.082,0.831,0.2,1.22l1.309-1.31c0.048-1.443,1.208-2.604,2.652-2.651l1.309-1.309
c-0.389-0.118-0.793-0.2-1.22-0.2C13.657,11.75,11.751,13.656,11.751,16z"/>
<path fill="#4B4B4D" d="M16.087,18.741l-1.308,1.308c0.389,0.119,0.794,0.201,1.222,0.201c2.344,0,4.25-1.906,4.25-4.25
c0-0.428-0.083-0.832-0.2-1.223l-1.309,1.309C18.696,17.533,17.533,18.695,16.087,18.741z"/>
<path fill="#4B4B4D" d="M23.247,11.75c-0.028-0.028-0.06-0.052-0.089-0.08l-1.061,1.062c0.029,0.029,0.062,0.054,0.093,0.083
L25.548,16l-3.356,3.186c-1.662,1.646-3.86,2.553-6.19,2.553c-0.872,0-1.725-0.128-2.538-0.373l-1.174,1.174
c1.17,0.453,2.422,0.698,3.712,0.699c2.728,0,5.301-1.062,7.246-2.988l4.29-4.25L23.247,11.75z"/>
<path fill="#4B4B4D" d="M8.842,20.328l1.062-1.061c-0.03-0.029-0.062-0.053-0.092-0.082L6.454,16l3.356-3.185
c1.662-1.646,3.86-2.553,6.19-2.553c0.87,0,1.724,0.127,2.536,0.372l1.174-1.174c-1.17-0.453-2.421-0.698-3.71-0.698
c-2.728,0-5.301,1.061-7.246,2.987L4.465,16l4.29,4.25C8.783,20.278,8.813,20.301,8.842,20.328z"/>
<rect x="3.272" y="15.25" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -6.6276 15.9997)" fill="#4B4B4D" width="25.456" height="1.501"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<polygon fill="#4B4B4D" transform="rotate(45,15,15)" points="12.78,25.03 11.72,23.97 19.689,16 11.72,8.03 12.78,6.97 21.811,16 "/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 586 B

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<polygon fill="#4B4B4D" points="19.22,25.03 10.189,16 19.22,6.97 20.28,8.03 12.311,16 20.28,23.97 "/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 557 B

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<path fill="#4B4B4D" d="M26.679,8.25L28,4l-4.25,1.321l0.934,0.935l-3.502,3.502c-0.212-0.083-0.44-0.133-0.682-0.133
c-1.035,0-1.875,0.84-1.875,1.875c0,0.241,0.05,0.47,0.133,0.682l-7.576,7.576c-0.212-0.083-0.44-0.133-0.682-0.133
c-1.035,0-1.875,0.84-1.875,1.875c0,0.241,0.05,0.47,0.133,0.682L4.97,25.97L6.03,27.03l3.788-3.788
c0.212,0.083,0.44,0.133,0.682,0.133c1.035,0,1.875-0.84,1.875-1.875c0-0.241-0.05-0.47-0.133-0.682l7.576-7.576
c0.212,0.083,0.44,0.133,0.682,0.133c1.035,0,1.875-0.84,1.875-1.875c0-0.241-0.05-0.47-0.133-0.682l3.502-3.502L26.679,8.25z"/>
</svg>

After

Width:  |  Height:  |  Size: 1006 B

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<path fill="#4B4B4D" d="M25.429,9.5L27,5l-4.5,1.571l0.934,0.935l-5.252,5.252c-0.212-0.083-0.44-0.133-0.682-0.133
c-1.035,0-1.875,0.84-1.875,1.875c0,0.241,0.05,0.47,0.133,0.682l-7.576,7.576c-0.212-0.083-0.44-0.133-0.682-0.133
c-1.035,0-1.875,0.84-1.875,1.875s0.84,1.875,1.875,1.875s1.875-0.84,1.875-1.875c0-0.241-0.05-0.47-0.133-0.682l7.576-7.576
c0.212,0.083,0.44,0.133,0.682,0.133c1.035,0,1.875-0.84,1.875-1.875c0-0.241-0.05-0.47-0.133-0.682l5.252-5.252L25.429,9.5z"/>
</svg>

After

Width:  |  Height:  |  Size: 917 B

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<polygon fill="#4B4B4D" points="12.78,25.03 11.72,23.97 19.689,16 11.72,8.03 12.78,6.97 21.811,16 "/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 557 B

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<circle fill="#4B4B4D" cx="24.5" cy="7.5" r="1.875"/>
<path fill="#4B4B4D" d="M19.684,11.256L8.182,22.758c-0.212-0.083-0.44-0.133-0.682-0.133c-1.035,0-1.875,0.84-1.875,1.875
s0.84,1.875,1.875,1.875s1.875-0.84,1.875-1.875c0-0.241-0.05-0.47-0.133-0.682l11.502-11.502l0.935,0.934L23,9l-4.25,1.321
L19.684,11.256z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 673 B

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 60 60" style="enable-background:new 0 0 60 60;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;stroke:#666666;stroke-width:5;stroke-miterlimit:10;}
</style>
<g>
<polyline class="st0" points="49,26 49,11 34,11 "/>
<line class="st0" x1="20" y1="40.7" x2="49" y2="11"/>
<circle class="st0" cx="17" cy="44" r="5"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 617 B

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<path fill="#4B4B4D" d="M26.249,15.999c0.001-2.737-1.065-5.312-3.002-7.248C21.312,6.815,18.737,5.749,16,5.75
c-2.738,0-5.312,1.065-7.248,3.002C6.816,10.688,5.75,13.262,5.75,16c0,2.736,1.065,5.312,3.002,7.248
c1.937,1.935,4.511,3.001,7.249,3.001c1.993,0,3.898-0.572,5.536-1.628c0.864,0.73,2.154,0.697,2.968-0.116
c0.815-0.815,0.849-2.104,0.117-2.97C25.678,19.897,26.25,17.993,26.249,15.999z M9.813,22.186C8.16,20.533,7.25,18.336,7.25,16
c-0.001-2.337,0.909-4.534,2.562-6.188c1.652-1.652,3.851-2.563,6.188-2.563c2.336,0,4.533,0.91,6.186,2.563
c1.653,1.653,2.563,3.85,2.564,6.187c-0.001,1.727-0.501,3.376-1.427,4.787c-0.682-0.115-1.406,0.084-1.931,0.609
s-0.726,1.249-0.608,1.929c-1.41,0.926-3.059,1.426-4.784,1.426C13.663,24.749,11.466,23.839,9.813,22.186z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<polygon fill="#4B4B4D" points="24.308,8.756 23.248,7.695 16.002,14.941 8.757,7.695 7.695,8.754 14.941,16.001 7.696,23.246
8.755,24.308 16.002,17.061 23.247,24.307 24.308,23.248 17.062,16.001 "/>
</svg>

After

Width:  |  Height:  |  Size: 641 B

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<g>
<path fill="#4B4B4D" d="M5.048,22.258c-0.234,0-0.464-0.109-0.61-0.312c-0.241-0.338-0.164-0.806,0.173-1.047l14.468-10.37
l7.497,7.447c0.294,0.292,0.296,0.767,0.004,1.061c-0.292,0.296-0.767,0.294-1.061,0.004l-6.597-6.553l-13.438,9.63
C5.352,22.213,5.199,22.258,5.048,22.258z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 748 B

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<path fill="#4B4B4D" d="M27.53,14.03c0.293-0.293,0.293-0.768,0-1.061l-5.064-5.064l-7.5,8.5L10.461,11.9l-7.027,8.109
c-0.271,0.313-0.238,0.786,0.075,1.058C3.65,21.189,3.825,21.25,4,21.25c0.21,0,0.419-0.088,0.566-0.259l5.973-6.891l4.495,4.495
l7.5-8.5l3.936,3.936C26.763,14.323,27.237,14.323,27.53,14.03z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 764 B

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<g opacity="0.5">
<polygon fill="#4B4B4D" points="12.509,22.893 12.509,17.428 11.409,17.428 9.651,18.718 10.229,19.507 11.363,18.628
11.363,22.893 "/>
<path fill="#4B4B4D" d="M17.962,19.832c-0.341-0.326-0.759-0.492-1.242-0.492c-0.141,0-0.264,0.02-0.365,0.058l-0.276,0.104
l0.181-0.289l1.281-1.784h-1.375l-1.339,1.996c-0.408,0.61-0.615,1.182-0.615,1.696c0,0.583,0.198,1.038,0.606,1.393
c0.405,0.353,0.919,0.532,1.526,0.532c0.606,0,1.12-0.181,1.526-0.536c0.401-0.352,0.605-0.829,0.605-1.421
C18.476,20.573,18.308,20.162,17.962,19.832z M17.055,21.843c-0.184,0.187-0.423,0.281-0.711,0.281s-0.527-0.098-0.713-0.29
c-0.183-0.192-0.274-0.43-0.274-0.706c0-0.287,0.094-0.527,0.281-0.714c0.187-0.188,0.427-0.281,0.714-0.281
c0.289,0,0.526,0.095,0.708,0.282c0.181,0.186,0.271,0.423,0.271,0.705C17.331,21.413,17.238,21.655,17.055,21.843z"/>
<path fill="#4B4B4D" d="M20.639,21.805c-0.141-0.135-0.302-0.201-0.495-0.201c-0.198,0-0.364,0.067-0.507,0.205
c-0.141,0.136-0.21,0.295-0.21,0.487c0,0.191,0.068,0.349,0.209,0.479c0.143,0.133,0.309,0.197,0.508,0.197
c0.193,0,0.354-0.066,0.495-0.201c0.138-0.133,0.205-0.291,0.205-0.483S20.776,21.938,20.639,21.805z"/>
<path fill="#4B4B4D" d="M22.962,19.063c0.04-0.23,0.13-0.423,0.268-0.574c0.164-0.179,0.372-0.269,0.618-0.269
c0.24,0,0.436,0.072,0.583,0.216c0.146,0.145,0.221,0.334,0.221,0.563c0,0.316-0.166,0.634-0.495,0.944l-2.177,1.972v0.977h3.896
v-0.969h-2.475l1.508-1.342c0.317-0.282,0.561-0.55,0.723-0.797c0.156-0.238,0.236-0.532,0.236-0.873
c0-0.531-0.184-0.927-0.56-1.208c-0.381-0.284-0.849-0.429-1.389-0.429c-0.539,0-1.008,0.158-1.394,0.471
c-0.358,0.29-0.578,0.683-0.654,1.168L22.962,19.063z"/>
</g>
<path opacity="0.5" fill="#4B4B4D" d="M17.486,12.742c-0.809,0.626-1.691,1.131-2.631,1.5H27.75v11.5H8.25v-3.061l-2.939-2.689
l2.939-2.689l0.001-2.122l-4.812,4.812l3.311,3.311v3.939h22.5v-14.5H17.486z"/>
<g>
<path fill="#4B4B4D" d="M17.121,10.432c-1.659,1.659-3.865,2.573-6.211,2.573l0,0c-0.723,0-1.43-0.097-2.113-0.266l1.096-1.097
c0.335,0.046,0.675,0.077,1.018,0.077c2.003,0,3.885-0.781,5.302-2.196c0.25-0.25,0.638-0.691,0.922-1.018
c-0.284-0.327-0.672-0.769-0.922-1.018c-0.368-0.368-0.769-0.691-1.194-0.972l0.922-0.921c0.417,0.292,0.814,0.616,1.182,0.983
c0.467,0.467,1.313,1.469,1.351,1.512l0.35,0.415l-0.35,0.414C18.435,8.963,17.588,9.964,17.121,10.432z"/>
<path fill="#4B4B4D" d="M3.351,8.091c0.035-0.043,0.882-1.045,1.351-1.512c1.658-1.66,3.864-2.574,6.209-2.574
c0.723,0,1.43,0.098,2.114,0.266l-1.097,1.097c-0.336-0.046-0.674-0.076-1.018-0.076c-2.002,0-3.884,0.779-5.301,2.197
c-0.25,0.249-0.639,0.69-0.922,1.018c0.283,0.326,0.672,0.767,0.922,1.017c0.367,0.367,0.768,0.69,1.192,0.97L5.88,11.414
c-0.415-0.293-0.812-0.616-1.179-0.982C4.232,9.965,3.386,8.963,3.351,8.92L3,8.506L3.351,8.091z"/>
<rect x="2.731" y="7.861" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -2.8175 10.2057)" fill="#4B4B4D" width="16.359" height="1.286"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<g>
<polygon fill="#4B4B4D" points="12.509,22.893 12.509,17.428 11.409,17.428 9.651,18.718 10.229,19.507 11.363,18.628
11.363,22.893 "/>
<path fill="#4B4B4D" d="M17.962,19.832c-0.341-0.326-0.759-0.492-1.242-0.492c-0.141,0-0.264,0.02-0.365,0.058l-0.276,0.104
l0.181-0.289l1.281-1.784h-1.375l-1.339,1.996c-0.408,0.61-0.615,1.182-0.615,1.696c0,0.583,0.198,1.038,0.606,1.393
c0.405,0.353,0.919,0.532,1.526,0.532c0.606,0,1.12-0.181,1.526-0.536c0.401-0.352,0.605-0.829,0.605-1.421
C18.476,20.573,18.308,20.162,17.962,19.832z M17.055,21.843c-0.184,0.187-0.423,0.281-0.711,0.281s-0.527-0.098-0.713-0.29
c-0.183-0.192-0.274-0.43-0.274-0.706c0-0.287,0.094-0.527,0.281-0.714c0.187-0.188,0.427-0.281,0.714-0.281
c0.289,0,0.526,0.095,0.708,0.282c0.181,0.186,0.271,0.423,0.271,0.705C17.331,21.413,17.238,21.655,17.055,21.843z"/>
<path fill="#4B4B4D" d="M20.639,21.805c-0.141-0.135-0.302-0.201-0.495-0.201c-0.198,0-0.364,0.067-0.507,0.205
c-0.141,0.136-0.21,0.295-0.21,0.487c0,0.191,0.068,0.349,0.209,0.479c0.143,0.133,0.309,0.197,0.508,0.197
c0.193,0,0.354-0.066,0.495-0.201c0.138-0.133,0.205-0.291,0.205-0.483S20.776,21.938,20.639,21.805z"/>
<path fill="#4B4B4D" d="M22.962,19.063c0.04-0.23,0.13-0.423,0.268-0.574c0.164-0.179,0.372-0.269,0.618-0.269
c0.24,0,0.436,0.072,0.583,0.216c0.146,0.145,0.221,0.334,0.221,0.563c0,0.316-0.166,0.634-0.495,0.944l-2.177,1.972v0.977h3.896
v-0.969h-2.475l1.508-1.342c0.317-0.282,0.561-0.55,0.723-0.797c0.156-0.238,0.236-0.532,0.236-0.873
c0-0.531-0.184-0.927-0.56-1.208c-0.381-0.284-0.849-0.429-1.389-0.429c-0.539,0-1.008,0.158-1.394,0.471
c-0.358,0.29-0.578,0.683-0.654,1.168L22.962,19.063z"/>
</g>
<path fill="#4B4B4D" d="M17.486,12.742c-0.809,0.626-1.691,1.131-2.631,1.5H27.75v11.5H8.25v-3.061l-2.939-2.689l2.939-2.689V14.65
c-0.512-0.131-1.015-0.287-1.5-0.489v2.521l-3.311,3.311l3.311,3.311v3.939h22.5v-14.5H17.486z"/>
<g>
<path fill="#4B4B4D" d="M10.911,10.741c-1.24,0-2.249-1.009-2.249-2.249s1.009-2.249,2.249-2.249s2.249,1.009,2.249,2.249
S12.151,10.741,10.911,10.741z M10.911,7.528c-0.532,0-0.964,0.432-0.964,0.964c0,0.531,0.432,0.964,0.964,0.964
c0.531,0,0.964-0.433,0.964-0.964C11.875,7.96,11.442,7.528,10.911,7.528z"/>
</g>
<g>
<path fill="#4B4B4D" d="M10.911,12.992L10.911,12.992c-2.346,0-4.553-0.915-6.211-2.573C4.233,9.951,3.387,8.949,3.35,8.906
L3,8.492l0.35-0.415C3.387,8.034,4.233,7.033,4.7,6.565c1.658-1.66,3.865-2.573,6.211-2.573c2.345,0,4.551,0.913,6.209,2.573
c0.469,0.468,1.315,1.469,1.351,1.512l0.351,0.415l-0.351,0.414c-0.035,0.043-0.882,1.045-1.351,1.513
C15.462,12.077,13.256,12.992,10.911,12.992z M4.687,8.492C4.972,8.818,5.36,9.261,5.608,9.51c1.417,1.416,3.3,2.196,5.303,2.196
c2.001,0,3.885-0.78,5.302-2.197c0.249-0.25,0.638-0.69,0.921-1.017c-0.283-0.327-0.672-0.769-0.921-1.018
c-1.417-1.418-3.301-2.197-5.302-2.197c-2.003,0-3.886,0.779-5.303,2.197C5.36,7.724,4.972,8.165,4.687,8.492z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<rect x="12.75" y="14" fill="#4B4B4D" width="1.5" height="10"/>
<rect x="17.75" y="14" fill="#4B4B4D" width="1.5" height="10"/>
<path fill="#4B4B4D" d="M25.25,10.5c0-1.517-1.233-2.75-2.75-2.75h-3.25V7c0-1.24-1.01-2.25-2.25-2.25h-2
c-1.24,0-2.25,1.01-2.25,2.25v0.75H9.5c-1.517,0-2.75,1.233-2.75,2.75v1.751h2V27.25h14.5V12.251h2V10.5z M14.25,7
c0-0.413,0.337-0.75,0.75-0.75h2c0.413,0,0.75,0.337,0.75,0.75v0.75h-3.5V7z M21.75,25.75h-11.5V12.251h11.5V25.75z M23.75,10.751
H8.25V10.5c0-0.689,0.561-1.25,1.25-1.25h13c0.689,0,1.25,0.561,1.25,1.25V10.751z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1013 B

View File

@ -0,0 +1,18 @@
<svg version="1.1" id="drawing" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
<style type="text/css">
.st0{fill:#4B4B4D;}
.st1{fill:none;}
.st2{fill:#1A1A8E;}
</style>
<path class="st0" d="M18.3,8.6c-0.5,0.2-0.8,0.7-0.9,1.2l-1,7.6l0.5,0.3l3.1-4.5c-0.1-0.1-0.2-0.3-0.2-0.5c-0.1-0.7,0.3-1.3,1-1.4
s1.3,0.3,1.4,1s-0.3,1.3-1,1.4c-0.2,0-0.4,0-0.5,0l-3.1,4.5l0.5,0.3l6.7-3.7c0.5-0.3,0.8-0.8,0.8-1.3L26,9.4l-4-2.6L18.3,8.6z
M27.2,5.2L25.4,4c-0.6-0.4-1.3-0.2-1.7,0.3L22.5,6l3.9,2.6L27.5,7C27.9,6.4,27.8,5.7,27.2,5.2C27.2,5.3,27.2,5.2,27.2,5.2z"/>
<rect id="rect" class="st1" width="32.3" height="32.3"/>
<path class="st2" d="M18,23.5c0,0.1,0,0.1-0.1,0.2"/>
<path class="st0" d="M17.1,18.9c-0.8-0.2-3.8-0.2-4,1.6c0,0.9,0.1,1.9,0.5,2.7c0.4,0.7,0.7,0.9,0.7,1.4c0,0.8-0.5,1.5-1.2,1.8
c-0.3,0.2-0.6,0.2-0.9,0.2c-1.2-0.1-1.2,0-1.4,0.1c-1,0.5-0.4,2.7-1.3,3.1c-0.4,0.1-0.7,0-1-0.2c-0.7-0.8-0.1-3.1,1.4-4.1
c0.5-0.4,1.1-0.6,1.7-0.7c0.6,0,0.9,0.1,1-0.1s-0.1-1.1-0.4-2c-0.4-1.1-0.5-2.2-0.4-3.4c0.5-1.9,3.6-1.8,5.2-1.7
C17.6,17.7,17.8,19.1,17.1,18.9z"/>
<rect class="st1" width="32" height="32"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<path fill="#4B4B4D" d="M22.125,3.814L5.817,20.122l-1.818,7.879l7.879-1.818L28.186,9.875L22.125,3.814z M26.064,9.875
l-1.439,1.439l-3.939-3.939l1.439-1.439L26.064,9.875z M10.186,22.875l9.939-9.939l1.439,1.439l-9.939,9.939L10.186,22.875z
M7.686,20.375l9.939-9.939l1.439,1.439l-9.939,9.939L7.686,20.375z M18.686,9.375l0.939-0.939l3.939,3.939l-0.939,0.939
L18.686,9.375z M6.974,21.784l3.242,3.242l-4.215,0.973L6.974,21.784z"/>
</svg>

After

Width:  |  Height:  |  Size: 872 B

View File

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<g>
<path fill="#4B4B4D" d="M5.048,22.258c-0.234,0-0.464-0.109-0.61-0.312c-0.241-0.338-0.164-0.806,0.173-1.047l14.468-10.37
l7.497,7.447c0.294,0.292,0.296,0.767,0.004,1.061c-0.292,0.296-0.767,0.294-1.061,0.004l-6.597-6.553l-13.438,9.63
C5.352,22.213,5.199,22.258,5.048,22.258z"/>
</g>
<g>
<g>
<path fill="#4B4B4D" d="M6.483,24.807c0.35,0.532,0.524,1.266,0.524,2.201s-0.175,1.67-0.524,2.201
C6.134,29.742,5.64,30.008,5,30.008c-0.646,0-1.144-0.266-1.496-0.799c-0.353-0.531-0.527-1.266-0.527-2.201
s0.175-1.669,0.527-2.201C3.856,24.273,4.354,24.008,5,24.008C5.64,24.008,6.134,24.273,6.483,24.807z M5.976,27.693
c0.026-0.221,0.04-0.449,0.04-0.686s-0.014-0.467-0.04-0.689s-0.074-0.455-0.141-0.697c-0.068-0.242-0.173-0.438-0.315-0.585
S5.204,24.814,5,24.814c-0.205,0-0.379,0.074-0.524,0.222c-0.145,0.147-0.252,0.343-0.322,0.585
c-0.069,0.242-0.119,0.475-0.146,0.697s-0.04,0.453-0.04,0.689c0,0.231,0.014,0.459,0.04,0.686
c0.026,0.226,0.076,0.459,0.146,0.697c0.07,0.24,0.178,0.432,0.322,0.576C4.621,29.112,4.795,29.186,5,29.186
c0.204,0,0.377-0.073,0.52-0.219c0.143-0.145,0.247-0.338,0.315-0.58C5.901,28.145,5.949,27.914,5.976,27.693z"/>
<path fill="#4B4B4D" d="M5,30.058c-0.659,0-1.177-0.276-1.538-0.82c-0.355-0.536-0.535-1.286-0.535-2.229
c0-0.942,0.18-1.692,0.535-2.229c0.361-0.544,0.879-0.82,1.538-0.82c0.654,0,1.167,0.276,1.525,0.821
c0.354,0.538,0.532,1.288,0.532,2.229c0,0.941-0.179,1.691-0.532,2.229C6.167,29.781,5.654,30.058,5,30.058z M5,24.058
c-0.633,0-1.108,0.254-1.454,0.776c-0.345,0.52-0.52,1.252-0.52,2.174c0,0.923,0.175,1.654,0.52,2.174
C3.892,29.704,4.367,29.958,5,29.958c0.618,0,1.104-0.261,1.441-0.776c0.343-0.521,0.517-1.252,0.517-2.174
c0-0.921-0.174-1.652-0.517-2.174C6.104,24.318,5.618,24.058,5,24.058z M5,29.235c-0.217,0-0.404-0.078-0.56-0.232
c-0.15-0.151-0.263-0.352-0.335-0.598c-0.072-0.249-0.121-0.485-0.147-0.706c-0.026-0.23-0.04-0.463-0.04-0.691
c0-0.234,0.014-0.469,0.04-0.695c0.026-0.22,0.074-0.451,0.147-0.705c0.072-0.249,0.185-0.453,0.334-0.606
C4.595,24.844,4.783,24.765,5,24.765s0.404,0.079,0.556,0.237c0.146,0.152,0.257,0.355,0.327,0.605
c0.07,0.254,0.116,0.484,0.143,0.705c0.026,0.227,0.04,0.461,0.04,0.695s-0.014,0.468-0.04,0.691
c-0.026,0.219-0.072,0.447-0.143,0.701c-0.07,0.25-0.181,0.453-0.327,0.602C5.403,29.157,5.216,29.235,5,29.235z M5,24.864
c-0.192,0-0.352,0.067-0.488,0.207c-0.139,0.142-0.243,0.331-0.311,0.563c-0.071,0.25-0.118,0.475-0.144,0.689
c-0.026,0.223-0.04,0.453-0.04,0.684c0,0.225,0.014,0.454,0.04,0.68c0.025,0.215,0.073,0.447,0.144,0.689
c0.067,0.23,0.172,0.416,0.31,0.555C4.648,29.068,4.809,29.136,5,29.136s0.35-0.067,0.483-0.204
c0.136-0.137,0.237-0.324,0.304-0.559C5.854,28.125,5.9,27.9,5.926,27.688c0.026-0.221,0.04-0.449,0.04-0.68
s-0.014-0.461-0.04-0.684c-0.025-0.217-0.071-0.441-0.139-0.69C5.721,25.4,5.619,25.211,5.483,25.07
C5.35,24.932,5.191,24.864,5,24.864z"/>
</g>
</g>
<g>
<g>
<path fill="#4B4B4D" d="M24,27.008v-6h2.339c0.508,0,0.942,0.125,1.301,0.373s0.538,0.627,0.538,1.135
c0,0.328-0.093,0.605-0.28,0.831c-0.186,0.226-0.44,0.388-0.762,0.483v0.017c0.39,0.051,0.703,0.201,0.94,0.449
c0.237,0.249,0.355,0.57,0.355,0.966c0,0.311-0.063,0.584-0.19,0.818s-0.301,0.416-0.521,0.547
c-0.22,0.129-0.46,0.226-0.72,0.287c-0.26,0.062-0.54,0.094-0.839,0.094H24z M25.067,21.889v1.561h0.95
c0.355,0,0.627-0.071,0.812-0.213c0.187-0.141,0.279-0.342,0.279-0.602c0-0.266-0.095-0.456-0.287-0.572
c-0.192-0.115-0.491-0.174-0.898-0.174H25.067z M25.067,24.363v1.746h0.958c0.893,0,1.339-0.299,1.339-0.898
c0-0.305-0.104-0.522-0.313-0.652s-0.537-0.195-0.982-0.195H25.067z"/>
</g>
</g>
<g>
<g>
<path fill="#4B4B4D" d="M15.958,9.008l2.61-6h0.924l2.584,6h-1.221l-0.559-1.373h-2.602l-0.542,1.373H15.958z M18.06,6.72h1.864
L19,4.279L18.06,6.72z"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<path fill="#4B4B4D" d="M27.53,14.03c0.293-0.293,0.293-0.768,0-1.061l-5.064-5.064l-7.5,8.5L10.461,11.9l-7.027,8.109
c-0.271,0.313-0.238,0.786,0.075,1.058C3.65,21.189,3.825,21.25,4,21.25c0.21,0,0.419-0.088,0.566-0.259l5.973-6.891l4.495,4.495
l7.5-8.5l3.936,3.936C26.763,14.323,27.237,14.323,27.53,14.03z"/>
<path fill="#4B4B4D" d="M3.999,22.9c-0.569,0-1.017,0.238-1.327,0.709c-0.304,0.459-0.457,1.096-0.457,1.891
c0,0.796,0.153,1.432,0.457,1.891C2.982,27.861,3.43,28.1,3.999,28.1c0.567,0,1.011-0.238,1.319-0.709
c0.301-0.457,0.501-1.094,0.501-1.891s-0.2-1.433-0.501-1.891C5.01,23.139,4.566,22.9,3.999,22.9z M4.692,26.039
c-0.021,0.17-0.058,0.354-0.111,0.543c-0.05,0.178-0.126,0.321-0.229,0.426c-0.098,0.1-0.212,0.146-0.353,0.146
c-0.139,0-0.255-0.048-0.355-0.146c-0.104-0.105-0.183-0.247-0.234-0.424c-0.055-0.186-0.092-0.369-0.113-0.545
c-0.021-0.177-0.032-0.357-0.032-0.539c0-0.186,0.011-0.367,0.032-0.542c0.021-0.174,0.059-0.357,0.113-0.546
c0.052-0.178,0.131-0.322,0.235-0.43c0.101-0.101,0.216-0.15,0.354-0.15c0.14,0,0.255,0.049,0.352,0.15
c0.104,0.106,0.18,0.251,0.229,0.43c0.054,0.188,0.09,0.372,0.111,0.546c0.021,0.175,0.032,0.356,0.032,0.542
S4.714,25.867,4.692,26.039z"/>
<path fill="#4B4B4D" d="M9.522,9.9h1.952l0.448,1.1h1.19l-2.129-4.941L10.959,6h-0.867l-2.116,4.864L7.917,11h1.171L9.522,9.9z
M10.5,7.337l0.639,1.686H9.851L10.5,7.337z"/>
<path fill="#4B4B4D" d="M16.416,22.34c0.151-0.079,0.279-0.182,0.383-0.307c0.163-0.198,0.246-0.443,0.246-0.729
c0-0.438-0.158-0.771-0.473-0.988C16.27,20.106,15.899,20,15.475,20h-1.97v5h1.827c0.248,0,0.482-0.025,0.695-0.078
c0.216-0.051,0.42-0.133,0.604-0.241c0.191-0.112,0.344-0.272,0.453-0.476c0.109-0.201,0.164-0.437,0.164-0.7
c0-0.341-0.104-0.624-0.312-0.841C16.795,22.516,16.62,22.406,16.416,22.34z M14.553,20.9h0.59c0.307,0,0.531,0.042,0.669,0.125
c0.124,0.075,0.185,0.197,0.185,0.375s-0.062,0.311-0.187,0.404c-0.131,0.1-0.33,0.15-0.593,0.15h-0.664V20.9z M15.224,24.086
h-0.671v-1.203h0.705c0.338,0,0.585,0.047,0.736,0.141c0.139,0.086,0.206,0.23,0.206,0.44C16.2,23.617,16.2,24.086,15.224,24.086z"
/>
<path fill="#4B4B4D" d="M22.539,7c0.78,0,1.401-0.282,1.845-0.837l0.062-0.077l-0.808-0.568l-0.055,0.073
c-0.242,0.331-0.582,0.492-1.038,0.492c-0.447,0-0.794-0.144-1.061-0.438c-0.266-0.293-0.4-0.684-0.4-1.159
c0-0.453,0.141-0.834,0.419-1.134c0.276-0.298,0.638-0.449,1.074-0.449c0.186,0,0.37,0.038,0.551,0.113
c0.176,0.073,0.315,0.182,0.416,0.321l0.058,0.079l0.768-0.608l-0.055-0.072c-0.183-0.242-0.438-0.427-0.762-0.552
C23.233,2.062,22.905,2,22.577,2c-0.741,0-1.362,0.229-1.846,0.682C20.245,3.136,20,3.744,20,4.487c0,0.734,0.24,1.343,0.713,1.811
C21.187,6.764,21.801,7,22.539,7z"/>
<path fill="#4B4B4D" d="M29.075,17.328c-0.163-0.338-0.386-0.604-0.66-0.792c-0.271-0.185-0.563-0.321-0.871-0.407
C27.237,16.043,26.908,16,26.567,16h-1.8v5h1.8c0.335,0,0.664-0.05,0.976-0.146c0.314-0.098,0.609-0.246,0.877-0.439
c0.272-0.195,0.493-0.463,0.655-0.792c0.162-0.327,0.243-0.706,0.243-1.122C29.318,18.057,29.237,17.662,29.075,17.328z
M28.103,19.134c-0.069,0.184-0.16,0.331-0.269,0.441c-0.112,0.111-0.248,0.205-0.404,0.279c-0.159,0.075-0.321,0.129-0.482,0.159
c-0.163,0.03-0.336,0.045-0.515,0.045h-0.617v-3.131h0.617c1.194,0,1.776,0.514,1.776,1.573
C28.209,18.736,28.173,18.949,28.103,19.134z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -0,0 +1,11 @@
<svg version="1.1" id="ellipse" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
<style type="text/css">
.st0{fill:#4B4B4D;}
.st1{fill:none;}
</style>
<path class="st0" d="M16.3,7.2C10.1,7.2,5,11.1,5,15.9s5.1,8.7,11.3,8.7s11.3-3.9,11.3-8.7S22.5,7.2,16.3,7.2z M16.3,23.3
c-5.5,0-9.9-3.3-9.9-7.4s4.4-7.4,9.9-7.4s9.9,3.3,9.9,7.4S21.8,23.3,16.3,23.3L16.3,23.3z"/>
<circle class="st0" cx="23.5" cy="22.2" r="2.3"/>
<rect class="st1" width="32" height="32"/>
</svg>

After

Width:  |  Height:  |  Size: 593 B

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="fibonacci-timezone" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px" viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
<style type="text/css">
.st0{fill:#4B4B4D;}
.st1{fill:none;}
</style>
<polyline class="st0" points="5.2,7.3 5.2,5.6 3.6,5.6 3.6,23.3 3.6,24.8 3.6,27.5 5.2,27.5 5.2,8.8 "/>
<polyline class="st0" points="9.6,7.3 9.6,5.6 8,5.6 8,23.3 8,24.8 8,27.5 9.6,27.5 9.6,8.8 "/>
<polyline class="st0" points="11.6,7.3 11.6,5.6 10,5.6 10,23.3 10,24.8 10,27.5 11.6,27.5 11.6,8.8 "/>
<polyline class="st0" points="14.2,7.3 14.2,5.6 12.6,5.6 12.6,23.3 12.6,24.8 12.6,27.5 14.2,27.5 14.2,8.8 "/>
<polyline class="st0" points="19,7.3 19,5.6 17.4,5.6 17.4,23.3 17.4,24.8 17.4,27.5 19,27.5 19,8.8 "/>
<polyline class="st0" points="27.5,7.3 27.5,5.6 25.9,5.6 25.9,23.3 25.9,24.8 25.9,27.5 27.5,27.5 27.5,8.8 "/>
<rect class="st1" width="32" height="32"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<rect x="19.5" y="19.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="24.5" y="19.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="9.5" y="19.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="14.5" y="19.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="4.5" y="19.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="19.5" y="15.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="24.5" y="15.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="9.5" y="15.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="14.5" y="15.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="4.5" y="15.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="19.5" y="10.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="24.5" y="10.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="9.5" y="10.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="14.5" y="10.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="4.5" y="10.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="4" y="4.75" fill="#4B4B4D" width="24" height="1.5"/>
<rect x="4" y="25.75" fill="#4B4B4D" width="24" height="1.5"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<path fill="#4B4B4D" d="M27.25,4.75H15V3h-1.65v22.175c0,0.456,0.369,0.825,0.825,0.825S15,25.631,15,25.175V16.25h12.25L21.5,10.5
L27.25,4.75z M23.689,14.75H15v-8.5h8.689l-4.25,4.25L23.689,14.75z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 653 B

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<path fill="#4B4B4D" d="M27.25,4.75H15V3h-1.65v20.175c0,0.456,0.369,0.825,0.825,0.825S15,23.631,15,23.175V16.25h12.25L21.5,10.5
L27.25,4.75z M23.689,14.75H15v-8.5h8.689l-4.25,4.25L23.689,14.75z"/>
<polygon fill="#4B4B4D" points="17,22.604 21.65,24 14,26.295 6.349,24 11,22.604 11,21.195 1.651,24 14,27.705 26.35,24
17,21.195 "/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 789 B

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<path fill="#4B4B4D" d="M17,20.385v1.506c4.129,0.398,6.25,1.558,6.25,2.109c0,0.673-3.146,2.5-9.25,2.5S4.75,24.673,4.75,24
c0-0.552,2.121-1.711,6.25-2.109v-1.506C6.879,20.757,3.25,21.922,3.25,24c0,2.576,5.572,4,10.75,4s10.75-1.424,10.75-4
C24.75,21.922,21.121,20.757,17,20.385z"/>
<path fill="#4B4B4D" d="M27.25,4.75H15V3h-1.65v20.175c0,0.456,0.369,0.825,0.825,0.825S15,23.631,15,23.175V16.25h12.25L21.5,10.5
L27.25,4.75z M23.689,14.75H15v-8.5h8.689l-4.25,4.25L23.689,14.75z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 938 B

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<polygon fill="#4B4B4D" points="19.29,20.3 17,20.3 17,21.7 18.71,21.7 23.311,26.3 6.133,26.3 8.433,21.7 11,21.7 11,20.3
7.567,20.3 3.867,27.7 26.69,27.7 "/>
<g>
<path fill="#4B4B4D" d="M27.25,4.75H15V3h-1.65v20.175c0,0.456,0.369,0.825,0.825,0.825S15,23.631,15,23.175V16.25h12.25
L21.5,10.5L27.25,4.75z M23.689,14.75H15v-8.5h8.689l-4.25,4.25L23.689,14.75z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 827 B

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<polygon fill="#4B4B4D" points="22.593,21.657 19.297,18.361 18.413,19.244 21.71,22.541 20.465,23.786 24.75,24.75 23.786,20.464
"/>
<polygon fill="#4B4B4D" points="11.535,8.214 7.25,7.25 8.214,11.536 9.459,10.291 12.756,13.588 13.641,12.703 10.343,9.406 "/>
<polygon fill="#4B4B4D" points="19.27,13.613 22.566,10.316 23.786,11.535 24.75,7.25 20.464,8.214 21.684,9.433 18.387,12.729
"/>
<polygon fill="#4B4B4D" points="12.729,18.386 9.432,21.683 8.214,20.465 7.25,24.75 11.536,23.786 10.316,22.567 13.613,19.271
"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 979 B

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<path fill="#4B4B4D" d="M27,14.751H15.143c-0.289-0.663-0.948-1.126-1.718-1.126s-1.429,0.463-1.718,1.126H5v1.5h6.709
c0.289,0.661,0.947,1.124,1.716,1.124s1.427-0.463,1.716-1.124H27V14.751z"/>
</svg>

After

Width:  |  Height:  |  Size: 635 B

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g id="Layer_1">
</g>
<g id="Robocza">
<g>
<g>
<polygon fill="#4B4B4D" points="14.138,14.794 14.697,16.26 21.328,11.074 22.156,12.134 23.723,8.25 19.576,8.834 20.404,9.893
"/>
<polygon fill="#4B4B4D" points="10.841,17.372 3.761,22.909 4.685,24.091 11.401,18.838 "/>
</g>
<g>
<path fill="#4B4B4D" d="M17.075,24.159c-0.11,0-0.221-0.006-0.332-0.019c-1.334-0.154-2.439-1.211-3.113-2.976l-2.215-5.793
c-0.469-1.226-1.177-1.967-1.995-2.087c-0.816-0.111-1.723,0.401-2.511,1.428l-3.842,4.994c-0.254,0.328-0.723,0.39-1.052,0.138
c-0.328-0.253-0.39-0.724-0.138-1.052l3.842-4.994c1.146-1.489,2.541-2.203,3.917-1.997c1.38,0.201,2.509,1.279,3.179,3.035
l2.215,5.793c0.458,1.199,1.146,1.936,1.885,2.021c0.736,0.08,1.576-0.477,2.296-1.54l9.141-13.53
c0.231-0.344,0.697-0.433,1.041-0.201c0.343,0.231,0.434,0.697,0.201,1.041l-9.141,13.53
C19.483,23.386,18.295,24.159,17.075,24.159z"/>
</g>
</g>
</g>
<g id="Baza">
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<path fill="#4B4B4D" d="M3.75,7.749v14.5h7.939L16,26.561l4.31-4.312h7.94v-14.5H3.75z M26.75,20.749h-7.062L16,24.439l-3.689-3.69
H5.25v-11.5h21.5V20.749z"/>
<polygon fill="#4B4B4D" points="9.291,18 10.735,18 10.735,13.251 12.426,13.251 12.426,12.018 7.601,12.018 7.601,13.251
9.291,13.251 "/>
<polygon fill="#4B4B4D" points="14.712,18 15.971,15.888 17.28,18 19.063,18 16.9,14.84 18.793,12.018 17.111,12.018
16.013,13.876 14.897,12.018 13.157,12.018 15.084,14.84 12.988,18 "/>
<polygon fill="#4B4B4D" points="21.265,18 22.709,18 22.709,13.251 24.399,13.251 24.399,12.018 19.574,12.018 19.574,13.251
21.265,13.251 "/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<path fill="#4B4B4D" d="M27.03,6.03L25.97,4.97l-3.788,3.788c-0.212-0.083-0.44-0.133-0.682-0.133c-1.035,0-1.875,0.84-1.875,1.875
c0,0.241,0.05,0.47,0.133,0.682l-8.576,8.576c-0.212-0.083-0.44-0.133-0.682-0.133c-1.035,0-1.875,0.84-1.875,1.875
c0,0.241,0.05,0.47,0.133,0.682L4.97,25.97L6.03,27.03l3.788-3.788c0.212,0.083,0.44,0.133,0.682,0.133
c1.035,0,1.875-0.84,1.875-1.875c0-0.241-0.05-0.47-0.133-0.682l8.576-8.576c0.212,0.083,0.44,0.133,0.682,0.133
c1.035,0,1.875-0.84,1.875-1.875c0-0.241-0.05-0.47-0.133-0.682L27.03,6.03z"/>
</svg>

After

Width:  |  Height:  |  Size: 974 B

View File

@ -0,0 +1,11 @@
<svg version="1.1" id="linear" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
<style type="text/css">
.st0{fill:#4B4B4D;}
.st1{fill:none;}
</style>
<polyline class="st0" points="8.4,7 8.4,5.3 6.8,5.3 6.8,23 6.8,24.5 6.8,27.3 8.4,27.3 8.4,8.5 "/>
<polyline class="st0" points="22.8,10.3 24.1,9 22.9,7.9 10.4,20.5 9.3,21.5 7.4,23.5 8.5,24.6 21.8,11.3 "/>
<polyline class="st0" points="25.2,25.4 26.9,25.4 26.9,23.8 9.2,23.8 7.7,23.8 4.9,23.8 4.9,25.4 23.7,25.4 "/>
<rect class="st1" width="32" height="32"/>
</svg>

After

Width:  |  Height:  |  Size: 647 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><defs><style>.cls-1{fill:#4b4b4d;}.cls-2{fill:none;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_7" data-name="Layer 7"><g id="logarithmic"><polyline class="cls-1" points="8.41 7.01 8.41 5.26 6.81 5.26 6.81 23.01 6.81 24.51 6.81 27.26 8.41 27.26 8.41 8.51"/><polyline class="cls-1" points="25.17 25.37 26.92 25.37 26.92 23.77 9.17 23.77 7.67 23.77 4.92 23.77 4.92 25.37 23.67 25.37"/><path class="cls-1" d="M24.66,12a2.18,2.18,0,0,0-.27-.11,12.35,12.35,0,0,0-16.64,12,9.8,9.8,0,0,0,1.88.14A10.51,10.51,0,0,1,23.77,13.61"/><rect class="cls-2" width="32" height="32"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 663 B

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<g>
<polygon fill="#4B4B4D" points="14.673,21 15.984,19.177 17.287,21 18.808,21 16.766,18.344 18.559,16 17.12,16 16.006,17.553
14.923,16 13.422,16 15.225,18.344 13.193,21 "/>
<rect x="25.75" y="9.014" fill="#4B4B4D" width="1.5" height="2.986"/>
<rect x="25.75" y="24.014" fill="#4B4B4D" width="1.5" height="2.986"/>
<rect x="25.75" y="14.014" fill="#4B4B4D" width="1.5" height="2.986"/>
<rect x="25.75" y="19.014" fill="#4B4B4D" width="1.5" height="2.986"/>
<rect x="4.75" y="9.014" fill="#4B4B4D" width="1.5" height="2.986"/>
<rect x="4.75" y="4.014" fill="#4B4B4D" width="1.5" height="2.986"/>
<rect x="4.75" y="19.014" fill="#4B4B4D" width="1.5" height="2.986"/>
<rect x="4.75" y="14.014" fill="#4B4B4D" width="1.5" height="2.986"/>
<rect x="25.75" y="4" fill="#4B4B4D" width="1.5" height="3"/>
<rect x="4.75" y="24" fill="#4B4B4D" width="1.5" height="2.986"/>
<polygon fill="#4B4B4D" points="24.465,13.5 21,11.5 21,13 11,13 11,11.5 7.535,13.5 11,15.5 11,14 21,14 21,15.5 "/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<g>
<rect x="26.75" y="19" fill="#4B4B4D" width="1.5" height="3"/>
<rect x="26.75" y="14" fill="#4B4B4D" width="1.5" height="3"/>
<rect x="26.75" y="9" fill="#4B4B4D" width="1.5" height="3"/>
<rect x="20" y="25.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="15" y="25.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="10" y="25.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="4.75" y="9.001" fill="#4B4B4D" width="1.5" height="2.999"/>
<rect x="4.75" y="14.001" fill="#4B4B4D" width="1.5" height="2.999"/>
<rect x="4.75" y="19.001" fill="#4B4B4D" width="1.5" height="2.999"/>
<rect x="10" y="3.751" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="15" y="3.751" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="20" y="3.751" fill="#4B4B4D" width="3" height="1.5"/>
</g>
<polygon fill="#4B4B4D" points="25,3.75 25,5.25 26.75,5.25 26.75,7 28.25,7 28.25,3.75 "/>
<polygon fill="#4B4B4D" points="4.75,7 6.25,7 6.25,5.25 8,5.25 8,3.75 4.75,3.75 "/>
<polygon fill="#4B4B4D" points="8,27.25 8,25.75 6.25,25.75 6.25,24 4.75,24 4.75,27.25 "/>
<polygon fill="#4B4B4D" points="28.25,24 26.75,24 26.75,25.75 25,25.75 25,27.25 28.25,27.25 "/>
<polygon fill="#4B4B4D" points="16.5,6.535 14.5,10 16,10 16,21 14.5,21 16.5,24.465 18.5,21 17,21 17,10 18.5,10 "/>
<polygon fill="#4B4B4D" points="25.465,15.5 22,13.5 22,15 11,15 11,13.5 7.535,15.5 11,17.5 11,16 22,16 22,17.5 "/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
<g>
<g>
<rect x="24" y="4.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="19" y="25.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="9" y="4.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="4" y="25.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="19" y="4.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="14" y="4.75" fill="#4B4B4D" width="3" height="1.5"/>
<path fill="#4B4B4D" d="M18.13,19.851c-0.113,0.116-0.297,0.175-0.552,0.175c-0.163,0-0.321-0.024-0.478-0.074l-0.106,1.104
c0.205,0.05,0.425,0.074,0.658,0.074c0.531,0,0.936-0.116,1.216-0.35c0.279-0.234,0.518-0.602,0.716-1.104l2.409-6.187h-1.326
l-1.264,3.703h-0.021l-1.423-3.703h-1.411l2.187,5.094l-0.255,0.647C18.36,19.526,18.243,19.733,18.13,19.851z"/>
<rect x="14" y="25.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="8.995" y="25.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="4" y="4.75" fill="#4B4B4D" width="3" height="1.5"/>
<rect x="24" y="25.75" fill="#4B4B4D" width="3" height="1.5"/>
<polygon fill="#4B4B4D" points="13.5,7.535 11.5,11 13,11 13,21 11.5,21 13.5,24.465 15.5,21 14,21 14,11 15.5,11 "/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,17 @@
<svg version="1.1" id="panning" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
<style type="text/css">
.st0{fill:#4B4B4D;}
.st1{fill:none;}
</style>
<path id="panning-2" class="st0" d="M20.8,10.7v-0.4c0-1.4-1.1-2.6-2.5-2.6c-0.2,0-0.4,0-0.7,0.1C17,6.5,15.5,6,14.3,6.6
c-0.5,0.2-0.9,0.7-1.2,1.2c-1.4-0.3-2.8,0.5-3.1,1.9C9.9,9.8,9.9,10,9.9,10.2v4.9c-0.8-0.3-1.7-0.2-2.4,0.3C6.4,16.3,6.2,17.9,7,19
l4.6,6.5c0.2,0.3,0.6,0.5,1,0.5h8.6c0.6,0,1.1-0.4,1.2-1l1.2-5.1c0.1-0.6,0.2-1.2,0.2-1.8v-5c0-1.4-1.1-2.6-2.5-2.6
C21.1,10.6,21,10.6,20.8,10.7z M21.9,18.3c0,0.5,0,0.9-0.1,1.3l-1.1,4.6h-7.8L8.5,18c-0.6-0.8,0.6-1.6,1.1-0.9l1,1.5
c0.2,0.3,0.6,0.3,0.9,0.1c0.2-0.1,0.3-0.3,0.3-0.5v-8c0-0.4,0.2-0.7,0.6-0.8c0.4,0,0.7,0.2,0.8,0.6c0,0.1,0,0.1,0,0.2v5.9
c0,0.3,0.3,0.6,0.6,0.6c0,0,0,0,0,0H14c0.3,0,0.6-0.3,0.6-0.6c0,0,0,0,0,0V8.9c0-0.4,0.2-0.7,0.6-0.8c0.4,0,0.7,0.2,0.8,0.6
c0,0.1,0,0.1,0,0.2v7.3c0,0.3,0.3,0.6,0.6,0.6c0,0,0,0,0,0H17c0.3,0,0.6-0.3,0.6-0.6c0,0,0,0,0,0v-6c0-0.4,0.2-0.7,0.6-0.8
c0.4,0,0.7,0.2,0.8,0.6c0,0.1,0,0.1,0,0.2v6c0,0.3,0.3,0.6,0.6,0.6c0,0,0,0,0,0h0.3c0.3,0,0.6-0.3,0.6-0.6c0,0,0,0,0,0v-2.9
c0-0.4,0.2-0.7,0.6-0.8c0.4,0,0.7,0.2,0.8,0.6c0,0.1,0,0.1,0,0.2L21.9,18.3L21.9,18.3z"/>
<rect class="st1" width="32" height="32"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

Some files were not shown because too many files have changed in this diff Show More