Skip to main content

Reused Blocks

Reused blocks

A Reused Block is an Analytics Block that is explicitly and programmatically defined by users to be used in Canvas Dashboards.

Why do you need Reused Blocks?

Normally, when you use Visual Editor to develop Canvas Dashboards, Holistics takes care of code generation under the hood to ensure that the generated code correctly reflects how your dashboard works. There are multiple ways to programmatically achieve the same outcome, so we pick a particular path to generate code so that you don't have to worry about it.

But there are cases where you may want to explicitly define Analytics Blocks as code yourself:

What happens when you define Reused Blocks?

When you explicitly define an Analytics Block as a reusable piece of code, it becomes a Reused Block which cannot be edited using the Visual Editor. You must switch to code mode and edit the code yourself. This behavior aims to avoid accidentally replacing user-defined code with auto-generated code.

aml-reused-block-cannot-be-edited-in-visual-editor

Let us know what you think about this document :)