You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/assets/option/en/common/layout-item.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,45 @@ padding: {
89
89
}
90
90
```
91
91
92
+
#${prefix} noOuterPadding(boolean) = true
93
+
94
+
Determines whether to automatically modify padding by hiding the outer padding according to the orient property. When set to true, the component will automatically set the padding on the outer side (the direction specified by orient) to 0. This feature is currently only effective for components.
95
+
96
+
Property Specifications:
97
+
98
+
- Type: `boolean`
99
+
- Default value: `true`
100
+
- Depends on the `orient` property - only takes effect when `orient` is set and the component supports this property
101
+
- Only effective for components, not applicable to other layout elements
102
+
103
+
Usage Scenarios:
104
+
105
+
- When components (such as legends, titles, axes, etc.) are positioned adjacent to chart edges, it is often desirable to automatically set the outer padding (in the orient-specified direction) to 0 for space efficiency and better visual alignment
106
+
- When maximizing chart space utilization
107
+
108
+
Example Usage:
109
+
110
+
```ts
111
+
const legendSpec = {
112
+
type: 'legend',
113
+
orient: 'right', // The legend is positioned on the right
114
+
padding: [10, 10, 10, 10], // 10px padding on all four sides: top, right, bottom, left
115
+
noOuterPadding: true// Automatically sets the right padding to 0
116
+
};
117
+
// Result: The effective padding is { top: 10, right: 0, bottom: 10, left: 10 }
118
+
```
119
+
120
+
Comparison:
121
+
122
+
- When `noOuterPadding: false`, the padding for all sides is retained.
123
+
- When `noOuterPadding: true`, the padding on the side specified by `orient` is automatically set to 0.
124
+
125
+
Notes:
126
+
127
+
- This property defaults to `true`, so you usually do not need to set it explicitly unless you want to retain the outer padding.
128
+
- It depends on `orient`; if `orient` is not set, this property has no effect.
129
+
- Currently, this property only applies to components.
0 commit comments