autoScale
Description
Allows the timescale to adjust dynamically based on the start/end datesUsage
autoScale: boolean;
Parameters
true
(default) - scale can change dynamically when data is added, it may change when data is modified. Tasks can be moved out via drag and drop. The initial behaviour depends on data:false
- start and end define a fixed, unchangeable range of the scale that does not react on data changed. Tasks cannot be moved outside of this range via drag and drop
If the start
or/and end
are not provided, the scale defaults to a range from the current date plus one month.
Example
<script>
import { getData } from "../data";
import { Gantt } from "wx-svelte-gantt";
const data = getData();
</script>
<Gantt
{tasks}
start={new Date(2023, 2, 1)}
end={new Date(2024, 3, 12)}
autoScale="true"
/>
Related articles: Configuring timescale