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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Data not showing in properties of Label chart (i have to select display field and X axis field)

VaibhavShinde
16-Pearl

Data not showing in properties of Label chart (i have to select display field and X axis field)

Hi ,

 

i have bound the infotable data (All data) to Label chart but unable to see infotable fields in Properties of Chart.

as i have to select specific field as x axis and display field. using  TWX  8.5.0.

 

Thanks 

1 ACCEPTED SOLUTION

Accepted Solutions

Yes! In fact, in your code you should create infotables using data shape name, like that:

var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape({ dataShapeName: "MyDataShape" });
result.AddRow({ name: 'a', value: 1 });
result.AddRow({ name: 'b', value: 2 });
...

This will protect you from some of those typos.

 

/ Constantine

View solution in original post

9 REPLIES 9
ankur
6-Contributor
(To:VaibhavShinde)

Hi Vaibhav,

 

You must bound the infotable to the Data property of the chart. After that you will get list option for x-axisfield and y-axis field  choose according to your use case.

 

Must define datashape for the infotable.

 

Thanks

Ankur

 
 

 

 

 

Hi ,

Thanks for reply, 

I am getting data now but unable to see in Chart, its showing value as 'NaN' at Y-axis. i have attached snap please check it. and i am able to see all data/fields as result of service. why its showing NaN?

VaibhavShinde_0-1589371683255.png

VaibhavShinde_1-1589371794166.png

 

Thank you

Hello @VaibhavShinde,

 

You need to select correct DataFieldX properties as well.

 

/ Constantine

Hi @Constantine ,

 

Please check below snap what i am doing..

This is infotable i am getting after running individual service which i am binding to Label Chart.

Consumed_power field is at no.4 in infotable same i selected in properties of chart.

 

VaibhavShinde_0-1589373706845.png

This is DatafieldX  as per infotable..

VaibhavShinde_1-1589373817152.png

 and the result--

VaibhavShinde_2-1589373862772.png

Thanks

Can you also show the Data Shape definition for this infotable?

this is the Datashape..

VaibhavShinde_0-1589374583071.png

Thanks

Looks like you renamed your data shape fields! You have "ConsumedPower" on one screenshot and "Consumed_power" on the others. Make sure they are all aligned and it will work.

 

/ Constantine

@Constantine ,

 

thanks for quick reply, what i understood here is, both Datashape and infotable field name's should be same right?

correct me if i am wrong.

 

Thanks

 

 

Yes! In fact, in your code you should create infotables using data shape name, like that:

var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape({ dataShapeName: "MyDataShape" });
result.AddRow({ name: 'a', value: 1 });
result.AddRow({ name: 'b', value: 2 });
...

This will protect you from some of those typos.

 

/ Constantine

Top Tags