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

[Solved] Barchnart Newbie Question: How to have multiple bars bound to different values?

1 Answer 97 Views
Chart for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Paul
Top achievements
Rank 1
Paul asked on 23 Oct 2012, 06:46 PM
Good day!
I'm making a Windows Store app and wish to display data with one of your charts.

In this case I have a List collection of Payment objects which includes the Properties: Month, Principle, Interest

I have the chart series bound to my collection but am only seeing one bar.

How do I have one bar that shows the Principle amount and then next to it the Interest amount?

See XAML below 

Thanks,
Paul

 

 

<telerik:RadCartesianChart Name="Chart" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="624" PaletteName="DefaultDark" SelectionPaletteName="DefaultDarkSelected">
    <telerik:RadCartesianChart.Grid>
        <telerik:CartesianChartGrid MajorLinesVisibility="Y"></telerik:CartesianChartGrid>
    </telerik:RadCartesianChart.Grid>
    <telerik:RadCartesianChart.VerticalAxis>
        <telerik:LinearAxis ></telerik:LinearAxis>
    </telerik:RadCartesianChart.VerticalAxis>
    <telerik:RadCartesianChart.HorizontalAxis>
        <telerik:DateTimeCategoricalAxis DateTimeComponent="Month" LabelFormat="{}{0,0:MMM}" ></telerik:DateTimeCategoricalAxis>
    </telerik:RadCartesianChart.HorizontalAxis>
    <telerik:RadCartesianChart.Series>
        <telerik:BarSeries CombineMode="Cluster">
            <telerik:BarSeries.ValueBinding>
                <telerik:PropertyNameDataPointBinding PropertyName="Interest"></telerik:PropertyNameDataPointBinding>
            </telerik:BarSeries.ValueBinding>
            <telerik:BarSeries.CategoryBinding>
                <telerik:PropertyNameDataPointBinding PropertyName="Month"></telerik:PropertyNameDataPointBinding>
            </telerik:BarSeries.CategoryBinding>
        </telerik:BarSeries>
        <telerik:BarSeries CombineMode="Cluster">
            <telerik:BarSeries.ValueBinding>
                <telerik:PropertyNameDataPointBinding PropertyName="Principle"></telerik:PropertyNameDataPointBinding>
            </telerik:BarSeries.ValueBinding>
            <telerik:BarSeries.CategoryBinding>
                <telerik:PropertyNameDataPointBinding PropertyName="Month"></telerik:PropertyNameDataPointBinding>
            </telerik:BarSeries.CategoryBinding>
        </telerik:BarSeries>
    </telerik:RadCartesianChart.Series>
</telerik:RadCartesianChart>

1 Answer, 1 is accepted

Sort by
0
Ivaylo Gergov
Telerik team
answered on 24 Oct 2012, 04:32 PM
Hello,Paul

Thank you for using our RadControls for Windows8!

I have prepared a sample project using your XAML code which you can see in the attached file. Please compare your project with this example and see if there's a mistake with the current logic or a bug.

I am looking forward to your reply.

 

All the best,
Ivaylo Gergov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Chart for XAML
Asked by
Paul
Top achievements
Rank 1
Answers by
Ivaylo Gergov
Telerik team
Share this question
or