How to create one series with multiple items

Thread is closed for posting
3 posts, 0 answers
  1. mahmoud
    mahmoud avatar
    13 posts
    Member since:
    Feb 2014

    Posted 12 Feb 2014 Link to this post

    Hello Team,
    I want to create one series and bound it to multiple items and with different colors for each item
    take a look at my picture this what I select from database Day, Date and Total Time sheet.. My problem now like it seems in the picture
    that the bars colors didnt change for each item and series in the the right of the chart just read the first date only.. so please can any one help me how can i achieve this programmatically by C#?

    Here's my code:
     RadChart1.PlotArea.XAxis.AutoScale = false;
        ChartSeries series = new ChartSeries(dt.Rows[0]["doc_date"].ToString(), ChartSeriesType.Bar);
        for (int i = 0; i < dt.Rows.Count; i++)
            //series = new ChartSeries(dt.Rows[i]["doc_date"].ToString(), ChartSeriesType.Bar);
            series.Items.Add(new ChartSeriesItem(Convert.ToDouble(dt.Rows[i]["total_timesheet"])));
            ChartAxisItem axisItem = new ChartAxisItem(dt.Rows[i]["day_name"].ToString());
  2. Danail Vasilev
    Danail Vasilev avatar
    1502 posts

    Posted 13 Feb 2014 Link to this post

    Hi Mahmoud,

    I have already replied to the same question you have asked in this forum thread, so that you can find my answer there.

    Could I also ask you to post only one thread per question in future? This will keep the conversation concise and in one place, without duplicating content and efforts.

    Thank you for your cooperation.

    Danail Vasilev
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
  3. mahmoud
    mahmoud avatar
    13 posts
    Member since:
    Feb 2014

    Posted 13 Feb 2014 in reply to Danail Vasilev Link to this post

    Hi Danail Vasilev,
    thanks for your reply, and I'm sorry for posting another thread but its just that I need this requirements quickly but admin replies are too late like 6 or 7 days from the date of post.
    thanks anyway. you were very helpful.
Back to Top