How to set min-height on vue-chartjs - chart.js

I have a chart in vue3 with vue-chart.js
When I view in mobile size the chart is too small to view in height.
How do I assign a min-height in CSS or in chart-options?
I have set the div height to 200px but the chart will still shrink as the width gets reduced.
I can set the chart-options "responsive: false" and the hiegth but the width does not follow changing size. Maybe a responsive in width but set height is the answer but not sure how to do that.
Thanks

Related

Chart.js bar chart minimum bar width

How do I set a minimum bar width for a Chart.js bar chart? When I have many bars, they become very thin in order to fit the given space. Instead, I want the bars to have a minimum width, and if necessary, there should be a scrollbar so that everything fits. There is a maxBarThickness but not a minBarThickness: https://www.chartjs.org/docs/latest/charts/bar.html#maxbarthickness.
Well the min setting is achieved with barThickness check the documentation for details.
... If this value is a number, it is applied to the width of each bar, in pixels. When this is enforced, barPercentage and categoryPercentage are ignored. ...

Draw.io autosize by keeping width fixed, and expanding height if needed

Is there a way in draw.io, to autosize a text container, keeping it's width fixed, and telling draw.io to only adjust the height if neccessary?
I tried out almost all options in the properties of the text box, but when I apply the autosize, it always overwrites my set width and height, by making the width larger, and the height smaller.
I am putting these texts inside a swimlane, and what I would like to achieve is, either:
when I add text to these text rectangles, the rectangle and the swimlane should expand automatically, but only vertically, ie, only the height of it should change (this would be the best for me, so that it is automatic)
if the automatic solution is not achievable, I would be happy with something like manually pressing the autosize button, and draw.io should keep my width fixed, and change the size of the height only.
Couldn't find any documentation anywhere. But I notice that the behaviour of auto wrap is different depending on the object type that you choose. For example,
The above one is a "Rectangle". it won't resize the width when auto-sizing. The bottom one is a "UML/Object". It will resize both the width and height.

How to keep UIView to a maximum size in pixels on iPad but at screen size on iPhone

I have some buttons and labels on a UIView (a main view to give it a name), I want to keep this view to a maximum size on iPhones but on iPads I want to have a size no more than xxx pixels.
I have added some constrains to these buttons and labels, they position and scale well on iPhones, this is because I added to the main view some constrains to keep it 4 pixels on each side from the border. When running on iPads the view scales to the screen size, so I want to limit the size to say 700 x 400 px.
Add 2 more constraints where you set the your UIView to a height of "<= 700" and a width of "<= 400". Make the priority of the constraint 1000. Then change the constraints that set your edges to 4 to priority 990 .

Flex Slider full height and width without stretching

I need Flex Slider to occupy the entire page, like the one on this website: http://webfire.co.uk/
I've set both height and width to 100%, but when I re-size the page, it causes the image to distort and stretch. However, setting the height to auto leaves a white space underneath the slider, so it doesn't fill up the full page. The same thing happens with background-size:cover - the width becomes responsive but the height stays the same.
On the website above, they manage to sort of re-center the image when the window is re-sized.
Any suggestions? :)

Set max width of a Gtk::TextView

I've created a textview which is being filled by a Gtk::TextBuffer, however the buffer contains a lot of characters and the window gets wider than the width of the screen.
Is there a way to define a max width for a Gtk::TextView?
Put the text view in a Gtk::ScrolledWindow and set the size request of the scrolled window.