# Perspective Tree Item Style Based on Data Object

**URL:** <https://forum.inductiveautomation.com/t/perspective-tree-item-style-based-on-data-object/71627>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 27, 2023, 11:27am UTC](https://forum.inductiveautomation.com/t/perspective-tree-item-style-based-on-data-object/71627 "2023-03-27T11:27:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![colin.bonner](https://avatars.discourse-cdn.com/v4/letter/c/a87d85/32.png) [@colin.bonner](https://forum.inductiveautomation.com/u/colin.bonner)\
**Post date:** [March 27, 2023, 11:27am UTC](https://forum.inductiveautomation.com/t/perspective-tree-item-style-based-on-data-object/71627/1 "2023-03-27T11:27:57Z")

</div>

I would like to be able to able to set the style on a tree item based on a value contained in the tree items 'data' object, is this possible?

The below forum post is along the lines of what I need but this example uses a style class to find an item path property in the DOM and set the style accordingly. I cannot figure if it's possible to access the items 'data' object to use in a PSC. For example a tree item in my tree is as follows:

`{"label":"Tree Item 1","data":{"TestingStatus":1},"itemPath":[1,0,1]}`

> [@Change child style in tree structure](https://forum.inductiveautomation.com/t/change-child-style-in-tree-structure/62391/2):
>
> I tried adding color : blue to Grandchild 2 in the default items of the Tree component and got message, items[0].items[0].items[1].color: is not defined in the schema and additional properties are not allowed I’d say the answer is ‘no’.
