Perspective Sparkline in View Template

I'm making a template view that happens to have a sparkline in it. I was wondering if there was a way to use a view parameter on that sparkline to bring in historical data, and put that view parameter in the udts field, for drop-in tagging. I'm thinking there must be some trick to configuring the view parameter to look at a UDT member that is returning historical arrays periodically. Could anyone point me in the right direction?

I presume you're using a udt type parameter in your view params? I'm no expert here as I never use them, but there should be the udt's full path in the UDT type meta that you can use to bind the chart data to

Ok, I've got a solution with a lot of help from Fadil Shaikh at tech support. The goal is to drag an instantiated UDT from the tag list onto a container and have it instantly populate, and one of the components in the view associated with that UDT happens to be a sparkline. Hopefully I'm describing this right.

(1.) The UDT (named myUDT, for example) should have a parameter that allows instantiations to reference UDTInstance1, UDTInstance2, etc. Let's say this is Instance Number. In the UDT definition, create an expression tag called (arbitrary name without spaces) "instNum" and set it to the UDT's parameter, such that the expression says {Instance Number}. Meanwhile, the tag that you want historicized should of course be set to log to your database (let's say it's called "trendedTag").

(2.) For the instantiated UDT, right click and restart that tag to refresh it.

(3.) In the view to be associated with the UDT, set up a view param object (called "myParameters", for example) and make sure it has "instNum" in it as one of its members, and is set to input. It doesn't need a binding. As usual, for the dropconfig, add an object to udts with (a) Type: myUDT (b) param: myParameters (c) action: bind.

(4.) Down in the sparkline in that view, set up a custom tag of type array. It could just be called "key." It needs to have 3 members: (a) aggregate: set to Average (b) alias: set to Chart (c) path: set to something arbitrary. Then click on the binding for (c) path and give it an expression: "[default]UDTInstance" + {view.params.myParameters.instNum} + "/trendedTag". Include the quotes. [default] happens to be my tag group; UDTInstance is part of the UDT instance name; {view.params.udtinstancepar.instNum} is a reference to the view parameter instNum, which is picking up the UDT parameter that distinguishes one instance from another; "/trendedTag" is the rest of the path to the tag being logged. If the UDT instance's Instance Number parameter is set to 2, the expression will evaluate as "[default]UDTInstance2/trendedTag". The custom array will pick up the view param's reference to a specific UDT instance tag that happens to be historicized.

(5.) Finally, in the sparkline points prop, set it to a historical expression of {this.custom.key}.

(6.) Dragging the UDT instance into a container will now instantly populate, and the sparkline will begin bringing in historical values for that UDT instance's trendedTag tag.