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

[Solved] Autorange not working with splinerangeseries

1 Answer 94 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Lars-Erik
Top achievements
Rank 1
Lars-Erik asked on 26 Aug 2011, 08:11 AM

Hi! I'm using the splinerange series and would like to take control over the rendering by setting max/min values and the autorange property to "off" but when doing so the chart renders only the yaxis and the xaxix remains at the beginning of the chart, ie. very narrow.
Here's the code..

 

 

 

 

<telerik:RadChart x:Name="MenuRadChart2" ItemsSource="{Binding Path=TraceData}" IsHitTestVisible="False" Background="Transparent" Width="490" Margin="18, 50,0,0" Height="260" HorizontalAlignment="Left" VerticalAlignment="Top" Style="{StaticResource MenuRadChartStyle}">

 

<telerik:RadChart.SeriesMappings>

<telerik:SeriesMapping ChartAreaName="1">

<telerik:SeriesMapping.SeriesDefinition>

<telerik:RangeSeriesDefinition ShowPointMarks="False" ShowItemLabels="False" ShowItemToolTips="False" />

</telerik:SeriesMapping.SeriesDefinition>

<telerik:SeriesMapping.ItemMappings>

<telerik:ItemMapping FieldName="TraceHigh" DataPointMember="High" />

<telerik:ItemMapping FieldName="TraceLow" DataPointMember="Low" />

</telerik:SeriesMapping.ItemMappings>

</telerik:SeriesMapping>

</telerik:RadChart.SeriesMappings>

<telerik:RadChart.DefaultView>

<telerik:ChartDefaultView>

<telerik:ChartDefaultView.ChartArea>

<telerik:ChartArea NoDataString="Waiting for data..." EnableAnimations="True" Style="{StaticResource RadChartAreaStyle}" >

<telerik:ChartArea.SeriesStyles>

<telerik:SeriesStyles SplineSeriesStyle="{StaticResource SplineAreaStyle}" LineSeriesStyle="{StaticResource SplineAreaStyle}"/>

</telerik:ChartArea.SeriesStyles>

<telerik:ChartArea.Annotations>

<telerik:CustomGridLine Visibility="Collapsed"/>

</telerik:ChartArea.Annotations>

<telerik:ChartArea.AxisX>

<telerik:AxisX StripLinesVisibility="Collapsed" AutoRange="false" MaxValue="200" MinValue="0">

</telerik:AxisX>

</telerik:ChartArea.AxisX>

<telerik:ChartArea.AxisY>

<telerik:AxisY StripLinesVisibility="Collapsed" AutoRange="false" MaxValue="100" MinValue="0"/>

</telerik:ChartArea.AxisY>

</telerik:ChartArea>

</telerik:ChartDefaultView.ChartArea>

<telerik:ChartDefaultView.ChartLegend>

<telerik:ChartLegend Visibility="Collapsed" />

</telerik:ChartDefaultView.ChartLegend>

<telerik:ChartDefaultView.ChartTitle>

<telerik:ChartTitle Visibility="Collapsed" />

</telerik:ChartDefaultView.ChartTitle>

</telerik:ChartDefaultView>

</telerik:RadChart.DefaultView>

</telerik:RadChart>

 

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 31 Aug 2011, 07:55 AM
Hi Lars-Erik,

It appears that you have missed setting a value for Step when setting the manual axis range, which may be the cause for the faulty behavior. Please, have a look at the attached sample application, which is created based on your code snippet ( bar the styles ). It works as expected on our side using both Range and Splinerange series, as well as with AutoRange set to true and false.

Hope this helps.

All the best,
Nikolay
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Chart
Asked by
Lars-Erik
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or