Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Requirement:

I need to create a Stacked Bar Chart in my web application based on 2.0 plateform. I dont want to use any third party tool or chart in VS because I cannot access the chart control when working on 2.0 plateform. It only supports 3.5.

Is there any professional developer present who can help me in this issue.

my Code is as below from which I need to create bar Chart.

C#
OracleConnection dbConn = Conn.getConn();
    ExCard_Services obj = new ExCard_Services(Conn.getConn());
    protected void Page_Load(object sender, EventArgs e)
    {
        BindData();
    }


    private void BindData()
    {
        
        string strQuery = "select product, quantity, amount, retail_outlet, to_char(txn_dt,'DD-MON-YYYY') DT, txn_time from(card_trans_detail) where card_no in (select card_no from card_services where emp_code='619') and to_char(bill_month,'MON-YYYY')='" + Request.QueryString.Get("mnyr") + "' order by  product";
        
        OracleCommand cmd = new OracleCommand(strQuery);
        gvFuelDetail.DataSource = obj.SetData(cmd);
        gvFuelDetail.DataBind();
    }


From the above code I need to extract the chart of AMOUNT and PRODUCT of the CURRENT MONTH.
Amount has numeric values.
Product has PETROL and CNG.

Thanks..
Posted
Updated 12-May-14 1:12am
v4
Comments
ZurdoDev 7-Oct-13 7:36am    
It's going to be way more work to make a chart on your own because you have to implement drawing techniques. I don't remember the chart control only working in 3.5 but if so, upgrade to it. Or, I know google used to have an api that you could use to generate graphs.
AR547 14-Oct-13 1:02am    
Yeah created it in 3.5 :)

 
Share this answer
 
Do have a look on Google API.....

Pretty Easy to deploy in an ASP.NET application.. and much helpful in chart creation...


https://developers.google.com/chart/interactive/docs/examples[^]

Hope it will help... :)
 
Share this answer
 
Comments
AR547 8-Oct-13 6:18am    
tHANKS...
VICK 8-Oct-13 6:21am    
Glad to help you.. :)

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