Skip to main content
17-Peridot
September 29, 2022
Question

Dynamic Style for Bars in Bar chart

  • September 29, 2022
  • 1 reply
  • 888 views

Hi Experts,

 

I have a very specific requirement to highlight certain bars in a Bar Chart without changing original colors of the bars.

 

Current scenario: Data infotable is bound to Chart and chart adjusts and displays bars according to the data value with different color for all bars.

 

Expected: Data infotable has 2 values beyond threshold and chart should highlight those 2 bars in red color and rest of the bars should remain in original(different) colors.

 

Tried and didn't work: Applied state formatting with a threshold value which turns all the bars meeting condition in red color and rest of them in another single color. Attached is the screenshot of the same.

TanmeyTWX_1-1664460168835.png

 

 

Example: Display top 2 fruits bars in red which has highest sales i.e. Banana and Pear.

 

TanmeyTWX_0-1664459932522.png

 

1 reply

17-Peridot
December 19, 2022

Hello @TanmeyTWX,

What version of ThingWorx and Which Widget are you using?
Have you looked at using DataSeriesStyle State Definitions?

Thanks

Peter