# What techniques are best to make charts dynamic like Marketwatch's advanced charting?

**URL:** <https://forum.inductiveautomation.com/t/what-techniques-are-best-to-make-charts-dynamic-like-marketwatchs-advanced-charting/70833>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 9, 2023, 2:38pm UTC](https://forum.inductiveautomation.com/t/what-techniques-are-best-to-make-charts-dynamic-like-marketwatchs-advanced-charting/70833 "2023-03-09T14:38:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [March 9, 2023, 2:38pm UTC](https://forum.inductiveautomation.com/t/what-techniques-are-best-to-make-charts-dynamic-like-marketwatchs-advanced-charting/70833/1 "2023-03-09T14:38:19Z")

</div>

> **[SPY | SPDR S&P 500 ETF Trust Advanced Charts | MarketWatch](https://www.marketwatch.com/investing/fund/spy/charts?mod=mw_quote_advanced)**
>
> SPDR S&P 500 ETF Trust advanced ETF charts by MarketWatch. View SPY exchange traded fund data and compare to other ETFs, stocks and exchanges.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/8/78a255af246622914bdfb0cab110377997143810.png)

There are all these dropdowns that change ranges and what things are drawn on the graphs.

I think they are changing queries and parameters. Or are they changing views?  
Or is changing views what I would have to do?  
I am not sure how to dynamically change the query and the parameters on a page.

I think it is a different query when looking at the 1 day.  
I can't tell what is done with parameters vs changing the query.

It is very snappy, and I am trying to do a small amount of that.

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [March 9, 2023, 3:33pm UTC](https://forum.inductiveautomation.com/t/what-techniques-are-best-to-make-charts-dynamic-like-marketwatchs-advanced-charting/70833/2 "2023-03-09T15:33:04Z")

</div>

Also, how do I make a tooltip show the values from multiple series in an xy chart?

Alternatively because I can show multiple values in a tooltip for that, can I make a stacked bar chart in a time series chart, ?

---

<div class="post-metadata">

**Author:** ![leonardo.godoi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/leonardo.godoi/32/27178_2.png) [@leonardo.godoi](https://forum.inductiveautomation.com/u/leonardo.godoi)\
**Post date:** [March 9, 2023, 4:25pm UTC](https://forum.inductiveautomation.com/t/what-techniques-are-best-to-make-charts-dynamic-like-marketwatchs-advanced-charting/70833/3 "2023-03-09T16:25:28Z")

</div>

I'll be wathcing this post as i'm interested to see how this would be achieved within Perspective, i did some windows in **Vision** where the user could select any historical tag from a dynamically created list, add it as a pen and edit pretty much anything that the easy chart allowed to be edit on a pen, also options to add calculated pens based on other pens, select date ranges or make it realtime, subplots, save and load configurations, export,etc...  
Basically everything that was available to be configured via the datasets in a Vision Easy Chart and its properties, while not as pretty, the result looks similar to what i remember so i'm sure it can also be done in perspective.

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [March 24, 2023, 12:52pm UTC](https://forum.inductiveautomation.com/t/what-techniques-are-best-to-make-charts-dynamic-like-marketwatchs-advanced-charting/70833/4 "2023-03-24T12:52:21Z")

</div>

Marketwatch seems to receive the inputs and write new series to their charting object dynamically.

I don't know that I saw a tutorial on doing that in Ignition.  
I think it can be done, but I don't know the syntax to target or if all the characters needed would be allowed.  
When I try to bind tooltips I can't write the # or % symbol for example.

Even if I knew how to target, the other part is that they must be building the additional columns from a dataset dynamically.  
I would want to do that in named queries, but I think maybe that can only be done with functions on the database or has to be a generated dataset in a script.
