plotsymbol label - iphone

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).

Related

Reduce Fill Image from Two Sides

I have set Image Type to Filled because I want to reduce the size of my filling area.
On the left side, you can see my progress bar within the attached image.
Within the inspector, you can clearly see I have set Fill Origin from Top so image size gets reduced from the bottom.
Now one twist I want, I want to reduce an image from both sides top and bottom, I have already played with Image component different values but I can't able to get success.
Overall I want to reduce the size of the image from the top and bottom.
There are 2 ways you can achieve this effect:
You can instead change the Y scale of the image, whilst the Y pivot is 0.5 this will make it shrink from top to bottom, but this will only work if the sprite looks the same even if shrunk down.
If your sprite's shape won't allow for changing the scale like that, you could also split it into 2 sprites at the midpoint and put them next to each other, and then have the top side fill from bottom, and the bottom side fill from top.

Get relative shape location in visio

I am generating a shape report to list x,y locations of all my shapes.
The report includes "Display Text", "X location" and "Y location".
The "X location" and "Y location" are equivalent to the PinX and PinY properties in the shape sheet. However these does not reflect the page grid, and do not refer to an origin (0,0), so the coordinates are all offset with some value.
I would like all coordinates to refer to the left lower corner of a specific rectangle, that surrounds my reported shapes.
Please check that all shapes have rotate point in center of shape (by default), not in bottom-left corner of shape!
PinX/PinY values you can see in Size & Position Window
In bottom of this window you can find field named Pin Pos.
This field corresponds to a combination of a pair of values in cells LocPinX & LocPinY. This is what caused the offset !

How to get exactly the same point on different screen sizes?

I want to call the action (go to another view) when user tap specific area of image (black dots): . Image fills whole view, content mode is 'Aspect Fit'. The problem is that when I setup it on one screen size (e.g. iPhone 8) on another the 'tap area' is shifted. I've tried to solve this with button and constraints or UITapGestureRecognizer with point conversion using screen resolution (nativeBounds), but nothing helps.
It is possible to use constraints to match the positions of the circles with UIButtons. The trick is to use the multiplier of the constraint to scale the buttons width/height and position to the screen size.
I'll describe how to do it for one button, and then you can repeat it for the others. I assume the image is 657 wide by 918 high. If I have the dimensions reversed, you'll need to substitute the actual values for the ones I have used.
Create a UIView to hold the image and buttons. Give this view an aspect ratio constraint with multiplier 657:918 which is width:height. Add the UIImageView to this view and constrain its 4 edges to the edges of the view with 0 offsets. Give this view constraints to the left and right edges of the main view and give it a vertical constraint to place it on the screen.
Get the width/height of the circle in the image and the horizontal and vertical positions of the right edge and bottom edge. For example, the topmost circle is 106 x 106 and ends at horizontal position 392 and the bottom is at 338.
Set the width of the button equal to the width of the containing view with multiplier 106:657 which is width of circle:width of the image.
Set the height of the button equal to the height of the containing view with multiplier 106:918 which is height of circle:height of the image.
Set the trailing edge of the button equal to the trailing edge of the containing view with multiplier 392:657 which is end of circle:width of image.
Set the bottom edge of the button equal to the bottom edge of the containing view with multiplier 338:918 which is bottom of circle:height of the image.
This will allow the button to stay aligned with the circle on all devices. Repeat steps 2 through 6 for the other circles.
Instead of using an image, you can try creating your own UIView subclass called BlackDotsView.
In the draw(_rect:) method, you can draw the lines. To determine where the lines start and end, you need to do some maths with the view's width and height. You calculate where all the lines end and create UIBezierPaths and then you stroke the paths.
In the initializer of BlackDotsView, you can add the dots as subviews. To make them circular, just set dotView.layer.cornerRadius to half the dot's width. Then, you can add UITapGestureRecognizers to the dot views.
You can follow the delegate pattern by creating a BlackDotsViewDelegate that has a method called dotTapped(index:). When a dot is tapped, you would call the delegate method and pass the index of the dot.

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.

how to set custom interval to horizontal axis in Flex Charts

I am trying to set custom step (interval) to my Line Chart's horizontal axis.
The chart gets its data from a grid. The grid has a lot of data and it is displayed accurately but because there are so many data points the horizontal axis is screwed up. I wanted to set a step on horizontal axis so that you get an idea when you see the graph without hovering the mouse on a data point!
thanks for any help!
-Ali
Flexi Comment Box
heylo people!
I have solved the mystery!!!
just add a horrizontalAxisRenderers to your Chart
and set the property canDropLabels to true!
<mx:horizontalAxisRenderers>
<mx:AxisRenderer axis="{horiAxis_B}" canDropLabels="true"/>
</mx:horizontalAxisRenderers>
axis being the name of the axis
you are done!!
but if you still have questions, you can always contact me here:
Alimsyed.com