iOS_Charts HorizontalBarChartView Vertical scrolling - swift

What changes need to be done if I have to make 'HorizontalBarChartView' vertically scrollable.
I want to show maximum of 8 bars at a time.

It already supports so. you can set maxScaleX/Y to limit the scale,
also you can try setVisibleYRangeMaximum. horizontal bar chart's x axis is the same as normal bar's x axis position. It's not reverted with y axis

Related

Rotating x axis label to vertical from horizontal in JasperReports Charts

How can I rotate the x-axis label from horizontal to vertical? The words are too long to be placed horizontally, vertically placing them will be able to display them.
Go to chart properties, set it to a numeric value in the properties "label rotation" -45.0 for example.

Matlab - change height of the text field on the whole figure

Is there a way to change the height of a text field on the whole figure without changing the x and y position?
To change we must use the position, which requires to change the coordinates. I would like to change only the height, without changing x and y.
Just store the current x and y, and use those in your set call like so:
old_pos = get(text_field_handle,'Position');
set(text_field_handle,'Position',[old_pos(1:2),new_width,new_height]);
Well, you can change the FontSize property, this won't change the coordinates, but will increase width as well as height. See Text Properties in the doc for more details.
I am assuming you are working with uicontrol('style','text').
From the uicontrol properties you have:
Position
position rectangle
*Size and location of uicontrol*. The rectangle defined by this property
specifies the size and location of the control within the parent figure
window, uipanel, or uibuttongroup. Specify Position as:
[left bottom width height]
where left and bottom define the distance from the lower-left corner of the
container to the lower-left corner of the rectangle. width and height are the
dimensions of the uicontrol rectangle.
You can then just change the width and height keeping the original left and bottom.
One can set the Margin property of a text object to increase the height of the object without changing the fontsize, but this influences both the height and the width of the text object. I am not sure what it means to make the height smaller than what Matlab thinks is the text height, so I will assume you are interested in increasing the size.
Increasing the height of the text object is relatively easy if you are willing to use the LaTeX interpreter. You just need to add an "empty" box of whatever height you want:
text(0.5, 0.25, 'Hello World\parbox{\textwidth}{\vspace{1in}}', 'Interpreter', 'LaTeX', 'BackgroundColor',[1, 0, 0]);
This won't increase the height by exactly 1 inch, instead it will be more like 1 inch minus a baseline skip. Determining the actual height increase in displayed units adds even more problems. You might be able to change the height with unicode characters, and hence skip the LaTeX interpreter, but I have no idea how.

GWT widget on bottom without knowing height/size

I want to have a two widgets to stack up
X
Y
I want Y to take up as much height as it needs (its static in size, roughly 50px depending on browser font, etc) and remain affixed to the bottom of the screen, and X to take the rest of the vertical space.
X happens to be a scrollpanel with VerticalPanel and more inside, Y is a Grid and I've tried putting them in various containers, but they all seem to want a size for Y (ie. DockLayoutPanel & LayoutPanel). If I specify a size for Y it ends up with white space at the bottom on one browser or another. Any advice?
It's just not possible in HTML/CSS. If you absolutely cannot know the height of Y in advance, the way around it would be to:
Attach this widget somewhere off-screen
Measure it's height using yWidget.getOffsetHeight()
Remove it
Add it to your LayoutPanel and setting the 'bottom' coordinate to 0 and 'height' to the measured height.

plotsymbol label

I'm playing with core-plot to generate a scatter plot. I've added a plot symbol and want to add a label near every symbol.
I able to do that but want to change the position of this label. I can set the offset but it move the label only vertically, I need to move the label horizontally.
Any way to do that?
this picture shows what i'd like.
screen shot
Thanks
The automatic labels will always appear above the point. You can create annotations to label your data points. For each label, use CPTPlotSpaceAnnotation, anchor it to the coordinates of the data point, and set the displacement and content anchor.
To put the labels to the right of the point, set the displacement to (x, 0) where x is the number of pixels between the label and the center of the data point. Set the content anchor to (0, 0.5).

Core plot not sizing the plot area appropriately for bar graph

I've got a container view that holds 2 view controllers, each of which in turn hosts a CPGraphHostingView. The heirarchy is something like this
ContainerView
- TopView
- BottomView
I initialize topViewController(initWithNibName), resize the view to 70% of the height and add the topViewController.view to containerView subviews
Similarly for BottomView, except that the height is 30%
These 2 views now span the height of the container view.
However, the bar plot drawn in the bottom view does not respect the super views height coordinates and draws the bars out of range resulting in the need for a vertical scroll. I've also tried adjusting the plotScale post addition of graph, but causes me to lose some alignment.
Strangely, the scatter chart view in the top view seems to behave better and scales when i flip the top: bottom ratio to 3:7 from the original 7:3.
Are bar plots supposed to behave differently ? Or am i missing something here. Attached are the images for my issue. notice that in both cases , the top scatter chart seems to have scaled correctly.
Also, i tested by using the scatter chart code in the bottomViewController (to make sure that this wasn't some nib issue) and again with scatter chart the scaling seems to just work.
Thanks a lot.
PS: i didn't use google groups because i could not post images there.
The fact that it works for the scatter plot makes me think there is an issue with the way your bar plot is set up.
Double-check your plot ranges in the plot space for the bar plot. The bars are being clipped because the yRange is too short and starts at a location above the minimum data value.