The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.
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
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.
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,
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.
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 .
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