Ignition 8.1.24
Perspective
XY Chart
Pulling what's left of my hair out. I am usually pretty good at finding the answers I am looking for but not today.
I have a Query datasource, this issue happens whether using json or dataset return formats.
I am having trouble with getting the data and labels to be aligned when I render the xAxes by date. I lose one of the columns of data but it retains the label (so 1 more label than column). If I render by category, I get the correct amount of columns and labels and everything is aligned nicely but the date is then turned into epoch time (even though my incoming data isn't) and I can't seem to format that back to a usable date/time.
What simple and obvious thing am I missing here?
Are you sure the query is always sorted by datetime?
The query is authored that way, and every time I look at the datasets from different machines they are always in the correct order. I can send a snippet of the query itself and additional data if needed, would like to not here though.
No, not necessary if you've checked. Not sure what it might be. You probably will have to share enough for us to reproduce, though.
If you can boil it down to a single view with a single component, then delete the bindings so the data remains, that would help. Prune proprietary info at that point. Use shift-right-click in the designer tree to get to the Copy JSON option. Paste here into a formatted code block.
If you can't boil it down like this, a support ticket would be appropriate.
Ok, let me know if a support ticket would be more appropriate. I assume it's pilot error at this point though.
This is when rendered as a category. I will send rendered as a date on request (just to see if you need it and simplify if not).
{
"custom": {},
"params": {},
"props": {},
"root": {
"children": [
{
"meta": {
"name": "xy_chart"
},
"position": {
"height": 416,
"width": 770
},
"propConfig": {
"props.yAxes[0].value.range.max": {
"binding": {
"config": {
"expression": "((1800/{[MM_Tag_Provider]MM DC Tags/Hall 2/S57/Standard Cycle})*{[MM_Tag_Provider]MM DC Tags/Hall 2/S57/Standard Cavities})*1.1"
},
"type": "expr"
}
}
},
"props": {
"dataSources": {
"dataset": {
"$": [
"ds",
192,
1749055392838
],
"$columns": [
{
"data": [
1749011400000,
1749013200000,
1749015000000,
1749016800000,
1749018600000,
1749020400000,
1749022200000,
1749024000000,
1749025800000,
1749027600000,
1749029400000,
1749031200000,
1749033000000,
1749034800000,
1749036600000,
1749038400000,
1749040200000,
1749042000000,
1749043800000,
1749045600000,
1749047400000,
1749049200000,
1749051000000,
1749052800000
],
"name": "time",
"type": "Date"
},
{
"data": [
372,
376,
376,
372,
372,
376,
376,
372,
376,
372,
376,
372,
372,
376,
376,
368,
324,
376,
372,
376,
372,
376,
372,
372
],
"name": "good",
"type": "Short"
},
{
"data": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
32,
0,
0,
0,
0,
0,
0,
0
],
"name": "total_rejects",
"type": "Integer"
},
{
"data": [
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#FF0000",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00"
],
"name": "color",
"type": "String"
}
]
}
},
"legend": {
"labels": {
"font": {
"size": ""
}
}
},
"scrollBars": {
"horizontal": {
"enabled": false
},
"vertical": {
"enabled": false
}
},
"series": [
{
"candlestick": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"stacked": false,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
}
},
"high": {
"x": "",
"y": ""
},
"low": {
"x": "",
"y": ""
},
"open": {
"x": "",
"y": ""
}
},
"column": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "color",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "#00FF00",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"height": null,
"stacked": false,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"width": null
},
"open": {
"x": "",
"y": ""
}
},
"data": {
"source": "dataset",
"x": "time",
"y": "good"
},
"defaultState": {
"visible": true
},
"hiddenInLegend": false,
"label": {
"text": ""
},
"line": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": false,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"name": "Good Parts",
"render": "column",
"stepLine": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": true,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"visible": true,
"xAxis": "time",
"yAxis": "good",
"zIndex": 0
},
{
"candlestick": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"stacked": false,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
}
},
"high": {
"x": "",
"y": ""
},
"low": {
"x": "",
"y": ""
},
"open": {
"x": "",
"y": ""
}
},
"column": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"height": null,
"stacked": false,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"width": null
},
"open": {
"x": "",
"y": ""
}
},
"data": {
"source": "dataset",
"x": "time",
"y": "total_rejects"
},
"defaultState": {
"visible": true
},
"hiddenInLegend": false,
"label": {
"text": ""
},
"line": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": false,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "#000000",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"name": "Total Rejects",
"render": "line",
"stepLine": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": true,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"visible": true,
"xAxis": "time",
"yAxis": "good",
"zIndex": 0
}
],
"style": {
"classes": "Text_Scaling",
"marginLeft": 5,
"marginRight": 5,
"outlineStyle": "solid"
},
"subtitle": {
"appearance": {
"color": "#000000",
"font": {
"weight": 700
},
"padding": {
"bottom": 10
}
},
"text": "Target Good Parts \u003d 331 per Half Hour"
},
"title": {
"appearance": {
"color": "#000000"
},
"text": "Good \u0026 Total Rejects"
},
"xAxes": [
{
"appearance": {
"font": {
"size": "",
"weight": 500
},
"grid": {
"color": "#000000",
"dashArray": "",
"minDistance": 15,
"opacity": 1,
"position": 0.1
},
"inside": false,
"labels": {
"color": "",
"horizontalCenter": "middle",
"opacity": 1,
"rotation": 270,
"verticalCenter": "middle"
},
"opposite": false
},
"category": {
"break": {
"enabled": false,
"endCategory": "",
"size": 0.05,
"startCategory": ""
}
},
"date": {
"baseInterval": {
"count": 1,
"enabled": false,
"skipEmptyPeriods": false,
"timeUnit": "hour"
},
"break": {
"enabled": false,
"endDate": "",
"size": 0.05,
"startDate": ""
},
"format": "M/d/yyyy HH:mm:ss",
"inputFormat": "M/d/yyyy HH:mm:ss",
"range": {
"max": "",
"min": "",
"useStrict": true
}
},
"inversed": false,
"label": {
"color": "#000000",
"enabled": false,
"text": "Time"
},
"name": "time",
"render": "category",
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": ""
},
"value": {
"break": {
"enabled": false,
"endValue": 100,
"size": 0.05,
"startValue": 0
},
"format": "#,###.##",
"logarithmic": false,
"range": {
"max": "",
"min": "",
"useStrict": false
}
},
"visible": true
}
],
"yAxes": [
{
"appearance": {
"font": {
"size": "",
"weight": 500
},
"grid": {
"color": "",
"dashArray": "",
"minDistance": null,
"opacity": 1,
"position": 0.5
},
"inside": false,
"labels": {
"color": "",
"horizontalCenter": "middle",
"opacity": 1,
"rotation": 0,
"verticalCenter": "middle"
},
"opposite": false
},
"category": {
"break": {
"enabled": false,
"endCategory": "",
"size": 0.05,
"startCategory": ""
}
},
"date": {
"baseInterval": {
"count": 1,
"enabled": false,
"skipEmptyPeriods": false,
"timeUnit": "hour"
},
"break": {
"enabled": false,
"endDate": "",
"size": 0.05,
"startDate": ""
},
"format": "M/d/yyyy HH:mm:ss",
"inputFormat": "yyyy-MM-dd kk:mm:ss",
"range": {
"max": "",
"min": "",
"useStrict": false
}
},
"inversed": false,
"label": {
"color": "#000000",
"enabled": false,
"text": "Good Parts"
},
"name": "good",
"render": "value",
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": ""
},
"value": {
"break": {
"enabled": false,
"endValue": 100,
"size": 0.05,
"startValue": 0
},
"format": "#,###.##",
"logarithmic": false,
"range": {
"min": 0,
"useStrict": false
}
},
"visible": true
},
{
"appearance": {
"font": {
"size": "",
"weight": 500
},
"grid": {
"color": "",
"dashArray": "",
"minDistance": null,
"opacity": 1,
"position": 0.5
},
"inside": false,
"labels": {
"color": "",
"horizontalCenter": "middle",
"opacity": 1,
"rotation": 0,
"verticalCenter": "middle"
},
"opposite": false
},
"category": {
"break": {
"enabled": false,
"endCategory": "",
"size": 0.05,
"startCategory": ""
}
},
"date": {
"baseInterval": {
"count": 1,
"enabled": false,
"skipEmptyPeriods": false,
"timeUnit": "hour"
},
"break": {
"enabled": false,
"endDate": "",
"size": 0.05,
"startDate": ""
},
"format": "M/d/yyyy HH:mm:ss",
"inputFormat": "yyyy-MM-dd kk:mm:ss",
"range": {
"max": "",
"min": "",
"useStrict": false
}
},
"inversed": false,
"label": {
"color": "#000000",
"enabled": true,
"text": "Reject Parts"
},
"name": "total_rejects",
"render": "category",
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": ""
},
"value": {
"break": {
"enabled": false,
"endValue": 100,
"size": 0.05,
"startValue": 0
},
"format": "#,###.##",
"logarithmic": false,
"range": {
"max": "",
"min": "",
"useStrict": false
}
},
"visible": true
}
]
},
"type": "ia.chart.xy"
}
],
"meta": {
"name": "root"
},
"position": {
"x": 0,
"y": 0
},
"type": "ia.container.coord"
}
}
You have an expression binding there. Delete that, too.
Yep, didn't notice that one until after I sent, sorry.
{
"custom": {},
"params": {},
"props": {},
"root": {
"children": [
{
"meta": {
"name": "xy_chart"
},
"position": {
"height": 416,
"width": 770
},
"props": {
"dataSources": {
"dataset": {
"$": [
"ds",
192,
1749055392838
],
"$columns": [
{
"data": [
1749011400000,
1749013200000,
1749015000000,
1749016800000,
1749018600000,
1749020400000,
1749022200000,
1749024000000,
1749025800000,
1749027600000,
1749029400000,
1749031200000,
1749033000000,
1749034800000,
1749036600000,
1749038400000,
1749040200000,
1749042000000,
1749043800000,
1749045600000,
1749047400000,
1749049200000,
1749051000000,
1749052800000
],
"name": "time",
"type": "Date"
},
{
"data": [
372,
376,
376,
372,
372,
376,
376,
372,
376,
372,
376,
372,
372,
376,
376,
368,
324,
376,
372,
376,
372,
376,
372,
372
],
"name": "good",
"type": "Short"
},
{
"data": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
32,
0,
0,
0,
0,
0,
0,
0
],
"name": "total_rejects",
"type": "Integer"
},
{
"data": [
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#FF0000",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00"
],
"name": "color",
"type": "String"
}
]
}
},
"legend": {
"labels": {
"font": {
"size": ""
}
}
},
"scrollBars": {
"horizontal": {
"enabled": false
},
"vertical": {
"enabled": false
}
},
"series": [
{
"candlestick": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"stacked": false,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
}
},
"high": {
"x": "",
"y": ""
},
"low": {
"x": "",
"y": ""
},
"open": {
"x": "",
"y": ""
}
},
"column": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "color",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "#00FF00",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"height": null,
"stacked": false,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"width": null
},
"open": {
"x": "",
"y": ""
}
},
"data": {
"source": "dataset",
"x": "time",
"y": "good"
},
"defaultState": {
"visible": true
},
"hiddenInLegend": false,
"label": {
"text": ""
},
"line": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": false,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"name": "Good Parts",
"render": "column",
"stepLine": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": true,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"visible": true,
"xAxis": "time",
"yAxis": "good",
"zIndex": 0
},
{
"candlestick": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"stacked": false,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
}
},
"high": {
"x": "",
"y": ""
},
"low": {
"x": "",
"y": ""
},
"open": {
"x": "",
"y": ""
}
},
"column": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"height": null,
"stacked": false,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"width": null
},
"open": {
"x": "",
"y": ""
}
},
"data": {
"source": "dataset",
"x": "time",
"y": "total_rejects"
},
"defaultState": {
"visible": true
},
"hiddenInLegend": false,
"label": {
"text": ""
},
"line": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": false,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "#000000",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"name": "Total Rejects",
"render": "line",
"stepLine": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": true,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"visible": true,
"xAxis": "time",
"yAxis": "good",
"zIndex": 0
}
],
"style": {
"classes": "Text_Scaling",
"marginLeft": 5,
"marginRight": 5,
"outlineStyle": "solid"
},
"subtitle": {
"appearance": {
"color": "#000000",
"font": {
"weight": 700
},
"padding": {
"bottom": 10
}
},
"text": "Target Good Parts \u003d 331 per Half Hour"
},
"title": {
"appearance": {
"color": "#000000"
},
"text": "Good \u0026 Total Rejects"
},
"xAxes": [
{
"appearance": {
"font": {
"size": "",
"weight": 500
},
"grid": {
"color": "#000000",
"dashArray": "",
"minDistance": 15,
"opacity": 1,
"position": 0.1
},
"inside": false,
"labels": {
"color": "",
"horizontalCenter": "middle",
"opacity": 1,
"rotation": 270,
"verticalCenter": "middle"
},
"opposite": false
},
"category": {
"break": {
"enabled": false,
"endCategory": "",
"size": 0.05,
"startCategory": ""
}
},
"date": {
"baseInterval": {
"count": 1,
"enabled": false,
"skipEmptyPeriods": false,
"timeUnit": "hour"
},
"break": {
"enabled": false,
"endDate": "",
"size": 0.05,
"startDate": ""
},
"format": "M/d/yyyy HH:mm:ss",
"inputFormat": "M/d/yyyy HH:mm:ss",
"range": {
"max": "",
"min": "",
"useStrict": true
}
},
"inversed": false,
"label": {
"color": "#000000",
"enabled": false,
"text": "Time"
},
"name": "time",
"render": "category",
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": ""
},
"value": {
"break": {
"enabled": false,
"endValue": 100,
"size": 0.05,
"startValue": 0
},
"format": "#,###.##",
"logarithmic": false,
"range": {
"max": "",
"min": "",
"useStrict": false
}
},
"visible": true
}
],
"yAxes": [
{
"appearance": {
"font": {
"size": "",
"weight": 500
},
"grid": {
"color": "",
"dashArray": "",
"minDistance": null,
"opacity": 1,
"position": 0.5
},
"inside": false,
"labels": {
"color": "",
"horizontalCenter": "middle",
"opacity": 1,
"rotation": 0,
"verticalCenter": "middle"
},
"opposite": false
},
"category": {
"break": {
"enabled": false,
"endCategory": "",
"size": 0.05,
"startCategory": ""
}
},
"date": {
"baseInterval": {
"count": 1,
"enabled": false,
"skipEmptyPeriods": false,
"timeUnit": "hour"
},
"break": {
"enabled": false,
"endDate": "",
"size": 0.05,
"startDate": ""
},
"format": "M/d/yyyy HH:mm:ss",
"inputFormat": "yyyy-MM-dd kk:mm:ss",
"range": {
"max": "",
"min": "",
"useStrict": false
}
},
"inversed": false,
"label": {
"color": "#000000",
"enabled": false,
"text": "Good Parts"
},
"name": "good",
"render": "value",
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": ""
},
"value": {
"break": {
"enabled": false,
"endValue": 100,
"size": 0.05,
"startValue": 0
},
"format": "#,###.##",
"logarithmic": false,
"range": {
"max": 404.0816247885252,
"min": 0,
"useStrict": false
}
},
"visible": true
},
{
"appearance": {
"font": {
"size": "",
"weight": 500
},
"grid": {
"color": "",
"dashArray": "",
"minDistance": null,
"opacity": 1,
"position": 0.5
},
"inside": false,
"labels": {
"color": "",
"horizontalCenter": "middle",
"opacity": 1,
"rotation": 0,
"verticalCenter": "middle"
},
"opposite": false
},
"category": {
"break": {
"enabled": false,
"endCategory": "",
"size": 0.05,
"startCategory": ""
}
},
"date": {
"baseInterval": {
"count": 1,
"enabled": false,
"skipEmptyPeriods": false,
"timeUnit": "hour"
},
"break": {
"enabled": false,
"endDate": "",
"size": 0.05,
"startDate": ""
},
"format": "M/d/yyyy HH:mm:ss",
"inputFormat": "yyyy-MM-dd kk:mm:ss",
"range": {
"max": "",
"min": "",
"useStrict": false
}
},
"inversed": false,
"label": {
"color": "#000000",
"enabled": true,
"text": "Reject Parts"
},
"name": "total_rejects",
"render": "category",
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": ""
},
"value": {
"break": {
"enabled": false,
"endValue": 100,
"size": 0.05,
"startValue": 0
},
"format": "#,###.##",
"logarithmic": false,
"range": {
"max": "",
"min": "",
"useStrict": false
}
},
"visible": true
}
]
},
"type": "ia.chart.xy"
}
],
"meta": {
"name": "root"
},
"position": {
"x": 0,
"y": 0
},
"type": "ia.container.coord"
}
}
Hmmm. Stumped.
Well, that can't be good! I'll put in a ticket with the same info. Thank you for taking a look!
When I have it render as date is when I get the top screenshot whether using strict or not. IE it does output in good datetime format but I get the offset as shown (which is one too many labels because for some reason I lose a column). I just tried again and getting the same results. I do have a conversation going with an IA engineer right now though. Once an issue is identified and hopefully resolved I will update here as well (most likely with where I went wrong). Thanks!
FWIW, I got the same results as you with v8.1.45. And I also tried both strict settings.
Very strange... tested it in 8.1.43 (Standard) and 8.1.47 (Cloud) and Disabling useStrict seems to add the extra column.
{
"custom": {
"key": "value"
},
"params": {
"key": "value"
},
"propConfig": {
"custom.key": {
"persistent": true
},
"params.key": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 850
}
},
"root": {
"children": [
{
"meta": {
"name": "xy_chart"
},
"position": {
"height": 416,
"width": 770
},
"props": {
"dataSources": {
"dataset": {
"$": [
"ds",
192,
1749055392838
],
"$columns": [
{
"data": [
1749011400000,
1749013200000,
1749015000000,
1749016800000,
1749018600000,
1749020400000,
1749022200000,
1749024000000,
1749025800000,
1749027600000,
1749029400000,
1749031200000,
1749033000000,
1749034800000,
1749036600000,
1749038400000,
1749040200000,
1749042000000,
1749043800000,
1749045600000,
1749047400000,
1749049200000,
1749051000000,
1749052800000
],
"name": "time",
"type": "Date"
},
{
"data": [
372,
376,
376,
372,
372,
376,
376,
372,
376,
372,
376,
372,
372,
376,
376,
368,
324,
376,
372,
376,
372,
376,
372,
372
],
"name": "good",
"type": "Short"
},
{
"data": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
32,
0,
0,
0,
0,
0,
0,
0
],
"name": "total_rejects",
"type": "Integer"
},
{
"data": [
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#FF0000",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00"
],
"name": "color",
"type": "String"
}
]
}
},
"legend": {
"labels": {
"font": {
"size": ""
}
}
},
"scrollBars": {
"horizontal": {
"enabled": false
},
"vertical": {
"enabled": false
}
},
"series": [
{
"candlestick": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"stacked": false,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
}
},
"high": {
"x": "",
"y": ""
},
"low": {
"x": "",
"y": ""
},
"open": {
"x": "",
"y": ""
}
},
"column": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "color",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "#00FF00",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"height": null,
"stacked": false,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"width": null
},
"open": {
"x": "",
"y": ""
}
},
"data": {
"source": "dataset",
"x": "time",
"y": "good"
},
"defaultState": {
"visible": true
},
"hiddenInLegend": false,
"label": {
"text": ""
},
"line": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": false,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"name": "Good Parts",
"render": "column",
"stepLine": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": true,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"visible": true,
"xAxis": "time",
"yAxis": "good",
"zIndex": 0
},
{
"candlestick": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"stacked": false,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
}
},
"high": {
"x": "",
"y": ""
},
"low": {
"x": "",
"y": ""
},
"open": {
"x": "",
"y": ""
}
},
"column": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"height": null,
"stacked": false,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"width": null
},
"open": {
"x": "",
"y": ""
}
},
"data": {
"source": "dataset",
"x": "time",
"y": "total_rejects"
},
"defaultState": {
"visible": true
},
"hiddenInLegend": false,
"label": {
"text": ""
},
"line": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": false,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "#000000",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"name": "Total Rejects",
"render": "line",
"stepLine": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": true,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"visible": true,
"xAxis": "time",
"yAxis": "good",
"zIndex": 0
}
],
"style": {
"classes": "Text_Scaling",
"marginLeft": 5,
"marginRight": 5,
"outlineStyle": "solid"
},
"subtitle": {
"appearance": {
"color": "#000000",
"font": {
"weight": 700
},
"padding": {
"bottom": 10
}
}
},
"title": {
"appearance": {
"color": "#000000"
}
},
"xAxes": [
{
"appearance": {
"font": {
"size": "",
"weight": 500
},
"grid": {
"color": "#000000",
"dashArray": "",
"minDistance": 15,
"opacity": 1,
"position": 0.1
},
"inside": false,
"labels": {
"color": "",
"horizontalCenter": "middle",
"opacity": 1,
"rotation": 270,
"verticalCenter": "middle"
},
"opposite": false
},
"category": {
"break": {
"enabled": false,
"endCategory": "",
"size": 0.05,
"startCategory": ""
}
},
"date": {
"baseInterval": {
"count": 1,
"enabled": false,
"skipEmptyPeriods": false,
"timeUnit": "hour"
},
"break": {
"enabled": false,
"endDate": "",
"size": 0.05,
"startDate": ""
},
"format": "M/d/yy HH:mm",
"inputFormat": "M/d/yy HH:mm",
"range": {
"max": "",
"min": "",
"useStrict": false
}
},
"inversed": false,
"label": {
"color": "#000000",
"enabled": false,
"text": "Time"
},
"name": "time",
"render": "date",
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": ""
},
"value": {
"break": {
"enabled": false,
"endValue": 100,
"size": 0.05,
"startValue": 0
},
"format": "",
"logarithmic": false,
"range": {
"max": "",
"min": "",
"useStrict": false
}
},
"visible": true
}
],
"yAxes": [
{
"appearance": {
"font": {
"size": "",
"weight": 500
},
"grid": {
"color": "",
"dashArray": "",
"minDistance": null,
"opacity": 1,
"position": 0.5
},
"inside": false,
"labels": {
"color": "",
"horizontalCenter": "middle",
"opacity": 1,
"rotation": 0,
"verticalCenter": "middle"
},
"opposite": false
},
"category": {
"break": {
"enabled": false,
"endCategory": "",
"size": 0.05,
"startCategory": ""
}
},
"date": {
"baseInterval": {
"count": 1,
"enabled": false,
"skipEmptyPeriods": false,
"timeUnit": "hour"
},
"break": {
"enabled": false,
"endDate": "",
"size": 0.05,
"startDate": ""
},
"format": "M/d/yyyy HH:mm:ss",
"inputFormat": "yyyy-MM-dd kk:mm:ss",
"range": {
"max": "",
"min": "",
"useStrict": false
}
},
"inversed": false,
"label": {
"color": "#000000",
"enabled": false,
"text": "Good Parts"
},
"name": "good",
"render": "value",
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": ""
},
"value": {
"break": {
"enabled": false,
"endValue": 100,
"size": 0.05,
"startValue": 0
},
"format": "#,###.##",
"logarithmic": false,
"range": {
"max": 404.0816247885252,
"min": 0,
"useStrict": false
}
},
"visible": true
},
{
"appearance": {
"font": {
"size": "",
"weight": 500
},
"grid": {
"color": "",
"dashArray": "",
"minDistance": null,
"opacity": 1,
"position": 0.5
},
"inside": false,
"labels": {
"color": "",
"horizontalCenter": "middle",
"opacity": 1,
"rotation": 0,
"verticalCenter": "middle"
},
"opposite": false
},
"category": {
"break": {
"enabled": false,
"endCategory": "",
"size": 0.05,
"startCategory": ""
}
},
"date": {
"baseInterval": {
"count": 1,
"enabled": false,
"skipEmptyPeriods": false,
"timeUnit": "hour"
},
"break": {
"enabled": false,
"endDate": "",
"size": 0.05,
"startDate": ""
},
"format": "M/d/yyyy HH:mm:ss",
"inputFormat": "yyyy-MM-dd kk:mm:ss",
"range": {
"max": "",
"min": "",
"useStrict": false
}
},
"inversed": false,
"label": {
"color": "#000000",
"enabled": true,
"text": "Reject Parts"
},
"name": "total_rejects",
"render": "value",
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": ""
},
"value": {
"break": {
"enabled": false,
"endValue": 100,
"size": 0.05,
"startValue": 0
},
"format": "#,###.##",
"logarithmic": false,
"range": {
"max": 400,
"min": 200,
"useStrict": true
}
},
"visible": true
}
]
},
"type": "ia.chart.xy"
},
{
"meta": {
"name": "ToggleSwitch"
},
"position": {
"height": 36,
"width": 159,
"x": 328,
"y": 430
},
"propConfig": {
"props.selected": {
"binding": {
"config": {
"bidirectional": true,
"path": "../xy_chart.props.xAxes[0].date.range.useStrict"
},
"type": "property"
}
}
},
"props": {
"label": {
"text": "Strict"
}
},
"type": "ia.input.toggle-switch"
}
],
"meta": {
"name": "root"
},
"position": {
"x": 0,
"y": 0
},
"type": "ia.container.coord"
}
}
Given that date is a range, rendering as date always puts an interval tick at each end of your chart, rather than one for each data point, If you want your columns centered on ticks, would you not just pre-format your times as date strings (MM/dd/yyyy HH:mm) using a transform and render as category?
Excellent suggestion.
I changed my query to cast the DB datetime field into char and all is well. I added some formatting to it as well to get the string looking like I want and this is the result, with the correct number of columns & labels and all aligning.
Not sure why this works, but if there is documentation where I could have found it I would find that useful to learn from.
Thanks!
The gotcha to doing your own date formatting is that it will use the gateway's timezone or your DB's timezone unless you take extra care.
I'll look into ways to watch for and/or mitigate that issue, but I'm assuming (for now) because our system is all under one roof it shouldn't be much of a concern as long as the gateway and DB (which live on the same machine) get their time source from the same place?