Need Dynamic charting help.

Thread is closed for posting
2 posts, 0 answers
  1. Zeeshan fawad
    Zeeshan fawad avatar
    10 posts
    Member since:
    Jun 2009

    Posted 08 Jul 2009 Link to this post

      I am making dynamic chats controls, i am getting problems in settings colors of chart in plot area and text color of legend. I am passing colors in series items , the colors drawn in the chart is of gradient not solid. Secondly the legend items text color is not changed w r t skin. eg i am using black skin , all items of the chart has been changed to white except the legend color. note that i am making legend dynamically w . r. t series items.
    Here is my code.

            //passing series to chart , with series items and colors
            ChartSeries csud = new ChartSeries();      
            csud.Type = ChartSeriesType.Pie;
            csud.AddItem(7000, "Total",Color.Red);
            csud.AddItem(3500, "Projected",Color.Blue);
            csud.AddItem(2000, "Used",Color.Green);
            csud.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.Nothing;

    //making dynamic legend according to chart series items.
         if (RadChart1.Series.Count == 1)
                int j = 0;
                for (j = 0; j < RadChart1.Series[0].Items.Count; j++)
                    LabelItem lblitem = new LabelItem();
                    lblitem.TextBlock.Text = RadChart1.Series[0].Items[j].Label.TextBlock.Text;
                    RadChart1.Legend.Items[j].Marker.Appearance.FillStyle.MainColor = RadChart1.Series[0].Items[j].Appearance.FillStyle.MainColor;                


    Muhammad Shoaib
  2. Ves
    Ves avatar
    2927 posts

    Posted 09 Jul 2009 Link to this post

    Hello Muhammad,

    I have answered in the other forum thread you have started.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top