# How do I reference Perspective controls in Python script

**URL:** <https://forum.inductiveautomation.com/t/how-do-i-reference-perspective-controls-in-python-script/22997>\
**Category:** Ignition Early Access\
**Created:** [March 1, 2019, 5:41pm UTC](https://forum.inductiveautomation.com/t/how-do-i-reference-perspective-controls-in-python-script/22997 "2019-03-01T17:41:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [March 1, 2019, 5:41pm UTC](https://forum.inductiveautomation.com/t/how-do-i-reference-perspective-controls-in-python-script/22997/1 "2019-03-01T17:41:27Z")

</div>

I’m trying to basically build an Easy Chart using an XY chart and some controls. I’m haivng difficulty figuring out how to reference the properties on the controls to integrate user date range selections with the chart’s data filter.

Can someone point me to where I can find this information?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 1, 2019, 6:34pm UTC](https://forum.inductiveautomation.com/t/how-do-i-reference-perspective-controls-in-python-script/22997/2 "2019-03-01T18:34:24Z")

</div>

I can’t promise this will work for you, but using the default data in the table I was able to modify the displayed date range by performing the following steps:

1. Repair the actual dates in the data (due to short-sighted copying/pasting of data, all data points are on a Tuesday - find a calendar for august of 2018 and change the days to the true days of the month).
2. place two DateTime Pickers into the View.
3. Place View into Preview Mode.
4. Change the date for DateTimePicker to be 5 August **2018**.
5. Change the date for DateTimePicker\_0 to be 21 August **2018**.
6. Exit Preview Mode.
7. Bind XYChart.xAxes[0].date.range.min to DateTimePicker.props.value.
8. Bind XYChart.xAxes[0].date.range.max to DateTimePicker\_0.props.value.
9. Enter Preview Mode.
10. You should now be able to manipulate the date range.

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [March 1, 2019, 6:49pm UTC](https://forum.inductiveautomation.com/t/how-do-i-reference-perspective-controls-in-python-script/22997/3 "2019-03-01T18:49:41Z")

</div>

I poked around a bit more and discovered that I might be able to do a property binding to point the historic chart to a drop down list to change the time range (theoretically).

I’m still working my way through how the control works. So far it isn’t updating the chart when I change parameters. I also had a weird behavior when I modify the date range to show on the chart that it sometimes faults out and appears to get corrupted. I’m working off backups of my screen and trying to identify the root cause. If I figure out what happened I’ll file a proper bug report if it is a bug.

It’s good to have the list of steps you posted to play around with the other methodology with date range text boxes.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 1, 2019, 7:07pm UTC](https://forum.inductiveautomation.com/t/how-do-i-reference-perspective-controls-in-python-script/22997/4 "2019-03-01T19:07:39Z")

</div>

It could be that the dropdown is supplying a String, while my method supplies a unix timestamp (ignore the Property Editor Warnings about String expectations).

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [March 1, 2019, 7:17pm UTC](https://forum.inductiveautomation.com/t/how-do-i-reference-perspective-controls-in-python-script/22997/5 "2019-03-01T19:17:44Z")

</div>

I just posted it as a bug report.

I’m sending an int from a dropdown. That int represents an hours offset.

Thanks for your help.
