Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to display bar chart with four values. But it is not working. My code is given below. Please help me

C#
protected void Page_Load(object sender, EventArgs e)
    {
        RunTimeDSTableAdapters.tbl_runtime_reportTableAdapter state;
        state = new RunTimeDSTableAdapters.tbl_runtime_reportTableAdapter();
        DataSet ds = new DataSet();
        ds = state.GetDummyChart(); // error popup here
        DataView source = new DataView(ds.Tables[0]);
        Chart1.DataSource = source;
        Chart1.Series[0].XValueMember = "Mains_Run_Hrs";
        Chart1.Series[0].XValueMember = "DG_Run_Auto_Mode";
        Chart1.Series[0].XValueMember = "Battery_Run_Hrs";
        Chart1.Series[0].XValueMember = "Solar_Run_hrs";
        Chart1.DataBind();
    }
Posted

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