ポストバック プロパティに問題があります。データソースから取得した 3 つのシリーズを含むチャート (以下のコード) があります。
すべてのシリーズは正常に表示されますが、グラフのバーがクリック イベントに応答するように設定しました。最初のシリーズのアイテムが選択されている場合、すべて正常に動作します。ただし、x 軸の値であるはずの 2 番目または 3 番目のシリーズの x 値を取得しようとしましたが、得られるのは 0 だけです。
ありがとう。
<asp:Chart ID="CTStatusCategory" runat="server" DataSourceID="DSLegislationCodeSummary"
BackColor="#FAEBD7" onclick="CTStatusCategory_Click">
<Series>
<asp:Series Name="Pending with Authority" XValueMember="LegislationCategoryCode"
YValueMembers="P" PostBackValue="#VALX,#VALY" IsValueShownAsLabel="true" ChartType="StackedColumn" YAxisType="Primary" ToolTip="#SERIESNAME : #VALY" >
</asp:Series>
<asp:Series Name="Yes" XValueMember="LegislationCategoryCode" YValueMembers="Y" ChartType="StackedColumn" IsValueShownAsLabel="true" PostBackValue="#VALX,#VALY" ToolTip="#SERIESNAME : #VALY">
</asp:Series>
<asp:Series Name="In-Progress" XValueMember="LegislationCategoryCode" YValueMembers="I" ChartType="StackedColumn" IsValueShownAsLabel="true" PostBackValue="#VALX,#VALY" ToolTip="#SERIESNAME : #VALY">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1" Area3DStyle-Enable3D="false" >
<AxisX LineColor="DarkGray">
<MajorGrid LineColor="LightGray" />
</AxisX>
<AxisY LineColor="DarkGray">
<MajorGrid LineColor="LightGray" />
</AxisY>
<Area3DStyle Enable3D="True" WallWidth="5" LightStyle="Realistic"></Area3DStyle>
<Position Height="80" Width="100" X="0" Y="20" />
</asp:ChartArea>
</ChartAreas>
<Legends>
<asp:Legend BackColor="#FAEBD7" >
</asp:Legend>
</Legends>
</asp:Chart>
C# コード
protected void CTStatusCategory_Click(object sender, ImageMapEventArgs e)
{
String dd = e.PostBackValue;
}