Documentation

Report Edit

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.

NoemiboroughWest JosiahLake CrystallandGeorgianaviewEast HellenSalvadorsideNew MelvinviewNew MiaNew OlenEast Jadafurt020406080100;;;;;;;;;;
020406080100NoemiboroughWest JosiahLake CrystallandGeorgianaviewEast HellenSalvadorsideNew MelvinviewNew MiaNew OlenEast Jadafurt;;;;;;;;;;
Index
<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>
Copied!Cx Fiddle
PropertyDescriptionType
size

Represents a swimlane size.

number
vertical

Switch to vertical swimlane.

boolean
x

The x value binding or expression.

string/number
y

The y value binding or expression.

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
className

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, mod="big" will add the CSS class .cxm-big to the block element.

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
contentFor

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
if

Visibility of the widget. Defaults to true.

boolean