Probleme size chart

5 posts, 0 answers
  1. GOURVEZ JJ
    GOURVEZ JJ avatar
    55 posts
    Member since:
    Dec 2009

    Posted 16 Mar 2012 Link to this post

    Hi,

    I use chart and I have problem of size.

    My Bars take 2/3 size possible (see file)

    Why ?

    This is my code :

    <Grid.Resources>
    <telerik:SeriesMappingCollection x:Key="VerticalMappings2">
      <telerik:SeriesMapping CollectionIndex="0" LegendLabel="inf. ou égale à 0 jours"  >
                                        <telerik:SeriesMapping.SeriesDefinition>
                                                <telerik:StackedBarSeriesDefinition StackGroupName="Stack1">
                                                    <telerik:StackedBarSeriesDefinition.Appearance>
                                                        <telerik:SeriesAppearanceSettings Foreground="Black">
      
                                                        </telerik:SeriesAppearanceSettings>
                                                    </telerik:StackedBarSeriesDefinition.Appearance>
                                                    <charting:StackedBarSeriesDefinition.LabelSettings>
                                                        <charting:BarLabelSettings Distance="25" LabelDisplayMode="Auto" ShowConnectors="False"   ShowZeroValueLabels="False"/>
                                                    </charting:StackedBarSeriesDefinition.LabelSettings>
                                                </telerik:StackedBarSeriesDefinition>
                                            </telerik:SeriesMapping.SeriesDefinition>
       <telerik:ItemMapping DataPointMember="YValue"  />
        </telerik:SeriesMapping>
        <telerik:SeriesMapping CollectionIndex="1" LegendLabel="compris entre 0 et 2 jours" >
                                        <telerik:SeriesMapping.SeriesDefinition>
                                                <telerik:StackedBarSeriesDefinition StackGroupName="Stack1" >
                                                    <telerik:StackedBarSeriesDefinition.Appearance>
                                                        <telerik:SeriesAppearanceSettings Foreground="Black">
      
                                                        </telerik:SeriesAppearanceSettings>
                                                    </telerik:StackedBarSeriesDefinition.Appearance>
                                                    <charting:StackedBarSeriesDefinition.LabelSettings>
                                                        <charting:BarLabelSettings Distance="25" LabelDisplayMode="Auto" ShowConnectors="False"   ShowZeroValueLabels="False"/>
                                                    </charting:StackedBarSeriesDefinition.LabelSettings>
                                                </telerik:StackedBarSeriesDefinition>
                                            </telerik:SeriesMapping.SeriesDefinition>
                                        <telerik:ItemMapping DataPointMember="YValue" />
                                    </telerik:SeriesMapping>
                                    <telerik:SeriesMapping CollectionIndex="2" LegendLabel="compris entre 2 et 7 jours" >
                                        <telerik:SeriesMapping.SeriesDefinition>
                                                <telerik:StackedBarSeriesDefinition StackGroupName="Stack1" >
                                                    <telerik:StackedBarSeriesDefinition.Appearance>
                                                        <telerik:SeriesAppearanceSettings Foreground="Black">
      
                                                        </telerik:SeriesAppearanceSettings>
                                                    </telerik:StackedBarSeriesDefinition.Appearance>
                                                    <charting:StackedBarSeriesDefinition.LabelSettings> <charting:BarLabelSettings Distance="25" LabelDisplayMode="Auto" ShowConnectors="False"   ShowZeroValueLabels="False"/></charting:StackedBarSeriesDefinition.LabelSettings> </telerik:StackedBarSeriesDefinition>
                                            </telerik:SeriesMapping.SeriesDefinition>
                                        <telerik:ItemMapping DataPointMember="YValue" />
                                    </telerik:SeriesMapping>
                                    <telerik:SeriesMapping CollectionIndex="3" LegendLabel="compris entre 7 et 14 jours" >
                                        <telerik:SeriesMapping.SeriesDefinition>
                                             <telerik:StackedBarSeriesDefinition StackGroupName="Stack1" >
                                                    <telerik:StackedBarSeriesDefinition.Appearance>
                                                        <telerik:SeriesAppearanceSettings Foreground="Black">
      
                                                        </telerik:SeriesAppearanceSettings>
                                                    </telerik:StackedBarSeriesDefinition.Appearance>
                                                    <charting:StackedBarSeriesDefinition.LabelSettings> <charting:BarLabelSettings Distance="25" LabelDisplayMode="Auto" ShowConnectors="False"   ShowZeroValueLabels="False"/></charting:StackedBarSeriesDefinition.LabelSettings> </telerik:StackedBarSeriesDefinition>
                                        </telerik:SeriesMapping.SeriesDefinition>
                                        <telerik:ItemMapping DataPointMember="YValue" />
                                    </telerik:SeriesMapping>
                                    <telerik:SeriesMapping CollectionIndex="4" LegendLabel="compris entre 14 et 21 jours" >
                                        <telerik:SeriesMapping.SeriesDefinition>
                                             <telerik:StackedBarSeriesDefinition StackGroupName="Stack1" >
                                                    <telerik:StackedBarSeriesDefinition.Appearance>
                                                        <telerik:SeriesAppearanceSettings Foreground="Black">
      
                                                        </telerik:SeriesAppearanceSettings>
                                                    </telerik:StackedBarSeriesDefinition.Appearance>
                                                    <charting:StackedBarSeriesDefinition.LabelSettings> <charting:BarLabelSettings Distance="25" LabelDisplayMode="Auto" ShowConnectors="False"   ShowZeroValueLabels="False"/></charting:StackedBarSeriesDefinition.LabelSettings> </telerik:StackedBarSeriesDefinition>
                                        </telerik:SeriesMapping.SeriesDefinition>
                                        <telerik:ItemMapping DataPointMember="YValue" />
                                    </telerik:SeriesMapping>
                                    <telerik:SeriesMapping CollectionIndex="5" LegendLabel="compris entre 21 et 28 jours" >
                                        <telerik:SeriesMapping.SeriesDefinition>
                                             <telerik:StackedBarSeriesDefinition StackGroupName="Stack1" >
                                                    <telerik:StackedBarSeriesDefinition.Appearance>
                                                        <telerik:SeriesAppearanceSettings Foreground="Black">
      
                                                        </telerik:SeriesAppearanceSettings>
                                                    </telerik:StackedBarSeriesDefinition.Appearance>
                                                    <charting:StackedBarSeriesDefinition.LabelSettings> <charting:BarLabelSettings Distance="25" LabelDisplayMode="Auto" ShowConnectors="False"   ShowZeroValueLabels="False"/></charting:StackedBarSeriesDefinition.LabelSettings> </telerik:StackedBarSeriesDefinition>
                                        </telerik:SeriesMapping.SeriesDefinition>
                                        <telerik:ItemMapping DataPointMember="YValue" />
                                    </telerik:SeriesMapping>
                                    <telerik:SeriesMapping CollectionIndex="6" LegendLabel="sup. ou égale à 28 jours" >
                                        <telerik:SeriesMapping.SeriesDefinition>
                                             <telerik:StackedBarSeriesDefinition StackGroupName="Stack1" >
                                                    <telerik:StackedBarSeriesDefinition.Appearance>
                                                        <telerik:SeriesAppearanceSettings Foreground="Black">
      
                                                        </telerik:SeriesAppearanceSettings>
                                                    </telerik:StackedBarSeriesDefinition.Appearance>
                                                    <charting:StackedBarSeriesDefinition.LabelSettings> <charting:BarLabelSettings Distance="25" LabelDisplayMode="Auto" ShowConnectors="False"   ShowZeroValueLabels="False"/></charting:StackedBarSeriesDefinition.LabelSettings> </telerik:StackedBarSeriesDefinition>
                                        </telerik:SeriesMapping.SeriesDefinition>
                                        <telerik:ItemMapping DataPointMember="YValue" />
                                    </telerik:SeriesMapping>
                                </telerik:SeriesMappingCollection>
                                <telerik:SeriesMappingCollection x:Key="VerticalMappings">
                                    <telerik:SeriesMapping CollectionIndex="0" LegendLabel="inf. ou égale à 0 jours"  >
                                        <telerik:SeriesMapping.SeriesDefinition>
                                                <telerik:StackedBarSeriesDefinition StackGroupName="Stack1">
                                                    <telerik:StackedBarSeriesDefinition.Appearance>
                                                        <telerik:SeriesAppearanceSettings Foreground="Black">
      
                                                        </telerik:SeriesAppearanceSettings>
                                                    </telerik:StackedBarSeriesDefinition.Appearance>
                                                </telerik:StackedBarSeriesDefinition>
                                            </telerik:SeriesMapping.SeriesDefinition>
                                        <telerik:ItemMapping DataPointMember="YValue"  />
                                    </telerik:SeriesMapping>
                                    <telerik:SeriesMapping CollectionIndex="1" LegendLabel="compris entre 0 et 2 jours" >
                                        <telerik:SeriesMapping.SeriesDefinition>
                                             <telerik:StackedBarSeriesDefinition StackGroupName="Stack1" >
                                                    <telerik:StackedBarSeriesDefinition.Appearance>
                                                        <telerik:SeriesAppearanceSettings Foreground="Black">
      
                                                        </telerik:SeriesAppearanceSettings>
                                                    </telerik:StackedBarSeriesDefinition.Appearance>
                                                    <charting:StackedBarSeriesDefinition.LabelSettings> <charting:BarLabelSettings Distance="25" LabelDisplayMode="Auto" ShowConnectors="False"   ShowZeroValueLabels="False"/></charting:StackedBarSeriesDefinition.LabelSettings> </telerik:StackedBarSeriesDefinition>
                                        </telerik:SeriesMapping.SeriesDefinition>
                                        <telerik:ItemMapping DataPointMember="YValue" />
                                    </telerik:SeriesMapping>
                                    <telerik:SeriesMapping CollectionIndex="2" LegendLabel="compris entre 2 et 7 jours" >
                                        <telerik:SeriesMapping.SeriesDefinition>
                                             <telerik:StackedBarSeriesDefinition StackGroupName="Stack1" >
                                                    <telerik:StackedBarSeriesDefinition.Appearance>
                                                        <telerik:SeriesAppearanceSettings Foreground="Black">
      
                                                        </telerik:SeriesAppearanceSettings>
                                                    </telerik:StackedBarSeriesDefinition.Appearance>
                                                    <charting:StackedBarSeriesDefinition.LabelSettings> <charting:BarLabelSettings Distance="25" LabelDisplayMode="Auto" ShowConnectors="False"   ShowZeroValueLabels="False"/></charting:StackedBarSeriesDefinition.LabelSettings> </telerik:StackedBarSeriesDefinition>
                                        </telerik:SeriesMapping.SeriesDefinition>
                                        <telerik:ItemMapping DataPointMember="YValue" />
                                    </telerik:SeriesMapping>
                                    <telerik:SeriesMapping CollectionIndex="3" LegendLabel="compris entre 7 et 14 jours" >
                                        <telerik:SeriesMapping.SeriesDefinition>
                                             <telerik:StackedBarSeriesDefinition StackGroupName="Stack1" >
                                                    <telerik:StackedBarSeriesDefinition.Appearance>
                                                        <telerik:SeriesAppearanceSettings Foreground="Black">
      
                                                        </telerik:SeriesAppearanceSettings>
                                                    </telerik:StackedBarSeriesDefinition.Appearance>
                                                    <charting:StackedBarSeriesDefinition.LabelSettings> <charting:BarLabelSettings Distance="25" LabelDisplayMode="Auto" ShowConnectors="False"   ShowZeroValueLabels="False"/></charting:StackedBarSeriesDefinition.LabelSettings> </telerik:StackedBarSeriesDefinition>
                                        </telerik:SeriesMapping.SeriesDefinition>
                                        <telerik:ItemMapping DataPointMember="YValue" />
                                    </telerik:SeriesMapping>
                                    <telerik:SeriesMapping CollectionIndex="4" LegendLabel="compris entre 14 et 21 jours" >
                                        <telerik:SeriesMapping.SeriesDefinition>
                                             <telerik:StackedBarSeriesDefinition StackGroupName="Stack1" >
                                                    <telerik:StackedBarSeriesDefinition.Appearance>
                                                        <telerik:SeriesAppearanceSettings Foreground="Black">
      
                                                        </telerik:SeriesAppearanceSettings>
                                                    </telerik:StackedBarSeriesDefinition.Appearance>
                                                    <charting:StackedBarSeriesDefinition.LabelSettings> <charting:BarLabelSettings Distance="25" LabelDisplayMode="Auto" ShowConnectors="False"   ShowZeroValueLabels="False"/></charting:StackedBarSeriesDefinition.LabelSettings> </telerik:StackedBarSeriesDefinition>
                                        </telerik:SeriesMapping.SeriesDefinition>
                                        <telerik:ItemMapping DataPointMember="YValue" />
                                    </telerik:SeriesMapping>
                                    <telerik:SeriesMapping CollectionIndex="5" LegendLabel="compris entre 21 et 28 jours" >
                                        <telerik:SeriesMapping.SeriesDefinition>
                                             <telerik:StackedBarSeriesDefinition StackGroupName="Stack1" >
                                                    <telerik:StackedBarSeriesDefinition.Appearance>
                                                        <telerik:SeriesAppearanceSettings Foreground="Black">
      
                                                        </telerik:SeriesAppearanceSettings>
                                                    </telerik:StackedBarSeriesDefinition.Appearance>
                                                    <charting:StackedBarSeriesDefinition.LabelSettings> <charting:BarLabelSettings Distance="25" LabelDisplayMode="Auto" ShowConnectors="False"   ShowZeroValueLabels="False"/></charting:StackedBarSeriesDefinition.LabelSettings> </telerik:StackedBarSeriesDefinition>
                                        </telerik:SeriesMapping.SeriesDefinition>
                                        <telerik:ItemMapping DataPointMember="YValue" />
                                    </telerik:SeriesMapping>
                                    <telerik:SeriesMapping CollectionIndex="6" LegendLabel="sup. ou égale à 28 jours" >
                                        <telerik:SeriesMapping.SeriesDefinition>
                                             <telerik:StackedBarSeriesDefinition StackGroupName="Stack1" >
                                                    <telerik:StackedBarSeriesDefinition.Appearance>
                                                        <telerik:SeriesAppearanceSettings Foreground="Black">
      
                                                        </telerik:SeriesAppearanceSettings>
                                                    </telerik:StackedBarSeriesDefinition.Appearance>
    <charting:StackedBarSeriesDefinition.LabelSettings> <charting:BarLabelSettings Distance="25" LabelDisplayMode="Auto" ShowConnectors="False"   ShowZeroValueLabels="False"/></charting:StackedBarSeriesDefinition.LabelSettings> </telerik:StackedBarSeriesDefinition>
                                        </telerik:SeriesMapping.SeriesDefinition>
                                        <telerik:ItemMapping DataPointMember="YValue" />
                                    </telerik:SeriesMapping>
                                </telerik:SeriesMappingCollection>
                            </Grid.Resources>

    And for my chart :

    <telerik:RadChart x:Name="RadADVLancementBE" Grid.Row="0" SeriesMappings="{StaticResource VerticalMappings2}" telerik:Theming.Theme="Office_Blue" VerticalAlignment="Top" HorizontalAlignment="Left" Width="90" >
      
                                <telerik:RadChart.DefaultView>
                                    <telerik:ChartDefaultView>
                                        <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>

    Thanks
  2. GOURVEZ JJ
    GOURVEZ JJ avatar
    55 posts
    Member since:
    Dec 2009

    Posted 19 Mar 2012 Link to this post

    nobody ?
  3. DevCraft banner
  4. Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 19 Mar 2012 Link to this post

    Hello,

    If you want the chart series to fill the whole available range, you should use StackedBar100 series.  They show the combined contribution of values as percentages where the combined total for each category is 100 percent.

    All the best,
    Evgenia
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  5. GOURVEZ JJ
    GOURVEZ JJ avatar
    55 posts
    Member since:
    Dec 2009

    Posted 19 Mar 2012 Link to this post

    Hi,

    thanks for your answer.
    But I can't choose StackedBar100 , because my customer refused.

    I must use Stack Bar

    Thanks
  6. Evgenia
    Admin
    Evgenia avatar
    1406 posts

    Posted 20 Mar 2012 Link to this post

    Hi Gourvez,

    Why don't you provide a custom Yaxis range then? Knowing the Max value for your last bar series added, you may set the MaxValue of the YAxis to be that value. Have in mind that the AutoRange property should be set to false for your manual range to be applied. More information about this can be found in our online documentation.
    If you want to keep the automatic range of the YAxis then I would suggest that you set its ExtendDirection property to None. This way your axis won't be extended. You may read more about the property here.

    Kind regards,
    Evgenia
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top
DevCraft banner