English
@eightkk/vue-weave / core / renderEventCalendarSvg
Function: renderEventCalendarSvg()
renderEventCalendarSvg<
E>(events,date,options?):string
Defined in: src/core/exportCalendarSvg.ts:448
Build a standalone SVG document of one view of an event calendar with the default EventCalendar rendering: for day and week, the column headers (one per resource in the day view with resources), the all-day row and the whole time grid from dayStart to dayEnd with the timed events side by side and the now line; for month, the weekday names and the weeks with their event lanes and "+N more"; for agenda, the days with events (over a week, or agendaDays days) with their entries in the order of layoutCalendarAgenda, or the empty text. Events are placed with layoutCalendarDayEvents, packCalendarEventLanes and layoutCalendarAgenda, so they sit where the component draws them. In a right-to-left export, times keep their left-to-right order and titles next to them are isolated. Pass concrete events: expand recurring series with expandRecurringEvents first. Validates like EventCalendar (validateCalendarEvents and the view options) and throws a RangeError for a view it does not export. Runs without a DOM.
Type Parameters
E
E extends CalendarEvent<unknown>
Parameters
events
readonly E[]
date
number
options?
EventCalendarSvgOptions<E> = {}
Returns
string