@@ -166,6 +166,8 @@ api.setMarkers([
166166 {
167167 time: Date .now () + 1800000 ,
168168 color: ' #ff0000' ,
169+ activeColor: ' #ff5252' ,
170+ hoverColor: ' #ff1744' ,
169171 label: ' Important Point'
170172 }
171173]);
@@ -185,6 +187,37 @@ api.setSelectedEvents(['event1', 'event2']);
185187** Parameters:**
186188- ` ids ` : Array of event IDs to select
187189
190+ #### ` setSections(sections: TimelineSection[]) `
191+
192+ Updates the timeline sections.
193+
194+ ``` typescript
195+ api .setSections ([
196+ {
197+ id: ' section1' ,
198+ from: Date .now (),
199+ to: Date .now () + 1800000 ,
200+ color: ' rgba(255, 193, 7, 0.2)' ,
201+ hoverColor: ' rgba(255, 193, 7, 0.3)'
202+ }
203+ ]);
204+ ```
205+
206+ ** Parameters:**
207+ - ` sections ` : Array of section configurations
208+
209+ #### ` setViewConfiguration(viewConfiguration: ViewConfiguration) `
210+
211+ Updates the view configuration. ** Merges with the current configuration** (does not replace it entirely).
212+
213+ ``` typescript
214+ api .setViewConfiguration ({ hideRuler: true });
215+ api .setViewConfiguration ({ axes: { lineWidth: 2 } });
216+ ```
217+
218+ ** Parameters:**
219+ - ` viewConfiguration ` : Partial view configuration to merge in
220+
188221### Utility Methods
189222
190223#### ` timeToPosition(t: number): number `
@@ -240,7 +273,7 @@ const duration = api.widthToTime(200);
240273| ` currentTime ` | ` number ` | Current timestamp (aligned to seconds) |
241274| ` emit ` | ` Function ` | Event emitter function |
242275| ` getInterval() ` | ` { start: number; end: number } ` | Current timeline range |
243- | ` getVisualConfiguration ()` | ` ViewConfigurationDefault ` | Current view configuration |
276+ | ` getViewConfiguration ()` | ` ViewConfigurationDefault ` | Current view configuration |
244277| ` getTimelineSettings() ` | ` TimelineSettings ` | Current timeline settings |
245278
246279## Examples
@@ -327,7 +360,7 @@ api.setSelectedEvents(['event1']);
327360// Get current timeline state
328361const { start, end } = api .getInterval ();
329362const settings = api .getTimelineSettings ();
330- const config = api .getVisualConfiguration ();
363+ const config = api .getViewConfiguration ();
331364```
332365
333366## Implementation Details
0 commit comments