cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Change Line Color Based on State Formatting

ague
12-Amethyst

Change Line Color Based on State Formatting

I am using the LabelChart widget, and need to change the color of the line based on state formatting. Is this possible? Should I use another type of chart widget?

 

I've been able to change the color of the 'on hover' action based on state formatting (by using the 'SeriesDataStyle1' property of the widget), but not the line itself.

 

 

8 REPLIES 8
slangley
23-Emerald II
(To:ague)

Hi @ague.

 

It is possible to edit the color of the line using either CSS or style definitions/state formatting based on the needs of your use case.  But in the case of a line, what criteria determines the line color?

 

If this does not guide you to a solution, please provide more details around your requirements.

 

Regards.

 

--Sharon

slangley
23-Emerald II
(To:slangley)

Hi @ague.

 

If my previous response answered your question, please mark it as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

slangley
23-Emerald II
(To:slangley)

Hi @ague.

 

If you have found a solution to your issue, your indulgence in posting it here for the benefit of other community members would be greatly appreciated.

 

Regards.

 

--Sharon

ague
12-Amethyst
(To:slangley)

Your response did not answer my question.

You say I can do this with CSS - can you send me an example? I have a boolean value that I want to use as a state based formatting - if true, line is green; If false, line is red. 

slangley
23-Emerald II
(To:slangley)

Hi @ague.

 

If you have found a solution to your issue, please post it here and mark it as the Accepted Solution.  If one of the previous responses allowed you to find a solution, please mark the appropriate one as the Accepted Solution for the benefit of others with similar questions.

 

Regards.

 

--Sharon

ague
12-Amethyst
(To:slangley)

I haven't found a solution to this issue - my team abandoned trying to research this and we've already moved forward with another option. 

ague
12-Amethyst
(To:ague)

But, from the bit of research I did do before going another route, I think the answer is that it is not possible to do this in ThingWorx.

slangley
23-Emerald II
(To:slangley)

Hi @ague.

 

Please take a look at this tutorial to see if it can guide you to a solution.

 

Regards.

 

--Sharon

 

 

Top Tags