4 Replies Latest reply on Apr 17, 2017 4:43 AM by qumar RSS
    qumar Explorer

    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

      • Re: How to use Bar Chart in ThingWorx Studio
        giri Communicator

        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.

        • Re: How to use Bar Chart in ThingWorx Studio
          qumar Explorer

          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,

            • Re: How to use Bar Chart in ThingWorx Studio
              Ankit Gupta Ninja

              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.

                • Re: How to use Bar Chart in ThingWorx Studio
                  qumar Explorer

                  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 .