I have a very simple question but unfortunately I could not find anything related to my problem.
I just want to know how can I add an x-axis or y-axis label in live editor of amcharts? By default, only y-axis is shown with live editor of a chart. I tried to use 'Value axes' from the menu on the left but the created label was overlapped with the existing y-axis label rather than appear on the x-axis. Also, I could not change the position of axis label through the 'Position' property of 'Value axes'.
Please help.
Mushi
For x axis - select "CategoryAxis" and enter "title" in "General Settings". Similar with value axis - select your value axis in the menu and enter title in general settings.
Related
What the title says. I would like to add something constantly visible (line, tooltip, ...) which is connected to a value on y-axis (in this case to a date). Is there any way to do this in any shape or form?
Symbolic picture:
I'm setting width for my button so that it's greater than text size - as on image below:
The width of it is 120px. My problem is that I have center vertical alignment for it so when I hit "update frames" then my button gets resized to it's minimum so that text fits the button as below:
I can't leave it that way because I've added frame programatically and it looks bad when it's so close to the text.
Is there any way to set some properties for xcode to stick to my width as oppose to auto-align it? I'd prefer to have it in xcode properties than in swift code.
You are not adding a constraint to the width. You need to add a constraint to it, not change de width at the Size Inspector.
Select the element, click at the Pin option at the bottom bar, and set the width of your element. Update Frames and voilĂ .
Remember: when working with Auto Layout you cannot use any manual configuration (size, position, etc.) for that element, always use constraints or stack views.
Apple documentation about Auto Layout
I would like to know wether we can change the Text Alignment of a label using the App Inventor 2's Code Block. I would like to make a button to select the text alignment position of a label or button.
You can't change the text alignment of a label programmatically in App Inventor
As workaround for example define 2 Labels, one having an alignment left and another having an alighment right and hide the second label. Then after button click copy the text of the label and display the other label instead, see screenshot.
I plan to add touch event features including an annotation on X axis with Core Plot. the problem is that the annotation on the axis can hide axis labels.
Is it possible to hide the axis labels during the touch down or drag event, and show them back upon touch up event. Some properties or methods, maybe?
Thanks
If you only want to hide them, you can loop through the axisLabels set and hide or show the contentLayer of each label with the hidden property.
You can also remove the labels to hide them. For custom labels (CPTAxisLabelingPolicyNone), just set the axisLabels to nil to hide them and assign new labels to show them again. For other labeling policies, set the labelTextStyle and/or labelFormatter to nil to hide the labels and restore them to show the labels again.
How can I do something like that?
I didn't find any appropriate object in the Interface Builder library.
Any thoughts?
The best way that i found is to use NSSegmentedControl.
after you dragged it on the canvas, you should configure its style:
Style: Small Square
Mode: Select Momentary
looks better. Now use "image" field to set NSAddTemplate and NSRemoveTemplate. Make sure that label field is empty.
Ok, we have "+", "-" and one empty segment. To prevent the latest one to be selected by the user, select it from Segment: pop up and turn off Enabled check box (located next to State: label).
And lastly, what we have to do is set width of first two segments to make them square.
Go to Size inspector
Select Segment 0
Turn off "Fixed" checkbox (segment should immediately autoresize to fit image)
Select Segment 1 and repeat number 3
Now as you resize control, only last segment will change width
Put it at the bottom of your table view and resize as well.
Enjoy ;)
Update for OSX Yosemite
I tried to achieve the same look as Mail.app has in the Accounts view (right window on my screenshot).
I did achieve the desired result by following the steps below:
Add a NSSegmentedControl
Add two segments and set the image to each:
NSAddTemplate for the + button
NSRemoveTemplate for the - button
Set the size of the segments to fixed and set the value to 32 pixels
The rectangle next to the buttons is a NSButton with the style Gradient.
The Button is enabled but Refuses First Responder is set to true so that it is not clickable.
Use a NSButton with a gradient style, and for the images use the system provided NSAddTemplate and NSRemoveTemplate.
One answer here suggests using gradient buttons, however these buttons cannot be disabled as this causes the background to change and thus breaks the look. Another one suggested using a segmented control, which is almost perfect but segmented controls don't support autoresizing, e.g. if the table width is dynamic. My suggestion is a combination of both. Use a segmented control for the actual buttons and a gradient button to fill the rest of the table width that now can also be dynamic if the button width is dynamic as well.
See my answer to a similar question (with screenshots):
https://stackoverflow.com/a/22586314/15809