markers
PRO
The functionality is available in PRO Edition only
Description
Defines visual markers on the timescaleAn array of objects containing the markers data
Usage
markers?: [
{
start: Date,
text: string,
css?: string,
}
];
Parameters
For each marker you can specify the following parameters:
start- (required) the start date of a markertext- (required) the label of a marker that appears above the marker in a chartcss- (optional) a css class name to be applied as a marker's style; if not specified, a default style will be applied
Example
<script setup>
import { getData } from "./common/data";
import { Gantt } from "@svar/vue-gantt";
const data = getData();
const markers = [
{
start: new Date(2020, 2, 4),
text: "Start Project",
css: "myMiddleClass",
},
//other markers
];
</script>
<template>
<Gantt
:markers="markers"
:tasks="data.tasks" />
</template>
<style scoped>
:global(.wx-willow-theme .myMiddleClass) {
background-color: rgba(255, 84, 84, 0.77);
}
</style>