Line graph ( two values) x axis values do not match

Hi - I am trying to use a simple line graph to compare two values. My X axis is not depicting the values correctly. I am not sure what I am doing wrong. I have tried two ways -

image

  1. through the wizard - this works EXCEPT I do not know how to eliminate my ‘All’ in the the data ( the 6th data point)

  2. I have been using this script and it was working. I am not sure when it became out of sync. This script is easier for me to manipulate.

My script -

var chartData = ;
for (var i = 0; i < record.tables.Age.length -1 ; i++) {
var temp = {
‘value_label’ : record.tables[‘Age’][i].fields[‘pls_age’],
‘values_1’ : record.tables[‘Age’][i].fields[‘pls_ageCtb’],
‘values_2’ : record.tables[‘Age’][i].fields[‘pls_ageCnt’]
};
chartData.push(temp);
}

var config = {
type : “serial”,
categoryField: “value_label”,
rotate: false,
fontSize:8,
dataProvider : chartData,
//synchronizeGrid: true,
categoryAxis: {
tickLength: 0,
gridThickness: 0
},
graphs: [
{
“valueField”: “values_1”,
“type”: “line”,
“bullet”:“circle”,
“labelText”: “[[value]]”,
//“color”: “#ffffff”,
“fillAlphas”: 0,
//“lineAlpha”: 1,
“lineColor”: “#232c68”,
“lineThickness”: 2
},
{
“valueField”: “values_2”,
“type”: “line”,
“bullet”: “circle”,
“labelText”: “[[value]]”,
“fillAlphas”: 0,
“lineColor”: “#980539”,
“lineThickness”: 2

}
],
“valueAxes”: [
{
“id”: “ValueAxis-1”,
“stackType”: “regular”,
“title”: “”,
“tickLength”: 0
}
]
};

results.attr(‘data-amchart’, JSON.stringify(config) );

Can anyone help?
Thank You!!

This issue has been resolved. Thanks

Can you post how it was resolved? That could help other users. :slight_smile:

Thanks.