Skip to main content
15-Moonstone
March 10, 2020
Solved

Unable to show colors on pie chart

  • March 10, 2020
  • 9 replies
  • 7170 views

I tried  to bind colorformats dynamically on pie chart from an infotable service output . But colors are not applied on pie chart.Please find the attached screenshots.Let me know where It went wrong.Thanks in advance

Best answer by khayes1

You just need to extend the original that I sent you to have more states & alter the service to take a 'type' input parameter.

K

 

9 replies

raluca_edu
17-Peridot
March 10, 2020

Hi,

 

Could you attach entities to reproduce this issue?

What version of Thingworx you are using?

 

Thank you,

Raluca Edu

15-Moonstone
March 10, 2020

As requested I have attached th xml file below.ON mashup load you can see a pie chart with colors left bottom.After clicking on right/left button beside pie chart,I am giving dynamic colors.Then it's not working.Thanks in advance

 

Thingworx version : 8.3.2

1-Visitor
March 10, 2020

Is the answer that your info table should return something more like

PropertyName: SegmentName   (e.g. "MS" or "CUB")

PropertyValue :  300    (some integer value)

 

Then you need a state definition tied to the 'PropertyName' parameter to give you the colour you requiire. 

 

We use the pie chart for a similar thing and our infotable looks like this

khayes1_0-1583843655927.png

We then have a state definition like the below which is tied to the 'State' parameter:

khayes1_2-1583843825846.png

 

so rather than your infotable having a column for each type ("MS", "CUB" etc.) you have an infotable with one column for the type parameter and return a number of rows .

 

The pie chart is then bound to All Data from infotable service and the pie chart settings are set accordingly. In our case:

khayes1_3-1583844168600.png