All examples By author By category About

GordonSmith

Tutorial 1: Hello World

Tutorial 1: The mandatory "Hello World" example.

Demonstrates how to import and instanciate a simple TextBox "Widget".

1 - Import the required visualization:

import { TextBox } from "@hpcc-js/common";

2 - Instantiate and render the visualisation:

var widget = new TextBox()  //  Create new instance of TextBox
    .target("placeholder")  //  Nominate target on web page 
    .text("Hello\nWorld!")  //  Set a "published property"
    .render()               //  Render
;

Note: To discover all the available "published properties" for the TextBox Widget see: Dermatology-TextBox and enable the "Properties" view.