If Dateline is provided then the value
property is mandatory.
When using dateline with graph then x axis type
must be timeseries it is mandatory.
Property Name | Expected | Description |
---|---|---|
value | string (ISO8601) | Position where dateline needs to be placed |
color | string (ISO8601) | color of the dateline |
shape | string (ISO8601) | Shape of the indicator above dateline. Required field if showDatelineIndicator is set to true. Refer a Shapes |
Property Name | Expected | Default | Description |
---|---|---|---|
onClick | Function | undefined | Any action that can be performed when clicking on the data point |
showDatelineIndicator | boolean | true | Shows the indicator above dateline, this can be clicked |
label | object | {} | display property needs to be provided for label |
Property Name | Expected | Default | Description |
---|---|---|---|
clickPassThrough | object | null | Refer Click Pass Throughs |
Here is a truth table on how clickPassThrough
s work in conjunction with onClick
s -
- If
clickPassThrough
is set totrue
andonClick
function is provided, we honor the onClick functionality and show cursor-pointer on top of the element. - If
clickPassThrough
is set totrue
andonClick
function is not provided, we would be able to click the element beneath it. We also show cursor-pointer here, if bottom element is selectable. - If
clickPassThrough
is set tofalse
andonClick
function is provided, we honor the onClick functionality and show cursor-pointer on top of the element. - If
clickPassThrough
is set tofalse
andonClick
function is not-provided, the element doesn't interact upon mouse events.
clickPassThrough = {
dateline: false
};
"dateline": [
{
showDatelineIndicator: true,
label: {
display: "Release A"
},
color: Carbon.helpers.COLORS.GREEN,
shape: Carbon.helpers.SHAPES.DARK.TRIANGLE,
onClick: (onCloseCB, payload) => {
// onCloseCB needs to called by the consumer after popup is closed;
// Payload is the dateline input object
},
value: new Date(2016, 5, 1).toISOString()
}
],
"clickPassThrough": {
datelines: false
}