How to setup chart in eform

Comments

4 comments

  • Avatar
    Dhanush

    Hi , 

    Thank you for reaching out. There is no out-of-the-box configuration for this, but it can be achieved using custom JavaScript.

    Regards
    Dhanush

    0
    Comment actions Permalink
  • Avatar
    New To Agilepoint User

    Good morning, Dhanush.

     

    I appreciate the feedback. I am not that experienced with JavaScript and learning as I go. Do you perhaps have a sample of such a JavaScript to display the required chart in Agilepoint?

    Any help would be greatly appreciated.

    Regards

    0
    Comment actions Permalink
  • Avatar
    Dhanush

    Hi , 

    Please follow below steps to achieve desired results. 

    1. Drag and drop two text area controls onto the form.
    2. Add a chart control.
    3. In the Custom JavaScript Snippet section, add the following code:

    function loadChart(){
        var chart = $("#Chart1").data("kendoChart");
        var txt3 = $('#TextArea3').val().split('\n');
        var txt2 = $('#TextArea2').val().split('\n');    
        chart.setOptions({series : [{data : txt3}]});
        chart.setOptions({ categoryAxis: {'categories' :txt2}});
        chart.setOptions({tooltip: { visible: true, template: "#: category # - #: value  #"}});
        chart.redraw();                                                                
    }

    4. Add a button control, and call this function when the button is clicked.

    Regards
    Dhanush BV

    0
    Comment actions Permalink
  • Avatar
    New To Agilepoint User

    Good afternoon Dhanush.

     

    Thank you for your assistance, it worked perfectly.

    I just wanted to enquire for additional functions for the chart, namely: How do I add a "limit line" at a fixed value across all of the recorded values?

    I appreciate your help greatly.

     

    0
    Comment actions Permalink

Please sign in to leave a comment.