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.
xxxxxxxxxx
•
<html>
<head>
<title>Hello World</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="./index.css">
<!-- GetLibs: An in-browser module loader for quick demos -->
<script src="https://unpkg.com/getlibs"></script>
</head>
<body>
<div id="placeholder">
<!-- Placeholder for Visualization -->
</div>
<script>
// Load Example JavaScript (via GetLibs)---
System.import('./index.js');
</script>
</body>
</html>
https://unpkg.com/getlibs