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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

How to use Bar Chart in ThingWorx Studio

qumar
1-Newbie

How to use Bar Chart in ThingWorx Studio

Hi ,

      I have a bar chart and i have to display some data on it. I don't know the format of data. i want to get the data from any function(let's say getData()). when a button is clicked it should call the function, get the data and display it on bar chart.

Thanks and Regards,

Qadir

5 REPLIES 5
katte
1-Newbie
(To:qumar)

The bar chart functionality is quite similar to ThingWorx (composer) bar chart, the input format should be of infotable type. You can add the external data and bind the service result (of infotable type) to the 'data' property of the widget.

qumar
1-Newbie
(To:qumar)

Hi giri, let me try what you suggested, i am going to create the function in .js file and will invoke it on button click event. Is there any way to change the css of vertical of charts, specially color of different vertical of y-axis?

Regards,

ankigupta
5-Regular Member
(To:qumar)

Qadir umar​,

If you are using Data from ThingWorx; you can actually bind the Button directly to the service to call the service on button click. So, on click of Button service will be called and show the Data in ThingWorx Studio.

Ankit Gupta​, i don't want to get data from Thingworx, i want to call the function in my .js file , in the function i will create data manually in same format as we get from thingowrx. the real question is , in my chart if we have four vertical along y-axis , i want to change the color of only one vertical dynamically based on data we are providing.if the data is less than 12, it should be fill red color.

chart.PNG

for eg. we have chart  Tempreture vs Month graph, i want to fill the red color to my verticals if tempreture is less than 12 degree Celcius. This is my actual requirement .

TomasCharvat
14-Alexandrite
(To:qumar)

 Hello qumar,

 

can you post here how the data format for Bar Chart looks?

I need to fill the Bar Chart too from .js function and this will help me a lot.

 

Thanks,

Tomas

Top Tags