Click here to Skip to main content
16,020,633 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
<asp:Chart ID="Chart1" runat="server"  Height="350px" Width="600px" Style="text-align: center;
             margin-left: auto; margin-right: auto; ">
             <Titles>

                <asp:Title Font="Times New Roman, 12pt, style=Bold, Italic" Name="Title1" Text="Daily MeatSale Graph">
                </asp:Title>
            </Titles>
            <Legends>
                <asp:Legend Docking="Bottom" IsTextAutoFit="False" Name="MeatinKgs" LegendStyle="Row" />
            </Legends>
            <Series>
                <asp:Series Name="Meat in Kgs" ToolTip="#VALX [#VALY Kgs]" YValuesPerPoint="1" />
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="ChartArea1">
                </asp:ChartArea>
            </ChartAreas>
        </asp:Chart>

.CS page code Here
C#
dtmeatgraph = objRetailBAL.getdatewisegraph(objRetailPL);

DataTable dttooltip = new DataTable();
dttooltip = dtmeatgraph.Tables[1].Copy();
string[] x = new string[dtmeatgraph.Tables[0].Rows.Count];
int[] y = new int[dtmeatgraph.Tables[0].Rows.Count];

for (int i = 0; i < dtmeatgraph.Tables[0].Rows.Count; i++)
{
    x[i] = dtmeatgraph.Tables[0].Rows[i][1].ToString();
    y[i] = Convert.ToInt32(dtmeatgraph.Tables[0].Rows[i][0]);

}

Chart1.Series[0].Points.DataBindXY(x,y);
Chart1.Series[0].ChartType = SeriesChartType.Column;
Chart1.ChartAreas[0].AxisX.LabelStyle.Angle = -90;
Chart1.ChartAreas[0].AxisX.LabelStyle.Interval = 1;
Chart1.Series[0].IsValueShownAsLabel = true;
Chart1.ChartAreas[0].AxisX.Title = "Dates";
Chart1.ChartAreas[0].AxisY.Title = "Meat In Kgs";

Here I need to display my tool tip values from datatable
"dtmeatgraph.Tables[1].Rows.Count".

How can i Add using Chat controls in Asp.net
Posted
Updated 9-Oct-14 21:20pm
v11

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900