D2Spec

interface D2Spec : AtlasSpec(source)

Used to configure D2 output from Atlas. For barebones output to a .d2 file, you can just add the "dev.jonpoulton.atlas.d2" gradle plugin. Or for a more fleshed-out config:

atlas {
// other Atlas config

d2 {
animateLinks = true
center = true
direction = Direction.Down
fileFormat = FileFormat.Svg
groupLabelLocation = Location.Inside
groupLabelPosition = Position.TopCenter
layoutEngine = LayoutEngine.Dagre
pad = 5
pathToD2Command = "/path/to/d2"
sketch = true
theme = Theme.ColorblindClear
themeDark = Theme.DarkMauve

rootStyle {
...
}

globalProps {
...
}

layoutEngine {
...
}
}
}

Properties

Link copied to clipboard
abstract val animateInterval: Property<Int>
Link copied to clipboard
abstract val animateLinks: Property<Boolean>
Link copied to clipboard
abstract val center: Property<Boolean>
Link copied to clipboard
abstract val direction: Property<Direction>
Link copied to clipboard
abstract val fileFormat: Property<FileFormat>
Link copied to clipboard
Link copied to clipboard
abstract val groupLabelLocation: Property<Location>
Link copied to clipboard
abstract val groupLabelPosition: Property<Position>
Link copied to clipboard
Link copied to clipboard
abstract val pad: Property<Int>
Link copied to clipboard
abstract val pathToD2Command: Property<String>
Link copied to clipboard
Link copied to clipboard
abstract val sketch: Property<Boolean>
Link copied to clipboard
abstract val theme: Property<Theme>
Link copied to clipboard
abstract val themeDark: Property<Theme>

Functions

Link copied to clipboard
abstract fun globalProps(action: Action<D2GlobalPropsSpec>)
Link copied to clipboard
abstract fun layoutEngine(action: Action<D2LayoutEngineSpec>)
Link copied to clipboard
abstract fun rootStyle(action: Action<D2RootStyleSpec>)