-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chart not rendering data correctly #473
Comments
I put this JSON in the custom editor and saw this: can you clarify which regions are not showing correctly? {
"type": "area",
"datasets": [
{
"url": "https://gulfpub-gisstg.esriemcs.com/server/rest/services/EWA_Global_Assets/MapServer/3",
"name": "Asia Pacific",
"query": {
"where": "Region='Asia Pacific' AND Type='Export' AND Start_up>=1964",
"orderByFields": "Start_up",
"groupByFieldsForStatistics": "Start_up",
"outStatistics": [
{
"statisticType": "sum",
"onStatisticField": "Project_ca",
"outStatisticFieldName": "Project_ca_SUM"
}
]
},
"join": "Start_up"
},
{
"url": "https://gulfpub-gisstg.esriemcs.com/server/rest/services/EWA_Global_Assets/MapServer/3",
"name": "Middle East",
"query": {
"where": "Region='Middle East' AND Type='Export' AND Start_up>=1964",
"orderByFields": "Start_up",
"groupByFieldsForStatistics": "Start_up",
"outStatistics": [
{
"statisticType": "sum",
"onStatisticField": "Project_ca",
"outStatisticFieldName": "Project_ca_SUM"
}
]
},
"join": "Start_up"
},
{
"url": "https://gulfpub-gisstg.esriemcs.com/server/rest/services/EWA_Global_Assets/MapServer/3",
"name": "Europe",
"query": {
"where": "Region='Europe' AND Type='Export' AND Start_up>=1964",
"orderByFields": "Start_up",
"groupByFieldsForStatistics": "Start_up",
"outStatistics": [
{
"statisticType": "sum",
"onStatisticField": "Project_ca",
"outStatisticFieldName": "Project_ca_SUM"
}
]
},
"join": "Start_up"
},
{
"url": "https://gulfpub-gisstg.esriemcs.com/server/rest/services/EWA_Global_Assets/MapServer/3",
"name": "North America",
"query": {
"where": "Region='North America' AND Type='Export' AND Start_up>=1964",
"orderByFields": "Start_up",
"groupByFieldsForStatistics": "Start_up",
"outStatistics": [
{
"statisticType": "sum",
"onStatisticField": "Project_ca",
"outStatisticFieldName": "Project_ca_SUM"
}
]
},
"join": "Start_up"
},
{
"url": "https://gulfpub-gisstg.esriemcs.com/server/rest/services/EWA_Global_Assets/MapServer/3",
"name": "Africa",
"query": {
"where": "Region='Africa' AND Type='Export' AND Start_up>=1964",
"orderByFields": "Start_up",
"groupByFieldsForStatistics": "Start_up",
"outStatistics": [
{
"statisticType": "sum",
"onStatisticField": "Project_ca",
"outStatisticFieldName": "Project_ca_SUM"
}
]
},
"join": "Start_up"
},
{
"url": "https://gulfpub-gisstg.esriemcs.com/server/rest/services/EWA_Global_Assets/MapServer/3",
"name": "Latin America",
"query": {
"where": "Region='Latin America' AND Type='Export' AND Start_up>=1964",
"orderByFields": "Start_up",
"groupByFieldsForStatistics": "Start_up",
"outStatistics": [
{
"statisticType": "sum",
"onStatisticField": "Project_ca",
"outStatisticFieldName": "Project_ca_SUM"
}
]
},
"join": "Start_up"
}
],
"series": [
{
"category": {
"field": "Start_up",
"label": "Years"
},
"source": "Asia Pacific",
"value": {
"field": "Project_ca_SUM",
"label": "Asia Pacific"
}
},
{
"category": {
"field": "Start_up",
"label": "Years"
},
"source": "Middle East",
"value": {
"field": "Project_ca_SUM",
"label": "Middle East"
}
},
{
"category": {
"field": "Start_up",
"label": "Years"
},
"source": "Europe",
"value": {
"field": "Project_ca_SUM",
"label": "Europe"
}
},
{
"category": {
"field": "Start_up",
"label": "Years"
},
"source": "North America",
"value": {
"field": "Project_ca_SUM",
"label": "North America"
}
},
{
"category": {
"field": "Start_up",
"label": "Years"
},
"source": "Africa",
"value": {
"field": "Project_ca_SUM",
"label": "Africa"
}
},
{
"category": {
"field": "Start_up",
"label": "Years"
},
"source": "Latin America",
"value": {
"field": "Project_ca_SUM",
"label": "Latin America"
}
}
]
} |
Looking at the graphic, I do see there is an issue where they series are "cross-linked" to one another. There may be an issue with how the Join is being done. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have the below code and a few of the regions aren't rendering correctly. The queries are correct, so I'm guessing the definition is set up incorrectly?
Any help would be greatly appreciated!
var definition = {
type: "area",
datasets: [
{
url: "https://gulfpub-gisstg.esriemcs.com/server/rest/services/EWA_Global_Assets/MapServer/3",
name: "Asia Pacific",
query: {
where: "Region='Asia Pacific' AND Type='Export' AND Start_up>=1964",
orderByFields: "Start_up",
groupByFieldsForStatistics: "Start_up",
outStatistics: [{
statisticType: "sum",
onStatisticField: "Project_ca",
outStatisticFieldName: "Project_ca_SUM"
}]
},
join: "Start_up",
},
{
url: "https://gulfpub-gisstg.esriemcs.com/server/rest/services/EWA_Global_Assets/MapServer/3",
name: "Middle East",
query: {
where: "Region='Middle East' AND Type='Export' AND Start_up>=1964",
orderByFields: "Start_up",
groupByFieldsForStatistics: "Start_up",
outStatistics: [{
statisticType: "sum",
onStatisticField: "Project_ca",
outStatisticFieldName: "Project_ca_SUM"
}]
},
join: "Start_up",
},
{
url: "https://gulfpub-gisstg.esriemcs.com/server/rest/services/EWA_Global_Assets/MapServer/3",
name: "Europe",
query: {
where: "Region='Europe' AND Type='Export' AND Start_up>=1964",
orderByFields: "Start_up",
groupByFieldsForStatistics: "Start_up",
outStatistics: [{
statisticType: "sum",
onStatisticField: "Project_ca",
outStatisticFieldName: "Project_ca_SUM"
}]
},
join: "Start_up",
},
{
url: "https://gulfpub-gisstg.esriemcs.com/server/rest/services/EWA_Global_Assets/MapServer/3",
name: "North America",
query: {
where: "Region='North America' AND Type='Export' AND Start_up>=1964",
orderByFields: "Start_up",
groupByFieldsForStatistics: "Start_up",
outStatistics: [{
statisticType: "sum",
onStatisticField: "Project_ca",
outStatisticFieldName: "Project_ca_SUM"
}]
},
join: "Start_up",
},
{
url: "https://gulfpub-gisstg.esriemcs.com/server/rest/services/EWA_Global_Assets/MapServer/3",
name: "Africa",
query: {
where: "Region='Africa' AND Type='Export' AND Start_up>=1964",
orderByFields: "Start_up",
groupByFieldsForStatistics: "Start_up",
outStatistics: [{
statisticType: "sum",
onStatisticField: "Project_ca",
outStatisticFieldName: "Project_ca_SUM"
}]
},
join: "Start_up",
},
{
url: "https://gulfpub-gisstg.esriemcs.com/server/rest/services/EWA_Global_Assets/MapServer/3",
name: "Latin America",
query: {
where: "Region='Latin America' AND Type='Export' AND Start_up>=1964",
orderByFields: "Start_up",
groupByFieldsForStatistics: "Start_up",
outStatistics: [{
statisticType: "sum",
onStatisticField: "Project_ca",
outStatisticFieldName: "Project_ca_SUM"
}]
},
join: "Start_up",
},
],
series: [
{
category: { "field": "Start_up", "label": "Years" },
source: "Asia Pacific",
value: {
field: "Project_ca_SUM",
label: "Asia Pacific",
}
},
{
category: { "field": "Start_up", "label": "Years" },
source: "Middle East",
value: {
field: "Project_ca_SUM",
label: "Middle East",
}
},
{
category: { "field": "Start_up", "label": "Years" },
source: "Europe",
value: {
field: "Project_ca_SUM",
label: "Europe",
}
},
{
category: { "field": "Start_up", "label": "Years" },
source: "North America",
value: {
field: "Project_ca_SUM",
label: "North America",
}
},
{
category: { "field": "Start_up", "label": "Years" },
source: "Africa",
value: {
field: "Project_ca_SUM",
label: "Africa",
}
},
{
category: { "field": "Start_up", "label": "Years" },
source: "Latin America",
value: {
field: "Project_ca_SUM",
label: "Latin America",
}
},
]
}
var chart = new cedar.Chart("chartLine2", definition);
chart.show();
The text was updated successfully, but these errors were encountered: