1

google chart in form

I am trying to insert google chart in a form what is the code

10 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 2 yrs ago
    • Reported - view

    subzwari

    Maybe this https://forum.ninox.com/t/h7hrmm9 helps. 
     

    Steven

    • subzwari
    • 2 yrs ago
    • Reported - view

    Hi Steve, Thanks, I have tried the code but the formula field shows only the tittle no graph. I replaced 'total Counts' after the coma with my formula field that contains the data, and did this for all rows, but nothing shows.
     

    var data = google.visualization.arrayToDataTable([
              ['Status Counts', 'Total Counts'],
              ['Complete'," + Complete + "],
              ['In Progress'," + 'In Progress' + "],
              ['Unstarted'," + Unstarted + "],
              ['On Hold'," + 'On Hold' + "]
            ]);
    • Ninox partner
    • RoSoft_Steven.1
    • 2 yrs ago
    • Reported - view

    subzwari

     

    more info on the google chart website.

     

    Steven

    • Rafael Sanchis
    • Rafael_Sanchis
    • 2 yrs ago
    • Reported - view

    RoSoft_Steven 

    Hi again Steven, never work with Google Chart, it is posible to generate this type of grah with Google graph an import it to Ninox.

    Sorry again with my problem 😞 

      • Ninox partner
      • RoSoft_Steven.1
      • 2 yrs ago
      • Reported - view

      Rafael 

      I haven't try this type of graph but importing them into Ninox would require a lot of javascript and is not easy.(And not my strenght)

      Steven

      • Rafael Sanchis
      • Rafael_Sanchis
      • 2 yrs ago
      • Reported - view

      RoSoft_Steven Thanks Steven

    • subzwari
    • 2 yrs ago
    • Reported - view

    Hi Steve, thanks for detailed explanation of the code, I think I edited the wrong item in the code, I will give it a try and hope this time it will work for me.

    • subzwari
    • 2 yrs ago
    • Reported - view

    Hi Steven, Thanks for guiding me in the right direction, the graph is working perfectly, however I note it works only with number fields and not with function field, which means I have to manually enter the number for graph to update, is there a way to use function field to update the graph or have the number field take the value from the function field and enter it in number field so that graph updates automatically. Currently I am using this script on trigger after update

    let I := round('Inc per day');
    let E := round('Expense per day');
    Inc := I;
    Exp := E

    but the field only updates when I edit another field on the form.

      • Ninox partner
      • RoSoft_Steven.1
      • 2 yrs ago
      • Reported - view

      subzwari 

      Maybe wrapping your formula/funtion field in the number() function to pass in the chart.

      number('Inc per day')
      number('Expense per day')

      e.g.: 

      .....
      ['Complete'," + number(Complete) + "],
      .....
      

      Steven

    • subzwari
    • 2 yrs ago
    • Reported - view

    Hi Steve, Yes formula field is now updating the chart, Thanks

Content aside

  • Status Answered
  • 1 Likes
  • 2 yrs agoLast active
  • 10Replies
  • 204Views
  • 5 Following