# Chart component

**URL:** <https://forum.inductiveautomation.com/t/chart-component/10971>\
**Category:** Ignition\
**Created:** [December 30, 2015, 8:20pm UTC](https://forum.inductiveautomation.com/t/chart-component/10971 "2015-12-30T20:20:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr.K001](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Mr.K001](https://forum.inductiveautomation.com/u/Mr.K001)\
**Post date:** [December 30, 2015, 8:20pm UTC](https://forum.inductiveautomation.com/t/chart-component/10971/1 "2015-12-30T20:20:24Z")

</div>

Hey guys, here with another question, I been messing around chart component of designer and I’m not sure what i’m trying to do is possible.  
I have 3 data sets that all they do is grab a t\_stamp and a integer value(total parts made in a shift) from the table, I have 3 shifts so 3 datasets, looks fine, does what it suppose to. as you see in the screenshot each dot on the 3 lines is a value that was grabbed from the DB, is it possible if I click on a point more information regarding that shift appears on the screen? I don’t want to add anymore lines to the chart, just like to show some more info based on the dot client is clicking on. Thanks

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [December 30, 2015, 11:10pm UTC](https://forum.inductiveautomation.com/t/chart-component/10971/2 "2015-12-30T23:10:46Z")

</div>

I would build a custom popup context menu for it and then do something based on the user selection.

On the Mouse Released of the chart do something like  
(BUTTON2 is the mousewheel button on windows)  
You would put your code in the result section of each.  
You could grab the start time, end time of the chart and fill a power table, open another window using the charts datasets, etc. The possibilities are endless actually.

```auto
if event.button == event.BUTTON2:
    def getShiftA(event):
        result = system.gui.messageBox("You Selected Shift A") 
    def getShiftB(event):
        result = system.gui.messageBox("You Selected Shift B")
    def getShiftC(event):
        result = system.gui.messageBox("You Selected Shift C") 
    def getAllShifts(event):
        result = system.gui.messageBox("You Selected All Shifts")
 
    names = ["Shift A More Info", "Shift B More Info", "Shift C More Info", "All Shifts More Info"]
    functions = [getShiftA,getShiftB, getShiftC, getAllShifts]
    menu = system.gui.createPopupMenu(names, functions)
    menu.show(event,event.x,event.y)
```

---

<div class="post-metadata">

**Author:** ![Mr.K001](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Mr.K001](https://forum.inductiveautomation.com/u/Mr.K001)\
**Post date:** [December 31, 2015, 5:41pm UTC](https://forum.inductiveautomation.com/t/chart-component/10971/3 "2015-12-31T17:41:16Z")

</div>

Interesting, I will definitely give that a try and let you know on the progress. Thanks!

---

<div class="post-metadata">

**Author:** ![Mr.K001](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Mr.K001](https://forum.inductiveautomation.com/u/Mr.K001)\
**Post date:** [December 31, 2015, 6:38pm UTC](https://forum.inductiveautomation.com/t/chart-component/10971/4 "2015-12-31T18:38:16Z")

</div>

MMaynardUSG, Is it possible to use the auto rang on an axis( in my case Y axis) and also be able to specify how the numbers show up, in my case I’d like to see 0,100,200,300…  
Only thing I could think of was the number format overwriting but I could’t find any sort of examples on it to see what it means by “number format changing”…

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [December 31, 2015, 7:36pm UTC](https://forum.inductiveautomation.com/t/chart-component/10971/5 "2015-12-31T19:36:04Z")

</div>

The actual JChart component has a property called Step, but it doesn’t seem to be exposed by Ignition.  
Someone with a deeper knowledge of how to expose the properties could probably show you how to modify that.

---

<div class="post-metadata">

**Author:** ![Mr.K001](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Mr.K001](https://forum.inductiveautomation.com/u/Mr.K001)\
**Post date:** [December 31, 2015, 9:56pm UTC](https://forum.inductiveautomation.com/t/chart-component/10971/6 "2015-12-31T21:56:21Z")

</div>

[quote=“MMaynardUSG”]The actual JChart component has a property called Step, but it doesn’t seem to be exposed by Ignition.  
Someone with a deeper knowledge of how to expose the properties could probably show you how to modify that.[/quote]  
It’s not a big deal, I was just curious to know if it is possible doing that using a chart component.
