An object representing a chart item of type WebChart.
Referenced by: Feature Layer (ArcGISFeatureLayer), Footprint Layer (FootprintLayer), Image Service Layer (ArcGISImageServiceLayer), KnowledgeGraph Sub Layer (KnowledgeGraphSubLayer), Link Chart Aggregation Layer (LinkChartAggregationLayer), Oriented Imagery Layer (OrientedImageryLayer), Subtype Layer (SubtypeLayer), Subtype Table (SubtypeTable), table, Tiled Image Service Layer (ArcGISTiledImageServiceLayer), Web Coverage Service Layer (WCS)
Additional information
WebChart specification in ArcGIS Maps SDK for JavaScript.
chart Example
Sample WebChart configuration
{
"version": "24.4.0",
"type": "chart",
"id": "example-chart",
"rotated": false,
"title": {
"type": "chartText",
"visible": true,
"content": {
"type": "esriTS",
"color": [
0,
0,
0,
178.5
],
"text": "District by WeekDay",
"font": {
"size": 18
}
}
},
"background": [
255,
255,
255,
255
],
"axes": [
{
"type": "chartAxis",
"visible": true,
"title": {
"type": "chartText",
"visible": true,
"content": {
"type": "esriTS",
"color": [
0,
0,
0,
178.5
],
"text": "WeekDay",
"font": {
"size": 14
}
}
},
"labels": {
"type": "chartText",
"visible": true,
"content": {
"type": "esriTS",
"color": [
0,
0,
0,
178.5
],
"text": "X Axis",
"font": {
"size": 10
}
}
},
"valueFormat": {
"type": "category",
"characterLimit": 11
},
"lineSymbol": {
"type": "esriSLS",
"style": "esriSLSSolid",
"color": [
156,
156,
156,
255
],
"width": 1
}
},
{
"type": "chartAxis",
"visible": true,
"title": {
"type": "chartText",
"visible": true,
"content": {
"type": "esriTS",
"color": [
0,
0,
0,
178.5
],
"text": "District",
"font": {
"size": 14
}
}
},
"labels": {
"type": "chartText",
"visible": true,
"content": {
"type": "esriTS",
"color": [
0,
0,
0,
178.5
],
"text": "Count",
"font": {
"size": 10
}
}
},
"valueFormat": {
"type": "number",
"intlOptions": {
"style": "decimal",
"minimumFractionDigits": 0,
"maximumFractionDigits": 3
}
},
"lineSymbol": {
"type": "esriSLS",
"style": "esriSLSSolid",
"color": [
156,
156,
156,
255
],
"width": 1
},
"grid": {
"type": "esriSLS",
"style": "esriSLSSolid",
"color": [
0,
0,
0,
25
],
"width": 1
}
}
],
"series": [
{
"type": "barSeries",
"id": "District",
"name": "District",
"hideOversizedSideBySideLabels": false,
"query": {
"groupByFieldsForStatistics": [
"WeekDay"
]
},
"x": "WeekDay",
"y": "District",
"fillSymbol": {
"type": "esriSFS",
"style": "esriSFSSolid",
"color": [
31,
120,
180,
178.5
]
},
"dataLabels": {
"type": "chartText",
"visible": false,
"content": {
"type": "esriTS",
"color": [
0,
0,
0,
178.5
],
"text": "",
"font": {
"size": 10
}
}
}
}
],
"legend": {
"type": "chartLegend",
"visible": true,
"title": {
"type": "chartText",
"visible": true,
"content": {
"type": "esriTS",
"color": [
0,
0,
0,
178.5
],
"text": "Arrest",
"font": {
"size": 13
}
}
},
"body": {
"type": "esriTS",
"color": [
0,
0,
0,
178.5
],
"text": "",
"font": {
"size": 12
}
},
"position": "top",
"maxHeight": null
},
"colorMatch": true,
"orderOptions": {
"data": {
"orderType": "arcgis-charts-category",
"orderBy": "ASC"
}
},
"stackedType": "sideBySide",
"iLayer": {
"layerType": "ArcGISFeatureLayer",
"id": "",
"layerDefinition": {
"id": 0,
"drawingInfo": {
"renderer": {
"type": "uniqueValue",
"visualVariables": [
{
"type": "sizeInfo",
"valueExpression": "$view.scale",
"stops": [
{
"size": 7.5,
"value": 4513.988705
},
{
"size": 6,
"value": 36111.909643
},
{
"size": 3,
"value": 288895.277144
},
{
"size": 1.5,
"value": 2311162.217155
}
]
}
],
"field1": "Primary_Ty",
"legendOptions": {},
"uniqueValueInfos": [
{
"label": "Robbery (custom)",
"symbol": {
"type": "esriSMS",
"color": [
253,
127,
111,
255
],
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"size": 6,
"style": "esriSMSCircle",
"outline": {
"type": "esriSLS",
"color": [
26,
26,
26,
64
],
"width": 0.75,
"style": "esriSLSSolid"
}
},
"value": "ROBBERY"
},
{
"label": "BATTERY",
"symbol": {
"type": "esriSMS",
"color": [
126,
176,
213,
255
],
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"size": 6,
"style": "esriSMSCircle",
"outline": {
"type": "esriSLS",
"color": [
26,
26,
26,
64
],
"width": 0.75,
"style": "esriSLSSolid"
}
},
"value": "BATTERY"
},
{
"label": "Assault (custom)",
"symbol": {
"type": "esriSMS",
"color": [
178,
224,
97,
255
],
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"size": 6,
"style": "esriSMSCircle",
"outline": {
"type": "esriSLS",
"color": [
26,
26,
26,
64
],
"width": 0.75,
"style": "esriSLSSolid"
}
},
"value": "ASSAULT"
}
]
}
}
},
"url": "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/ChicagoCr/FeatureServer/0"
}
}