# \[Bug\] Perspective Gantt Chart breaks with 0 length events

**URL:** <https://forum.inductiveautomation.com/t/bug-perspective-gantt-chart-breaks-with-0-length-events/104603>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 2, 2025, 7:13pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-gantt-chart-breaks-with-0-length-events/104603 "2025-04-02T19:13:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon\_Hathout\_Willar](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Simon\_Hathout\_Willar](https://forum.inductiveautomation.com/u/Simon_Hathout_Willar)\
**Post date:** [April 2, 2025, 7:13pm UTC](https://forum.inductiveautomation.com/t/bug-perspective-gantt-chart-breaks-with-0-length-events/104603/1 "2025-04-02T19:13:29Z")

</div>

Just wanted to flag that, if you use a Gannt Chart like the one described in [XY Chart Example - Gantt Chart | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-chart-palette/perspective-xy-chart/xy-chart-example-gantt-chart), and set the "fromDate" and "toDate" to be the exact same time, the chart will experience strange rendering issues -- the chart appears to be clipped off in strange places.

I have checked this issue supplying data as JSON, though it might also exist with datasets.

An example chart which shows this issue, with datapoint 3 causing it:

> **Chart Code**
>
> [  
> {  
> "type": "ia.chart.xy",  
> "version": 0,  
> "props": {  
> "legend": {  
> "enabled": false  
> },  
> "cursor": {  
> "series": "mySeries"  
> },  
> "scrollBars": {  
> "horizontal": {  
> "series": "mySeries"  
> }  
> },  
> "xAxes": [  
> {  
> "name": "time",  
> "label": {  
> "enabled": true,  
> "text": "Time",  
> "color": ""  
> },  
> "visible": true,  
> "tooltip": {  
> "enabled": true,  
> "text": "",  
> "cornerRadius": 3,  
> "pointerLength": 4,  
> "background": {  
> "color": "",  
> "opacity": 1  
> }  
> },  
> "inversed": false,  
> "render": "date",  
> "category": {  
> "break": {  
> "enabled": false,  
> "startCategory": "",  
> "endCategory": "",  
> "size": 0.05  
> }  
> },  
> "date": {  
> "baseInterval": {  
> "enabled": false,  
> "timeUnit": "hour",  
> "count": 1,  
> "skipEmptyPeriods": false  
> },  
> "range": {  
> "max": "",  
> "min": "",  
> "useStrict": false  
> },  
> "break": {  
> "enabled": false,  
> "startDate": "",  
> "endDate": "",  
> "size": 0.05  
> },  
> "inputFormat": "yyyy-MM-dd kk:mm:ss",  
> "format": "M/d/yyyy"  
> },  
> "value": {  
> "range": {  
> "max": "",  
> "min": "",  
> "useStrict": false  
> },  
> "logarithmic": false,  
> "break": {  
> "enabled": false,  
> "startValue": 0,  
> "endValue": 100,  
> "size": 0.05  
> },  
> "format": "#,###.##"  
> },  
> "appearance": {  
> "opposite": false,  
> "inside": false,  
> "labels": {  
> "color": "",  
> "opacity": 1,  
> "rotation": 0,  
> "verticalCenter": "middle",  
> "horizontalCenter": "middle"  
> },  
> "grid": {  
> "color": "",  
> "opacity": 1,  
> "dashArray": "",  
> "minDistance": 60,  
> "position": 0.5  
> },  
> "font": {  
> "size": "",  
> "weight": 500  
> }  
> }  
> }  
> ],  
> "yAxes": [  
> {  
> "name": "Operator",  
> "label": {  
> "enabled": false,  
> "text": "Process Temp",  
> "color": ""  
> },  
> "visible": true,  
> "tooltip": {  
> "enabled": true,  
> "text": "",  
> "cornerRadius": 3,  
> "pointerLength": 4,  
> "background": {  
> "color": "",  
> "opacity": 1  
> }  
> },  
> "inversed": false,  
> "render": "category",  
> "category": {  
> "break": {  
> "enabled": false,  
> "startCategory": "",  
> "endCategory": "",  
> "size": 0.05  
> }  
> },  
> "date": {  
> "baseInterval": {  
> "enabled": false,  
> "timeUnit": "hour",  
> "count": 1,  
> "skipEmptyPeriods": false  
> },  
> "range": {  
> "max": "",  
> "min": "",  
> "useStrict": false  
> },  
> "break": {  
> "enabled": false,  
> "startDate": "",  
> "endDate": "",  
> "size": 0.05  
> },  
> "inputFormat": "yyyy-MM-dd kk:mm:ss",  
> "format": "M/d/yyyy HH:mm:ss"  
> },  
> "value": {  
> "range": {  
> "max": "",  
> "min": "",  
> "useStrict": false  
> },  
> "logarithmic": false,  
> "break": {  
> "enabled": false,  
> "startValue": 0,  
> "endValue": 100,  
> "size": 0.05  
> },  
> "format": "#,###.##"  
> },  
> "appearance": {  
> "opposite": false,  
> "inside": false,  
> "labels": {  
> "color": "",  
> "opacity": 1,  
> "rotation": 0,  
> "verticalCenter": "middle",  
> "horizontalCenter": "middle"  
> },  
> "grid": {  
> "color": "",  
> "opacity": 1,  
> "dashArray": "",  
> "minDistance": null,  
> "position": 0  
> },  
> "font": {  
> "size": "",  
> "weight": 500  
> }  
> }  
> }  
> ],  
> "series": [  
> {  
> "name": "mySeries",  
> "label": {  
> "text": "Process Temp"  
> },  
> "visible": true,  
> "hiddenInLegend": false,  
> "defaultState": {  
> "visible": true  
> },  
> "data": {  
> "source": "example",  
> "x": "toDate",  
> "y": "name"  
> },  
> "xAxis": "time",  
> "yAxis": "Operator",  
> "zIndex": 0,  
> "tooltip": {  
> "enabled": true,  
> "text": "{name}: [bold]{fromDate} - {toDate}[/]",  
> "cornerRadius": 3,  
> "pointerLength": 4,  
> "background": {  
> "color": "",  
> "opacity": 1  
> }  
> },  
> "render": "column",  
> "candlestick": {  
> "open": {  
> "x": "",  
> "y": ""  
> },  
> "high": {  
> "x": "",  
> "y": ""  
> },  
> "low": {  
> "x": "",  
> "y": ""  
> },  
> "appearance": {  
> "fill": {  
> "color": "",  
> "opacity": 1  
> },  
> "stroke": {  
> "color": "",  
> "opacity": 1,  
> "width": 1  
> },  
> "stacked": false,  
> "deriveFieldsFromData": {  
> "fill": {  
> "color": "",  
> "opacity": ""  
> },  
> "stroke": {  
> "color": "",  
> "opacity": "",  
> "width": ""  
> }  
> },  
> "heatRules": {  
> "enabled": false,  
> "max": "",  
> "min": "",  
> "dataField": ""  
> }  
> }  
> },  
> "column": {  
> "open": {  
> "x": "fromDate",  
> "y": ""  
> },  
> "appearance": {  
> "fill": {  
> "color": "",  
> "opacity": 1  
> },  
> "stroke": {  
> "color": "",  
> "opacity": 1,  
> "width": 1  
> },  
> "stacked": false,  
> "width": null,  
> "height": null,  
> "deriveFieldsFromData": {  
> "fill": {  
> "color": "color",  
> "opacity": ""  
> },  
> "stroke": {  
> "color": "",  
> "opacity": "",  
> "width": ""  
> }  
> },  
> "heatRules": {  
> "enabled": false,  
> "max": "",  
> "min": "",  
> "dataField": ""  
> }  
> }  
> },  
> "line": {  
> "open": {  
> "x": "",  
> "y": ""  
> },  
> "appearance": {  
> "connect": true,  
> "tensionX": 1,  
> "tensionY": 1,  
> "minDistance": 0.5,  
> "stroke": {  
> "width": 3,  
> "opacity": 1,  
> "color": "",  
> "dashArray": ""  
> },  
> "fill": {  
> "opacity": 0,  
> "color": ""  
> },  
> "bullets": [  
> {  
> "enabled": false,  
> "render": "circle",  
> "width": 10,  
> "height": 10,  
> "label": {  
> "text": "{value}",  
> "position": {  
> "dx": 0,  
> "dy": 0  
> }  
> },  
> "fill": {  
> "color": "",  
> "opacity": 1  
> },  
> "stroke": {  
> "color": "",  
> "opacity": 1,  
> "width": 1  
> },  
> "rotation": 0,  
> "tooltip": {  
> "enabled": true,  
> "text": "{name}: [bold]{valueY}[/]",  
> "cornerRadius": 3,  
> "pointerLength": 4,  
> "background": {  
> "color": "",  
> "opacity": 1  
> }  
> },  
> "deriveFieldsFromData": {  
> "fill": {  
> "color": "",  
> "opacity": ""  
> },  
> "stroke": {  
> "color": "",  
> "opacity": "",  
> "width": ""  
> },  
> "rotation": ""  
> },  
> "heatRules": {  
> "enabled": false,  
> "max": 100,  
> "min": 2,  
> "dataField": ""  
> }  
> }  
> ]  
> }  
> },  
> "stepLine": {  
> "open": {  
> "x": "",  
> "y": ""  
> },  
> "appearance": {  
> "connect": true,  
> "tensionX": 1,  
> "tensionY": 1,  
> "minDistance": 0.5,  
> "stroke": {  
> "width": 3,  
> "opacity": 1,  
> "color": "",  
> "dashArray": ""  
> },  
> "fill": {  
> "opacity": 0,  
> "color": ""  
> },  
> "bullets": [  
> {  
> "enabled": true,  
> "render": "circle",  
> "width": 10,  
> "height": 10,  
> "label": {  
> "text": "{value}",  
> "position": {  
> "dx": 0,  
> "dy": 0  
> }  
> },  
> "fill": {  
> "color": "",  
> "opacity": 1  
> },  
> "stroke": {  
> "color": "",  
> "opacity": 1,  
> "width": 1  
> },  
> "rotation": 0,  
> "tooltip": {  
> "enabled": true,  
> "text": "{name}: [bold]{valueY}[/]",  
> "cornerRadius": 3,  
> "pointerLength": 4,  
> "background": {  
> "color": "",  
> "opacity": 1  
> }  
> },  
> "deriveFieldsFromData": {  
> "fill": {  
> "color": "",  
> "opacity": ""  
> },  
> "stroke": {  
> "color": "",  
> "opacity": "",  
> "width": ""  
> },  
> "rotation": ""  
> },  
> "heatRules": {  
> "enabled": false,  
> "max": 100,  
> "min": 2,  
> "dataField": ""  
> }  
> }  
> ]  
> }  
> }  
> }  
> ],  
> "dataSources": {  
> "example": [  
> {  
> "name": "John",  
> "fromDate": 1743533919000,  
> "toDate": 1743533919050,  
> "color": "#00FF30"  
> },  
> {  
> "name": "John",  
> "fromDate": 1743533919050,  
> "toDate": 1743533919060,  
> "color": "#00FFFF"  
> },  
> {  
> "name": "John",  
> "fromDate": 1743533919060,  
> "toDate": 1743533919060,  
> "color": "#FF0000"  
> }  
> ]  
> }  
> },  
> "meta": {  
> "name": "XYChart\_1"  
> },  
> "position": {  
> "x": 94,  
> "y": 106,  
> "height": 375,  
> "width": 700  
> },  
> "custom": {}  
> }  
> ]

When I set data point 3's toDate a little later, it displays as such.

 ![A gannt chart, displaying normally.](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/8/d8fbf270b5ece4a4b1bbeb832bd2e546d4814ee4.png)

When I set the toDate to be the same as the fromDate, it displays as such.

 ![A gannt chart, not displaying data correctly](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/e/be488973bdf9ca47d2bcf15c1749e8f47e360914.png)

---

<div class="post-metadata">

**Author:** ![Jesse\_Dale\_Gimenez](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jesse_dale_gimenez/32/68763_2.png) [@Jesse\_Dale\_Gimenez](https://forum.inductiveautomation.com/u/Jesse_Dale_Gimenez)\
**Post date:** [April 3, 2025, 2:48am UTC](https://forum.inductiveautomation.com/t/bug-perspective-gantt-chart-breaks-with-0-length-events/104603/2 "2025-04-03T02:48:49Z")

</div>

have you tried rendering  
toDate: 4/1/2025 01:00:00  
fromDate: 4/1/2025 23:00:00

adding hours might adjust the time span

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [April 3, 2025, 3:00am UTC](https://forum.inductiveautomation.com/t/bug-perspective-gantt-chart-breaks-with-0-length-events/104603/3 "2025-04-03T03:00:01Z")

</div>

I see what you mean.

This works:

 ![{C0795A64-EAE6-4CD9-8209-8BB60E9ABF16}](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/9/a9f89712dd59122b2cb8ba46b127cacd1bdf5434.png)

this doesn't:

 ![{C5C678C8-9B60-499D-8BB0-6C65A1F304FB}](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/7/172d9d8865c1853cef868c2e7ca3b54e507f08e2.png)

doesn't matter what the other data points have in them, if a single data point has the same from/to, it destroys the chart...it should just not render anything for it since there's 0 time between the start and end
