Giter VIP home page Giter VIP logo

radar-chart's Introduction

Glide Experimental Code Template

This is a sample and template for implementing your own Experimental Code column. It's a fully functional implementation of a simple substring column. jl-s

Getting started

The first thing to do is to fork this CODE so you have your own copy of it that you can modify. You can then try the URL of your copy (you should see it in the mini-browser on your right) in Glide. Just make sure to delete any columns you made with it, and reload Glide before you move on.

To implement your own column you only have to change two files:

  • glide.json contains metadata about your function, such as its name, a description, what parameters it takes, and what kind of result it produces.
  • function.js is the actual JavaScript code of your column.

The glide.json file should be mostly self-explanatory, except for the types. These are what's allowed:

  • string, number, and boolean are the basic primitive types. If you declare a parameter of this type, Glide will convert whichever values are passed in to that declared JavaScript type, i.e. if you declare a parameter as number, then you can be sure that the value is a JavaScript number (or undefined, which can happen for any parameter).
  • primitive is special in that it doesn’t convert the values, as far as that is possible. For example, if you have a boolean column with a string value of "True", if you declare a parameter as boolean, Glide will pass it as the boolean true, but if you declare it as primitive, Glide will pass the string "True".
  • uri, image-uri, audio-uri, date-time, markdown, phone-number, email-address, and emoji are string types, i.e. Glide will pass them as strings to your code, and you have to return them as strings, but Glide treats them specially. For example, if your computed column declares that it returns date-time, then you can use all the date/time comparison operators on the result.
  • Arrays of primitive values are declared as, for example { "kind": "array", "items": "string" }, which declares an array of strings.

The implementation file has comments explaining it.

If you make a change to your glide.json or code when you’re building your column, click the “Reload” button in the column configurator in Glide, which causes Glide to unload your old manifest and code. If you don’t, you won’t see your changes take effect in the Data Editor.

radar-chart's People

Contributors

thinhdinhlca avatar lowcodeagency avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.