Hi All,
I have a problem where I have gone mad about a solution in the last hours. I have a RadChart with two Y-axis and on the X-Axis I would like to see string labels instead of numbers, but I always see the numbers...
My XAML is the following:
<telerik:RadChart ItemsSource="{Binding Chart2Data}" x:Name="chart2" >
<telerik:RadChart.SamplingSettings>
<telerik:SamplingSettings SamplingThreshold="240" />
</telerik:RadChart.SamplingSettings>
<telerik:RadChart.SeriesMappings>
<telerik:SeriesMapping LegendLabel="{x:Static p:Resources.Report_MaskingTrail}" >
<telerik:SeriesMapping.SeriesDefinition>
<telerik:LineSeriesDefinition ShowItemLabels="False" ShowPointMarks="False" ShowItemToolTips="False" />
</telerik:SeriesMapping.SeriesDefinition>
<telerik:SeriesMapping.ItemMappings>
<telerik:ItemMapping DataPointMember="YValue" FieldName="Y2" />
<telerik:ItemMapping FieldName="XLabel" DataPointMember="XCategory" />
</telerik:SeriesMapping.ItemMappings>
</telerik:SeriesMapping>
<telerik:SeriesMapping LegendLabel="{x:Static p:Resources.Report_CoreLoudness}" >
<telerik:SeriesMapping.SeriesDefinition>
<telerik:LineSeriesDefinition ShowItemLabels="False" ShowPointMarks="False" ShowItemToolTips="False" />
</telerik:SeriesMapping.SeriesDefinition>
<telerik:SeriesMapping.ItemMappings>
<telerik:ItemMapping DataPointMember="YValue" FieldName="Y1" />
<telerik:ItemMapping FieldName="XLabel" DataPointMember="XCategory" />
</telerik:SeriesMapping.ItemMappings>
</telerik:SeriesMapping>
</telerik:RadChart.SeriesMappings>
<telerik:RadChart.DefaultView>
<telerik:ChartDefaultView >
<telerik:ChartDefaultView.ChartArea>
<telerik:ChartArea LegendName="legendLive"
NoDataString="{x:Static p:Resources.NoMeasurementData}"
EnableAnimations="False">
<telerik:ChartArea.AxisX>
<telerik:AxisX AutoRange="true" LabelRotationAngle="270" />
</telerik:ChartArea.AxisX>
<telerik:ChartArea.AxisY>
<telerik:AxisY AutoRange="{Binding Path=Configuration.Chart2ManualConfiguration1, Converter={StaticResource inverseBooleanConverter}}"
MinValue="{Binding Path=Configuration.Chart2Minimum1}"
MaxValue="{Binding Path=Configuration.Chart2Maximum1}"
Step="{Binding Path=Configuration.Chart2YStep1}"
Title="{x:Static p:Resources.Chart2_Series_Title}">
<telerik:AxisY.AxisStyles>
<telerik:AxisStyles AxisLineStyle="{StaticResource AxisLineStyle}"
TickLineStyle="{StaticResource MajorTickLineStyle}"
MinorTickLineStyle="{StaticResource MinorTickLineStyle}"
ItemLabelStyle="{StaticResource CustomLabel}" />
</telerik:AxisY.AxisStyles>
</telerik:AxisY>
</telerik:ChartArea.AxisY>
</telerik:ChartArea>
</telerik:ChartDefaultView.ChartArea>
<telerik:ChartDefaultView.ChartLegend>
<telerik:ChartLegend x:Name="legendLive"
Header="{x:Static p:Resources.ChartLegend}"
LegendItemStyle="{StaticResource CustomLegendItem}"
Visibility="Collapsed"
/>
</telerik:ChartDefaultView.ChartLegend>
</telerik:ChartDefaultView>
</telerik:RadChart.DefaultView>
</telerik:RadChart>
The data class has four properties:
X => The counter of the value, not bound the the chart
XLabel => a string which should be visible in the X-Axis
Y1, Y2 => The values for the two Y-axis.
Can someone explain to me what I am doing wrong?
Thanks,
Chris