Swimlane
import {Swimlane} from 'cx/charts';The Swimlane widget is used to make swimlane charts where each swimlane has unique properties or additional content inside.
<div class="widgets" >
<Svg style="width:500px; height:400px;">
<Chart offset="20 -20 -120 40" axes={{
x: { type: CategoryAxis, labelRotation: -90, labelDy: '0.4em', labelAnchor: "end" },
y: { type: NumericAxis, vertical: true }
}}>
<Repeater records-bind="$page.points" recordAlias="$point">
<Swimlane size={0.8} x-bind="$point.category" vertical/>
</Repeater>
</Chart>
</Svg>
</div>
<div class="widgets">
<Svg style="width:700px; height:400px;">
<Chart offset="20 -100 -40 120" axes={{
x: { type: NumericAxis, snapToTicks: 0 },
y: { type: CategoryAxis, vertical: true }
}}>
<Repeater records-bind="$page.points" recordAlias="$point">
<Swimlane size={0.8} y-bind="$point.category" />
</Repeater>
</Chart>
</Svg>
</div>| Property | Description | Type |
|---|---|---|
size | Represents a swimlane size. | number |
vertical | Switch to vertical swimlane. | boolean |
x | The | string/number |
y | The | string/number |
anchors | Anchor defines how child bounds are tied to the parent. Zero aligns with the top/left edge. One aligns with the bottom/right edge. See Svg for more information. | string/number/rect |
class | Additional CSS classes to be applied to the element. If an object is provided, all keys with a "truthy" value will be added to the CSS class list. | string/object |
laneOffset | The laneOffset property adjusts the positioning of lane elements, enhancing their alignment and readability. | number |
laneStyle | Style object applied to the swimlane. | string/object |
margin | Apply margin to the given boundaries. See Svg for more information. | string/number/rect |
mod | Appearance modifier. For example, | string/array |
offset | Move boundaries specified by the offset. See Svg for more information. | string/number/rect |
outerLayout | Defines the outer layout which wraps the widget. | widget |
padding | Padding to be applied to the boundaries rectangle before passing to the children. | string/number/rect |
putInto | Used with outer layouts. Specifies the name of the content placeholder which should render the widget. | string |
style | Style object applied to the wrapper div. Used for setting the dimensions of the element. | string/object |
vdomKey | Key that will be used as the key when rendering the React component. | string |
visible | Visibility of the widget. Defaults to | boolean |