cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Get selected bar in bar chart with JavaScript

Former Member
0 Likes
155

Hi everybody,

I have a question about the bar chart. I have a simple bar chart with three bars and I want to get data from the applet. I just need the number of the bar when you click on it. But the problem is that I only can get the number of the selected pen. So I need to click on the legend to get the right value. The problem is, that I don't want to use a legend.

Is there a method to get the correct number of the selected bar or is there a method to automatically change the selected pen when you click on a bar in the chart.

Accepted Solutions (1)

Accepted Solutions (1)

jamie_cawley
Product and Topic Expert
Product and Topic Expert
0 Likes

How about something like

var myChart = document.iChartAppBar.getChartObject();
var selPen = parseInt(myChart.getLastSelectedTag());
var selName = myChart.getTagName(selPen);

Jamie

Answers (0)