BIRT adjust grid row height according to chart height - birt

I am setting the height of a chart through javascript inside html of text item. However, the grid row height remains constant and therefore, sometimes there is too much white space
I want to adjsut row height according to chart height. Please help me
Regards
Arif

You should just leave the height property of the row to blank, it will automatically be adjusted to the size of the content, in your case the height of the chart + your margins/paddings. You should also pay attention if the grid itself has a height defined.
As soon as an element has a dynamic height, most of the time we have to remove "height" properties defined in its containers

Related

How can I set a fixed row height and column width in Telerik WinForms RadScheduler?

How can I set a fixed row height and column width in Telerik (UI for WinForms) RadScheduler when using a timeline view with grouping by resources?
I could find only the Resources per view property which automatically changes the height when the resource numbers are different.
If you're using the timeline view, I'm afraid this is the only way to control the height, by actually setting the Resources per view as you mentioned.
This was confirmed by Stefan, one of Telerik's admins. Please, check his answer in this post.
As for the width, I'm still researching it, however, it can be changed in proportion to other columns which are considered to be 1 by default, so if you set one of columns' width to 2, it will be twice the standard size:
((SchedulerTimelineViewElement)radScheduler1.ViewElement).SetColumnWidth(0, 2); // 0 being the column index and 2 being the width
[Edit: This is also mentioned in the documentation]

Xamrin Grid get height by text size

In Xamarin Forms I use Grid to show some icons as Button and Text as Label.
I want my Icons to fit to default grid size, to do so I need to know what is the height of the Grid. But all the height values of Grid are 0.
My question are: how cant I get any Height size of this grid? Can I figure the height by text size?
P.S. I don't want to set specific height value for Grid, I want it to remain default.

Tooltips getting cutoff in pie charts in highcharts

I have a pie chart which is being generated from a json string. The pie is getting created correctly but what is happening is the tooltip is getting cutoff when the text to be displayed in the tooltip is large. I have tried increasing the width and height of the svg area. But the charts are generated dynamically so i have no way of setting the chart widht and height dynamically depending on the content.
One can adjust the margins margin:[0,100,0,100], to shrink the pie chart so that the tooltips/labels will appear. This has been set to automatically scale the chart in Highcharts 3.0.
http://www.highcharts.com/component/content/article/2-news/53-highcharts-3-0-beta-released
http://github.highcharts.com/v3.0Beta/highcharts.js
http://jsfiddle.net/Zvrt6/1/
Increase Height and width of your chart div or put your code in jsfiddle if possible, so that we can get more idea
This example could be relevant to your situation- http://jsfiddle.net/4ac8b/1/. When you re-size the result pane you will notice the chart size changes accordingly.
You will need to set the size of your container so that the chart is drawn in that area itself. http://jsfiddle.net/4ac8b/. Even when you re-size the result pane the chart size wont change.
Change the diameter of your pie chart to allow additional information
http://www.highcharts.com/ref/#plotOptions-pie--size

Firefox: wrong interpretation of box model?

I just discovered strange behaviour of Firefox.
If I have a table cell of 100px height, and add 20px padding to it - it's total height should become 140px.
All browsers act correctly, Firefox 8.0 ignores the padding:
http://jsfiddle.net/8wDde/
Anyone knowing a fix?
It seems the best cross browser solution may be to set the full height of the table row equal to height and padding of the cell:
tr {height: 140px;}
See: http://jsfiddle.net/8wDde/19/
that is a strange behave. add display:block; can fix the problem. tested in FF8.01 see:
http://jsfiddle.net/8wDde/1/
But I also do not know why?
I searched in https://developer.mozilla.org/en-US/search?q=table+padding, but did not find anything. May be you can also try to search in there.
UPDATE:
http://jsfiddle.net/8wDde/7/
add overflow:hidden to avoid the td change line.
I couldn't find any information about this on Google, so one way to fix it for Firefox would be to use a CSS hack.
#-moz-document url-prefix() {
td{
height:140px !important;
}
}
Obviously, if the height was 200px, then you'd change that to 240px to account for the missing 20px on top and on bottom.
That targets all Firefox versions, I'm not sure if theres a FF8 specific css hack.
You can see this demo here: http://jsfiddle.net/charlescarver/8wDde/2/
Edit: I like Giberno's answer more
This is a fuller description of a couple of comments I made on another question, hopefully a little bit clearer. Note that Opera has the same behaviour as Firefox.
In the diagram above, the total cell area is the dark box, and the text My Text is the content of the td, and it is that that defines the Cell Box (C).
Now, the CSS 2.1 spec says:
The height of a 'table-row' element's box is calculated once the user
agent has all the cells in the row available: it is the maximum of the
row's computed 'height', the computed 'height' of each cell in the
row, and the minimum height (MIN) required by the cells. A 'height'
value of 'auto' for a 'table-row' means the row height used for layout
is MIN. MIN depends on cell box heights and cell box alignment (much
like the calculation of a line box height). ...
In CSS 2.1, the height of a cell box is the minimum height required by
the content. The table cell's 'height' property can influence the
height of the row (see above), but it does not increase the height of
the cell box.
So td { height:100px; } affects the Row Height (R) (it will be at least 100px high) but does not effect the Cell Box (C).
On the other hand, td { padding:20px; } applies to the Cell Box (C), so if the height of (C) + Top Padding + Bottom Padding is less than 100px, the row height is not affected and is still 100px.
If (C) + Top Padding + Bottom Padding is greater that 100px, the row height will expand to accommodate the full height of (C) + Top Padding + Bottom Padding.
Then td { background-color:blue } applies to the full row height (R) and cell width.
You can see this in action at http://jsfiddle.net/Ez7xz/
The final confusing factor is the value of the computed height of the td in Firebug. What seems to be happening here is that it is assuming that the height is the result of content-box box sizing, and reporting the value of R less the top and bottom padding. While this seems odd, it's not obvious what other value it could reasonably report.

How to set optimal width for labels column in jqgrid edit and view forms

jqGrid edit and view forms row labels (they are same as column captions ) are set at runtime.
Sometimes they are narrow and sometimes wide.
For narrow labels column width in too big. There is too much empty place between label text and value field.
It looks like labelswidth: '30%' value is hard coded.
How to adjust edit and view form labels columns width automatically so that if all labels are narrow, column width is smaller ?
The first which I would try to do is to use the values in pixel instead of percents:
labelswidth: 80, width: 600

Resources