# How to drill down into a chart?

**URL:** <https://forum.inductiveautomation.com/t/how-to-drill-down-into-a-chart/45938>\
**Category:** Ignition\
**Created:** [April 22, 2021, 10:39pm UTC](https://forum.inductiveautomation.com/t/how-to-drill-down-into-a-chart/45938 "2021-04-22T22:39:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahman.tarek](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@rahman.tarek](https://forum.inductiveautomation.com/u/rahman.tarek)\
**Post date:** [April 22, 2021, 10:39pm UTC](https://forum.inductiveautomation.com/t/how-to-drill-down-into-a-chart/45938/1 "2021-04-22T22:39:02Z")

</div>

Hi there,

I have a bar chart with line state names. What i want to do is allow the user to click onto a specific bar which would open up a popup window and show how that specific line state duration is split into different shifts

1. Now when i hover my mouse over the bar graph the tool tip shows me the line state name as you can see in the image. Is there a way to store this variable?
2. If so i can do a ‘mouseclicked’ action where i pass this variable as a parameter into the custom property of the popup window.
3. Then i can run a new script/query where i can use this custom property to filter for this specific line state name and split the line state duration by shift

Is this possible or is there a different way to ‘drill’ down into a graph?

Thanks

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/2/0200fd753c20ceedcdb29b62882f74e41a9fbed3.png)

---

<div class="post-metadata">

**Author:** ![matthew.ayre](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matthew.ayre/32/19499_2.png) [@matthew.ayre](https://forum.inductiveautomation.com/u/matthew.ayre)\
**Post date:** [April 26, 2021, 2:15pm UTC](https://forum.inductiveautomation.com/t/how-to-drill-down-into-a-chart/45938/2 "2021-04-26T14:15:14Z")

</div>

Hi @rahman.tarek, in short this functionality is not present as far as I’m aware, but it looks like it is [planned for a future release](https://ideas.inductiveautomation.com/ignition-features-and-ideas/p/xy-chart-and-pie-chart-onactionperformed).

For now could you use a popup or hidden view that has all the legend keys which a user can click on to navigate to the drilldown view?

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [April 26, 2021, 4:43pm UTC](https://forum.inductiveautomation.com/t/how-to-drill-down-into-a-chart/45938/3 "2021-04-26T16:43:05Z")

</div>

This should be able to get you started.

You'll need to add a MouseListener to the chart. You should be able to get the tool tip text and pass it to a pop up.

> [@Jfree chart - click on rendered data point](http://forum.inductiveautomation.com/t/jfree-chart-click-on-rendered-data-point/38066/12):
>
> This should do the trick: from org.jfree.chart import ChartMouseListener class CustomChartMouseListener(ChartMouseListener): def chartMouseClicked(self,e): xyItem = e.getEntity() #gets the data entity that was clicked, None if no entity was clicked if xyItem: #ensure that a data entity was clicked dataset = xyItem.getDataset() xValue = dataset.getXValue(xyItem.getSeriesIndex(),xyItem.getItem()) yValue = dataset.getYValue(xyI…
