Perspective Ad Hoc Trends Color

ignition80
perspective
#1

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!

0 Likes

#2

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.
0 Likes