Skip to main content
1-Visitor
March 12, 2021
Solved

How to color a single bar in a bar chart depending on a value from a different table?

  • March 12, 2021
  • 1 reply
  • 2953 views

I have a Bar chart on my mashup. That is showing few series of data. I want to change a color of a particular bar within a series in a bar chart, depending on a value that is stored in a different table. I tried to do some state formatting. But it is changing the color of the entire series. I just want to change only a particular bar's color. I am attaching an image for the reference.

Also is there any way to change color of bars from a service?

 

Thanks in advance.

Best answer by c_lowy

Hi @RajatBain,

 

Which version of ThingWorx are you using ?

 

Starting ThingWorx 9.1.0 I believe you should be able to achieve that using the options introduced to define State-Formatting by Serie ;

 

1 reply

c_lowy16-PearlAnswer
16-Pearl
March 17, 2021

Hi @RajatBain,

 

Which version of ThingWorx are you using ?

 

Starting ThingWorx 9.1.0 I believe you should be able to achieve that using the options introduced to define State-Formatting by Serie ;

 

RajatBain1-VisitorAuthor
1-Visitor
March 17, 2021

Hi @c_lowy 

 

Thank you for your response. I am using Thingworx 9.1.0 and I don't see any option for state formatting for individual data series. I have state formatting option that is applicable for all the data series. Can you please tell me if I am missing anything and also, can you please share your data infotable datashape?

RajatBain_1-1615976100084.png

 

Thanks,

Rajat Bain

 

 

16-Pearl
March 22, 2021

@RajatBain 

 

Update the property value #NumberOfSeries to the number of series you have and you will get the state formatting option for all the series.

SachinSharma_0-1616392027161.png

 

 

Regards,

Sachin