Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Mateus Rios

PHPlot

Recommended Posts

Pessoal estou com um pequeno probleminha no PHPlot:

Preciso que o eyxo y começe em 0.

 

Segue o cód...

CODE
$graph = new PHPlot(600,400);

 

$graph->SetPlotType("bars");

$graph->SetDataType( "text-data");

$graph->SetShading(0);

 

$data = array(

array('RESPOSTAS', $_POST['cpfpos'], $_POST['respos'], $_POST['cpfneg'], $_POST['resneg']),

// array('Resp. Prod.', $_POST['respos']),

// array('Cpf Improd.', $_POST['cpfneg']),

// array('Resp. Improd.', $_POST['resneg']),

 

);

 

 

 

$graph->SetLegend(array('Cpf Prod. '.$_POST['cpfpos'],'Resp. Prod. '.$_POST['respos'],'Cpf Improd. '.$_POST['cpfneg'],'Resp. Improd. '.$_POST['resneg']));

$graph->SetLegendpixels(55, 35);

 

$graph->SetDataColors(array('#FF3300','#33CC00','#FFCC00','#3399FF'));

 

 

$graph->SetDataValues($data);

$graph->SetTitle("{$_POST['operador']}");

$graph->SetYLabel('Qde');

//$graph->SetXLabel('Respostas');

 

$graph->SetFont('x_label', 3);

$graph->SetFont('y_label', 0.5);

 

$graph->SetImageBorderType('plain');

 

 

$graph->SetTextColor('black');

$graph->SetDrawXDataLabelLines(true);

$graph->SetXDataLabelPos('plotdown');

$graph->SetGridColor('black');

$graph->SetBackgroundColor('#ffffff');

$graph->SetDataBorderColors('#606099');

 

 

$graph->SetDrawXDataLabels(true);

$graph->SetDrawXGrid(true);

$graph->SetNumHorizTicks(4); // Set the number of labels to be used

//$graph->SetXGridLabelType("plain"); // Show in this way

$graph->SetVertTickIncrement(100);

//$graph->SetXDataLabelMaxlength(11);

 

//$graph->SetYGridLabelType( "right");

 

//Draw it

$graph->DrawGraph();

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.