# Pie Chart with parameters

**URL:** <https://forum.inductiveautomation.com/t/pie-chart-with-parameters/14783>\
**Category:** Ignition\
**Created:** [July 13, 2017, 2:26pm UTC](https://forum.inductiveautomation.com/t/pie-chart-with-parameters/14783 "2017-07-13T14:26:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ray\_Carnahan](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@Ray\_Carnahan](https://forum.inductiveautomation.com/u/Ray_Carnahan)\
**Post date:** [July 13, 2017, 2:26pm UTC](https://forum.inductiveautomation.com/t/pie-chart-with-parameters/14783/1 "2017-07-13T14:26:01Z")

</div>

Hello,

I’m trying to just make a simple pie chart in the reporting program with three values (up time, static time, and down time). I have all these values being calculated using expression tags. I can import them into the data of the report as a parameter, but I can’t figure out how to inject them into the pie chart.

Thanks for the help

---

<div class="post-metadata">

**Author:** ![Ray\_Carnahan](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@Ray\_Carnahan](https://forum.inductiveautomation.com/u/Ray_Carnahan)\
**Post date:** [July 13, 2017, 4:24pm UTC](https://forum.inductiveautomation.com/t/pie-chart-with-parameters/14783/2 "2017-07-13T16:24:22Z")

</div>

NVM I just ported the tags to my database and then ported them into the Pie chart. Unless someone has a better way of doing it?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 14, 2017, 12:25am UTC](https://forum.inductiveautomation.com/t/pie-chart-with-parameters/14783/3 "2017-07-14T00:25:54Z")

</div>

That when I would use scripting to add a manually-constructed dataset with the one row.

---

<div class="post-metadata">

**Author:** ![Ray\_Carnahan](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@Ray\_Carnahan](https://forum.inductiveautomation.com/u/Ray_Carnahan)\
**Post date:** [July 14, 2017, 1:42pm UTC](https://forum.inductiveautomation.com/t/pie-chart-with-parameters/14783/4 "2017-07-14T13:42:28Z")

</div>

Could you give me an example or point me to an area that has an example? That would be more efficient than what I have now.  
Thanks for the help

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [July 15, 2017, 3:42pm UTC](https://forum.inductiveautomation.com/t/pie-chart-with-parameters/14783/5 "2017-07-15T15:42:18Z")

</div>

There are the “toDataset” scripts: [https://support.inductiveautomation.com/usermanuals/ignition/index.html?system\_dataset\_todataset.htm](https://support.inductiveautomation.com/usermanuals/ignition/index.html?system_dataset_todataset.htm)

You just need to figure out when to run them: on a tag trigger, on a gui timer, … You can save the dataset to a custom memory tag, or directly put it on the table too. The first will run on the server, the second on the client. So if the table is opened seldomly, a gui-timer and writing it directly to the table might be best. If it’s open constantly, on multiple clients, it will be better to calculate the table on tag triggers.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 15, 2017, 7:05pm UTC](https://forum.inductiveautomation.com/t/pie-chart-with-parameters/14783/6 "2017-07-15T19:05:14Z")

</div>

See the section on “Script Data Source” in the user manual’s [Scripting in Reporting](https://docs.inductiveautomation.com/display/DOC79/Scripting+in+Reporting) page.
