Filltype not solid when adding item with colour

Thread is closed for posting
3 posts, 0 answers
  1. david mills
    david mills avatar
    5 posts
    Member since:
    May 2010

    Posted 08 Jun 2010 Link to this post

    Hi

    I have a page where I am adding the items programmatically and specifying the colour of the bar. This works fine except that the FillType="Solid" specified in my ascx seems to be overidden and the bars fade with a gradient.

    ascx:
     <telerik:RadChart ID="crtResults" runat="server"  SeriesOrientation="Horizontal" SkinsOverrideStyles="false" 
                OnItemDataBound="crtResults_ItemDataBound" AutoLayout="true"
                <ChartTitle> 
                    <TextBlock Text="Title"
                    </TextBlock> 
                </ChartTitle> 
                <Series> 
                    <telerik:ChartSeries Name="Series" Type="Bar" > 
                        <Appearance LegendDisplayMode="Nothing" > 
                        <Border Visible="false"/> 
                        <FillStyle FillType="Solid" MainColor="White"></FillStyle> 
                        <LabelAppearance Visible="false" ></LabelAppearance></Appearance> 
                       
                    </telerik:ChartSeries> 
                </Series> 
            </telerik:RadChart> 
     then adding items in code-behind:
     crtResults.Series[0].AddItem(1, "label", Color.Red);  

    If I remove the Color param in the code, all bars display a solid white.

    Thanks


  2. david mills
    david mills avatar
    5 posts
    Member since:
    May 2010

    Posted 08 Jun 2010 Link to this post

    I've also tried setting the fill type programmatically on the item databound event:
    e.SeriesItem.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid; 

    Still showing as fading bar
  3. david mills
    david mills avatar
    5 posts
    Member since:
    May 2010

    Posted 08 Jun 2010 Link to this post

    For anyone who cares....

    It looks like if you add items to the chart in the code behind and specify the colour, the FillType in the ascx is not pulled through.

    This code solves my problem;
    ChartSeriesItem newItem = new ChartSeriesItem(1, "label", Color.Red); 
    newItem.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid; 




    Simple really, but something that could be addressed or explained?
Back to Top