Perspective Ad Hoc Trends Color

Hello,

I’ve recently downloaded Matthew Raybourn’s Perspective Ad Hoc Trending project off of Ignition Exchange (great work Matt!). I’ve been modifying this project to suit my needs, but had a question regarding the color column of the Timeseries chart. Currently, the color column displays rgba values, which are not easy to discern what color is displayed. I’m wondering if I can either:

  1. translate the rgba value to display the color that the trend is as text
  2. replace this with a color palette tool

Was wondering if anyone has come across this before. Thanks in advance!

Thanks! I’m glad you like the Perspective Ad Hoc chart!

  1. Translate the rgba value to text - Automatically translating from rgba values to standard color names would be a bit difficult, but you can always manually swap out those values for standard color names. If you look in view.custom.colors[], you will see each color stored as an object. The ‘color’ key stores the desired color as a string, so you can simply change them to red/blue/green.
  2. Color Palette Tool - You can certainly do that! There is a Color Picker on the Exchange that Travis created. The table component allows you to embed a view in a cell, instead of displaying a value. For that, you could try creating a view that simply displays a given color, with a click event that opens up the Color Picker as a popup. You can then use Perspective messaging to update components as needed.

hello, I am currently working on the Ad Hoc chart. It’s amazing! However, while I modified it to fit my needs, I am wondering in time series chart, how did you display separate graph with the same series in data.
for example, this is my data,
image
I want each column with t_stamp in separate graph, but right now all data in the same diagram, I can’t separate it. Please let me know if any thoughts. Thanks

You can set up a separate plot for each series using the plots[] property. You then need to add a new trend to the trends[] property for each separate plot. After that, point each trend to the your series, and add a column under columns[] for each trend. Set the key to the target column for each trend.

um yes, I know that I can setup separately in series and trend to achieve that. I am just wondering how did the ac hoc in ignition exchange do, because seems I did the same way as the ac hoc in ignition exchange, but my graphs are not separate

The Ad Hoc Trends resource does it the way I described above. If you enable the split plots feature, then it will create a separate plot for each in the plots[] property. If you disable the split plots feature, then it will create only one plot in the plots[] property.

hello, thanks for your reply. what i did for modifying the ac hoc trend is that, I did not use the tag browser(I delete the tag browser) , instead, I write the tag path in to the pen.path. Basically I have all pen property manually write in. Also I did not use the Axes. In result, with the splitPlot = True, I still can’t get separate graph. Any idea where I may got wrong? thanks!

It will be hard to tell what could have gone wrong after removing whole parts of the resource like that, but I can try to point you in the right direction. My suggestion is to start at the plots[] property binding and work backwards. There should be different parts of the script, one for a single plot and another for multiple. Check out what each of those is doing and try to track down what might be missing. You can also check what other properties those scripts are referencing, and make sure they still exist (and not deleted along with other components, for example).

hello thanks for your help! I got that figured out. Regrading to the ac hoc, I got another problems here. For real-rime, you can set last number of sec/min/hours, however, I want to set last number of days/week/month. I haven’t found where I can modifiy that, do you have any clue on how i can change the realtime time range to day/week/month? thanks!
image