RedChart and ChartSeries

Thread is closed for posting
4 posts, 1 answers
  1. Munish
    Munish avatar
    13 posts
    Member since:
    Jul 2012

    Posted 25 Jun 2012 Link to this post

    Any one can help me to apply vertical style on Chart Series in RedChart. As i want to show x axis item vertically in positive direction
    My Sample Code :

          ChartSeries pSeries = new ChartSeries();
                
              //radBarGraph.SeriesOrientation = Telerik.Charting.ChartSeriesOrientation.Vertical;
                int iCount = 5;
                radChart.PlotArea.XAxis.AutoScale = false;
                radChart.PlotArea.XAxis.Items.Clear();
                for (int i = 0; i < iCount; i++)
                {
                
                    // Add a new item  
                    pSeries.AddItem((double)i * 12, "Jan");
                    radChart.PlotArea.XAxis.Items.Add(new ChartAxisItem("R"+Convert.ToString(iCount - i)));
                    //pSeries.AddItem((double)i * 2, Convert.ToString(i * 2));
                    //radChart.PlotArea.XAxis.Items.Add(new ChartAxisItem(Convert.ToString(iCount - i)));
                }

                radChart.Series.Add(pSeries);


    Here "Jan" value show horizontally but i want to show it Vertically



    Please Suggest..
  2. Peshito
    Admin
    Peshito avatar
    497 posts

    Posted 26 Jun 2012 Link to this post

    Hello,

    You can achieve this by rotating the series items labels like this:
    series1.Appearance.LabelAppearance.RotationAngle = 90;
    Hope this helps.

    All the best,
    Peshito
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Munish
    Munish avatar
    13 posts
    Member since:
    Jul 2012

    Posted 26 Jun 2012 Link to this post

    thanks for this. it works.

    my x-axis and y-axis header text is not visible fully. how to arrange it .
    below is the screenshot for same.

  5. Answer
    Peshito
    Admin
    Peshito avatar
    497 posts

    Posted 27 Jun 2012 Link to this post

    Hello Munish,

    I am glad that the offered solution worked.

    Regarding your other question, you can try setting a margin to your plot area like this:
    RadChart1.PlotArea.Appearance.Dimensions.Margins = new Telerik.Charting.Styles.ChartMargins(0, 0, 10, 10);
    You should note that chart's AutoLayout property should be set to false.

    Hope this helps.

    Regards,
    Peshito
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top