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

RedChart and ChartSeries

3 Answers 38 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Munish
Top achievements
Rank 1
Munish asked on 25 Jun 2012, 10:25 AM
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..

3 Answers, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 26 Jun 2012, 08:56 AM
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.
0
Munish
Top achievements
Rank 1
answered on 26 Jun 2012, 11:20 AM
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.

0
Accepted
Peshito
Telerik team
answered on 27 Jun 2012, 11:23 AM
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.
Tags
Chart (Obsolete)
Asked by
Munish
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Munish
Top achievements
Rank 1
Share this question
or