Ranges in the XAxis Label

2 posts, 0 answers
  1. Sergio
    Sergio avatar
    30 posts
    Member since:
    Jul 2010

    Posted 24 May 2011 Link to this post


    I have Point Chart Type Graph in WinForms. My client is requiring me to Display range labels for the XAxis, so for instance in the label between tick marks say - 10 to 30, 30 to 50 and so on. In its natural state the graph displays the xvalue, I would need to know the range of data between tick marks in order to provide for a label. Is there a workaround you could suggest?

    I really like the Mark Zone approach, as a matter of fact I try this one, and It work really well! My only concern is that the MarkZone Label Displays at the top of the Graph... If I could only manage to display this label right at the bottom (right above the XAxis Line) I could fake the XAxis labels.

    Also my client wants me to specify the number of ticks, on the xAxis, and I have not manage to accomplish this - How can I do this, say like have 11 tick marks instead of 5? In addition, My graph for some reason is starting in the xaxis label before zero - even though there is not even xvalues before zero, I try changing XAxis.MinValue but this had not effect.

  2. Evgenia
    Evgenia avatar
    1396 posts

    Posted 27 May 2011 Link to this post

    Hi Sergio,

    You can control the position of the MarkedZone's Label by customizing the values of the MarkedZone.Label.TextBlock.Position property. You can access these from the Properties window as shown in the picture attached.

    There is no way to hide some of the MajorTicks of the Axes - you can either turn the visibility off for all of them or for none.

    You can control the range of the Axes by the AutoScale property. When turned off you can provide your own MinValue, MaxValue and Step like this:
    this.radChart1.PlotArea.XAxis.AutoScale = false;
    this.radChart1.PlotArea.XAxis.AddRange(1, 10, 1);

    the Telerik team
    Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
  3. DevCraft R3 2016 release webinar banner
Back to Top