Hi, I am trying to add a space on the xy chart between categories:
I have been looking into other topics. And I found these two topics useful:
How to add space between category bars - XY Chart
Bars distance in XY Chart
However, there's an error in my script saying that the "array.array" object has no attribute 'getRowCount'
Any hints for me?
Your Query return type is JSON, but getRowCount is a DataSet function.
Try this instead:
for row in range(0, len(value))
1 Like
Thank you. Now it's complaining about the getValueAt
Because... getValueAt is a DataSet function.
1 Like
return [
{
"NestId": value[i]["NestID"] # access like this
} for i in range(lenvalue))
]
1 Like
lrose
November 18, 2022, 9:40pm
6
Better might be:
return [dict(blank=0,blank1=0, **value)]
1 Like
Thank you very much for your help!
@cmallonee Question:
Instead of NestID column name now it's called "station". However, I would like to map values from 1-7 to the Station Description. How can I correct the line station": value[row].stationDesc["station"] ?
stationDesc = { 1: "Tube Inserts",
2: "Valve Load",
3: "Foot Load",
4: "Pres. Test",
5: "Clock Valve",
6: "Foot Snap",
7: "Part Present"
}
return [
{
"blank": 0,
"station": value[row].stationDesc["station"],
"Ch1": value[row]["Ch1"],
"Ch2": value[row]["Ch2"],
"Ch3": value[row]["Ch3"],
"Ch4": value[row]["Ch4"],
"blank1": 0
} for row in range (0, len(value))
]
@cmallonee Never mind. I got it this way:
stationDesc = { 1: "Tube Inserts",
2: "Valve Load",
3: "Foot Load",
4: "Pres. Test",
5: "Clock Valve",
6: "Foot Snap",
7: "Part Present"
}
return [
{
"blank": 0,
"station":stationDesc.get(value[row]["station"]),
"Ch1": value[row]["Ch1"],
"Ch2": value[row]["Ch2"],
"Ch3": value[row]["Ch3"],
"Ch4": value[row]["Ch4"],
"blank1": 0
} for row in range (0, len(value))
]