Altair tooltips: Is there a way to format box shape for long text? - formatting

I have a chart where I want to display text tooltips of variable lengths as long as 300 characters, but they are displayed with random box sizes. Sometimes they are shown in a neat square box with several lines of text, which is nice. But sometimes they attempt to put all the text in one line and it doesn't fit in the chart, so some part of the text is not visible.
I wonder if there is a way to format the tooltip box to a fixed maximum width to avoid this problem.
Below are two pictures showing the same chart. The first one shows a tooltip box out of the chart and page, so the complete text is not visible. The second one shows another tooltip that randomly shows the text fine.
Note: I tried cutting the text to a fixed length of 50 or 80 characters and it's better, but I would prefer to have the complete text.

Related

Add text box at specific location in report base on value

I'm working on a cut list generator but I'm having difficulty on the final report. I'd like to display a rectangle that represents the factory length piece with lines indicating cut points. In each segment I'd like to have the length of the piece shown. Using Report.line I've created the rectangles needed but I'm not sure how to get text in each box. Here is a sample output so far As an example I want the three rectangles for Piece #1 to have 48" in them, probably all the way to the left. Any suggestions? I thought createReportControl might work but I'm not sure that is the correct approach. I'm also thinking about one text box with a monospace font so I can scale the input across the entire width. Any suggestions are appreciated.
Thanks,
Dave
I played around with the monospace font idea. It isn't as pretty as I would like but I'm getting closer.
The issue is that I cannot keep the text in the same spot in each box. There is one line lower on the page that pushes the number almost out the right side of the box.
Sample Output
This code is functional but I'm looking at the cosmetics. I'm inserting spaces between my values using the following function:
Private Function InsertSpaces(CutLen, PieceLen) As String
MaxChar = 50 ' 6 inch 14pt Courier text box
cutchar = Int(CutLen / PieceLen * MaxChar)
Cutcharcount = Len(Str(CutLen))
cutchar = cutchar - Cutcharcount + 1
For i = 1 To cutchar
InsertSpaces = InsertSpaces + " "
Next
End Function
I'm just trying to clean it up. CreateReportControl was giving me a error because I wasn't in design mode. I'm guessing that is because it ran as part of OnFormat of the Detail section.

vb.net I am trying to size a control (label, textbox, richtextbox) so that it is the smallest square that contains a given string

I need to present arbitrary text, which might include line breaks, in a square control with word wrap such that the square is as small as possible but sufficiently large to display the text in its entirety.
This is the closest I've gotten so far:
Load the text into a temporary rich text box, Rich, with BorderStyle = none
I increment the value of size, width=height=size until Rich.ClientRectangle.Width = Rich.Width.
If I could now extract the visual lines one by one I would be done, as I could then save the original string with appropriate line breaks for later display.
Visual lines are not, of course, the same as Rich.Lines array.
Any ideas?
Thank you.

How to color numeric text?

I have an OpenOffice Calc document that contains text data in cells. The text in each cell contains numeric characters. I want these numeric characters to be different in color.
Is there a way to accomplish this format?
There are huge number of cells and manually editing would be time consuming. I could not manage to do it by "conditional formatting". So I'd like to learn if any other method is available.
Double-click in the cell and select one of the characters. Then click on the triangle of the Font Color toolbar icon. Finally, choose the color from the palette.

empty column in pdf version of ssrs report

My report structure:
header
tablix in rectangle
footer
from reportviewer and visual studio all looks great, but when i render pdf i'm getting document consisting of 3 pages, first (with header) is ok, but the rest gets an empty column on the right
i try to put each column and row in rectangle etc.
i'm sure that size of my report body is ok (body + margins <= page)
example with colors (dark blue - subreport in rectangle, yellow - main container):
height is correct, but width from second page is too large
Not sure if this is your issue, but I have found that I get that kind of issue when the width of report + left margin + right margin is too close to page size. An easy way to see if this may be the issue is to see if you have random blank pages. I would also suggest attempting to shorten the columns to all fit on one page width. Another thing to try is export it to Word. Strangely enough, if the report goes over the width that you specify for a page, Word will accommodate your report and become a bigger page size. See if you are still missing columns in those cases.

Eliminate stray whitespace between textboxes on a report

I have 4 stacked textboxes in the body of an SSRS report and am getting a stray space / extra line between textboxes 3 & 4.
This is for an address block - name / title / email / website. Can't put it in a single textbox with intervening vbcrlf tokens because the email and website are links. I've tried formatting it to remove vertical spacing; also calculated the exact position by taking top + height to calculate the position. And of course I've tried positioning it so there are exactly 0 pixels between the text boxes. If I reverse the position of #3 & #4 the rendering looks the same so it isn't stray formatting characters in the data fields.
The solution is to wrap the stacked boxes in a rectangle.
I had this problem as well. It blew my mind until I started over on another part of the form. The new boxes worked perfectly until I moved them to the right of another set of text boxes which had some word wrap in them. I realized the wordwrapped boxes were directly related to the gaps I was seeing the set of textboxes to the right. I guess there's some kind of poor markup going on that tries to line things up horizontally and enclosing the set of textboxes in a rectangle protects them from it.
good idea on putting the info into a table - jumping off that idea - I'm going to construct a dynamic string in my query and output the dynamic string into a textbox. thank you for the idea, I don't know why I didn't think to do that.
Simpler thing is to just check text alignment - the default is "default" which appears to be centered. Changing the text box to the right to "left" fixed this problem for me.
Reduce padding property of the textbox.
Once dragging the textbox one closer to the other the tooltip shows convergence points between two textboxes - make tooltip show 0 points
it is best I could do to control the spacing