You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3df9874
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: index.md
+28-8Lines changed: 28 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,9 @@ Create a new JavaScript class in the widgets folder of the view page. This class
71
71
72
72
The new class can optionally extend the `D3Visualization` class, which already has methods for fetching the data, creating and clearing the chart svg and the tooltip event handlers. To support the controls and export functionality of the toolbar, a `ControlsHandler` and an `ExportHandler` should be created and updated.
73
73
74
-
The new class also needs to provide an `init` and a `render` method. The init method will be called once after creation of the widget and should contain the first data fetch and rendering as well as the configuration of the controls. The render method will be called every time the chart data changes, for example after a filter is applied. You can use the following code as a starting point:
74
+
The new class also needs to provide an `init` and a `render` method. The init method will be called once after creation of the widget and should contain the first data fetch and rendering as well as the configuration of the controls. The render method will be called every time the chart data changes, for example after a filter is applied.
75
+
76
+
You can use the following code as a starting point:
@@ -117,9 +119,11 @@ Create a new JavaScript class in the `handler/widgets` folder of the editor page
117
119
118
120
The new handler can optionally extend the `FormHandler` class, which already has some methods for creating formular fields like text inputs and selects and initialization of the buttons.
119
121
120
-
A static field with default values for the widget configuration is required.
122
+
A static field with default values for the widget configuration must be set.
123
+
124
+
The handler must define three methods: `init`, `createForm`, and `saveForm`. The `init` method is called once when the handler is created and should contain the initialization logic, such as setting up buttons or event listeners. The `createForm` method is executed each time the settings modal is opened. It must return a DOM element that contains the form fields used to modify the configuration. The `saveForm` method is triggered whenever the user saves changes in the modal. It should apply those changes to both the internal state and the DOM.
121
125
122
-
The handler needs to provide an `init`, a `createForm` and a `saveForm` method. The init method will be called once after creation of the handler and should contain the initialization of the buttons. The other two methods get called when the options formular opens/closes. They are for creating and saving the the formular data. You can use the following code as a starting point:
126
+
You can use the following code as a starting point:
Create a new JavaScript class in the `handler/generators` folder of the editor page. This class will get the generator configuration.
180
+
181
+
The new handler can optionally extend the `FormHandler` class, which already has some methods for creating formular fields like text inputs and selects and initialization of the buttons.
182
+
183
+
Static fields for the generator token (will be displayed as an icon for the generator), a short description of the generator (will be displayed in a tooltip) and the default values for the generator configuration must be set.
184
+
185
+
The handler must define three methods: `init`, `createForm`, and `saveForm`. The `init` method is called once when the handler is created and should contain the initialization logic, such as setting up buttons or event listeners. The `createForm` method is executed each time the settings modal is opened. It must return a DOM element that contains the form fields used to modify the configuration. The `saveForm` method is triggered whenever the user saves changes in the modal. It should apply those changes to both the internal state and the DOM.
186
+
187
+
You can use the following code as a starting point:
0 commit comments