I'm looking for a way to set the size on a chart either dynamically or at creation of a single vega-lite chart. So far, I have tried setting width and height on spec.config.cell used for trellis charts which sets the height only, also calling the width() and height() methods on the view object, e.g.
view.height(200).width(200).render()
best I can do is get the canvas to resize and crop the chart, but the chart does not redraw to the specified size. I'm looking for it to work with padding:'strict' to specify the overall size, not just the size of the data rect.
Aside from manually setting the bandWidth for ordinals it seems the feature isn't implemented just yet:
https://github.com/vega/vega-lite/issues/1356#issuecomment-231825910
Related
How can we Decrease the Font Size and Size of the UWP Calendar Date Picker Control?
I want to decrease the size of the Calendar Popup but It's not working and also the Font size of dates is not getting Changed even after changing the value for font size property of the Control.
It's is not possible to change the size of CalendarDatePicker in UWP apps as already described by documentation for size as follows:
Several of the FrameworkElement derived types are also derived from Shape. Not all of the Shape classes use Height or Width to specify their appearance, and instead use specific properties that might define a set of points. In this case a Height or Width is calculated, but is not typically set directly.
I am creating a graph chart using telerik TChart. Using storyboard I set the position of a graphview.
For iPhone,it's height is correct for all values of chart but for Ipad if I give maximum value it will touch the above labels. so I have to reduce the height of that view of chart programmatically.
Is there any way to reduce the height of graph.If I want to set frame size height of graph using
_graphView.translatesAutoresizingMaskIntoConstraints
it will generate exception. so is there any other way to set height.
I have a little problem, I am trying to set an image inside a frame to the frame's size.
However, the Width and Height properties return garbage.
What am I doing wrong?
See gw, gh:
Listen for the WindowActivatedEventHandler to get the size using ActualWidth/ActualHeight. This ensures that the Window is activated and the Frame has been drawn before trying to get the height/width.
I have two charts on a page, their codes stored in different files. What Im trying to achieve is: When I click on first chart, the second should change its size (lower height and width). Function that should do this is in yet another file (but I think it´s not the condition)... I tried to change the width of containing div, but it only cuts the chart. Then I tried to change the width of that div and then to load that chart again...no result.... Is it even possible to do this?
Use setSize() function.
For example:
chart.setSize(newWidth, newHeight);
I'm pretty new to OpenSceneGraph and I have the following problem:
I'm trying to build a 2D Head Up Display out of several images, so that it can resize depending on the screen's resolution. That means I have extra images for the corners and one image for the bar that connects the corners and so on.
Well, that's the idea. But I have no clue how to do that in OpenSceneGraph.
Can anybody help me?
So, when the window resizes, you'll get an event from osgViewer telling you about the change.
You need to resize your viewport when the window size changes, so your HUD geometry has some idea of what the pixel-size of the display is (most of the HUD examples setup for a nominal 1024x768 screen and then just let that stretch around as the window is resized, pretending like the new viewport is still 1024x768).
Once you've resized the viewpoer, you need to rearrange your geometry. Your corner pieces need to be laid out at the fixed pixel size you want them to always appear, then you need your connecting elements to change size, horizontally or vertically, to fill the space between the corner pieces. You usually rely on texture stretching or repeating to fill the space as the piece of geometry gets stretched.
If none of that makes any sense, I can describe more.