7.1 Adding HTML
Last updated
Last updated
You add HTML to the chart using UDI.createHTML(). For example:
A second call to UDI.createHTML() replaces the previous HTML with the new HTML. You can remove your HTML from the chart using UDI.removeHTML().
The options which are passed to UDI.createHTML() can contain the following properties. You must provide either the html or url.
Property
Description
html
Text of the HTML to add; a complete document with <html> and </html> tags
url
URL of a web page to load. Standard browser security requires that this is hosted at a secure https:// address.
foreground
Controls whether the HTML is displayed in the background, behind the indicator drawing, or in the foreground. If your HTML includes elements for the user to interact with, such as buttons or fields, then you must set foreground:true.
style
Lets you set CSS style options on the iframe container, particularly the position. For example:
style: {opacity: 0.5, pointer-events: none}
You cannot set the position, which is always absolute (within its container). You cannot set zIndex, which is instead controlled by the foreground option.