Not getting XAXIS value of all series in MS CHART click event

huso_85

New Member
I am using ms chart with multiple series. I have set \[code\]postback\[/code\] value for all three series but the problem is that i can get the \[code\]xvalue\[/code\] only for first series not for second and third series . Here is code for setting the \[code\]xaxis\[/code\] value for all three series and chart click event where i am getting \[code\]xaxis\[/code\] value only for first series . code to bind the data source for chart and setting postback value for each series \[code\]int year = Convert.ToInt32(ddlYear.SelectedValue); DataSet dsAllDepartmentComparisonBarChart = r.AllDepartmentComparisonBarChart(year); DataView dvAllDepartmentComparisonBarChart = dsAllDepartmentComparisonBarChart.Tables[0].DefaultView;AllDepartmentComparisonBarChart.Series["Tour"].XValueMember = "dname"; AllDepartmentComparisonBarChart.Series["Inspection"].XValueMember = "dname"; AllDepartmentComparisonBarChart.Series["NightHalt"].XValueMember = "dname"; AllDepartmentComparisonBarChart.Series["Tour"].YValueMembers = "toursper"; AllDepartmentComparisonBarChart.Series["Tour"].ToolTip = " #VALY"; AllDepartmentComparisonBarChart.Series["Tour"].Label = "#VALY"; AllDepartmentComparisonBarChart.Series["Tour"].LegendText = " Tour"; AllDepartmentComparisonBarChart.Series["Tour"].PostBackValue = "http://stackoverflow.com/questions/12775571/1 : #VALX"; AllDepartmentComparisonBarChart.Series["Inspection"].YValueMembers = "inspectionsper"; AllDepartmentComparisonBarChart.Series["Inspection"].ToolTip = "#VALY"; AllDepartmentComparisonBarChart.Series["Inspection"].Label = "#VALY"; AllDepartmentComparisonBarChart.Series["Inspection"].LegendText = "Inspection"; AllDepartmentComparisonBarChart.Series["Inspection"].PostBackValue = "http://stackoverflow.com/questions/12775571/2 : #VALX"; AllDepartmentComparisonBarChart.Series["NightHalt"].YValueMembers = "nighthaltsper"; AllDepartmentComparisonBarChart.Series["NightHalt"].ToolTip = " #VALY"; AllDepartmentComparisonBarChart.Series["NightHalt"].Label = "#VALY"; AllDepartmentComparisonBarChart.Series["NightHalt"].LegendText = "Night halt "; AllDepartmentComparisonBarChart.Series["NightHalt"].PostBackValue = "http://stackoverflow.com/questions/12775571/3 : #VALX"; AllDepartmentComparisonBarChart.DataSource = dvAllDepartmentComparisonBarChart; AllDepartmentComparisonBarChart.DataBind(); Legend leg1 = new Legend(); AllDepartmentComparisonBarChart.Legends.Add(leg1); protected void AllDepartmentComparisonBarChart_Click(object sender, ImageMapEventArgs e) { string[] pointData = http://stackoverflow.com/questions/12775571/e.PostBackValue.Split(':'); //here getting value for firs series for xaxis but not for second and third }\[/code\]
 
Back
Top