Skip to content

Commit e1bfd4f

Browse files
RahixMc-Zen
andauthored
[docs] how to set fixed size of full diagram (#173)
--------- Co-authored-by: Mc-Zen <52877387+Mc-Zen@users.noreply.github.com>
1 parent ae75f51 commit e1bfd4f

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/model/diagram.typ

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,25 @@
4141

4242
/// The width of the diagram. This can be one of the following:
4343
/// - A `length`, defining just the width of the data area,
44-
/// excluding axes, labels, title etc.
44+
/// excluding axes, labels, title, etc. To set a `length` including
45+
/// everything, use `0% + length`, see the next option.
4546
/// - A `ratio` or `relative` where the ratio part is relative to the width
46-
/// of the parent that the diagram is placed in. This is not allowed if the
47-
/// parent has an unbounded width, e.g., a page with `width: auto`.
47+
/// of the parent that the diagram is placed in. This includes axes, labels,
48+
/// title, etc. This is not allowed if the parent has an unbounded width,
49+
/// e.g., a page with `width: auto`.
4850
/// - Or `auto` in which case the width is computed automatically based on
4951
/// @diagram.aspect-ratio.
5052
/// -> length | relative | auto
5153
width: 6cm,
5254

5355
/// The height of the diagram. This can be one of the following:
5456
/// - A `length`, defining just the height of the data area,
55-
/// excluding axes, labels, title etc.
57+
/// excluding axes, labels, title, etc. To set a `length` including
58+
/// everything, use `0% + length`, see the next option.
5659
/// - A `ratio` or `relative` where the ratio part is relative to the height
57-
/// of the parent that the diagram is placed in. This is not allowed if the
58-
/// parent has an unbounded height, e.g., a page with `height: auto`.
60+
/// of the parent that the diagram is placed in. This includes axes, labels,
61+
/// title, etc. This is not allowed if the parent has an unbounded height,
62+
/// e.g., a page with `height: auto`.
5963
/// - Or `auto` in which case the height is computed automatically based on
6064
/// @diagram.aspect-ratio.
6165
/// -> length | relative | auto

0 commit comments

Comments
 (0)