How to change the size (resolution) of one pageview in Spotfire - business-intelligence

I saw a viz in the company's repository, and I wish to replicate one of the feature.
The viz is consist of several pages with an introductory page. The introductory page contained a lot of information with a scrollable canvas, while other detail page had a fixed-to-window way of presenting data, showing each segment in one screen without the overall scroll bar.
What I want to know is how to only make one or part of the pages in the dxp file able to enable the scroll bar (larger canvas height), while the rest having the fit-to screen way of displaying the viz. Any approach will be appreciated.
PS:
The Document Property→General→Visualization area size→Custom size method changes the canvas size of all visualization table. Which is not able to fulfill this feature, as this property changes the canvas size of all pages in the dxp file, which is not what I expected.

sounds like they used a Text Area but it's hard to tell without seeing the document.
you can insert a Text Area the same way you do a visualization (via the toolbar or the main menu). you can then right click the Text Area to edit it either with the WYSIWYG editor or in raw HTML. Text Areas will show scrollbars to match the length of your content.

Related

View whole page in inspect/dev tools window

Is there a way so I can see my entire page while having the inspect/dev tools open in google chrome, as it is it is only displaying the far left two inches of the page which isnt particularly helpful when trying to view aspects on the other side?
I am trying to see the entire chart. I have tried to enlarge/shrink screen size and increase % and adjust to fit but it still only manipulates the two inch strip visible here instead of the entire chart.

Autoresize header to stay on one row

I'm currently customizing wordpress layout for one company and I have a problem with layout.
I have a logo in header and to the right of it is navigation. But when I'm zooming in, at one point the navigation skips to the next row.
I'd like to ask you how should I keep them on one row when zooming.
Page can be found on dev.machala.cz
Thanks in advance for answers.
When you zoom your page that means viewport size is getting lower and your page starts using your Media Query for that width.
If you don't want to break your menu to down. You have to remove your Media Query.
This is not an issue. You can leave it as it is.
If you are trying to do this for layout purposes on mobile and tablet maybe consider this -
Try changing the font size of the menu text to:
font-size: 1vw;
and then change the media query for the of the mobile menu toggle bar to 1000px
and set the font size back to normal in that media query.
Using VW make the font scale with the width of the browser.
Doing this means you'll be able to shrink the browser for slightly longer and then the media query for the toggle will appear sooner avoiding the text moving to a new row.

Center image horizontally & vertically on page with % margins and be resizable with window

It seemed so simple just a day ago, but I can't figure it out:
How do I center an image on a page, giving it fixed % margins (10% on all sides) and still have it scale with the window on resize?
It's very important that the page and the image display well on all platforms, without scrollers (!).
The page itself is very simple and only contains the image (which on different versions of the page has different dimensions), and a bar on the top with a link to send it to another page.
The max size of the image would be 1500x1000px, no minimum size.
I wholeheartedly hope someone can help me out with this, thanks so much!
Best way to do that is using JavaScript. Get the window size, subscribe for window.onresize event and update the image size and position accordingly.
Using CSS only will NOT work, because any position properties depend on the container. In your case the container is the window, which will size itself based on the content. This creates a sort of circular dependency (window size depends on the image, the image size and position depend on the window size).
For information about getting the exact available window size in cross-browser way you could check this post: Get the size of the screen, current web page and browser window - haven't done that in a while to provide you with exact code.
Also note that you don't mention keeping the aspect ratio of the image. If it should not be maintained there is no way to do it HTML/CSS only, because all operations with them do maintain AR of images.

Working with a Custom Image Grid

I was looking for a custom image grid and found a similar question that had a really sweet component in an answer.
I downloaded the code and after some fiddling, I managed to get it to compile in DXE2. It looks really cool, but I can't get either scrollbar to show up. I also can't figure out how to dynamically control the images displayed. Or how to update the grid based on keyboard events.
Also, to get it to compile I had to remove the GR32 references; the library I downloaded had too many incompatibilities with DXE2 for me to resolve.
Any help would be greatly appreciated. This really looks like a killer component.
Update from Bill:
Here is a screenshot of incorrect thumbnail painting. I can not get the thumbnails to look like the screenshot from the component in question.
If the thumbnails were painted at the same XY as the rects painted in the first pass they would look much better. Any idea on what is going on?
... but I can't get either scrollbar to show up.
Well, there is no horizontal scrollbar. There is the property ColWidth that controls how much images are drawn in one row, depending on the control's width. You might update ColWidth in an OnResize event handler due to anchor settings, for example.
The vertical scroll bar appears automatically when not all images (incl. spacing) fit in the clientrect. The images are drawn on a TPaintBox and that paint box' size is updated as soon as the image count changes:
procedure TImageGrid.RearrangeImages;
begin
...
FPainter.Height := Max(ClientHeight,
FRowCount * (FRowHeight + FImageSpacing) - FImageSpacing);
The component inherites from TScrollingWinControl, so the scroll bar should modify accordingly. If not, then Bill has a workaround found as commented:
VertScrollBar.Range := FRowCount * (FRowHeight + FImageSpacing) - FImageSpacing;
I understand this obviously also works, but I really wonder why the scroll bar's range should be modified manually. Here in D7 I have no problem with a hidden vertical scroll bar.
... I also can't figure out how to dynamically control the images displayed. ...
The most easy way to fill the component is by assigning the Folder property to a path with images. Only the images with the file formats in the FileFormats property will be loaded. To specify the images manually (e.g. to combine multiple folders), use the FileNames property. When the Folder property is set, then the FileNames property is updated accordingly, but those file names are not stored in the DFM. When you change the file names (e.g. you delete one from the folder), then the Folder property is cleared and the component uses the FileNames property instead.
... Or how to update the grid based on keyboard events. ...
The only keystrokes currently implemented are Up, Down, PageUp, PageDown, Home and End which all scroll the control. What more key actions do you wish? It's a viewer.
Here is a screenshot of incorrect thumbnail painting. I can not get the thumbnails to look like the screenshot from the component in question. ... If the thumbnails were painted at the same XY as the rects painted in the first pass they would look much better.
While loading the images, a temporary rect is drawn with size ColWidth * RowHeight. All images are stretchdrawn within that size, so adjust your ratio of these properties to make the spacing equal everywhere. Note that you can also influence appearance with the ImageHorzAlign and ImageVertAlign properties.
Update:
The component you refer to is recently completely rewritten, and some of the answers above are outdated.
It now has a Propertional property that defaults to True, but when set False, it will stretch up the thumbs to whatever cell size you have set, independent from the original image sizes. Small images could remain narow though, unless you set the new Stretch property to True.
It now distinguishes between RowHeight and CellHeight, and ColWidth and CellWidth. The difference between both is CellSpacing.
The component does not descend from TScrollingWinControl anymore, but from TCustomControl and only the vertical scroll bar is added.

How to prevent overflow text in a text block?

I'm trying to make an ebook reader. I want each page to scroll sideways (like the Pivot viewer does) but I can't get out how to figure out how many words need to be added to the text box on a screen to before it starts overflowing (I don't want the user to scroll vertically).
Any tips?
Thanks!
There is a Scrollable TextBlock which divide text into blocks of 2048px height. You can use their code to get text that will exactly fit into one page (800px, for example)
Creating Scrollable TextBlock for WP7
If you call the UIElement.Measure(Size) method, then check the UIElement.DesiredSize property, it will tell you the size of an element before it is rendered. You could add text, repeatedly measuring the rendered size.
However ... this will be pretty inefficient. It is much better if you can create a layout that performs what you require automatically.

Resources