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

Hide Y-Axis labels

1 Answer 65 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Manishkumar
Top achievements
Rank 1
Manishkumar asked on 01 Nov 2011, 08:35 AM

 

Hi,

I have bar chart with  Y-Axis having range from 0 to 100. On the same chartarea I have one more Y-Axis(right hand side) having range from -100 to 100 in the step of 50. i want to make -100, -50 label values invisible so that 0 starts in the middle of the Y-axis.  I am using this Y-Axis for showing line chart but while assigning I am giving value as minmumvalue = -1.00,MaxValue = 1.10,step as 0.5. Please help me achieve this.
as we have Go Live on 2/11/11
Here is the sample code I have tried to achive this
 

radchartarea.AdditionalYAxes.Add(axisy);

radchartarea.AdditionalYAxes[0].AutoRange =

 

false;

 

radchartarea.AdditionalYAxes[0].AddRange(-_intMaxValYAxisSec, _intMaxValYAxisSec + 0.10, (_intMaxValYAxisSec * 2) / 4);

radchartarea.AdditionalYAxes[0].PlotAreaAxisVisibility =

 

Visibility.Collapsed;

 

radchartarea.AdditionalYAxes[0].DefaultLabelFormat =

 

"#VAL{P0}";

 



Here We are adding the additional Y -Axis --axisY. And after that we are making te value of lable as Blank.

 

 

foreach (TickPoint point in radchartarea.AdditionalYAxes[0].TickPoints)

 

{

 

 

if (point.Value < 0)

 

{

point.Label =  " ";

 

}

}

If Give the minvalue as -100,Maxvalue as 100,Step as 50 then the above solution with for loop works.
But if I give the value as  minvalue as -1.10,Maxvalue as 1.10,Step as 0.5  then it does not work with above solution and not able to hide the values can you please Provide me the solution ASAP.

Please provide solution ASAP 

1 Answer, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 03 Nov 2011, 04:33 PM
Hello Manishkumar,

You can review my answer in the other thread you have started here:
http://www.telerik.com/community/forums/wpf/chart/hide-y-axis-labels.aspx

Please, keep the discussion in a single thread, as it would be easier for both sides to follow.

Greetings,
Peshito
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Chart
Asked by
Manishkumar
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Share this question
or