It is currently Sat Nov 01, 2014 3:55 pm Advanced search

Is it possible to draw an ellipse in highcharts?

Technical support, bug reports and more.

Is it possible to draw an ellipse in highcharts?

Postby jimerik » Thu Feb 23, 2012 10:03 pm

I need to draw an ellipse, more spesifically a von mises ellipse (http://upload.wikimedia.org/wikipedia/c ... ess_2D.png)
Is there a way to do this in highcharts?

Rgds
jimerik
 
Posts: 2
Joined: Thu Feb 23, 2012 9:41 pm

Re: Is it possible to draw an ellipse in highcharts?

Postby cailie » Fri Feb 24, 2012 10:02 am

Hi Jimerik,

Here are all the things you can draw: http://www.highcharts.com/ref/#renderer

As you can see, the ellipse or oval is not listed as one of the shapes. And the arc function supports only a constant radius. That leaves the path function. You could specify elliptical arcs in SVG (See http://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands). But as the Highcharts documentation states, the path function's VML support is less flexible. The closest thing to what you want is 'curveTo', which draws a Bezier curve rather than an elliptical one (See http://www.w3.org/TR/NOTE-VML#_Toc416858391). There are techniques for approximating ellipses with Bezier curves.

Another thing you could try is to plot generated data. You could generate data with the mathematical function of your ellipse, and plot it on two spline series. That might look okay.

Good luck :)
User avatar
cailie
 
Posts: 81
Joined: Sun Aug 28, 2011 9:43 am
Location: Vancouver, BC, Canada

Re: Is it possible to draw an ellipse in highcharts?

Postby jimerik » Sun Feb 26, 2012 12:26 am

Great,

Thank you for the answer.
jimerik
 
Posts: 2
Joined: Thu Feb 23, 2012 9:41 pm

Re: Is it possible to draw an ellipse in highcharts?

Postby bclaff » Sat Mar 17, 2012 8:29 pm

Perhaps a little late ...
Use transform to scale and rotate a circle to get your ellipse
http://jsfiddle.net/bclaff/Bdy9a/
:)
Bill
bclaff
 
Posts: 5
Joined: Sat Mar 10, 2012 10:15 pm

Re: Is it possible to draw an ellipse in highcharts?

Postby cailie » Sun Mar 18, 2012 7:06 am

Ah... good thinking, Bill!

Thank you :)
User avatar
cailie
 
Posts: 81
Joined: Sun Aug 28, 2011 9:43 am
Location: Vancouver, BC, Canada


Return to Highcharts Usage

Who is online

Users browsing this forum: Google [Bot] and 5 guests