iOS-Charts: How to include a gap between data points & lines - swift

I'm using iOS-Charts with Swift to draw line charts, and I'm looking for a way to place a gap between the data points (circles) and the lines themselves.
Something like this: example
I've tried playing around with some values under the drawLinear section of LineChartRenderer.swift, but I don't know enough about Core Graphics to do anything useful.
Having a white outline for the circles is unfortunately not an option, since I'm displaying multiple datasets with images containing transparent layers, and the datasets need to be able to overlap (as in the example image)
Any help would be greatly appreciated - thanks :)

Related

Change Shape Fill based on Shape Data in Visio

Wondering if someone can help me with what I thought was a simple Shapesheet issue.
I'd like the fill colour of a shape to change based on one of the shape data values. I thought I could do this easily:
FillForeground: If(Prop.Colour="Blue",XXX,YYY)
But this doesn't work? (Visio 2021)
I've 5 list values for the data and would like a different fill colour for each? Weirdly, I can see that the value does change based on the data selection, but the actual colour seen in on the page doesn't.
Obviously, I'm not much of a coder, just an enthusiastic meddler.
I've stuck at:
=IF(Sheet.3780!Prop.StringSection="Firsts",THEMEGUARD(MSOTINT(THEME("LineColor"),40)),THEMEGUARD(MSOTINT(THEME("AccentColor"),40)))
(The shapes to colour are within a group)
Thanks
Steve
Steve !
FillForeground: If(Prop.Colour="Blue",XXX,YYY)
But this doesn't work? (Visio 2021)
For compare strings in ShapeSheet you must use STRSAME function
Use syntax like this:
IF(STRSAME(Prop.color,"blue"),4,3)

Calculating transform-origin of two overlapping elements

I have an image (represented as green) overlaying a box (represented as blue), and the image is going to be transform: scale()ing in size. When this happens I need all edges of the image to complete their transformation at the same time.
To do this I need to calculate the transform-origin based on where the image is located overtop of the bounding box, using JavaScript. Assume I know all the coordinates that getBoundingClientRect() provides, for both elements.
In the six examples below I’ve placed a red dot where the transform-origin percentages should intersect.
I just can’t figure out the math to get there. The closest I've come to finding an answer is with this question, but it's a little vague and I'm not sure I fully understand the answer itself. I would greatly appreciate help with this, and will happily provide more details if I'm missing something.
After fiddling around, I figured out the formula is:
(
(box.left - image.left) /
(image.width - box.width)
) * 100

Separation of Overlapping and Touching Lines

Can anyone suggest an approach or method for the separation of overlapping and touching lines within handwritten documents?
I can segment text lines. Now i want to separate the connected lines.
Here it is my image:
Thanks
You try using the watershed over the distance function of the connected component set to separate them like here and here. Though its possible it could oversegment the result based on the shapes.

D3.js pie chart labels for slices not tweening

When I click on the various hyperlinks to tween my chart: while the pie's slices are tweening but I cannot figure out how to bring along each slice's label.
A mostly working JSfiddle is here: http://jsfiddle.net/lukateake/MX7JC/
Thanks in advance for any insights you can provide me. I promise to update the fiddle with whatever solution we discover as I imagine this effect is of interest to a great many D3'ers.
The main issue here is in your updateChart function - while you rebound the data to arcs, you did not do so for sliceLabel: (second line added)
arcs.data(donut(data.pct)); // recompute angles, rebind data
sliceLabel.data(donut(data.pct));
One other small thing - your slice label text selection seems a little bit strange:
var sliceLabel = label_group.selectAll("text.value")
but you are creating no text with class = "value"; this doesn't really end up affecting much, but might cause problems in other implementations - selectAll("text") or selectAll("text.arcLabel") might be more appropriate here.
updated fiddle at http://jsfiddle.net/MX7JC/9/

how to restrict scrolling for +ve part in cpxygraph

I am new to core plot SDK, implemented core plot in my app. i need to restrict -ve part of graph. i.e always i will have +ve values for graph((1,1),(10,15),(20,15)).i need horizontal , vertical scrolling for +ve part only.So i want to restrict remaining 3 parts of graph. I tried in all ways help less, so posted here. if any one already done with this type requirement, please help me ASAP.
Thanks in advance.
The easiest way to restrict the scrolling ranges is to set the globalXRange and globalYRange properties on your plot space. If you want more control, you can use a plot space delegate. CPTestApp (the Mac version) demonstrates both techniques.