0

While making the bar graph a horizontal one(JPGraph), am not able to align the axes' titles accordingly..
The titles r not shown parallel to the axes..

Solution PLZZZ..

1
Contributor
1
Reply
2
Views
9 Years
Discussion Span
Last Post by Tess James
0

Here's d Code also..


<?php
include ("jpgraph.php");
include ("jpgraph_bar.php");
$graph = new Graph(900,700,"auto");
$graph->SetScale("textlin");
$datay=array(29,34,67,12,78);

$graph->SetShadow();
$graph->SetMarginColor('white');

$graph->img->SetMargin(40,30,20,40);
$top = 75;
$bottom = 80;
$left = 120;
$right = 20;

$graph->Set90AndMargin($left,$right,$top,$bottom);
$graph->xaxis->SetPos('min');
$graph->xaxis->SetLabelAlign('right','center');

$graph->xaxis-> SetTickLabels( $datax);
$bplot = new BarPlot($datay);
$bplot->SetFillColor('lavender');
$graph->Add($bplot);


$graph->title->Set("Aggregate Result Analysis");
$graph->xaxis->title->Set("Roll No");
$graph->yaxis->title->Set("Aggergate Percentage");

$graph->title->SetFont(FF_ARIAL,FS_BOLD,15);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$graph->Stroke();
?>

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.