HighCharts - Inner line gradient for 3d effect - highcharts

I found a graph on the internet that I am trying to mimic. The line has a linear gradient inside the line to make it appear cylindric. Is there an option to add this in high charts? I found I can apply a linear gradient with fixed xy coordinates but they are not relative to the line but the background of the graph it self.

Related

How to detect filled line in OpenCV?

I've used Canny and findContour to detect my contours of drawn coloured lines.
However, because of this, I am currently facing a problem of having lines being bounded.
What I want is to overlay and detect the entire line.
This is what I have now:
https://imgur.com/vnwu3Qf
I want the blue detection lines to cover the entire line that is being drawn. Not just the perimeter of the line drawn.
How is this possible?
The perimeter of pen-drawn line is highlighted with blue because you are using 1 as thickness in drawContours() function. To fill it with blue, set thickness = -1 in drawContours().
Refer this

Circle with fluid/strechy stroke

Me and my team are working on an app for a client. We are trying to understand how to achieve this kind of animations (refer only to the circle stroke) :
We tried using a CADisplayLink to set up and change the circle, but it generated non-fluid results.
We couldn't find a way to create a circle from "components" of UIBezierPath and change each of the anchors.
Any suggestions on how to achieve this kind of effect, or how to construct a circle from seperated points, would be highly appricated
Best Regards,
Roi and the team
I suggest using Catmull-Rom splines. Those allow you to create smooth curves using only points that are on the curve, whereas Bezier curves require that you define control points that are not on the curve.
Once you have beginning and ending CGPaths its pretty easy to create a CAAnimation of the path from it's starting to it's ending state (although animating change to a CGPath only works correctly if the starting and ending paths in the animation have the same number and type of points.)
You could probably also use Bezier curves, but you would need to generate the control points for the circle and it's distorted shape.
Check out this sample app that uses Catmull-Rom splines to create a distorted circle shape:
http://wareto.com/animating-shapes-using-cashapelayer-and-cabasicanimation
(Written in Objective-C, but the technique is the same in Swift.)
A Catmull-Rom spline with 8 control points evenly spaced around a circle where the distance from the center of each control points is varied by ± r/12 seems about right:

Sorting ellipses by resemblance to a circle

So I need to extract ellipses that are closest to being circles using OpenCV and Java since I have lot of false ellipses found. I have found the ellipses with color extraction and
Imgproc.fitEllipse(thisContour2f);
Current idea is to check all ellipse points and calculate widths from center. Those ellipses whose width variance in value is the smallest are closest to a circle in that image. Any better ideas?
I have also tried using Hough Circle but this does not detect anything.

Core Plot scatter graph line gradient

I'm using Core Plot to draw a scatter graph. The points (which are in an ordered sequence) are connected by line segments. I need to visualize the line direction (and it might overlap or cross itself). I've been able to set each of the points to a different color form dark to light, like this:
and
I'd like to have the line change color, too, in a linear fashion from the first point to the last. How can I use CPTGradient to do this?
You can't. The gradient options for lines in Core Plot are the lineGradient to give the line a 3D effect or the lineFill (with a gradient fill) to fill the entire line path with a gradient. The lineFill works by using the line path as a mask to show part of a rectangle filled with the gradient.

Mask Core Plot data line and plot symbol to background image

I'm using a Core Plot Scatter Plot to chart data. While I want the background to be white, I'd like to mask the plot symbols and data lines to an image sitting beneath the graph. This way, the only parts of the image visible would be the "fill" of the scatter plot lines and plot symbols.
How can I mask lines and symbols to an image while still keeping the background white?
Here's a Photoshop Mockup of what I'd like to do:
Thanks!
I'm not sure it's possible. The final result will depend on the image you're trying to use. The plot is drawn on top of the plot area and graph fills. You might be able to use image fills for the line and plot symbols. Experiment with the tiled and tileAnchoredToContext properties of CPTImage to see if you can position the fill images in a way that mimics the effect you're looking for.

Resources