This is a migrated thread and some comments may be shown as answers.

XAxis.AutoScale = false makes problem.

2 Answers 110 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Oh Sangho
Top achievements
Rank 1
Oh Sangho asked on 20 Apr 2010, 11:24 AM

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 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 23 Apr 2010, 09:15 AM
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.
0
Oh Sangho
Top achievements
Rank 1
answered on 23 Apr 2010, 11:44 AM
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.
Tags
Chart (Obsolete)
Asked by
Oh Sangho
Top achievements
Rank 1
Answers by
Ves
Telerik team
Oh Sangho
Top achievements
Rank 1
Share this question
or