<?php ob_start(); date_default_timezone_set('America/New_York'); require_once "lib/presentation.php"; require_once "lib/lib_v2.php"; require_once "lib/ChromePhp.php"; include 'lib/open-flash-chart-2-Lug-Wyrm-Charmer/php-ofc-library/open-flash-chart.php'; UserManagement::InitSession(); if (!isset($_SESSION['User']) || !isset($_GET['i'])) { header("Location: index.php"); die; } UserManagement::SetInactiveLogoutTime(30); $DB = new Database(); $total_data = $DB->trackPortfolio_getData($_SESSION['User']->user_id, $_GET['i']); //$total_data = $DB->trackIndividual_getData($_SESSION['User']->user_id, 21121); $num_data_points = count($total_data); ////ChromePhp::log($num_data_points); $chart = new open_flash_chart(); // x legend properties $amt_stride = 1; $date_stride = 1; if ($num_data_points <= 10) { // <= 10 (can show dates); date_stride = 1; amt_stride = 1; $x_legend = new x_legend('Date (mm/dd/yyyy)'); $x_legend->set_style('{font-size:18px; font-family:Calibri; color:#121212}'); $chart->set_x_legend($x_legend); } else { if ($num_data_points <= 20) { // 10 < n <= 20 (can show mm/yy); date_stride = 1; amt_stride = 1;