XAxis.AutoScale = false makes problem.

Thread is closed for posting
3 posts, 0 answers
  1. Oh Sangho
    Oh Sangho avatar
    4 posts
    Member since:
    Apr 2010

    Posted 20 Apr 2010 Link to this post


    Please try this.


    .aspx

    <telerik:RadChart ID="RadChart1" runat="server" Width="700" />
    <telerik:RadChart ID="RadChart2" runat="server" Width="700" />
               





    .aspx.cs

        protected void Page_Load(object sender, EventArgs e)
        {
            int seriescnt = 15;
            DataTable dt = new DataTable();
            Random rand = new Random();

            for (int i = 0; i < seriescnt; i++)
            {
                dt.Columns.Add("Data" + i.ToString(), typeof(int));
            }

            DataRow dr = dt.NewRow();
            for (int j = 0; j < 4; j++)
            {
                dr = dt.NewRow();
                for (int i = 0; i < seriescnt; i++)
                {
                    dr[i] = rand.Next(100);
                }

                dt.Rows.Add(dr);
            }

            // RadChart1
            RadChart1.DataSource = dt;
            RadChart1.DataBind();
            RadChart1.AutoLayout = true;

            for (int i = 0; i < seriescnt; i++)
            {
                RadChart1.Series[i].Type = ChartSeriesType.Line;
                RadChart1.Series[i].Appearance.PointMark.Visible = true;
                RadChart1.Series[i].Appearance.PointMark.FillStyle.MainColor = RadChart1.Series[i].Appearance.FillStyle.MainColor;
                RadChart1.Series[i].Appearance.PointMark.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid;
            }
            
            RadChart1.PlotArea.XAxis.Step = 1;
            RadChart1.PlotArea.XAxis.AutoScale = true;
            RadChart1.ChartTitle.TextBlock.Text = "AutoScale = true";

            RadChart1.Skin = "LightGreen";



            // RadChart2
            RadChart2.DataSource = dt;
            RadChart2.DataBind();
            RadChart2.AutoLayout = true;

            for (int i = 0; i < seriescnt; i++)
            {
                RadChart2.Series[i].Type = ChartSeriesType.Line;
                RadChart2.Series[i].Appearance.PointMark.Visible = true;
                RadChart2.Series[i].Appearance.PointMark.FillStyle.MainColor = RadChart2.Series[i].Appearance.FillStyle.MainColor;
                RadChart2.Series[i].Appearance.PointMark.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid;
            }

            RadChart2.PlotArea.XAxis.Step = 1;
            RadChart2.PlotArea.XAxis.AutoScale = false;
            RadChart2.ChartTitle.TextBlock.Text = "AutoScale = false";
        }




    Q1. PointMark depends on the chart's skin. You can find some PointMarks on Chart1, but nothing in Chart2. Why?
    Q2. Why are the PointMarks from 8th series to the last series in Chart1 invisible?
    Q3. What is wrong with the X-axis of the second chart?


    I need help.
    Thank you.

    Alex.





                               

  2. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 23 Apr 2010 Link to this post

    Hello Alex,

    When setting AutoScale to false, you need to provide values for MinValue, MaxValue and Step properties manually.

    Sincerely,
    Ves
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Oh Sangho
    Oh Sangho avatar
    4 posts
    Member since:
    Apr 2010

    Posted 23 Apr 2010 Link to this post

    Thanks for your comment.

    But still the PointMark doesn't work.


    I spent a week just for one chart, because of these problems, but they are still unsolved.



    Thanks a lot.

    Alex.
Back to Top