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

Legends positioned in the bottom are hidden when rendered in HTML #81

Open
jerlabor opened this issue Jul 27, 2023 · 1 comment
Open

Comments

@jerlabor
Copy link

image

This is the settings of the svg:
$settings = [ 'back_stroke_width' => 0, 'back_colour' => 'none', 'axis_ticks_y' => range(1, 1000), 'use_iconv' => false, 'legend_stroke_width' => 0, 'legend_shadow_opacity' => 0, 'legend_position' => 'outer bottom 0 120', 'legend_show_empty' => true, 'show_axis_text_h' => false, 'structure' => array( 'key' => 'option', 'value' => 'value', 'legend_text' => 'option' ) ];

@goat1000
Copy link
Owner

SVG elements don't usually appear outside the SVG document area.

To make it work you can add the 'auto_fit' => true option to your settings and add

svg { overflow: visible }

to your stylesheet.

The auto_fit option is required because it makes SVGGraph add a viewBox attribute to the SVG and visible overflow will not work without it.

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