javascript - Surround Highcharts points -
i'm working on project have highcharts graphs populated database; 1 of them scatter graph , need surround points placed on outside area of graph.
we need graph this need area surrounding outside points of scatter; there easy way highcharts? need work on ie11 (client's specs).
we can new polygon serie make getting codebehind or database, may take development time , slow down queries. need know if there easier way via highcharts or javascript
thanks in advance.
i not familiar highcharts, not find such functionality in their api.
there easy algorithm solve problem. need have array containing border elements , connect points list here.
finding points not hard. compute linear equation between 2 extreme points (like 1 on top , right).
resulting formula looks like
f(x) = m*x + b
now check points within x-range if y-coordinate higher line (or lower when doing point on bottom). if add them border array , continue other extreme points.
Comments
Post a Comment