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

Chart beginner

1 Answer 43 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Boaz Sadeghi
Top achievements
Rank 1
Boaz Sadeghi asked on 25 Apr 2010, 01:18 AM
Hi,

I am new to Telerik chart. Actually downloaded the wpf controls to try before purchasing. I have added the following
XAML:

 

 

<GroupBox Style="{DynamicResource NoTitledGroupBox}" Grid.Row="1" Margin="20,5,20,20">

 

 

 

     <telerikChart:RadChart x:Name="RadChart1">

 

 

 

     </telerikChart:RadChart>

 

 

 

</GroupBox>

 


Code:

RadChart1.DefaultView.ChartArea.AxisX.DefaultLabelFormat =

"{0:F2}"

 

RadChart1.DefaultView.ChartArea.AxisX.MaxValue = 1000

RadChart1.DefaultView.ChartArea.AxisX.MinValue = 0

RadChart1.DefaultView.ChartArea.AxisX.[Step] = 100.0

RadChart1.DefaultView.ChartArea.AxisY.ExtendDirection = AxisExtendDirection.Smart

RadChart1.DefaultView.ChartArea.AxisX.Step = 100.0

RadChart1.DefaultView.ChartArea.AxisY.Title =

"Head"

 

RadChart1.DefaultView.ChartArea.AxisX.Title =

"GPM"

 

 

'RadChart1.DefaultView.ChartArea.AxisY.AxisStyles.TitleStyle = TryCast(Resources("CustomAxisTitleStyle"), Style)

 

 

Dim dsSeries As DataSeries = GenerateSeries(obj.getAdjustedHeadCalc, obj.getAdjustedCapacity)

 

dsSeries.LegendLabel =

"Head"

 

dsSeries.Definition =

New LineSeriesDefinition

 

RadChart1.DefaultView.ChartArea.DataSeries.Add(dsSeries)

I have about 17 points. The YAxis draws the labels fine but I see some missing tick marks. I want 10 ticks on the XAxis but it keeps drawing 17 ticks and the labels are all messed up. Is there anything I am doing wrong?

I have attached the produced chart with the above code.

Regards,
Boaz

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 28 Apr 2010, 01:08 PM
Hi Boaz Sadeghi,

When you need to provide your own values for MinValue, MaxValue and Step properties for the chart axes, you need to set the AutoRange property to false before that.

Regards,
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.
Tags
Chart
Asked by
Boaz Sadeghi
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or