Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

axis_max_h and grid_division_h #69

Open
fglueck opened this issue Sep 9, 2022 · 2 comments
Open

axis_max_h and grid_division_h #69

fglueck opened this issue Sep 9, 2022 · 2 comments

Comments

@fglueck
Copy link

fglueck commented Sep 9, 2022

If is a value > axis_max_h then the axis will be expand by grid_division_h step.

So axis_max_h/v don't limit the axis?

Description, I try to show a horizonatal bar and set
grid_division_h = 10
axis_max_h = 112 // highest value

One value/bar shows 112, but the axis will be expand to 120.

@goat1000
Copy link
Owner

goat1000 commented Sep 9, 2022

Someone else emailed me about the same issue a few weeks ago, so it is already on my list of things to work on.

There is a workaround you can use now, using the axis_ticks_x option to override the automatic axis settings:

$max = 112;
$division = 10;

$options['axis_max_h'] = $max;
$options['axis_ticks_x'] = [];
for($i = 0; $i < $max; $i += $division)
  $options['axis_ticks_x'][] = $i;

@fglueck
Copy link
Author

fglueck commented Sep 9, 2022

Thanks, works !
Also with $max = 123.45;
'axis_ticks_y' => range(0, $max, 10)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants