Hi there,
i try to solve a problem i did not reach anything. I use JPGraph to make a graph for exchange market.
I did this graph my it always add end of X axis a number.For example, below graph it adds 60.One hour ago it was 55 .
[ATTACH]4487[/ATTACH]
This is my code,
<?php // content="text/plain; charset=utf-8"
require_once ('jpgraph.php');
require_once ('jpgraph_line.php');
ini_set("display_errors","off");
$getJson = file_get_contents("http://borsa.doviz.com/hisse_grafik_ajax/XU100/hisse/minute/json",false);
$j = json_decode($getJson);
$i = 0;
$datay1 = array();
$datay2 = array();
foreach($j as $result)
{
$datay1[]=$result->KAPANIS;
$arr = explode(" ",$result->TARIH);
$arr2 = explode(":",$arr[1]);
$datay2[]=$arr2[0] . ":" . $arr2[1];
}
// Setup the graph
$graph = new Graph(400,250);
$graph->SetScale('intlin');
$theme_class=new UniversalTheme;
$graph->SetTheme($theme_class);
$graph->img->SetAntiAliasing(false);
$graph->title->Set('Filled Y-grid');
$graph->SetBox(false);
$graph->img->SetAntiAliasing();
$graph->yaxis->HideZeroLabel();
$graph->yaxis->HideLine(false);
$graph->yaxis->HideTicks(false,false);
$graph->xgrid->Show();
$graph->xgrid->SetLineStyle("solid");
$graph->xaxis->SetTickLabels($datay2);
$graph->xgrid->SetColor('#E3E3E3');
// Create the first line
$p1 = new LinePlot($datay1);
$graph->Add($p1);
$p1->SetColor("#6495ED");
$graph->legend->SetFrameWeight(1);
// Output line
$graph->Stroke();
?>
How can i solve this ?