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

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

SOLVED
Highlighted
Moonstone

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
Highlighted

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

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
Highlighted

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

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

 
 

 

 

 

Highlighted

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

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

Highlighted

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

Hello @VaibhavShinde,

 

You need to select correct DataFieldX properties as well.

 

/ Constantine

Highlighted

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

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

Highlighted

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

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

Highlighted

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

this is the Datashape..

VaibhavShinde_0-1589374583071.png

Thanks

Highlighted

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

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

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

@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

 

 

Highlighted

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

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

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!