# GD::Graph => How to set maximum value manually on Y ?

#### Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

•  Subject
• Author
• Posted on
Hi,

Do you know how to "tell" to GD::Graph which is the maximum value on a chart
?

I explain:
When you want to make a chart with % data, value begin at 0 and finish at
100 (0 - 100%). But GD::Graph automaticly define the max value (so if you
have a chart with max value=30 in your @data, the chart will show the max at
30-35%).

Regards,
Yoann Wyffels

## Re: GD::Graph => How to set maximum value manually on Y ?

> Hi,
>
> Do you know how to "tell" to GD::Graph which is the maximum value on a
> chart
> ?
>
> I explain:
> When you want to make a chart with % data, value begin at 0 and finish at
> 100 (0 - 100%). But GD::Graph automaticly define the max value (so if you
> have a chart with max value=30 in your @data, the chart will show the max
> at
> 30-35%).
>
> Regards,
> Yoann Wyffels
>

Use y_max_value:
\$graph->set(  y_max_value => 100 );

>

## Re: GD::Graph => How to set maximum value manually on Y ?

yes it is. thanks !

>
> > Hi,
> >
> > Do you know how to "tell" to GD::Graph which is the maximum value on a
> > chart
> > ?
> >
> > I explain:
> > When you want to make a chart with % data, value begin at 0 and finish
at
> > 100 (0 - 100%). But GD::Graph automaticly define the max value (so if
you
> > have a chart with max value=30 in your @data, the chart will show the
max
> > at
> > 30-35%).
> >
> > Thanks for your help.
> > Regards,
> > Yoann Wyffels
> >
>
> Use y_max_value:
>  \$graph->set(  y_max_value => 100 );
>
> >
>
>