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

add: config.scale option #135

Merged
merged 2 commits into from
Jan 11, 2024
Merged

add: config.scale option #135

merged 2 commits into from
Jan 11, 2024

Conversation

netpyoung
Copy link
Contributor

It will be good to support config.scale option for small size radar.
It produces 700/500 size radar from 1400/1000.

radar_visualization({
  svg_id: "radar",
  width: 1400,
  height: 1000,
  scale: 0.5,   ;; <<----

@bocytko
Copy link
Member

bocytko commented Jan 11, 2024

Thanks for the PR!

The two screenshots below showcase the value of scaling (here: with scale 1.5).
If just the width/height is increased, the radar is just shifted to the center leaving a lot of whitespace:

without-scale

The scale attribute scales the radar SVG to occupy the full dimensions:

with-scale

@bocytko bocytko merged commit 30fcc27 into zalando:master Jan 11, 2024
@bocytko bocytko mentioned this pull request Jan 11, 2024
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

Successfully merging this pull request may close these issues.

2 participants