# Defect 1651
REPL code to get the chart JSON,
```clojure
(defn chart-json
[org-id uid chart-id refresh]
(let [system integrant.repl.state/system
server-state {:db (:unifize/db system)
:ds (:unifize/ds system)
:unifize/ds (:unifize/ds system)
:unifize/redis (:unifize/redis system)
:unifize.aws/dynamodb (:unifize.aws/dynamodb system)
:unifize/reporting-database :dynamo}]
(:metadata
(unifize.db.chart/chart-with-metadata server-state
org-id
uid
chart-id
{:refresh refresh}))))
```
The REPL function call to get the chart,
```clojure
(chart-json 141 "2Kro7kPQz4XDtZAJRQOJejMzNmg2" 191 true)
```
Filters (Stored in the Database):
```jsonld
{
"id": 455,
"page": 1,
"sort": [
"seqNo:asc"
],
"status": [
-1,
247,
-2
]
}
```
Following is the JSON obtained,
```json
{
"chart": {
"theme": "fusion"
},
"categories": [
{
"category": [
{
"label": "1.5 Failure"
},
{
"label": "Functional failure"
},
{
"label": "1.2 Features"
},
{
"label": "1.3 Finish"
},
{
"label": "1.1 Dimensional"
},
{
"label": "Wrong Item Shipped"
},
{
"label": "2.3 Quantity Short"
},
{
"label": "Dimensional issue"
},
{
"label": "Missing Parts"
},
{
"label": "Defective Out of Box"
},
{
"label": "2.5 Damaged in Shipment"
},
{
"label": "Finish defect"
},
{
"label": "Damaged in Shipment"
},
{
"label": "Features are incorrect"
},
{
"label": "Customer Issue"
},
{
"label": "Paint defect"
},
{
"label": "3.2 Inaccurate Information"
},
{
"label": "Missing Product"
},
{
"label": "Engineering Design"
},
{
"label": "Quantity Short"
},
{
"label": "Contamination, FOD, rust, corrosion on part"
},
{
"label": "Paint"
},
{
"label": "1.4 Documentation"
},
{
"label": "Inaccurate Information"
},
{
"label": "Wrong component in kit"
},
{
"label": "2.1 Late"
},
{
"label": "2.4 Quantity High"
},
{
"label": "Wiring issue"
},
{
"label": "Wrong Item"
},
{
"label": "Nonconformance"
},
{
"label": "Incorrect packaging, pallet or rack"
},
{
"label": "Surface defect/damaged"
},
{
"label": "Material issue"
},
{
"label": "Late shipment"
},
{
"label": "Documentation is missing or incomplete"
},
{
"label": "1.5 Failure"
},
{
"label": "Quantity High"
},
{
"label": "Customer complained that the mast retraction through the NS Control Box is too slow"
},
{
"label": "SHIPPED TO WRONG LOCATION"
},
{
"label": "2.3 Quantity Short"
},
{
"label": "Damage "
},
{
"label": "Unauthorized Shipment"
},
{
"label": "1.1 Dimensional"
},
{
"label": "Early shipment"
},
{
"label": "Wrong Packing"
},
{
"label": "Quantity Short & Defective"
},
{
"label": "Pitting of Steel"
},
{
"label": "Parts are not properly wrapped and protected from damage"
},
{
"label": "Incomplete order is sent to customer"
},
{
"label": "Address wrong, ship to wrong location"
},
{
"label": "1.2 Features"
},
{
"label": "Damage to shipping container"
},
{
"label": "#"
}
]
}
],
"dataset": [
{
"seriesname": "",
"data": [
{
"value": 212,
"label": "1.5 Failure",
"filter": {
"920": [
"1.5 Failure"
]
},
"labelId": 7
},
{
"value": 121,
"label": "Functional failure",
"filter": {
"920": [
"Functional failure"
]
},
"labelId": 29
},
{
"value": 71,
"label": "1.2 Features",
"filter": {
"920": [
"1.2 Features"
]
},
"labelId": 3
},
{
"value": 47,
"label": "1.3 Finish",
"filter": {
"920": [
"1.3 Finish"
]
},
"labelId": 5
},
{
"value": 47,
"label": "1.1 Dimensional",
"filter": {
"920": [
"1.1 Dimensional"
]
},
"labelId": 1
},
{
"value": 44,
"label": "Wrong Item Shipped",
"filter": {
"920": [
"Wrong Item Shipped"
]
},
"labelId": 50
},
{
"value": 41,
"label": "2.3 Quantity Short",
"filter": {
"920": [
"2.3 Quantity Short"
]
},
"labelId": 10
},
{
"value": 40,
"label": "Dimensional issue",
"filter": {
"920": [
"Dimensional issue"
]
},
"labelId": 23
},
{
"value": 34,
"label": "Missing Parts",
"filter": {
"920": [
"Missing Parts"
]
},
"labelId": 35
},
{
"value": 32,
"label": "Defective Out of Box",
"filter": {
"920": [
"Defective Out of Box"
]
},
"labelId": 22
},
{
"value": 24,
"label": "2.5 Damaged in Shipment",
"filter": {
"920": [
"2.5 Damaged in Shipment"
]
},
"labelId": 13
},
{
"value": 22,
"label": "Finish defect",
"filter": {
"920": [
"Finish defect"
]
},
"labelId": 28
},
{
"value": 22,
"label": "Damaged in Shipment",
"filter": {
"920": [
"Damaged in Shipment"
]
},
"labelId": 21
},
{
"value": 22,
"label": "Features are incorrect",
"filter": {
"920": [
"Features are incorrect"
]
},
"labelId": 27
},
{
"value": 21,
"label": "Customer Issue",
"filter": {
"920": [
"Customer Issue"
]
},
"labelId": 17
},
{
"value": 12,
"label": "Paint defect",
"filter": {
"920": [
"Paint defect"
]
},
"labelId": 39
},
{
"value": 11,
"label": "3.2 Inaccurate Information",
"filter": {
"920": [
"3.2 Inaccurate Information"
]
},
"labelId": 14
},
{
"value": 11,
"label": "Missing Product",
"filter": {
"920": [
"Missing Product"
]
},
"labelId": 36
},
{
"value": 8,
"label": "Engineering Design",
"filter": {
"920": [
"Engineering Design"
]
},
"labelId": 26
},
{
"value": 8,
"label": "Quantity Short",
"filter": {
"920": [
"Quantity Short"
]
},
"labelId": 43
},
{
"value": 7,
"label": "Contamination, FOD, rust, corrosion on part",
"filter": {
"920": [
"Contamination, FOD, rust, corrosion on part"
]
},
"labelId": 16
},
{
"value": 6,
"label": "Paint",
"filter": {
"920": [
"Paint"
]
},
"labelId": 38
},
{
"value": 6,
"label": "1.4 Documentation",
"filter": {
"920": [
"1.4 Documentation"
]
},
"labelId": 6
},
{
"value": 5,
"label": "Inaccurate Information",
"filter": {
"920": [
"Inaccurate Information"
]
},
"labelId": 30
},
{
"value": 4,
"label": "Wrong component in kit",
"filter": {
"920": [
"Wrong component in kit"
]
},
"labelId": 52
},
{
"value": 4,
"label": "2.1 Late",
"filter": {
"920": [
"2.1 Late"
]
},
"labelId": 9
},
{
"value": 4,
"label": "2.4 Quantity High",
"filter": {
"920": [
"2.4 Quantity High"
]
},
"labelId": 12
},
{
"value": 4,
"label": "Wiring issue",
"filter": {
"920": [
"Wiring issue"
]
},
"labelId": 48
},
{
"value": 3,
"label": "Wrong Item",
"filter": {
"920": [
"Wrong Item"
]
},
"labelId": 49
},
{
"value": 3,
"label": "Nonconformance",
"filter": {
"920": [
"Nonconformance"
]
},
"labelId": 37
},
{
"value": 3,
"label": "Incorrect packaging, pallet or rack",
"filter": {
"920": [
"Incorrect packaging, pallet or rack"
]
},
"labelId": 32
},
{
"value": 3,
"label": "Surface defect/damaged",
"filter": {
"920": [
"Surface defect/damaged"
]
},
"labelId": 46
},
{
"value": 2,
"label": "Material issue",
"filter": {
"920": [
"Material issue"
]
},
"labelId": 34
},
{
"value": 2,
"label": "Late shipment",
"filter": {
"920": [
"Late shipment"
]
},
"labelId": 33
},
{
"value": 2,
"label": "Documentation is missing or incomplete",
"filter": {
"920": [
"Documentation is missing or incomplete"
]
},
"labelId": 24
},
{
"value": 1,
"label": "1.5 Failure",
"filter": {
"920": [
"1.5 Failure",
"1.5 Failure",
"1.5 Failure",
"1.5 Failure",
"1.5 Failure"
]
},
"labelId": 8
},
{
"value": 1,
"label": "Quantity High",
"filter": {
"920": [
"Quantity High"
]
},
"labelId": 42
},
{
"value": 1,
"label": "Customer complained that the mast retraction through the NS Control Box is too slow",
"filter": {
"920": [
"Customer complained that the mast retraction through the NS Control Box is too slow",
"1.2 Features"
]
},
"labelId": 18
},
{
"value": 1,
"label": "SHIPPED TO WRONG LOCATION",
"filter": {
"920": [
"SHIPPED TO WRONG LOCATION"
]
},
"labelId": 45
},
{
"value": 1,
"label": "2.3 Quantity Short",
"filter": {
"920": [
"2.3 Quantity Short",
"1.1 Dimensional"
]
},
"labelId": 11
},
{
"value": 1,
"label": "Damage ",
"filter": {
"920": [
"Damage "
]
},
"labelId": 19
},
{
"value": 1,
"label": "Unauthorized Shipment",
"filter": {
"920": [
"Unauthorized Shipment"
]
},
"labelId": 47
},
{
"value": 1,
"label": "1.1 Dimensional",
"filter": {
"920": [
"1.1 Dimensional",
"1.3 Finish",
"1.2 Features"
]
},
"labelId": 2
},
{
"value": 1,
"label": "Early shipment",
"filter": {
"920": [
"Early shipment"
]
},
"labelId": 25
},
{
"value": 1,
"label": "Wrong Packing",
"filter": {
"920": [
"Wrong Packing"
]
},
"labelId": 51
},
{
"value": 1,
"label": "Quantity Short & Defective",
"filter": {
"920": [
"Quantity Short & Defective"
]
},
"labelId": 44
},
{
"value": 1,
"label": "Pitting of Steel",
"filter": {
"920": [
"Pitting of Steel"
]
},
"labelId": 41
},
{
"value": 1,
"label": "Parts are not properly wrapped and protected from damage",
"filter": {
"920": [
"Parts are not properly wrapped and protected from damage"
]
},
"labelId": 40
},
{
"value": 1,
"label": "Incomplete order is sent to customer",
"filter": {
"920": [
"Incomplete order is sent to customer"
]
},
"labelId": 31
},
{
"value": 1,
"label": "Address wrong, ship to wrong location",
"filter": {
"920": [
"Address wrong, ship to wrong location"
]
},
"labelId": 15
},
{
"value": 1,
"label": "1.2 Features",
"filter": {
"920": [
"1.2 Features",
"1.2 Features",
"1.2 Features",
"1.2 Features",
"1.2 Features"
]
},
"labelId": 4
},
{
"value": 1,
"label": "Damage to shipping container",
"filter": {
"920": [
"Damage to shipping container"
]
},
"labelId": 20
},
{
"value": 1,
"label": "#",
"filter": {
"920": null
},
"labelId": 0
}
]
}
]
}
```