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

[Solved] Bar chart with date x-axis

2 Answers 100 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.
Andy Macourek
Top achievements
Rank 1
Andy Macourek asked on 09 Nov 2012, 03:03 PM
I have seen plenty of examples with bar charts using a category x-axis.  I started with a line chart with a date x-axis and I wanted to make it into a column chart.  I changed the series from Line to Bar and all of the bars are wide and overlapping.  What property do I use to make the items skinny columns?

2 Answers, 1 is accepted

Sort by
0
Andy Macourek
Top achievements
Rank 1
answered on 09 Nov 2012, 04:15 PM
I figured it out.  I changed the border width in the data template.
<telerik:BarSeries.PointTemplate>
    <DataTemplate>
        <Border Width="5">
            <Border.Background>
                <SolidColorBrush Color="CornflowerBlue" />
            </Border.Background>
        </Border>
    </DataTemplate>
</telerik:BarSeries.PointTemplate>
0
Ivaylo Gergov
Telerik team
answered on 12 Nov 2012, 03:41 PM
Hello, Andy 

I am glad to know that you figured out a solution.

There is yet another way to alter the width of the generated Bars and this may be achieved by using the GapLength property of the Date-time axis. The property works in logical units within the [0,1] range.

Do not hesitate to write us back in case you have other question/problem with our tools.

Regards,
Ivaylo Gergov
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
Chart for XAML
Asked by
Andy Macourek
Top achievements
Rank 1
Answers by
Andy Macourek
Top achievements
Rank 1
Ivaylo Gergov
Telerik team
Share this question
or