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

Manually determine column width

1 Answer 55 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Avi
Top achievements
Rank 1
Avi asked on 07 Jul 2011, 12:11 PM
Hello'

I'm using BarSeriesDefinition chart. is there any way to set thet the column width will not automatically. I  will set them manually.
If I determine the width is 20 pixels then the width of all columns will be at this width size.


   <telerik:RadChart x:Name="ReportChart"
                          ItemsSource="{Binding PaymentsPerTemplateCollection}"
                          Visibility="{Binding IsPaymentsPerTemplateChartVisible,
                                               Converter={StaticResource boolToVisibilityConverter}}">          
            <!--  View  -->
            <telerik:RadChart.DefaultView>
                <telerik:ChartDefaultView>
                    <!--  Title  -->
                    <telerik:ChartDefaultView.ChartTitle>
                        <telerik:ChartTitle Visibility="Collapsed" />
                    </telerik:ChartDefaultView.ChartTitle>


                    <!--  Legend  -->
                    <telerik:ChartDefaultView.ChartLegend>
                        <telerik:ChartLegend Visibility="Collapsed" />
                    </telerik:ChartDefaultView.ChartLegend>
                    <!--  ChartArea  -->
                    <telerik:ChartDefaultView.ChartArea>
                        <telerik:ChartArea LabelFormatBehavior="Scientific">
                            <!--  Axis X  -->
                            <telerik:ChartArea.AxisX>
                                <telerik:AxisX DefaultLabelFormat="n"
                                               IsDateTime="False"
                                               LabelRotationAngle="25">
                                </telerik:AxisX>
                            </telerik:ChartArea.AxisX>
                            <!--  Axis Y  -->
                            <telerik:ChartArea.AxisY>
                                <telerik:AxisY Title="סכום שנפרע"
                                               DefaultLabelFormat="c"
                                               ExtendDirection="None"
                                               Visibility="Collapsed">
                                </telerik:AxisY>
                            </telerik:ChartArea.AxisY>
                        </telerik:ChartArea>
                    </telerik:ChartDefaultView.ChartArea>


                </telerik:ChartDefaultView>
            </telerik:RadChart.DefaultView>


            <telerik:RadChart.SeriesMappings>
                <telerik:SeriesMapping>
                    <telerik:SeriesMapping.SeriesDefinition>
                        <telerik:BarSeriesDefinition ItemLabelFormat="#Y{C0}"
                                                     ItemToolTipFormat="כמות מבוטחים: #IntValue2{0:n}"
                                                     LegendDisplayMode="DataPointLabel"
                                                     ShowItemToolTips="True"
                                                     Visibility="Visible"/>                      
                    <telerik:SeriesMapping.ItemMappings>
                        <telerik:ItemMapping DataPointMember="YValue" FieldName="PaymentAmount" />
                        <telerik:ItemMapping DataPointMember="XCategory" FieldName="IntValue1" />
                    </telerik:SeriesMapping.ItemMappings>
                </telerik:SeriesMapping>
            </telerik:RadChart.SeriesMappings>
        </telerik:RadChart>

Thanks,
Aviv

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 12 Jul 2011, 08:57 AM
Hello Avi,

You can review this help topic which describes how you can manually set the Width of the bars using the ItemWidthPercent property. Also have in mind that you can specify the Width in percents only and not in pixels.

All the best,
Evgenia
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Chart
Asked by
Avi
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or