Hide plot with touch event - Core Plot - events

I whould like to make a graph in Core Plot and I need to have a "switch" to each (Scatter)plot.
The objective is, when the user tap the "switch", the associated plot hide/show. For example, I have a graph with 5 Scatterplot's and a "switch" to each plot. When I tap the "switch
1" the "plot1" is hidden or show.
I've already read this tutorial but it does not what I want: Touch Event on LEGENDS in Coreplot iOS
How can I do this?

Related

NSButton pair +/- rounded, like Finder?

This question NSButton + & - Button answers how to make those [+|-] buttons for adding/removing things, like in tables, using a gradient button and system supplied + and - images. You still get two separate square buttons, while Finder has a nicely paired set of those buttons, see image:
They are clearly paired. How do you make those?

How to make a drag and drop in Grid Layout in Xamarin forms?

What I want to achieve is to drag red box view and drop in on the aqua boxview. The aqua box view should then take the place of the redbox view. How can I achieve this in Xamarin Forms ? I have added the following XAML code below. Please someone help me with this.
AFAIK Xamarin.Forms does not support drag-n-drop out of the box, hence you'll have to implement it yourself. It won't be easy, since there are certainly some edge cases to consider, but it's achievable. Basically the steps could be (maybe there are other options)
Add an AbsoluteLayout that wraps your Grid
Add an PanGestureRecognizer
When the pan gesture starts, check if it's on the red BoxView
If so, move the red BoxView to the AbsoluteLayout and remove it from the Grid
Move the red BoxView if the pan is updated
When the users stops the pan, check whether the red BoxView where you'd expect it to be dropped
If so, drop it (whatever that means in the context of your app)
If not, animate it back to its original position, remove it from the AbsoluteLayout and add it to the Grid
If you have tried to implement it and are stuck with a more concrete issue, feel free to ask another question about it.

How to Hide or Show Axis Labels programmatically in Core Plot?

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.

Javafx 2 - multiple view in a anchorpane

I would like to show an animation with two views - overview and closeup view in a same anchorpane.
The overview would show trucks travelling from point A to point B on a map background and the closeup view would show what is happening at point B (i.e. discharging cargo etc...). When we start the animation both the views should be in action.
I am not sure how to implement this in Javafx-2. I have created an AnchorPane called globalpane and have two children - (AnchorPane)overViewPane and (AnchorPane)closeViewPane. I have got the overview pane working. But to implement the close up view, can we make a copy of overViewPane, zoom it using scale method and present it in closeViewPane?
What is the best approach to do this ?
Thanks
Ps : I found this link which shows magnifying glass:
Why is my magnifying glass not following the mouse?
However, I am not sure if the same would work with animation running in the overview will also be updated simultaneously on the magnifying glass
I could not find anything regarding reflecting/copying/mirroring a same anchorpane twice. Therefore, I had to resort to coding them individually in my program.

jqplot enhancedLegendRendrer seriesToggle functionality override

I am trying to change the default functionality of enhancedLegendRendrer.js where in on clicking on the legend series that particular bar item in the graph gets visible/hidden.I want to change this default functionality, wherein if the user clicks on the legend series item only that series is displayed while rest of the bars are made invisible.
Jumped the gun on the post and now cannot delete. Thought the above was asking how to enable toggling on legend. Anyway, for anyone interested:
https://bitbucket.org/jab/jqplot/src/edd2f5972593/examples/legendLabels.html

Resources