I am using asp.net chart control and i want to use chart click event to get the deptId
value of bar click in bar chart .
<Series>
<asp:Series Name="Tour" ChartType="Column" ChartArea="MainChartArea" PostBackValue="#VALX">
</asp:Series>
<asp:Series Name="Inspection" ChartType="Column" ChartArea="MainChartArea" PostBackValue="#VALX">
</asp:Series>
<asp:Series Name="NightHalt" ChartType="Column" ChartArea="MainChartArea" PostBackValue="#VALX">
</asp:Series>
</Series>
I am using department name to show on X axis but i want to capture deptid
on chart click event . In above markup i use #VALX
in series postback
event but its give me deptname in click event
protected void AllDepartmentComparisonBarChart_Click(object sender, ImageMapEventArgs e)
{
e.PostBackValue;
}
Maybe you can try removing your serie-level PostBackValue and try to iterate through the DataPoints of your Series, setting the correct deptId as PostBackValue for each individual DataPoint.
http://msdn.microsoft.com/fr-fr/library/system.web.ui.datavisualization.charting.datapointcustomproperties.postbackvalue.aspx