HOw To Show Data in Ms Chart on Mouse Over C# Web Application
i am using ms chat sp line i want that when i take my cursor to the chart to any point it will show the reading at that particular point as my chart is as
DataView dv = dtGroupedBy.DefaultView;
dv.Sort = "DATE";
chart1.DataSource = dv;
cha开发者_StackOverflow中文版rt1.DataBind();
<asp:chart runat="server" ID="chart1" Height="432px" Width="923px"
style="margin-top: 0px">
<Series>
<asp:Series Name="Series1" ChartType="Spline" XValueMember="DATE" YValueMembers="POWER"
Color="LightGreen">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
<AxisX Title="Days">
</AxisX>
<AxisY Title="Electricity in KW">
</AxisY>
</asp:ChartArea>
</ChartAreas>
</asp:chart>
Hopes for your reply..
Not sure if asp chart provides tooltip on data points. If yes use it, else write custom div's for each point and image map to the html output after chart is being created.
In your codebehind page try adding this when you load your chart: Chart1.Series["Series1"].ToolTip = "#VALX, #VALY";
#VALX and #VALY are some of many variables described below that you can add to the tooltip.
http://support2.dundas.com/Default.aspx?article=1132
精彩评论