Radchart Xaxis textblock default text

Thread is closed for posting
2 posts, 0 answers
  1. Sebastian Hermosilla
    Sebastian Hermosilla avatar
    1 posts
    Member since:
    Jul 2009

    Posted 07 Oct 2009 Link to this post

    Hello
    I have a chart wich in his xaxis textblok have dates,
    I need this, when a date haven't data the xaxis texblock it display nothing.
    I dont want use this
    RadChart1.PlotArea.XAxis[3].TextBlock.Text = " ";
    because the chart will have a lots of days (200 to 300) with empty values.
    I need to know if there is a way to define a default value for the empty values.

    Help please.


    protected void Page_Load(object sender, EventArgs e) 
        { 
            if (!Page.IsPostBack) 
            { 
                RadChart1.PlotArea.XAxis.AutoScale = false
                RadChart1.PlotArea.XAxis.AddRange(1, 7, 1); 
                 
                RadChart1.PlotArea.XAxis[0].TextBlock.Text = "lun"
                RadChart1.PlotArea.XAxis[1].TextBlock.Text = "mar"
                RadChart1.PlotArea.XAxis[2].TextBlock.Text = "mie"
                //RadChart1.PlotArea.XAxis[3].TextBlock.Text = " "; 
                //RadChart1.PlotArea.XAxis[4].TextBlock.Text = " "; 
                RadChart1.PlotArea.XAxis[5].TextBlock.Text = "sab"
                RadChart1.PlotArea.XAxis[6].TextBlock.Text = " "
     
      
     
                RadChart1.Series[0].Items.Add(new Telerik.Charting.ChartSeriesItem(1,0.1)); 
                RadChart1.Series[0].Items.Add(new Telerik.Charting.ChartSeriesItem(2,0.3)); 
                RadChart1.Series[0].Items.Add(new Telerik.Charting.ChartSeriesItem(3,1)); 
                RadChart1.Series[0].Items.Add(new Telerik.Charting.ChartSeriesItem(6,0.3)); 
       
     
            } 

  2. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 08 Oct 2009 Link to this post

    Since you have defined a range between 1 and 7, you really don't have any empty values - there will always be a value there. You would probably have to define this manually as you are doing in the commented section since you are doing it from the code-behind.
Back to Top