Is there any way to specify all the x-axis values for a jpgraph. After so much of research, I found only a way to specify the tick range or min and max values. I have discrete values to be passed for x-axis, such as last 24 hours (3 pm, 4 pm, 5 pm ....2 pm).
Here is the existing code that automatically scales x-axis to 0,1,2..24.
$graph = new Graph(400,200);
$graph->SetScale('textlin');
$graph->SetShadow();
$graph->img->SetMargin(40,30,40,40);
$bplot = new BarPlot($datay);
$graph->Add($bplot);
$txt=new Text($text);
$txt->SetPos(0,20);
$txt->SetColor('darkred');
$txt->SetFont(FF_FONT2,FS_BOLD);
$graph->AddText($txt);
$graph->title->Set($name);
$graph->xaxis->title->Set("Last 24 Hours");
$graph->yaxis->title->Set("Ticket Count");
$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->Stroke();
For quick answer, here is the what I found
$graph->xaxis->SetTickLabels(array(1,2,3,4);