render a circle onclick event in highcharts

Poles

I have a requirement to render circles on click event in highcharts. The x,y value should be the point getting from click event I mean

var x = event.xAxis[0].value;
var y = event.yAxis[0].value;

If I click more than one point there should render another circle.

js fiddle:

http://jsfiddle.net/das_palash89/WN3XC/1/

Strikers

Poles,

Renderer draws the shape based on the inputs given to it. It accepts its input in pixels.

When you pass x and y positions for it to render they have to be in pixels, but the x and y values you will be getting from the click events will be in corresponding x and y units. You need to convert them into respective pixels and then pass them to the renderer.

For this highcharts has provided toPixels() method on both the axes. you can convert the axis Units into corresponding pixel positions using them

API ref

I've updated your JS fiddle here

Hope this will help you

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to hide Axes Crosshairs by onclick event in Highcharts

From Dev

onclick event when part of highcharts funnel is clicked

From Dev

How to hide Axes Crosshairs by onclick event in Highcharts

From Dev

HighCharts Stacked Column Adding Onclick Event to the chart

From Dev

Having Highcharts directive how to get/change current path onClick event?

From Dev

How to render different content with onclick event using ReactJS

From Dev

Highcharts Render Animation Reverse?

From Dev

Render a list of highcharts in Rmarkdown

From Dev

Highcharts: Add circle to scatter plot

From Dev

Highcharts - Pie inner circle size

From Dev

Highcharts (rCharts) onclick tooltip

From Dev

Reverse onClick Event onClick

From Dev

identifying event on arc of circle

From Dev

React, Adding onClick event directly to Components instead of render element inside said component.

From Dev

Browser can't render the circle

From Dev

translate event in highcharts

From Dev

Catch panning event in Highcharts

From Dev

AngularJs Render div onclick

From Dev

AngularJs Render div onclick

From Dev

Render a timer component onClick

From Dev

Highcharts Render Text after animation

From Dev

HighCharts render chart already zoomed

From Dev

highcharts render black on ajax refresh

From Dev

Position text and circle in Highcharts graph dynamically?

From Dev

HighCharts - Pie Semi Circle (Arrow in Chart)

From Dev

Highcharts full circle gauge as in Knob js

From Dev

Position text and circle in Highcharts graph dynamically?

From Dev

Highcharts 5 - Radar Charts with circle round the outside

From Dev

Draw a circle on a Long Press event

Related Related

HotTag

Archive