Scale pygal svg graphs in web page with susy - css

I am trying to place two svg files side by side in a web page. This I have done using susy to create the spans, first one is 2 columns wide, the second 10 columns. I place a narrow bar graph in the first span, and a wide line graph in the second span.
The problem I am having is scaling the graphs. they look like this:
But I want them to look more like this:
They are svg files generated with pygal and I achieved the second image by forcing a size in pygal, but it's not elegant and fails wehn the screen size changes.
How can I make the svg bar chart scale the height without scaling the width and do it dynamically in a web browser instead of manually changing the size in pygal? I also cant manually edit the svg files as they are generated via another system and update frequently.

Your graphs should load in two different divs, so that you can set a different width style for each, depending on a view-based css class (like col based classes in Twitter Bootstrap). If you load dynamic svg's (without any explicit_size setting in Pygal) you should be able to handle different window sizes.

Related

Zoom & crop an image and draw an svg-square on top (in angular)

"A stackblitz is worth a thousand words": https://stackblitz.com/edit/angular-zoom-crop-marker
Basically what I'm trying to do is to have a square drawn above a certain position in an image (<img>), and have that dynamically adjust to the image while being zoomed in / out and cropped. The stackblitz link has 3 views, the basic view which is a plain image, a zoomable view (which I got working as well) and a view where the imaged is "zoomed in and cropped" while being zoomable - This is where I need your help.
Should I crop using object-fit in some way? Is it better if I use a canvas to handle this? I've been at this for a whole day I and I feel my css knowledge is too limited to pull this of.
Bonus question: How would I go about to have the zoom-in zoom-out buttons add/remove one image per row using only css flex-box? (ie: not statically adding x pixles in height and width, but rather increase or decrease the size of each image so that another image is removed or added (per row) while always filling up all the available space)
Thank you in advance!
Managed to solve it myself. stackblitz updated with a working solution.

Get Canvas to stick next to other canvas vue.js

I have a project that use multiple canvas elements. I have one canvas called gutter and then multiple groups of canvas that render as many times as needed. Each group contains three canvas layered over each other. I am using vue js and vuetify to work with all this. What I want is to place the canvas called gutter next to the first group of canvas. I have tried floating both elements to the left and that has not worked and variety of different div configurations and also display properties such as flex block and flex inline with no luck. I attached a picture to try and illustrate what I am doing, on the far left is the gutter that I want to move next to the other canvas. The blue boxes illustrate the groups.Each group has a name that renders on top of it.
rendered layout in inspector

ionic 3 tabs width to avoid entire horizontal space

i am using ionic-tabs component and trying to make the tab bar width just enough to show contents rather taking the entire space.
I don't see a sass variable to control it. all the variables are to control text and color related items.
How can i set the max height and widht for the ion-tabs ?
What I am aiming to look them like
https://www.dropbox.com/s/vv9vjjk2ym3iacb/Screenshot%202017-10-23%2014.10.27.png?dl=0
instead of
https://www.dropbox.com/s/hj1s1tp3xd8wbub/Screenshot%202017-10-23%2014.11.00.png?dl=0

Pure CSS reflowing grid-based layout with hidden sections

I'm trying to streamline the code for the 'Treatments' section of this website.
The site is responsive, the tiles are floats and reposition themselves with browser size. Clicking on a tile reveals a hidden section below it.
At the moment each tile has around three identical hidden sections positioned in the code, one for each of the three tile positions, to ensure it always appears below the desired tile - i.e. the 'Bunion Deformity' tile's hidden section appears after 'Osteoarthritis' in the widest format, after 'Ingrowing Toenails' in the midsize format and after 'Bunion Deformity' in the smallest format. Javascript is used to select the correct one.
It works but it's a very messy solution. Is there a way I can only paste the hidden section in the HTML code once and have it appear in the desired position regardless of the tile layout? Ideally using CSS alone.

Layout fails to adjust screen size in Qt

I am trying to make a GUI similar to the layout in Image attached.
The problem starts when I add the three frames besides the stacked widget.
Frame one contains some labels for status.
Frame two contains some buttons and two sliders.
Frame three contains a tab widget.
I am adding suitable layouts at every stage. The layout fails to adjust to screen size and the window goes outside the limited size. I tried setting maximum size for the frames and stacked widget but the problem stays.
Can some one tell me if I am missing out on something.
Thank You
You should to understand, what is Layout is. And especially Layout stretching. Have you seen it?

Resources