Problems With Markedzone.

Thread is closed for posting
3 posts, 0 answers
  1. Fabian Raul Jofre
    Fabian Raul  Jofre avatar
    29 posts
    Member since:
    Dec 2008

    Posted 14 Sep 2009 Link to this post

    I need to know if i am doing something wrong with the marked zone at radchart.-
    But i have a little problem.
    If i set the DataLabelsColumn, the Markedzone doesn´t work, but if i comment this line everithing is ok with the markedzone.
    The line is this -->RadChart1.PlotArea.XAxis.DataLabelsColumn = "DiasMes";

    RadChart1.DataSource = dt;

    RadChart1.PlotArea.XAxis.DataLabelsColumn =





    foreach (ChartSeries oSerie in RadChart1.Series)



    oSerie.Type =



    oSerie.Appearance.LabelAppearance.Visible =








    ChartMarkedZone oMZ = new ChartMarkedZone();


    oMZ.ValueStartX = 10;

    oMZ.ValueEndX = 12;

    oMZ.Appearance.FillStyle.MainColor = System.Drawing.



    RadChart1.PlotArea.XAxis.LabelStep = 1;

    RadChart1.PlotArea.XAxis.MinValue = 1;

    RadChart1.PlotArea.XAxis.MaxValue = MaxDayOfMonth;//int Value



  2. Velin
    Velin avatar
    391 posts

    Posted 17 Sep 2009 Link to this post

    Hi Fabian,

    Indeed, settng the AxisX.DataLabelsColumn property seems to override the marked zone settings and our developers will further investigate the issue. In the meanwhile , you can workaround the problem by handling the BeforeLayout event and manually add the axis labels:
    RadChart1.BeforeLayout += new EventHandler<EventArgs>(RadChart1_BeforeLayout); 
        void RadChart1_BeforeLayout(object sender, EventArgs e) 
                RadChart1.PlotArea.XAxis.Items[0].TextBlock.Text = GetData().Rows[0][2].ToString(); 
                RadChart1.PlotArea.XAxis.Items[1].TextBlock.Text = GetData().Rows[1][2].ToString(); 
                RadChart1.PlotArea.XAxis.Items[2].TextBlock.Text = GetData().Rows[2][2].ToString(); 
    Attached is a sample project.

    Hope this will help.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Fabian Raul Jofre
    Fabian Raul  Jofre avatar
    29 posts
    Member since:
    Dec 2008

    Posted 17 Sep 2009 Link to this post

    Thank´s that´s solucionated my problem.
Back to Top